The "fix" command fixes variables at specified values. You can think of fixing a variable at a value as being equivalent to adding a constraint that the variable must equal the value. The unfix command reverses the effect of fix, so that the variable is not fixed anymore.
A command of the form "fix
varname;" fixes the named variable at its
current value:
- Before any solve, the current value is usually the initial value specified in a var statement, or it is 0 if no initial value has been specified.
- After a solve, the current value is normally the variable's value in the solution returned by the solver.
A variable's current value can also be modified using a data or let statement. If you not sure about a variable's current value, you can use a "display
varname;" statement to show it.
A command of the form "fix
varname :=
expression;" fixes the variable at the value given by the expression.