NO FRAMES

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:

Constructor Summary
public IloIfThen()
public IloIfThen(IloIfThen::ImplClass *)
public IloIfThen(const IloEnv, const IloConstraint, const IloConstraint, const char *)
Method Summary
public IloIfThen::ImplClass *getImpl()
Inherited Methods from IloConstraint
getImpl
Inherited Methods from IloIntExprArg
getImpl
Inherited Methods from IloNumExprArg
getImpl
Inherited Methods from IloExtractable
end, getEnv, getId, getImpl, getName, getObject, setName, setObject
Constructor Detail

IloIfThen

public IloIfThen()
This constructor creates an empty handle. You must initialize it before you use it.

IloIfThen

public IloIfThen(IloIfThen::ImplClass * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloIfThen

public IloIfThen(const IloEnv env, const IloConstraint left, const IloConstraint right, const char * name)

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.


Method Detail

getImpl

public IloIfThen::ImplClass * getImpl()
This member function returns a pointer to the implementation object of the invoking handle.