Defining a constructive strategy
A constructive strategy can be defined using search phases. A search phase specifies the criteria for the order in which variables and values are chosen in the search.
In addition to variables, a search phase can be used to tune a search strategy by specifying the criteria for the order in which decision variables are chosen to be fixed and to which values these variables should be fixed. This strategy is then used as a constructive strategy to instantiate the decision variables of the phase.
In the C++ API, the constructor of a complete phase is:
IloSearchPhase(IloIntVarArray x,
IloIntVarChooser varChooser,
IloIntValueChooser valueChooser);
The variable chooser (IloIntVarChooser in
the C++ API and the Java™ API, IIntVarChooser in
the C# API) defines how the next decision variable
to fix in the search is chosen.
The value chooser (IloIntValueChooser in
the C++ API and the Java API, IIntValueChooser in
the C# API) defines how values are chosen for instantiating
decision variables.
Search phase
A search phase is an object that is used to define instantiation strategies to help the CP Optimizer search. A search phase is composed of
an array of decision variables to instantiate (or fix),
a variable chooser that defines how the next variable to instantiate is chosen
a value chooser that defines how values are chosen when instantiating variables.
Since V12.8, the IloCPEngine class is used in evaluators used by
choosers. It provides access to the extracted model objects. See details about
IloCPEngine in the CP Optimizer reference manuals.