help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] fixing the value of a variable


From: gesitos
Subject: [Help-glpk] fixing the value of a variable
Date: Thu, 4 Jan 2007 17:47:48 -0600

Hello,
I have a linear program which works fine with variables and fixed
parameters. But I want to fix values of some variables for testing
purposes.

More specifically, I have a set of variables and constraints in my
model file:
set x;
var vars{x};
subject to constraint1{i in x}:
   vars[i] ... ;

And data file defines the members of the set.
set x := x1 x2;

This works fine, but I want to assign a constant to vars[x1] and see the
output of the program and its effect on the other variables. I cannot
put constraints in my model file using names x1 or x2 because they are
not defined yet, and I cannot define the value of vars[x1] in data file
because set x is formed of variables. Does anyone know a way of doing
this without changing variables to parameters?

thanks,
gesi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]