Overview | Group | Tree | Graph | Index | Concepts |
An instance of this class represents a constrained semicontinuous variable in a
Concert Technology model. Semicontinuous variables derive from
IloNumVar
, the class of numeric variables.
A semicontinuous variable may be 0 (zero) or it may take a value within
an interval defined by its semicontinuous lower and upper
bound. Conventionally, semicontinuous variables are defined as
floating-point variables, but you can designate an instance of
IloSemiContVar
as integer by using the type indicator it
inherits from IloNumVar
. In that case,
Concert Technology will impose an integrality constraint on the
semicontinuous variable for you, thus further restricting the feasible set
of values to 0 (zero) and the integer values in the interval defined by the
semicontinuous lower and upper bound.
IloIntVar
or an IloNumVar
with Type = Int
)
in the constructors of via a modifier (setUB
, setLB
,
setBounds
), they are inward rounded to an integer value. LB
is rounded down and UB
is rounded up.In an instance of IloNumVar
,
lb
denotes the lower bound of the variable, and ub
denotes its upper bound. In an instance of the derived class
IloSemiContVar
, sclb
denotes the semicontinuous
lower bound.
In formal terms, if lb <= 0
, then a semicontinuous
variable is a numeric variable with the feasible set of {0, [sclb,
ub]}
, where 0 < sclb < ub
; otherwise, for other
values of lb
, the feasible set of a semicontinuous variable is
the intersection of the interval [lb, ub]
with the set
{0, [sclb, ub]}
. The semicontinuous lower bound
sclb
may differ from the lower bound of an ordinary numeric
variable in that the semicontinuous variable is restricted to the
semicontinuous region. For example, the table below shows you the
bounds of a semicontinuous variable and the corresponding feasible
region.
Examples of bounds on semicontinuous variables and their feasible regions
These conditions | define these feasible regions |
---|---|
lb == ub < sclb | {0} if lb==ub==0 or empty set if
lb==ub!=0 |
lb < 0 < sclb < ub | {0, [sclb, ub]} |
0 < lb < sclb < ub | [sclb, ub] |
0 < sclb < lb < ub | [lb, ub] |
Most member functions in this class contain assert
statements. For an explanation of the macro NDEBUG
(a way to
turn on or turn off these assert
statements), see the concept
Assert and NDEBUG.
See Also:
Constructor Summary | |
---|---|
public | IloSemiContVar() |
public | IloSemiContVar(IloSemiContVar::ImplClass *) |
public | IloSemiContVar(const IloEnv, IloNum, IloNum, IloNumVar::Type, const char *) |
public | IloSemiContVar(const IloAddNumVar &, IloNum, IloNum, IloNumVar::Type, const char *) |
Method Summary | |
---|---|
public IloSemiContVar::ImplClass * | getImpl() |
public IloNum | getSemiContLB() |
public void | setSemiContLB(IloNum) |
Inherited Methods from IloNumVar |
---|
getImpl, getLB, getPossibleValues, getType, getUB, setBounds, setLB, setPossibleValues, setUB |
Inherited Methods from IloNumExprArg |
---|
getImpl |
Inherited Methods from IloExtractable |
---|
end, getEnv, getId, getImpl, getName, getObject, setName, setObject |
Constructor Detail |
---|
This constructor creates an instance of IloSemiContVar
from
its sclb
(that is, its semicontinuous lower bound) and its
upper bound ub
. By default, its type is floating-point, but you
can use ILOINT
to indicate integer; in that case, Concert
Technology will impose an integrality constraint on the variable. The value
for lb
is set to zero.
This constructor creates an instance of IloSemiContVar
from
the prototype var
.
Method Detail |
---|
This member function returns the semicontinuous lower bound (that is, its
sclb
) of the invoking semicontinuous variable.
This member function makes sclb
the semicontinuous lower
bound of the invoking semicontinuous variable.
setSemiContinuousLb
notifies Concert
Technology algorithms about this change of this invoking object.