> I'm trying to specify fixed values to some variables in an array using =
> expression (see "4.3 Variable statement" in GMPL Reference). Something
> like this:
>     set MySet;
>     set MySubset within MySet;
>     var X {i in MySet} = if i in MySubset then 0 else binary;

> or, similarly:
>     var X {i in MySet diff MySubset}, binary;
>     var X {i in MySubset} = 0;

> How can i do this in GMPL?

*All* elemental variables in the array of variables can be fixed as
follows:

var x{...} = <numeric expression> ;

However, to fix *some* elemental variables you should use correspodning
equality constraints, for example:

s.t. fpp{i in MySubset}: x[i] = 0;

This is normal, because such constraints will be removed by the mip
preprocessor.



_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to