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:

One is required to utilize a mixed integer (MIP) solver to solve this problem type.
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.
The variables are upper bounded at 100.  If one wants larger bounds then they need to be specified.
The bounds for semiint variables have to be set at integer values.  GAMS will flag an error during model generation if it finds that this is not the case.
Not all MIP solvers allow semi-continuous variables.  Please verify that the solver you are interested in can handle semi-continuous variables by checking the Solver Manual.