• 1 reply
  • Latest Post - ‏2013-09-30T08:00:27Z by Philippe_Refalo
2 Posts

Pinned topic Ilo{Var|Value}Selector vs IloInt{Var|Value}Chooser

‏2013-09-27T12:54:20Z |



I was wondering what are the differences between a "selector" and a "chooser" for

variables or values, as the user's manual shows examples mainly with "selectors"

which are directly passed as arguments to IloSearchPhase, whereas the constructors

of IloSearchPhase in the reference manual expect objects of type IloIntVarChooser and



Best regards,


-- Nicolas Barnier


  • Philippe_Refalo
    53 Posts

    Re: Ilo{Var|Value}Selector vs IloInt{Var|Value}Chooser

    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);
         IloIntVarChooser varChooser(env, varSelArray);

    The same principles applies to value selection as well. 

    Updated on 2013-09-30T08:01:20Z at 2013-09-30T08:01:20Z by Philippe_Refalo