Interface VariableEvaluator<V extends Variable>
- All Known Implementing Classes:
public interface VariableEvaluator<V extends Variable>A variable evaluator. One provide a way to evaluate a variable (domain size, smallest values, ...). It should return a value which can be minimized. For instance, to select the integer variable with the smallest value in its domain, return ivar.getLB(). To select the variable with the largest value in its domain, return -ivar.getUB(). Such evaluator can be called and combined with others to define a variable selector which enables tie breaking. Indeed, many uninstantied variables may return the same value for the evaluation. In that case, the next evaluator should break ties, otherwise the first computed variable would be returned. Be aware that using a single variable evaluator in
solver.search.strategy.selectors.VariableSelectorWithTiesmay result in a slower execution due to the generalisation it requires.
- Charles Prud'homme
double evaluate(V variable)Evaluates the heuristic that is minimized in order to find the best variable
variable- array of variable
- the result of the evaluation, to minimize