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:

One is required to utilize a mixed integer (MIP) solver to solve any model containing Semi-continuous variables.  However, these variables do not have to take on integer solution levels.
The MIP solver is required because the solution process needs to impose the discontinuous jump between zero and the threshold value.  To do this solvers implicitly define an additional zero one variable, and then solve the problem as a MIP.
The lower bound has to be less than the upper bound, and both bounds have to be greater than 0.  GAMS will flag an error if it finds that this is not the case.
Not all MIP solvers allow semi-continuous variables.  Please verify that the solver you are using can handle semi-continuous variables by checking the solver manual.