> Discrete Optimization > Rates: Using Semi-Continuous Variables > 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). Both those bounds (the sclb and the ub) must be finite. 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 Concert Technology Reference Manual.
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 Concert Technology Reference Manual.
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |