Class IntDomainLast

  • All Implemented Interfaces:

    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
    Jean-Guillaume FAGES, Charles Prud'homme
    • Constructor Detail

      • IntDomainLast

        public IntDomainLast​(Solution solution,
                             IntValueSelector mainSelector,
                             BiPredicate<IntVar,​Integer> condition)
        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'.
        solution - container of the last solution
        mainSelector - falling back selector
        condition - condition to force, when return true, or skip, when return false, phase saving. Can be null, in that case will be consider as true.
    • 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 of variable.
        Specified by:
        selectValue in interface IntValueSelector
        the value, based on the domain of variable