Function searchPhase
The function searchPhase defines an variable fixing strategy.
Syntax
searchPhase searchPhase(intExprArray variables)
searchPhase searchPhase(intVarChooser variableChooser, intValueChooser valueChooser)
searchPhase searchPhase(intExprArray variables, intVarChooser variableChooser, intValueChooser valueChooser)
searchPhase searchPhase(intervalVarArray variables)
searchPhase searchPhase(sequenceVarArray variables)
Description
searchPhase searchPhase(intExprArray variables)-
This function defines a search phase specifying an array of variables only. The variable and value choosers for these variables will be chosen by CP Optimizer automatically.
Note: Although the type of parametervariablesisintExprArray, it can contain only variables, not expressions. searchPhase searchPhase(intVarChooser variableChooser, intValueChooser valueChooser)-
This function defines a search phase with a variable and a value chooser. The phase will fix all integer variables in the model.
Variable and value choosers can be created from selectors or array of selectors, see
intVarChooserandintValueChooser. searchPhase searchPhase(intExprArray variables, intVarChooser variableChooser, intValueChooser valueChooser)-
This function defines a search phase over variables
variables. The phase will usevariableChooserandvalueChooserto determine how to fix variables invariables.Variable and value choosers can be built from selectors or array of selectors, see
intVarChooserandintValueChooser.Note: Although the type of parametervariablesisintExprArray, it can contain only variables, not expressions. searchPhase searchPhase(intervalVarArray variables)-
This function defines a search phase over interval variables. During this phase CP Optimizer fixes the value of interval variables specified in the array
variables: each interval variable in the array will be assigned a presence status and for each present interval, a start and an end value. searchPhase searchPhase(sequenceVarArray variables)-
This function defines a search phase with an array of interval sequence variables. During this phase CP Optimizer fixes the value of interval sequence variables specified in the array
variables: each sequence variable in the array will be assigned a totally ordered sequence of present interval variables. Note that this search phase also fixes the presence statuses of the intervals involved in the sequence variables. This phase does not fix the start and end values of interval variables.It is recommended to use this search phase only if the possible range for start and end values of all interval variables is limited (for example by some known horizon that limits their maximal values).