|
Semi-continuous variables |
Top Previous Next |
|
Semi-continuous variables are restricted, if non-zero, to take on a level above a given minimum and below given maximum. This can be expressed algebraically as: Either x=0 or x $ a and x < b
By default, the lower bound (a) is 1.0 and the variable is upper bounded at infinity. 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-continuous variable is declared using the reserved phrase Semicont variable. The following example illustrates its use.
semicont variable x ; x.lo = 1.5 ; x.up = 23.1 ;
The above code declares the variable x to be a semi-continuous variable that can either be 0, or can behave as a continuous variable between 1.5 and 23.1. Notes:
|