Module org.maxicp

Class LexLe

All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class LexLe extends AbstractCPConstraint
Global lexicographic ordering constraint between two vectors x and y: enforces x <=_lex y (when strict == false) or x <_lex y (when strict == true). Achieves Generalized Arc Consistency (GAC) based on Frisch et al. (CP 2002).
  • Constructor Details

    • LexLe

      public LexLe(CPIntVar[] x, CPIntVar[] y, boolean strict)
      Creates a lexicographic ordering constraint between two arrays of variables x and y.
      Parameters:
      x - the first array of variables
      y - the second array of variables (must have the same length as x)
      strict - if true, enforces x <_lex y; otherwise enforces x <=_lex y
    • LexLe

      public LexLe(CPIntVar[] x, CPIntVar[] y)
      Creates a non-strict lexicographic ordering constraint x <=_lex y.
      Parameters:
      x - the first array of variables
      y - the second array of variables (must have the same length as x)
  • Method Details