Class IntDomainLast
- java.lang.Object
-
- org.chocosolver.solver.search.strategy.selectors.values.IntDomainLast
-
- All Implemented Interfaces:
IntValueSelector
public final class IntDomainLast extends Object implements IntValueSelector
Value selector for optimization problems: Branches on the value in the last solution, if still in domain- Author:
- Jean-Guillaume FAGES, Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description IntDomainLast(Solution solution, IntValueSelector mainSelector)
Create a value selector that returns the value in the last solution.
-
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
-
IntDomainLast
public IntDomainLast(Solution solution, IntValueSelector mainSelector)
Create a value selector that returns the value in the last solution. If no solution was found or value does not exist anymore, falls back to 'mainSelector'.- Parameters:
solution
- container of the last solutionmainSelector
- falling back selector
-
-
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
-
-