IBM ILOG Solver User's Manual > Extending the Library > Using Impacts during Search > Customizable Goal for Integer Variables > Selection |
Selection |
INDEX
![]() |
An instance of IloCustomizableGoal
is created with an array of variables to perform the search on:
IloCustomizableGoal d = IloCustomizableGoal(env, x); |
By default the goal contains filters to perform selection in the following way:
If we want to change these defaults one can add filters. An addition of a variable filter will discard the default filters for variables. An addition of a value filter will discard the default filters for the values.
To define a goal that selects at least five variables with the largest impact and then selects, among these promising variables, those having the largest local impact and that, finally breaks ties randomly, you can write:
To select the value that has the smallest impact and to break ties randomly you can write:
IloEvaluator<IlcInt> e4 = IlcImpactValueEvaluator(env); IloEvaluator<IlcInt> e5 = IlcRandomValueEvaluator(env); d.addFilter(e4); d.addFilter(e5); |
Of course the class IloCustomizableGoal
is not devoted to strategies based on impacts only but can also be used to select variables according to other criteria like the domain size, the variable degree, or any evaluator that a user can define.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |