Originally posted by: Philippe_Refalo
A chooser chooses one among many, while a selector selects several among many. For instance the variable selector IloSelectSmallest(IloDomainSize(env)) selects the variables that have the smallest domain. There can be several variables as a result. For building a variable chooser you can use one or more variable selectors. Each one is applied to the result of the previous one and at the end only one variable will be choosen. This choice is abritrary if several candidates remains.
For instance, this code defines a chooser that seclect first the variabels having the smallest domains and, if several variables remains at this stage, it chooses one variable randomly.
IloVarSelectorArray varSelArray(env);
varSelArray.add(IloSelectSmallest(IloDomainSize(env)));
varSelArray.add(IloSelectRandomVar(env));
IloIntVarChooser varChooser(env, varSelArray);
The same principles applies to value selection as well.
Regards,
Philippe
#CPOptimizer#DecisionOptimization