Class SoftAlldifferent


public class SoftAlldifferent extends DecomposedConstraint<Constraint>
This class provides soft-alldifferent constraint by decomposing it either into a network flow constraint or a set of primitive constraints.
Version:
4.9
  • Field Details

  • Constructor Details

  • Method Details

    • primitiveDecomposition

      public List<Constraint> primitiveDecomposition(Store store)
    • decompose

      public List<Constraint> decompose(Store store)
      Description copied from class: DecomposedConstraint
      It returns an array list of constraint which are used to decompose this constraint. It actually creates a decomposition (possibly also creating variables), but it does not impose the constraint.
      Specified by:
      decompose in class DecomposedConstraint<Constraint>
      Parameters:
      store - the constraint store in which context the decomposition takes place.
      Returns:
      an array list of constraints used to decompose this constraint.
    • imposeDecomposition

      public void imposeDecomposition(Store store)
      Description copied from class: DecomposedConstraint
      It imposes the constraint in a given store.
      Specified by:
      imposeDecomposition in class DecomposedConstraint<Constraint>
      Parameters:
      store - the constraint store to which the constraint is imposed to.
    • toString

      public String toString()
      Overrides:
      toString in class Object