Class IntDomainBest
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.values.IntDomainBest
-
- All Implemented Interfaces:
IntValueSelector
public final class IntDomainBest extends Object implements IntValueSelector
Value selector for optimization problems: Branches on the value with the best objective bound (evaluated each possible assignment)- Author:
- Jean-Guillaume FAGES, Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description IntDomainBest()
Create a value selector for assignments that returns the best value wrt to the objective to optimize.IntDomainBest(int maxdom, DecisionOperator<IntVar> dop)
Create a value selector that returns the best value wrt to the objective to optimize.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
selectValue(IntVar var)
Selects and returns the value to constrained chosen variable with.
-
-
-
Constructor Detail
-
IntDomainBest
public IntDomainBest(int maxdom, DecisionOperator<IntVar> dop)
Create a value selector that returns the best value wrt to the objective to optimize. When an enumerated variable domain exceedsmaxdom
, only bounds are considered.- Parameters:
maxdom
- a maximum domain size to satisfy to use this value selector.dop
- the decision operator used to make the decision
-
IntDomainBest
public IntDomainBest()
Create a value selector for assignments that returns the best value wrt to the objective to optimize. When an enumerated variable domain exceeds 100, only bounds are considered.
-
-
Method Detail
-
selectValue
public int selectValue(IntVar var)
Selects and returns the value to constrained chosen variable with. The chosen value must belong to the domain ofvariable
.- Specified by:
selectValue
in interfaceIntValueSelector
- Returns:
- the value, based on the domain of variable
-
-