|
Semi-integer variables |
Top Previous Next |
|
Semi-integer variables are restricted, if non-zero, to take on an integer level above a given minimum level. This can be expressed algebraically as: Either x=0 or x $ a and integer
By default, the lower bound (a) is set to 1.0 and the variable is upper bounded at 100. The lower and upper bounds are set through the .lo and .up variable attributes as discussed in the Variables, Equations, Models and Solves chapter. In GAMS, a semi-integer variable is declared using the reserved phrase Semiint variable. The following example illustrates its use.
semiint variable x ; x.lo = 2 ; x.up = 23 ;
The above declares the variable x to be a semi-continuous variable that can either be 0, or can behave as an integer variable between 2 and 23. Notes:
|