Fx

Top  Previous  Next

Variables can be fixed at a value.  In turn GAMS sets the lower and upper bound to that value.  The attribute is addressed using .Fx as follows

 

Variable fixed level is variablename.fx (setdependency)

 

These are commonly used in calculations pre solution to specify or revise the value.

Example:

(varmodatt.gms)

Move.fx("boston","seattle")=1.;

solve transport using lp minimizing cost;

display move.lo,move.fx;

Notes:

The upper and lower bound are changed when the Fx attribute for a variable is set to the value of the Fx attribute.
Fixed variables can subsequently be freed by changing the lower .lo and upper .up bounds.
Fx attributes are not defined for equations.
One cannot use the Fx attribute in the expression in an equation or on the right hand side of a replacement statement.