Skip to main content
FRAMES NO FRAMES

Class IloIntVarChooserI

Definition file: ilcp/cp.h
Map of IloIntVarChooserIIloIntVarChooserIIloIntVarChooserI
The implementation class for a variable chooser in a search strategy.

An integer variable chooser is an object that can be used to define search strategies. Your own variable selection strategies can be created by redefining the pure virtual member function IloInt IloIntVarChooserI::choose(IloCPEngine cp, IloIntVarArray x).

See Also:

Method Summary
public virtual IloIntchoose(IloCPEngine cp, IloIntVarArray x)
public IloIntVarChooserI(IloEnv env)
public ~IloIntVarChooserI()
Method Detail

IloIntVarChooserI

public IloIntVarChooserI(IloEnv env)

This constructor creates an implementation of a variable chooser. It must be called in the constructor of any sub-class of IloIntVarChooserI.


~IloIntVarChooserI

public ~IloIntVarChooserI()

As this class is abstract, a virtual destructor is provided.


choose

public virtual IloInt choose(IloCPEngine cp, IloIntVarArray x)

This pure virtual function must be defined to choose a variable from the array x. The integer value returned must be the index of the chosen variable in the array x. If no variable is selected - for instance because every variable of x is fixed - the value returned must be -1.