Up

Top  Previous  Next

Variables and equations have an upper bound.  The upper bound for a variable is the largest value a variable can take on.  The upper bound for an equation is the right hand side for a less than or equal to and an equality constraint.  It is plus infinity for a greater than or equal to constraint.  The attribute is addressed using .Up as follows

 

Variable upper bound is variablename.up (setdependency)

Equation upper bound is equationname. up (setdependency)

 

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

Example:

(varmodatt.gms)

Move.up(source,sink)=1000.1;

solve transport using lp minimizing cost;

display sinkdemand.up;

Notes:

The upper bound is also changed when the .fx attribute for a variable is set.
The upper bound defaults to +inf for positive and unrestricted variables and 0 for negative variables.
The upper bound defaults to +inf for greater than or equal to equations.