| ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Using Semi-Continuous Variables: a Rates Example > What Are Semi-Continuous Variables? |
What Are Semi-Continuous Variables? |
INDEX
PREVIOUS
NEXT
|
A semi-continuous variable is a variable that by default can take the value 0 (zero) or any value between its semi-continuous lower bound (sclb) and its upper bound (ub). The semi-continuous lower bound (sclb) must be finite. The upper bound (ub) need not be finite. The semi-continuous lower bound (sclb) must be greater than or equal to 0 (zero). An attempt to use a negative value for the semi-continuous lower bound (sclb) will result in that bound being treated as 0 (zero).
In Concert Technology, semi-continuous variables are represented by the class IloSemiContVar. To create a semi-continuous variable, you use the constructor from that class to indicate the environment, the semi-continuous lower bound, and the upper bound of the variable, like this:
IloSemiContVar mySCV(env, 1.0, 3.0); |
That statement creates a semi-continuous variable with a semi-continuous lower bound of 1.0 and an upper bound of 3.0. The method IloSemiContVar::getSemiContinuousLB returns the semi-continuous lower bound of the invoking variable, and the method IloSemiContVar::getUB returns the upper bound. That class, its constructors, and its methods are documented in the ILOG CPLEX Reference Manual of the C++ API.
In that manual, you will see that IloSemiContVar derives from IloNumVar, the Concert Technology class for numeric variables. Like other numeric variables, semi-continuous variables assume floating-point values by default (type ILOFLOAT). However, you can designate a semi-continuous variable as integer (type ILOINT). In that case, it is a semi-integer variable.
For details about the feasible region of a semi-continuous or semi-integer variable, see the documentation of IloSemiContVar in the ILOG CPLEX Reference Manual of the C++ API.
In the Callable Library, semi-continuous variables can be entered with type CPX_SEMICONT or CPX_SEMIINT via the routine CPXcopyctype. In that case, the lower bound of 0 (zero) is implied; the semi-continuous lower bound is defined by the corresponding entry in the array of lower bounds; and likewise, the semi-continuous upper bound is defined by the corresponding entry in the array of upper bounds of the problem.
Semi-continuous variables can be specified in MPS and LP files. Stating a MIP Problem tells you how to specify variables as semi-continuous.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |