Class AntiFirstFail
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.variables.AntiFirstFail
-
- All Implemented Interfaces:
VariableEvaluator<IntVar>,VariableSelector<IntVar>
public class AntiFirstFail extends Object implements VariableSelector<IntVar>, VariableEvaluator<IntVar>
Anti first fail variable selector. It chooses the variable with the largest domain (instantiated variables are ignored).- Since:
- 2 juil. 2010
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description AntiFirstFail(Model model)First fail variable selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleevaluate(IntVar variable)Evaluates the heuristic that is minimized in order to find the best variableIntVargetVariable(IntVar[] variables)Provides access to the current selected variable amongvariables.
-
-
-
Constructor Detail
-
AntiFirstFail
public AntiFirstFail(Model model)
First fail variable selector.- Parameters:
model- reference to the model (does not define the variable scope)
-
-
Method Detail
-
getVariable
public IntVar getVariable(IntVar[] variables)
Description copied from interface:VariableSelectorProvides access to the current selected variable amongvariables. If there is no variable left, returnnull.- Specified by:
getVariablein interfaceVariableSelector<IntVar>- Returns:
- the current selected variable if any,
nullotherwise.
-
evaluate
public double evaluate(IntVar variable)
Description copied from interface:VariableEvaluatorEvaluates the heuristic that is minimized in order to find the best variable- Specified by:
evaluatein interfaceVariableEvaluator<IntVar>- Parameters:
variable- array of variable- Returns:
- the result of the evaluation, to minimize
-
-