FRAMES NO FRAMES

Class IloCPConstraintI

Definition file: ilsolver/ilosolverint.h
Include file: <ilsolver/ilosolver.h>

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:

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 voiddisplay(ostream & out) const
public virtual IlcConstraintextract(const IloSolver solver) const
public virtual IloExtractableI *makeClone(IloEnvI * env) const
public voiduse(const IloSolver solver, const IloExtractableArray extarray) const
public voiduse(const IloSolver solver, const IloExtractable ext) const
Constructor and Destructor Detail

IloCPConstraintI

public IloCPConstraintI(IloEnvI *, const char *)

This constructor creates an instance of the class IloCPConstraintI. This constructor is called automatically in the constructor of its subclasses.


~IloCPConstraintI

public ~IloCPConstraintI()

This destructor is called automatically by the destructor of its subclasses. It frees memory used by the invoking object.


Method Detail

display

public virtual void display(ostream & out) const

This member function prints the invoking constraint on an output stream.


extract

public virtual IlcConstraint extract(const IloSolver solver) const

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.


makeClone

public virtual IloExtractableI * makeClone(IloEnvI * env) const

This member function is called internally to duplicate the current constraint.


use

public void use(const IloSolver solver, const IloExtractableArray extarray) const

This member function forces the extraction of an array of extractables and its subextractables.


use

public void use(const IloSolver solver, const IloExtractable ext) const

This member function forces the extraction of an extractable and its subextractables.