Skip to main content
FRAMES NO FRAMES

Class IloCPConstraintI

Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Map of IloCPConstraintIIloCPConstraintIIloCPConstraintI
A class for wrapping a user-defined constraint.

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:

You can use the example in ILOCPCONSTRAINTWRAPPER as a model for writing your own new constraint explicitly.

See Also:

Method Summary
public virtual voiddisplay(ostream & out) const
public virtual IlcConstraintextract(const IloCPEngine cp) const
public IloCPConstraintI(IloEnvI *, const char *)
public virtual IloExtractableI *makeClone(IloEnvI * env) const
public voiduse(const IloCPEngine solver, const IloIntervalSequenceVarArray xa) const
public voiduse(const IloCPEngine solver, const IloIntervalVarArray xa) const
public voiduse(const IloCPEngine solver, const IloNumVarArray xa) const
public voiduse(const IloCPEngine solver, const IloIntVarArray xa) const
public voiduse(const IloCPEngine solver, const IloIntervalSequenceVar x) const
public voiduse(const IloCPEngine solver, const IloIntervalVar x) const
public voiduse(const IloCPEngine solver, const IloNumVar x) const
public ~IloCPConstraintI()
Method 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.


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 IloCPEngine cp) const

In general terms, in Concert Technology, the objects of a model must be extracted. This member function returns the internal constraint extracted for use by cp 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 IloCPEngine solver, const IloIntervalSequenceVarArray xa) const

This member function forces the extraction of an array of interval sequence variables.


use

public void use(const IloCPEngine solver, const IloIntervalVarArray xa) const

This member function forces the extraction of an array of interval variables.


use

public void use(const IloCPEngine solver, const IloNumVarArray xa) const

This member function forces the extraction of an array of numerical variables.


use

public void use(const IloCPEngine solver, const IloIntVarArray xa) const

This member function forces the extraction of an array of integer variables.


use

public void use(const IloCPEngine solver, const IloIntervalSequenceVar x) const

This member function forces the extraction of an interval sequence variable.


use

public void use(const IloCPEngine solver, const IloIntervalVar x) const

This member function forces the extraction of an interval variable.


use

public void use(const IloCPEngine solver, const IloNumVar x) const

This member function forces the extraction of a numerical (integer or continuous) variable.