Class IloIfThen
Definition file: ilconcert/ilomodel.h
An instance of IloIfThen represents a condition constraint. Generally,
a condition constraint is composed of an if part (the conditional statement or left
side) and a then part (the consequence or right side).
In order for a constraint to take effect, you must add it to a model with the
template IloAdd or the member function
IloModel::add and extract the model for an algorithm
with the member function IloAlgorithm::extract.
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:
IloConstraint
| Method Summary |
|---|
public IloIfThen::ImplClass * | getImpl() |
public IloIfThen()
This constructor creates an empty handle. You must initialize it before you use it.
public IloIfThen(IloIfThen::ImplClass * impl)
This constructor creates a handle object from a pointer to an implementation object.
This constructor creates a condition constraint in the environment indicated by
env. The parameter left indicates the if part of the
condition. The parameter right indicates the then part of the condition.
The string name indicates the name of the constraint; it is set to
0 by default. For the constraint
to take effect, you must add it to a model and extract the model for an algorithm.
public IloIfThen::ImplClass * getImpl()
This member function returns a pointer to the implementation object of the invoking handle.