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