Module org.chocosolver
Class IntDomainImpact
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.values.IntDomainImpact
-
- All Implemented Interfaces:
IntValueSelector
public final class IntDomainImpact extends Object implements IntValueSelector
Value selector for any type of problems: Branches on the value with the best/worst impact on domains cardinality (evaluated each possible assignment)- Author:
- Jean-Guillaume FAGES, Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description IntDomainImpact()
Create a value selector for assignments that returns the best value wrt to its impact on domains cardinality.IntDomainImpact(int maxdom, DecisionOperator<IntVar> dop, boolean smallest)
Create a value selector that returns the best value wrt to its impact on domains cardinality.
-
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
-
IntDomainImpact
public IntDomainImpact(int maxdom, DecisionOperator<IntVar> dop, boolean smallest)
Create a value selector that returns the best value wrt to its impact on domains cardinality. 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 decisionsmallest
- set to true to select the value with the smallest impact, set to false to select the value with the greatest impact
-
IntDomainImpact
public IntDomainImpact()
Create a value selector for assignments that returns the best value wrt to its impact on domains cardinality. 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
-
-