Overview | Group | Tree | Graph | Index | Concepts |
The class IloCPConstraintI
simplifies writing a new
constraint using IBM® ILOG® Concert Technology. You can use the macro ILOCPCONSTRAINTWRAPPER to create a subclass of the class
IloCPConstraintI
with up to 4 data members.
If you want to create a constraint class with more than 4 data members,
you must explicitly define a subclass of the class
IloCPConstraintI
. To do this, you must do the following:
ILOCPCONSTRAINTWRAPPERDECL
in the class definition
ILOCPCONSTRAINTWRAPPERIMPL
in the source file
makeClone
initTypeIndex
once before using the generated constraint. Therefore,
it is recommended to include this call in the function.)
extract
. You can use the example in ILOCPCONSTRAINTWRAPPER as a model for writing your own new constraint explicitly.
See Also:
Constructor and Destructor Summary | |
---|---|
public | IloCPConstraintI(IloEnvI *, const char *) |
public | ~IloCPConstraintI() |
Method Summary | |
---|---|
public virtual void | display(ostream & out) const |
public virtual IlcConstraint | extract(const IloSolver solver) const |
public virtual IloExtractableI * | makeClone(IloEnvI * env) const |
public void | use(const IloSolver solver, const IloExtractableArray extarray) const |
public void | use(const IloSolver solver, const IloExtractable ext) const |
Constructor and Destructor Detail |
---|
This constructor creates an instance of the class
IloCPConstraintI
. This constructor is called
automatically in the constructor of its subclasses.
This destructor is called automatically by the destructor of its subclasses. It frees memory used by the invoking object.
Method Detail |
---|
This member function prints the invoking constraint on an output stream.
In general terms, in Concert Technology, the objects of a model
must be extracted for an algorithm (an instance of one of the
subclasses of IloAlgorithm
, such as
IloSolver
). This member function
returns the internal constraint extracted for solver
from the invoking constraint of a model.
This member function is called internally to duplicate the current constraint.
This member function forces the extraction of an array of extractables and its subextractables.
This member function forces the extraction of an extractable and its subextractables.