Class 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 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 exceeds maxdom, 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 of variable.
        Specified by:
        selectValue in interface IntValueSelector
        Returns:
        the value, based on the domain of variable