Interface ProblemAPI

    • Method Detail

      • dom

        default Domains.Dom dom​(int[] values,
                                FunctionalInterfaces.Intx1Predicate p)
        Returns an integer domain composed of the sorted distinct values that come from the specified array and that respect the specified predicate.
        Parameters:
        values - a 1-dimensional array of integers
        p - a predicate allowing us to test if a value v must be kept in the domain
        Returns:
        an integer domain composed of the sorted distinct values that come from the specified array and that respect the specified predicate
      • dom

        default Domains.Dom dom​(int[] values)
        Returns an integer domain composed of the sorted distinct values that come from the specified array.
        Parameters:
        values - a 1-dimensional array of integers
        Returns:
        an integer domain composed of the sorted distinct values that come from the specified array
      • dom

        default Domains.Dom dom​(int value,
                                int... otherValues)
        Returns an integer domain composed of the sorted distinct values that come from the specified values.
        Parameters:
        value - a first integer (value)
        otherValues - a sequence of other integers (values)
        Returns:
        an integer domain composed of the sorted distinct values that come from the specified values
      • dom

        default Domains.Dom dom​(Collection<Integer> values)
        Returns an integer domain composed of the sorted distinct values that come from the specified collection.
        Parameters:
        values - a collection of integers (values)
        Returns:
        an integer domain composed of the sorted distinct values that come from the specified collection
      • dom

        default Domains.Dom dom​(java.util.stream.IntStream values)
        Returns an integer domain composed of the sorted distinct values that come from the specified stream
        Parameters:
        values - a stream of integer values
        Returns:
        an integer domain composed of the sorted distinct values that come from the specified stream
      • dom

        default Domains.Dom dom​(int[][] m)
        Returns an integer domain composed of the sorted distinct values that come from the specified array.
        Parameters:
        m - a 2-dimensional array of variables
        Returns:
        an integer domain composed of the sorted distinct values that come from the specified array
      • dom

        default Domains.Dom dom​(Range range)
        Returns an integer domain composed of the values contained in the specified range.
        Parameters:
        range - the range of values to be considered for the domain
        Returns:
        an integer domain composed of the values contained in the specified range
      • size

        default Size.Size1D size​(int length)
        Builds an object that represents the size (length) of a 1-dimensional array.
        Parameters:
        length - the size (length) of the array
        Returns:
        an object that represents the size (length) of a 1-dimensional array
      • size

        default Size.Size2D size​(int length0,
                                 int length1)
        Builds an object that represents the size (i.e., length of each dimension) of a 2-dimensional array.
        Parameters:
        length0 - the size (length) of the first dimension of a 2-dimensional array
        length1 - the size (length) of the second dimension of a 2-dimensional array
        Returns:
        an object that represents the size (i.e., length of each dimension) of a 2-dimensional array
      • size

        default Size.Size3D size​(int length0,
                                 int length1,
                                 int length2)
        Builds an object that represents the size (i.e., length of each dimension) of a 3-dimensional array.
        Parameters:
        length0 - the size (length) of the first dimension of a 3-dimensional array
        length1 - the size (length) of the second dimension of a 3-dimensional array
        length2 - the size (length) of the third dimension of a 3-dimensional array
        Returns:
        an object that represents the size (i.e., length of each dimension) of a 3-dimensional array
      • size

        default Size.Size4D size​(int length0,
                                 int length1,
                                 int length2,
                                 int length3)
        Builds an object that represents the size (i.e., length of each dimension) of a 4-dimensional array.
        Parameters:
        length0 - the size (length) of the first dimension of a 4-dimensional array
        length1 - the size (length) of the second dimension of a 4-dimensional array
        length2 - the size (length) of the third dimension of a 4-dimensional array
        length3 - the size (length) of the fourth dimension of a 4-dimensional array
        Returns:
        an object that represents the size (i.e., length of each dimension) of a 4-dimensional array
      • size

        default Size.Size5D size​(int length0,
                                 int length1,
                                 int length2,
                                 int length3,
                                 int length4)
        Builds an object that represents the size (i.e., length of each dimension) of a 5-dimensional array.
        Parameters:
        length0 - the size (length) of the first dimension of a 5-dimensional array
        length1 - the size (length) of the second dimension of a 5-dimensional array
        length2 - the size (length) of the third dimension of a 5-dimensional array
        length3 - the size (length) of the fourth dimension of a 5-dimensional array
        length4 - the size (length) of the fifth dimension of a 5-dimensional array
        Returns:
        an object that represents the size (i.e., length of each dimension) of a 5-dimensional array
      • range

        default Range range​(int startInclusive,
                            int endExclusive,
                            int step)
        Constructs an object Range from the specified bounds and step (difference between each two successive numbers).
        Parameters:
        startInclusive - the lower bound (inclusive) of this range
        endExclusive - the upper bound (exclusive) of this range
        step - the step of this range
        Returns:
        the object Range that represents an interval of values (while considering the specified step)
      • rangeClosed

        default Range rangeClosed​(int startInclusive,
                                  int endInclusive,
                                  int step)
        Constructs an object Range from the specified bounds and step (difference between each two successive numbers).
        Parameters:
        startInclusive - the lower bound (inclusive) of this range
        endInclusive - the upper bound (inclusive) of this range
        step - the step of this range
        Returns:
        the object Range that represents an interval of values (while considering the specified step)
      • range

        default Range range​(int startInclusive,
                            int endExclusive)
        Constructs an object Range from the specified bounds (using implicitly a step equal to 1).
        Parameters:
        startInclusive - the lower bound (inclusive) of this range
        endExclusive - the upper bound (exclusive) of this range
        Returns:
        the object Range that represents an interval of values
      • rangeClosed

        default Range rangeClosed​(int startInclusive,
                                  int endInclusive)
        Constructs an object Range from the specified bounds (using implicitly a step equal to 1).
        Parameters:
        startInclusive - the lower bound (inclusive) of this range
        endInclusive - the upper bound (inclusive) of this range
        Returns:
        the object Range that represents an interval of values
      • range

        default Range range​(int length)
        Constructs an object Range from the specified length (using implicitly a lower bound equal to 0 and a step equal to 1).
        Parameters:
        length - the length of this range
        Returns:
        the object Range that represents an interval of values, from 0 to the specified value (excluded)
      • var

        default IVar.Var var​(String id,
                             Domains.Dom dom,
                             String note,
                             Types.TypeClass... classes)
        Builds a stand-alone integer variable with the specified id, domain, note (short comment) and classes. Use methods dom() for building integer domains. For example:
         Var x = var("x", dom(range(10), "x is the number of products");
         
        On our example, we build a stand-alone variable whose domain contains 10 values.
        Parameters:
        id - the id (unique name) of the variable
        dom - the integer domain of the variable
        note - a short comment about the variable
        classes - the tags (possibly, none) associated with the variable
        Returns:
        a stand-alone integer variable
      • var

        default IVar.Var var​(String id,
                             Domains.Dom dom,
                             Types.TypeClass... classes)
        Builds a stand-alone integer variable with the specified id, domain and classes. Use methods dom() for building integer domains. For example:
         Var x = var("x", dom(range(10));
         
        On our example, we build a stand-alone variable whose domain contains 10 values.
        Parameters:
        id - the id (unique name) of the variable
        dom - the integer domain of the variable
        classes - the tags (possibly, none) associated with the variable
        Returns:
        a stand-alone integer variable
      • array

        default IVar.Var[] array​(String id,
                                 Size.Size1D size,
                                 FunctionalInterfaces.IntToDom f,
                                 String note,
                                 Types.TypeClass... classes)
        Builds a 1-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Method size(int) for building the size (length) of the array. The specified function f associates an integer domain with each variable at index i of the array. In case the specified function f return the value null, the variable is not built. In the following example, the first five variables have a domain containing 10 values whereas the next five variables have a domain containing two values only:
         Var[] = array("x", size(10), i -> i < 5 ? dom(range(10)) : dom(0,1),"x[i] is the number of carrots eaten by the ith rabbit");
         
        Parameters:
        id - the id (unique name) of the array
        size - the length of the array
        f - a function that associates an integer domain with any possible index i of a variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 1-dimensional array of integer variables
      • array

        default IVar.Var[] array​(String id,
                                 Size.Size1D size,
                                 FunctionalInterfaces.IntToDom f,
                                 Types.TypeClass... classes)
        Builds a 1-dimensional array of integer variables with the specified id, size, and classes. Use Method size(int) for building the size (length) of the array. The specified function f associates an integer domain with each variable at index i of the array. In case the specified function f return the value null, the variable is not built. In the following example, the first five variables have a domain containing 10 values whereas the next five variables have a domain containing two values only:
         Var[] = array("x", size(10), i -> i < 5 ? dom(range(10)) : dom(0,1));
         
        Parameters:
        id - the id (unique name) of the array
        size - the length of the array
        f - a function that associates an integer domain with any possible index i of a variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 1-dimensional array of integer variables
      • array

        default IVar.Var[] array​(String id,
                                 Size.Size1D size,
                                 Domains.Dom dom,
                                 String note,
                                 Types.TypeClass... classes)
        Builds a 1-dimensional array of integer variables with the specified id, size, domain, note and classes. Use Method size(int) for building the size (length) of the array. Each variable of the array has the specified integer domain. In the following example, the ten variables have a domain containing 10 values:
         Var[] = array("x", size(10), dom(range(10), "x[i] is the number of carrots eaten by the ith rabbit");
         
        Parameters:
        id - the id (unique name) of the array
        size - the length of the array
        dom - the domain of each variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 1-dimensional array of integer variables
      • array

        default IVar.Var[] array​(String id,
                                 Size.Size1D size,
                                 Domains.Dom dom,
                                 Types.TypeClass... classes)
        Builds a 1-dimensional array of integer variables with the specified id, size, domain, and classes. Use Method size(int) for building the size (length) of the array. Each variable of the array has the specified integer domain. In the following example, the ten variables have a domain containing 10 values:
         Var[] = array("x", size(10), dom(range(10));
         
        Parameters:
        id - the id (unique name) of the array
        size - the length of the array
        dom - the domain of each variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 1-dimensional array of integer variables
      • array

        default IVar.Var[][] array​(String id,
                                   Size.Size2D size,
                                   FunctionalInterfaces.Intx2ToDom f,
                                   String note,
                                   Types.TypeClass... classes)
        Builds a 2-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Method size(int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][] = array("x", size(10, 5), (i,j) -> i < j ? dom(range(10)) : dom(0,1), 
           "x[i][j] is the number of forks built by the jth worker at the ith factory");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j) of a variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 2-dimensional array of integer variables
      • array

        default IVar.Var[][] array​(String id,
                                   Size.Size2D size,
                                   FunctionalInterfaces.Intx2ToDom f,
                                   Types.TypeClass... classes)
        Builds a 2-dimensional array of integer variables with the specified id, size, and classes. Use Method size(int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][] = array("x", size(10, 5), (i,j) -> i < j ? dom(range(10)) : dom(0,1));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j) of a variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 2-dimensional array of integer variables
      • array

        default IVar.Var[][] array​(String id,
                                   Size.Size2D size,
                                   Domains.Dom dom,
                                   String note,
                                   Types.TypeClass... classes)
        Builds a 2-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Method size(int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][] = array("x", size(10, 5), dom(range(10)),
           "x[i][j] is the number of forks built by the jth worker at the ith factory");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 2-dimensional array of integer variables
      • array

        default IVar.Var[][] array​(String id,
                                   Size.Size2D size,
                                   Domains.Dom dom,
                                   Types.TypeClass... classes)
        Builds a 2-dimensional array of integer variables with the specified id, size, domain, and classes. Use Method size(int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][] = array("x", size(10, 5), dom(range(10)));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 2-dimensional array of integer variables
      • array

        default IVar.Var[][][] array​(String id,
                                     Size.Size3D size,
                                     FunctionalInterfaces.Intx3ToDom f,
                                     String note,
                                     Types.TypeClass... classes)
        Builds a 3-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Method size(int,int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j,k) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][][] = array("x", size(10, 5, 5), (i,j,k) -> i+j == k ? dom(range(10)) : dom(0,1), 
           "x[i][j][k] is something I can't reveal");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j,k) of a variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 3-dimensional array of integer variables
      • array

        default IVar.Var[][][] array​(String id,
                                     Size.Size3D size,
                                     FunctionalInterfaces.Intx3ToDom f,
                                     Types.TypeClass... classes)
        Builds a 3-dimensional array of integer variables with the specified id, size, and classes. Use Method size(int,int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j,k) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][][] = array("x", size(10, 5, 5), (i,j,k) -> i+j == k ? dom(range(10)) : dom(0,1));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j,k) of a variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 3-dimensional array of integer variables
      • array

        default IVar.Var[][][] array​(String id,
                                     Size.Size3D size,
                                     Domains.Dom dom,
                                     String note,
                                     Types.TypeClass... classes)
        Builds a 3-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Method size(int,int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][][] = array("x", size(10, 5, 2), dom(range(10)),
           "x[i][j][k] is something I can't reveal");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 3-dimensional array of integer variables
      • array

        default IVar.Var[][][] array​(String id,
                                     Size.Size3D size,
                                     Domains.Dom dom,
                                     Types.TypeClass... classes)
        Builds a 3-dimensional array of integer variables with the specified id, size, domain, and classes. Use Method size(int,int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][][] = array("x", size(10, 5, 2), dom(range(10)));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 3-dimensional array of integer variables
      • array

        default IVar.Var[][][][] array​(String id,
                                       Size.Size4D size,
                                       FunctionalInterfaces.Intx4ToDom f,
                                       String note,
                                       Types.TypeClass... classes)
        Builds a 4-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Method size(int,int,int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j,k,l) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][][][] = array("x", size(10, 5, 5, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1), 
           "x[i][j][k][l] is something I can't reveal");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j,k,l) of a variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 4-dimensional array of integer variables
      • array

        default IVar.Var[][][][] array​(String id,
                                       Size.Size4D size,
                                       FunctionalInterfaces.Intx4ToDom f,
                                       Types.TypeClass... classes)
        Builds a 4-dimensional array of integer variables with the specified id, size, and classes. Use Method size(int,int,int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j,k,l) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][][][] = array("x", size(10, 5, 5, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j,k,l) of a variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 4-dimensional array of integer variables
      • array

        default IVar.Var[][][][] array​(String id,
                                       Size.Size4D size,
                                       Domains.Dom dom,
                                       String note,
                                       Types.TypeClass... classes)
        Builds a 4-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Method size(int,int,int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][][][] = array("x", size(10, 5, 2, 2), dom(range(10)),
           "x[i][j][k][l] is something I can't reveal");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 4-dimensional array of integer variables
      • array

        default IVar.Var[][][][] array​(String id,
                                       Size.Size4D size,
                                       Domains.Dom dom,
                                       Types.TypeClass... classes)
        Builds a 4-dimensional array of integer variables with the specified id, size, domain, and classes. Use Method size(int,int,int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][][][] = array("x", size(10, 5, 2, 2), dom(range(10)));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 4-dimensional array of integer variables
      • array

        default IVar.Var[][][][][] array​(String id,
                                         Size.Size5D size,
                                         FunctionalInterfaces.Intx5ToDom f,
                                         String note,
                                         Types.TypeClass... classes)
        Builds a 5-dimensional array of integer variables with the specified id, size, note (short comment) and classes. Use Method size(int,int,int,int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j,k,l,m) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][][][][] = array("x", size(10, 5, 5, 2, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1), 
           "x[i][j][k][l] is something I can't reveal");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j,k,l),m of a variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 5-dimensional array of integer variables
      • array

        default IVar.Var[][][][][] array​(String id,
                                         Size.Size5D size,
                                         FunctionalInterfaces.Intx5ToDom f,
                                         Types.TypeClass... classes)
        Builds a 5-dimensional array of integer variables with the specified id, size, and classes. Use Method size(int,int,int,int,int) for building the size (length of each dimension) of the array. The specified function f associates an integer domain with each variable at index (i,j,k,l,m) of the array. In case the specified function f return the value null, the variable is not built. In the following example, some variables have a domain containing 10 values whereas others have a domain containing two values only:
         Var[][][][][] = array("x", size(10, 5, 5, 2, 2), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        f - a function that associates an integer domain with any possible index (i,j,k,l,m) of a variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 5-dimensional array of integer variables
      • array

        default IVar.Var[][][][][] array​(String id,
                                         Size.Size5D size,
                                         Domains.Dom dom,
                                         String note,
                                         Types.TypeClass... classes)
        Builds a 5-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Method size(int,int,int,int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][][][][] = array("x", size(10, 5, 2, 2, 2), dom(range(10)),
           "x[i][j][k][l][m] is something I can't reveal");
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        note - a short comment about the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 5-dimensional array of integer variables
      • array

        default IVar.Var[][][][][] array​(String id,
                                         Size.Size5D size,
                                         Domains.Dom dom,
                                         Types.TypeClass... classes)
        Builds a 5-dimensional array of integer variables with the specified id, size, domain, note (short comment) and classes. Use Method size(int,int,int,int,int) for building the size (length of each dimension) of the array. Each variable of the array has the specified integer domain. In the following example, all variables have a domain containing 10 values:
         Var[][][][][] = array("x", size(10, 5, 2, 2, 2), dom(range(10)));
         
        Parameters:
        id - the id (unique name) of the array
        size - the size (length of each dimension) of the array
        dom - the domain of each variable in the array
        classes - the tags (possibly, none) associated with the array
        Returns:
        a 5-dimensional array of integer variables
      • ctrFalse

        default CtrEntities.CtrEntity ctrFalse​(IVar.Var[] scp)
        Builds a disentailed integer constraint, i.e., a special constraint that always returns false.
        Parameters:
        scp - the scope of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by means of method chaining.
      • ctrTrue

        default CtrEntities.CtrEntity ctrTrue​(IVar.Var[] scp)
        Builds an entailed integer constraint, i.e., a special constraint that always returns true. For example, it may be useful to achieve some sophisticated tasks related to some forms of consistency.
        Parameters:
        scp - the scope of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by means of method chaining.
      • intension

        default CtrEntities.CtrEntity intension​(XNodeParent<IVar> tree)
        Builds a constraint intension from the specified argument that represents the root of a syntactic tree. This method can be used with integer variables but also with symbolic variables (but currently, it is not allowed to have both integer and symbolic variables involved simultaneously). As an illustration,
         intension(eq(x,add(y,z)))
         
        allows us to post: x = y+z
        Parameters:
        tree - a syntactic tree
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining.
      • abs

        default XNodeParent<IVar> abs​(Object operand)
        Returns the root of a syntactic tree built with the unary operator abs applied to the specified operand. For example, one possible call is abs(sub(x,y)) that represents |x-y|
        Parameters:
        operand - an object that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • neg

        default XNodeParent<IVar> neg​(Object operand)
        Returns the root of a syntactic tree built with the unary operator neg applied to the specified operand. For example, one possible call is neg(add(x,y)) that represents -(x+y)
        Parameters:
        operand - an object that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • sqr

        default XNodeParent<IVar> sqr​(Object operand)
        Returns the root of a syntactic tree built with the unary operator sqr applied to the specified operand. For example, one possible call is sqr(x) that represents x*x
        Parameters:
        operand - an object that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • add

        default XNodeParent<IVar> add​(Object... operands)
        Returns the root of a syntactic tree built with the operator add applied to the specified operands. For example, one possible call is add(x,y,z) that represents x+y+z
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • sub

        default XNodeParent<IVar> sub​(Object operand1,
                                      Object operand2)
        Returns the root of a syntactic tree built with the binary operator sub applied to the specified operands. For example, one possible call is sub(x,y) that represents x-y
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • mul

        default XNodeParent<IVar> mul​(Object... operands)
        Returns the root of a syntactic tree built with the operator mul applied to the specified operands. For example, one possible call is mul(x,y) that represents x*y
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • div

        default XNodeParent<IVar> div​(Object operand1,
                                      Object operand2)
        Returns the root of a syntactic tree built with the binary operator div applied to the specified operands. For example, one possible call is div(x,y) that represents x/y (integer division)
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • mod

        default XNodeParent<IVar> mod​(Object operand1,
                                      Object operand2)
        Returns the root of a syntactic tree built with the binary operator mod applied to the specified operands. For example, one possible call is mod(x,2) that represents x%2
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • pow

        default XNodeParent<IVar> pow​(Object operand1,
                                      Object operand2)
        Returns the root of a syntactic tree built with the binary operator pow applied to the specified operands. For example, one possible call is pow(x,3) that represents x^3
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • min

        default XNodeParent<IVar> min​(Object... operands)
        Returns the root of a syntactic tree built with the operator min applied to the specified operands. For example, one possible call is min(x,y,z)
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • max

        default XNodeParent<IVar> max​(Object... operands)
        Returns the root of a syntactic tree built with the operator max applied to the specified operands. For example, one possible call is max(x,y,z).
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • dist

        default XNodeParent<IVar> dist​(Object operand1,
                                       Object operand2)
        Returns the root of a syntactic tree built with the binary operator dist applied to the specified operands. For example, one possible call is dist(x,y) that represents |x-y|
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • lt

        default XNodeParent<IVar> lt​(Object operand1,
                                     Object operand2)
        Returns the root of a syntactic tree built with the binary operator lt applied to the specified operands. For example, one possible call is lt(x,10 that represents x<10
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • le

        default XNodeParent<IVar> le​(Object operand1,
                                     Object operand2)
        Returns the root of a syntactic tree built with the binary operator le applied to the specified operands. For example, one possible call is le(x,10) that represents x≤10
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • ge

        default XNodeParent<IVar> ge​(Object operand1,
                                     Object operand2)
        Returns the root of a syntactic tree built with the binary operator ge applied to the specified operands. For example, one possible call is ge(x,10) that represents x≥10
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • gt

        default XNodeParent<IVar> gt​(Object operand1,
                                     Object operand2)
        Returns the root of a syntactic tree built with the binary operator gt applied to the specified operands. For example, one possible call is gt(x,10) that represents x>10
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • ne

        default XNodeParent<IVar> ne​(Object... operands)
        Returns the root of a syntactic tree built with the operator ne applied to the specified operands. For example, one possible call is ne(x,y) that represents x≠y
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • eq

        default XNodeParent<IVar> eq​(Object... operands)
        Returns the root of a syntactic tree built with the operator eq applied to the specified operands. For example, one possible call is eq(x,y) that represents x=y
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • set

        default XNode<IVar> set​(Object... operands)
        Returns the root of a syntactic tree built with the operator set applied to the specified operands. For example, one possible call is set(1,2,3) that represents {1,2,3}
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNode that represents the node of a syntactic tree
      • set

        default XNode<IVar> set​(int[] operands)
        Returns the node of a syntactic tree built with the operator set applied to the integers from the specified array. For example, if t id an array containing values 1, 2 and 3, then the call set(t) represents {1,2,3}
        Parameters:
        operands - an array of integers
        Returns:
        an object XNode that represents the node of a syntactic tree
      • in

        default XNodeParent<IVar> in​(Object var,
                                     Object set)
        Returns the root of a syntactic tree built with the operator in applied to the specified operands. For example, one possible call is in(x,set(1,2,3)) that represents x∈{1,2,3}
        Parameters:
        var - the first operand that is typically a variable but can also can be an object XNode
        set - the second operand that must have been built with the operator set
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • notin

        default XNodeParent<IVar> notin​(Object var,
                                        Object set)
        Returns the root of a syntactic tree built with the operator notin applied to the specified operands. For example, one possible call is notin(x,set(1,2,3)) that represents x∉{1,2,3}
        Parameters:
        var - the first operand that is typically a variable but can also can be an object XNode
        set - the second operand that must have been built with the operator set
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • not

        default XNodeParent<IVar> not​(Object operand)
        Returns the root of a syntactic tree built with the unary operator not applied to the specified operand. For example, one possible call is not(eq(x,y)) that represents ¬(x=y)
        Parameters:
        operand - an object that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • and

        default XNodeParent<IVar> and​(Object... operands)
        Returns the root of a syntactic tree built with the operator and applied to the specified operands. For example, one possible call is and(eq(x,y),lt(z,3)) that represents x=y∧z<3
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNode that represents the node of a syntactic tree
      • or

        default XNodeParent<IVar> or​(Object... operands)
        Returns the root of a syntactic tree built with the operator or applied to the specified operands. For example, one possible call is or(eq(x,y),lt(z,3)) that represents x=y∨z<3
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNode that represents the node of a syntactic tree
      • xor

        default XNodeParent<IVar> xor​(Object... operands)
        Returns the root of a syntactic tree built with the operator xor applied to the specified operands. For example, one possible call is xor(eq(x,y),lt(z,3)) that represents x=y⨁z<3
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNode that represents the node of a syntactic tree
      • iff

        default XNodeParent<IVar> iff​(Object... operands)
        Returns the root of a syntactic tree built with the operator iff applied to the specified operands. For example, one possible call is iff(eq(x,y),lt(z,3)) that represents x=y⇔z<3
        Parameters:
        operands - a sequence of operands that can be integers, variables, or objects XNode
        Returns:
        an object XNode that represents the node of a syntactic tree
      • imp

        default XNodeParent<IVar> imp​(Object operand1,
                                      Object operand2)
        Returns the root of a syntactic tree built with the binary operator imp applied to the specified operands. For example, one possible call is imp(eq(x,y),lt(z,3) that represents x=y⇒z<3
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object XNodeParent that represents the root of a syntactic tree
      • ifThenElse

        default XNodeParent<IVar> ifThenElse​(Object operand1,
                                             Object operand2,
                                             Object operand3)
        Returns the root of a syntactic tree built with the binary operator if applied to the specified operands. For example, one possible call is if(eq(x,y),2,4) that represents x=y?2:4
        Parameters:
        operand1 - the first operand that must correspond to a Boolean expression (values 0 or 1)
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        operand3 - the third operand that can be an integer, a variable, or an object XNode
        Returns:
        the root of a syntactic tree built from the specified operands
      • knightAttack

        default XNodeParent<IVar> knightAttack​(IVar x,
                                               IVar y,
                                               int order)
        Returns the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two cells of a flattened matrix (whose order is specified) at a knight distance.
        Parameters:
        x - a first variable
        y - a second variable
        order - the order of the matrix
        Returns:
        the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two distinct cells of a flattened matrix (whose order is specified) at a knight distance
      • queenAttack

        default XNodeParent<IVar> queenAttack​(IVar x,
                                              IVar y,
                                              int order)
        Returns the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two distinct cells of a flattened matrix (whose order is specified) on the same row, column or diagonal.
        Parameters:
        x - a first variable
        y - a second variable
        order - the order of the matrix
        Returns:
        the root of a syntactic tree that represents the predicate ensuring that the specified variables are put in two cells of a flattened matrix (whose order is specified) at a knight distance
      • lessThan

        default CtrEntities.CtrEntity lessThan​(Object operand1,
                                               Object operand2)
        Builds a constraint intension, while considering the operator lt applied to the specified arguments. This is a modeling ease of use. As an illustration,
         lessThan(x,y);
         
        is equivalent (a shortcut) to:
         intension(lt(x,y));
         
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • lessEqual

        default CtrEntities.CtrEntity lessEqual​(Object operand1,
                                                Object operand2)
        Builds a constraint intension, while considering the operator le applied to the specified arguments. This is a modeling ease of use. As an illustration,
         lessEqual(x,y);
         
        is equivalent (a shortcut) to:
         intension(le(x,y));
         
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • greaterEqual

        default CtrEntities.CtrEntity greaterEqual​(Object operand1,
                                                   Object operand2)
        Builds a constraint intension, while considering the operator ge applied to the specified arguments. This is a modeling ease of use. As an illustration,
         greaterEqual(x,y);
         
        is equivalent (a shortcut) to:
         intension(ge(x,y));
         
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • greaterThan

        default CtrEntities.CtrEntity greaterThan​(Object operand1,
                                                  Object operand2)
        Builds a constraint intension, while considering the operator gt applied to the specified arguments. This is a modeling ease of use. As an illustration,
         greaterThan(x,y);
         
        is equivalent (a shortcut) to:
         intension(gt(x,y));
         
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • equal

        default CtrEntities.CtrEntity equal​(Object... operands)
        Builds a constraint intension, while considering the operator eq applied to the specified arguments. This is a modeling ease of use. As an illustration,
         equal(x,y);
         
        is equivalent (a shortcut) to:
         intension(eq(x,y));
         
        Parameters:
        operands - the operands that can be integers, variables, or objects XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • different

        default CtrEntities.CtrEntity different​(Object... operands)
        Builds a constraint intension, while considering the operator ne applied to the specified arguments. This is a modeling ease of use. As an illustration,
         different(x,y);
         
        is equivalent (a shortcut) to:
         intension(ne(x,y));
         
        Parameters:
        operands - the operands that can be integers, variables, or objects XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • belong

        default CtrEntities.CtrEntity belong​(Object operand1,
                                             Object operand2)
        Builds a constraint intension, while considering the operator in applied to the specified arguments. This is a modeling ease of use. As an illustration,
         belong(x,set(1,2,3));
         
        is equivalent (a shortcut) to:
         intension(in(x,set(1,2,3)));
         
        Parameters:
        operand1 - the first operand that can be a variable, or an object XNode
        operand2 - the second operand that must have been built with the operator set
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • implication

        default CtrEntities.CtrEntity implication​(Object operand1,
                                                  Object operand2)
        Builds a constraint intension, while considering the operator imp applied to the specified arguments. This is a modeling ease of use. As an illustration,
         implication(eq(x,y),lt(z,3));
         
        is equivalent (a shortcut) to:
         intension(imp(eq(x,y),lt(z,3)));
         
        Parameters:
        operand1 - the first operand that can be an integer, a variable, or an object XNode
        operand2 - the second operand that can be an integer, a variable, or an object XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • equivalence

        default CtrEntities.CtrEntity equivalence​(Object... operands)
        Builds a constraint intension, while considering the operator iff applied to the specified arguments. This is a modeling ease of use. As an illustration,
         equivalence(eq(x,y),lt(z,3));
         
        is equivalent (a shortcut) to:
         intension(iff(eq(x,y),lt(z,3)));
         
        Parameters:
        operands - the operands that can be integers, variables, or objects XNodehe operands that can be integers, variables, or objects XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • conjunction

        default CtrEntities.CtrEntity conjunction​(Object... operands)
        Builds a constraint intension, while considering the operator add applied to the specified arguments. This is a modeling ease of use.
        Parameters:
        operands - the operands that can be integers, variables, or objects XNodehe operands that can be integers, variables, or objects XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • disjunction

        default CtrEntities.CtrEntity disjunction​(Object... operands)
        Builds a constraint intension, while considering the operator or applied to the specified arguments. This is a modeling ease of use.
        Parameters:
        operands - the operands that can be integers, variables, or objects XNode
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • treesFrom

        default java.util.stream.Stream<XNode<IVar>> treesFrom​(IVar[] t,
                                                               java.util.function.Function<IVar,​XNode<IVar>> f)
        Returns a stream of syntactic trees (predicates) built by applying the specified function to each variable of the specified array. null values in the array are discarded.
        Parameters:
        t - an array of variables
        f - a function mapping variables into syntactic trees (predicates)
        Returns:
        a stream of syntactic trees built by applying the specified function to each variable of the specified array
      • treesFrom

        default java.util.stream.Stream<XNode<IVar>> treesFrom​(java.util.stream.IntStream stream,
                                                               java.util.function.Function<Integer,​XNode<IVar>> f)
        Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified stream.
        Parameters:
        stream - a stream of integers
        f - a function mapping integers into syntactic trees (predicates)
        Returns:
        a stream of syntactic trees built by applying the specified function to each integer of the specified stream
      • treesFrom

        default java.util.stream.Stream<XNode<IVar>> treesFrom​(Collection<Integer> c,
                                                               java.util.function.Function<Integer,​XNode<IVar>> f)
        Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified collection. null values in the collection are discarded.
        Parameters:
        c - a collection of integers
        f - a function mapping integers into syntactic trees (predicates)
        Returns:
        a stream of syntactic trees built by applying the specified function to each integer of the specified collection
      • treesFrom

        default java.util.stream.Stream<XNode<IVar>> treesFrom​(int[] t,
                                                               java.util.function.Function<Integer,​XNode<IVar>> f)
        Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified array.
        Parameters:
        t - an array of integers
        f - a function mapping integers into syntactic trees (predicates)
        Returns:
        a stream of syntactic trees built by applying the specified function to each integer of the specified array
      • treesFrom

        default java.util.stream.Stream<XNode<IVar>> treesFrom​(Range r,
                                                               java.util.function.Function<Integer,​XNode<IVar>> f)
        Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified range.
        Parameters:
        r - a range
        f - a function mapping integers into syntactic trees (predicates)
        Returns:
        a stream of syntactic trees built by applying the specified function to each integer of the specified range
      • extension

        default CtrEntities.CtrAlone extension​(XNodeParent<IVar> tree)
        Builds a constraint extension from the specified syntactic tree (predicate). The specified intentional constraint is converted in extensional form.
        Parameters:
        tree - the root of a syntactic tree (predicate)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var[] scp,
                                                int[][] tuples,
                                                Boolean positive)
        Builds a constraint extension from the specified scope and the specified array of tuples, seen as either supports (when positive is true) or conflicts (when positive is false). Note that you can use constants POSITIVE and NEGATIVE.
        Parameters:
        scp - the scope of the constraint
        tuples - the tuples defining the semantics of the constraint
        positive - boolean value indicating if the tuples are supports or conflicts
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var[] scp,
                                                int[]... tuples)
        Builds a constraint extension from the specified scope and the specified array of tuples, seen as supports.
        Parameters:
        scp - the scope of the constraint
        tuples - the tuples defining the supports of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var[] scp,
                                                Collection<int[]> tuples,
                                                Boolean positive)
        Builds a constraint extension from the specified scope and the specified collection of tuples, seen as either supports (when positive is true) or conflicts (when positive is false). Note that you can use constants POSITIVE and NEGATIVE.
        Parameters:
        scp - the scope of the constraint
        tuples - the tuples defining the semantics of the constraint
        positive - boolean value indicating if the tuples are supports or conflicts
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var[] scp,
                                                Collection<int[]> tuples)
        Builds a constraint extension from the specified scope and the specified collection of tuples, seen as supports.
        Parameters:
        scp - the scope of the constraint
        tuples - the tuples defining the supports of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var[] scp,
                                                Table table)
        Builds a constraint extension from the specified scope and the specified table, whose elements are seen as supports. An example of integer table that can be constructed is
         table("(1,2,3)(2,1,1)")
         
        For a negative table, you can write:
         table("(1,2,3)(2,1,1)").positive(false)
         
        Parameters:
        scp - the scope of the constraint
        table - the table containing the tuples defining the supports of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var x,
                                                int[] values,
                                                Boolean positive)
        Builds a unary constraint extension from the specified variable and the specified array of values, seen as either supports (when positive is true) or conflicts (when positive is false). Note that you can use constants POSITIVE and NEGATIVE.
        Parameters:
        x - the variable involved in this unary constraint
        values - the values defining the semantics of the constraint
        positive - boolean value indicating if the values are supports or conflicts
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var x,
                                                int... values)
        Builds a unary constraint extension from the specified variable and the specified array of values, seen as supports.
        Parameters:
        x - the variable involved in this unary constraint
        values - the values defining the semantics of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • extension

        default CtrEntities.CtrEntity extension​(IVar.Var x,
                                                Table table)
        Builds a unary constraint extension from the specified variable and the specified table.
        Parameters:
        x - the variable involved in this unary constraint
        table - the table defining the semantics of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • regular

        default CtrEntities.CtrEntity regular​(IVar.Var[] scp,
                                              Automaton automaton)
        Builds a constraint regular from the specified scope and the specified automaton. Note that an automaton can be built as in the following example:
         Transitions transitions = Transitions.parse("(q0,0,q1)(q0,2,q2)(q1,0,q3)(q2,2,q3)"); 
         Automaton automata = new Automaton(transitions, "q0", tuple("q2", "q3"));)
         
        Parameters:
        scp - the scope of the constraint
        automaton - the automaton defining the semantics of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • mdd

        default CtrEntities.CtrEntity mdd​(IVar.Var[] scp,
                                          Transition[] transitions)
        Builds a constraint mdd from the specified scope and the specified transitions. Note that transitions can be built as in the following example:
         
                Transitions transitions = Transitions.parse("(q0,0,q1)(q0,2,q2)(q1,0,q3)(q2,2,q3)");
         
         
        Parameters:
        scp - the scope of the constraint
        transitions - the transitions defining the MDD, and consequently the semantics of the constraint
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(IVar.Var[] list)
        Builds a constraint allDifferent on the specified integer variables: the variables must all take different values.
        Parameters:
        list - the involved integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(IVar.Var x,
                                                   IVar.Var... others)
        Builds a constraint allDifferent on the specified integer variables: the variables must all take different values.
        Parameters:
        x - a first integer variable
        others - a sequence of other integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(IVar.Var[]... list)
        Builds a constraint allDifferent on the specified integer variables: the variables must all take different values. Note that the specified 2-dimensional array of variables will be flattened (i.e., converted into a 1-dimensional array of variables). Do not mistake this form with allDifferentList
        Parameters:
        list - the involved integer variables (a 2-dimensional array)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(IVar.Var[][][] list)
        Builds a constraint allDifferent on the specified integer variables: the variables must all take different values. Note that the specified 3-dimensional array of variables will be flattened (i.e., converted into a 1-dimensional array of variables).
        Parameters:
        list - the involved integer variables (a 3-dimensional array)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(IVar.Var[] list,
                                                   int... exceptValues)
        Builds a constraint allDifferent on the specified integer variables: the variables must take different values, except those that take one of the specified 'exceptional' values.
        Parameters:
        list - the involved integer variables
        exceptValues - the values that must be ignored
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferentList

        default CtrEntities.CtrEntity allDifferentList​(IVar.Var[]... lists)
        Builds a constraint allDifferentList on the specified lists of variables: all tuples formed by the different lists must be different.
        Parameters:
        lists - a 2-dimensional array of variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferentMatrix

        default CtrEntities.CtrEntity allDifferentMatrix​(IVar.Var[][] matrix)
        Builds a constraint allDifferentMatrix on the specified matrix of variables. On each row and on each column, the variables must all take different values.
        Parameters:
        matrix - a 2-dimensional array of variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(XNode<IVar>[] trees)
        Builds a constraint allDifferent on the specified syntactic trees (predicates): the predicates, when evaluated, must all take different values.
        Parameters:
        trees - an array of syntactic trees (predicates)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allDifferent

        default CtrEntities.CtrEntity allDifferent​(java.util.stream.Stream<XNode<IVar>> trees)
        Builds a constraint allDifferent on the specified (stream of) syntactic trees (predicates): the predicates, when evaluated, must all take different values.
        Parameters:
        trees - a stream of syntactic trees (predicates)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allEqual

        default CtrEntities.CtrEntity allEqual​(IVar.Var... list)
        Builds a constraint allEqual on the specified integer variables: the variables must all take the same value. Basically, this is a modeling ease of use.
        Parameters:
        list - the involved integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allEqual

        default CtrEntities.CtrEntity allEqual​(IVar.Var[][] list)
        Builds a constraint allEqual on the specified integer variables: the variables must all take the same value. Basically, this is a modeling ease of use. Note that the specified 2-dimensional array of variables will be flattened (i.e., converted into a 1-dimensional array of variables). Do not mistake this form with allEqualList
        Parameters:
        list - the involved integer variables (a 2-dimensional array)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • allEqualList

        default CtrEntities.CtrEntity allEqualList​(IVar.Var[]... lists)
        Builds a constraint allEqualList on the specified lists of variables: all tuples formed by the different lists must be equal.
        Parameters:
        lists - a 2-dimensional array of variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • ordered

        default CtrEntities.CtrEntity ordered​(IVar.Var[] list,
                                              int[] lengths,
                                              Types.TypeOperatorRel operator)
        Builds a constraint ordered on the specified lists of variables: any two successive variables must respect the specified operator, while considering the specified lengths. We have:
         for any i in 0..list.length-1, list[i] + lengths[i] <op> list[i+1]
         
        In general, the size of lengths is the size of list minus 1. But, for simplicity, it is authorized to have the size of lengths being equal to that of list, in which case the last value of the integer array is simply ignored. Basically, this constraint is a modeling ease of use.
        Parameters:
        list - the involved integer variables
        lengths - the lengths used
        operator - a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • ordered

        default CtrEntities.CtrEntity ordered​(IVar.Var[] list,
                                              IVar.Var[] lengths,
                                              Types.TypeOperatorRel operator)
        Builds a constraint ordered on the specified lists of variables: any two successive variables must respect the specified operator, while considering the specified lengths. We have:
         for any i in 0..list.length-1, list[i] + lengths[i] <op> list[i+1]
         
        In general, the size of lengths is the size of list minus 1. But, for simplicity, it is authorized to have the size of lengths being equal to that of list, in which case the last value of the integer array is simply ignored. Basically, this constraint is a modeling ease of use.
        Parameters:
        list - the involved integer variables
        lengths - the lengths used
        operator - a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • ordered

        default CtrEntities.CtrEntity ordered​(IVar.Var[] list,
                                              Types.TypeOperatorRel operator)
        Builds a constraint ordered on the specified lists of variables: any two successive variables must respect the specified operator. Basically, this is a modeling ease of use.
        Parameters:
        list - the involved integer variables
        operator - a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • strictlyIncreasing

        default CtrEntities.CtrEntity strictlyIncreasing​(IVar.Var... list)
        Builds a constraint ordered on the specified lists of variables, while considering a strict increasing order. This is a modeling ease of use. As an illustration,
         strictlyIncreasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,STRICTLY_INCREASING);
         
        Parameters:
        list - the involved integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • increasing

        default CtrEntities.CtrEntity increasing​(IVar.Var... list)
        Builds a constraint ordered on the specified lists of variables, while considering an increasing order. This is a modeling ease of use. As an illustration,
         increasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,INCREASING);
         
        Parameters:
        list - the involved integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • decreasing

        default CtrEntities.CtrEntity decreasing​(IVar.Var... list)
        Builds a constraint ordered on the specified lists of variables, while considering a decreasing order. This is a modeling ease of use. As an illustration,
         decreasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,DECREASING);
         
        Parameters:
        list - the involved integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • strictlyDecreasing

        default CtrEntities.CtrEntity strictlyDecreasing​(IVar.Var... list)
        Builds a constraint ordered on the specified lists of variables, while considering a strict decreasing order. This is a modeling ease of use. As an illustration,
         strictlydecreasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,STRICTLY_DeCREASING);
         
        Parameters:
        list - the involved integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • lex

        default CtrEntities.CtrEntity lex​(IVar.Var[][] lists,
                                          Types.TypeOperatorRel operator)
        Builds a constraint lex on the specified 2-dimensional array of variables: any two successive rows of variables must respect the specified operator. Basically, this is a modeling ease of use.
        Parameters:
        lists - a 2-dimensional array of integer variables
        operator - a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • strictlyIncreasing

        default CtrEntities.CtrEntity strictlyIncreasing​(IVar.Var[]... lists)
        Builds a constraint lex on the specified 2-dimensional array of variables, while considering a strict increasing order on rows. This is a modeling ease of use. As an illustration,
         strictlyIncreasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,STRICTLY_INCREASING);
         
        Parameters:
        lists - a 2-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • increasing

        default CtrEntities.CtrEntity increasing​(IVar.Var[]... lists)
        Builds a constraint lex on the specified 2-dimensional array of variables, while considering an increasing order on rows. This is a modeling ease of use. As an illustration,
         increasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,INCREASING);
         
        Parameters:
        lists - a 2-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • decreasing

        default CtrEntities.CtrEntity decreasing​(IVar.Var[]... lists)
        Builds a constraint lex on the specified 2-dimensional array of variables, while considering a decreasing order on rows. This is a modeling ease of use. As an illustration,
         decreasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,DeCREASING);
         
        Parameters:
        lists - a 2-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • strictlyDecreasing

        default CtrEntities.CtrEntity strictlyDecreasing​(IVar.Var[]... lists)
        Builds a constraint lex on the specified 2-dimensional array of variables, while considering a strict decreasing order on rows. This is a modeling ease of use. As an illustration,
         strictlyDecreasing(x);
         
        is equivalent (a shortcut) to:
         ordered(x,STRICTLY_DECREASING);
         
        Parameters:
        lists - a 2-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • lexMatrix

        default CtrEntities.CtrEntity lexMatrix​(IVar.Var[][] matrix,
                                                Types.TypeOperatorRel operator)
        Builds a constraint lexMatrix on the specified matrix of variables. Any two successive rows of variables and any two successive columns of variables must respect the specified operator.
        Parameters:
        matrix - a 2-dimensional array of integer variables
        operator - a relational operator (STRICTLY_INCREASING, INCREASING, DECREASING or STRICTLY_DECREASING)
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          int[] coeffs,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the specified condition.
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the sum must respect the specified condition.
        Parameters:
        list - the summed variables
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         sum(x,t,EQ,10);
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          Range coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. The coefficients are given under the form of a range. As an illustration,
         sum(x,range(5),EQ,10);
         
        Parameters:
        list - the summed variables
        coeffs - the range of values used as coefficients for the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         sum(x,EQ,10);
         
        Parameters:
        list - the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         sum(x,t,GT,z);
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         sum(x,GT,z);
         
        Parameters:
        list - the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorSet op,
                                          Range range)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         sum(x,t,IN,range(1,4));
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          Types.TypeConditionOperatorSet op,
                                          Range range)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         sum(x,IN,1,4);
         
        Parameters:
        list - the summed variables
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorSet op,
                                          int[] set)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified set of values. As an illustration,
         sum(x,t,NOTIN,vals(1,3,5,6));
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          Types.TypeConditionOperatorSet op,
                                          int[] set)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified set of values. As an illustration,
         sum(x,NOTIN,vals(1,3,5,6));
         
        Parameters:
        list - the summed variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          IVar.Var[] coeffs,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the specified condition.
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          IVar.Var[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         sum(x,y,LE,100);
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          IVar.Var[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         sum(x,y,LE,z);
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          IVar.Var[] coeffs,
                                          Types.TypeConditionOperatorSet op,
                                          Range range)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         sum(x,y,IN,1,4);
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(IVar.Var[] list,
                                          IVar.Var[] coeffs,
                                          Types.TypeConditionOperatorSet op,
                                          int[] set)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified set of values. As an illustration,
         sum(x,y,NOTIN,vals(1,3,5,6));
         
        Parameters:
        list - the summed variables
        coeffs - the coefficients associated with the summed variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(XNode<IVar>[] trees,
                                          int[] coeffs,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the specified condition.
        Parameters:
        trees - an array of syntactic trees (usually, predicates)
        coeffs - the coefficients associated with the syntactic trees
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(XNode<IVar>[] trees,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the specified condition.
        Parameters:
        trees - an array of syntactic trees (usually, predicates)
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(XNode<IVar>[] trees,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - an array of syntactic trees (usually, predicates)
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(XNode<IVar>[] trees,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - an array of syntactic trees (usually, predicates)
        coeffs - the coefficients associated with the syntactic trees
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(XNode<IVar>[] trees,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - an array of syntactic trees (usually, predicates)
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(XNode<IVar>[] trees,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - an array of syntactic trees (usually, predicates)
        coeffs - the coefficients associated with the syntactic trees
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(java.util.stream.Stream<XNode<IVar>> trees,
                                          int[] coeffs,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the specified condition.
        Parameters:
        trees - a stream of syntactic trees (usually, predicates)
        coeffs - the coefficients associated with the syntactic trees
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(java.util.stream.Stream<XNode<IVar>> trees,
                                          Condition condition)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the specified condition.
        Parameters:
        trees - a stream of syntactic trees (usually, predicates)
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(java.util.stream.Stream<XNode<IVar>> trees,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - a stream of syntactic trees (usually, predicates)
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(java.util.stream.Stream<XNode<IVar>> trees,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          long limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - a stream of syntactic trees (usually, predicates)
        coeffs - the coefficients associated with the syntactic trees
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(java.util.stream.Stream<XNode<IVar>> trees,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - a stream of syntactic trees (usually, predicates)
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • sum

        default CtrEntities.CtrEntity sum​(java.util.stream.Stream<XNode<IVar>> trees,
                                          int[] coeffs,
                                          Types.TypeConditionOperatorRel op,
                                          IVar.Var limit)
        Builds a constraint sum from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.
        Parameters:
        trees - a stream of syntactic trees (usually, predicates)
        coeffs - the coefficients associated with the syntactic trees
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the sum is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int[] values,
                                            Condition condition)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the specified condition.
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int[] values,
                                            Types.TypeConditionOperatorRel op,
                                            int limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,vals(0,1),LE,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int value,
                                            Types.TypeConditionOperatorRel op,
                                            int limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,0,LE,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int[] values,
                                            Types.TypeConditionOperatorRel op,
                                            IVar.Var limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,vals(0,1),LE,z);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int value,
                                            Types.TypeConditionOperatorRel op,
                                            IVar.Var limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,0,LE,z);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int[] values,
                                            Types.TypeConditionOperatorSet op,
                                            Range range)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         count(x,vals(0,1),IN,1,4);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int value,
                                            Types.TypeConditionOperatorSet op,
                                            Range range)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         count(x,0,IN,1,4);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int[] values,
                                            Types.TypeConditionOperatorSet op,
                                            int[] set)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,
         count(x,vals(0,1),IN,t);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            int value,
                                            Types.TypeConditionOperatorSet op,
                                            int[] set)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,
         count(x,1,IN,t);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var[] values,
                                            Condition condition)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the values must respect the specified condition.
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var[] values,
                                            Types.TypeConditionOperatorRel op,
                                            int limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,y,LE,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var value,
                                            Types.TypeConditionOperatorRel op,
                                            int limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the assigned value must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,y,LE,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer variable
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var[] values,
                                            Types.TypeConditionOperatorRel op,
                                            IVar.Var limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,y,LE,z);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var value,
                                            Types.TypeConditionOperatorRel op,
                                            IVar.Var limit)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the assigned value must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         count(x,y,LE,z);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer variable
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the count is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var[] values,
                                            Types.TypeConditionOperatorSet op,
                                            Range range)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the values must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         count(x,y,IN,1,4);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var value,
                                            Types.TypeConditionOperatorSet op,
                                            Range range)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the value must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         count(x,y,IN,1,4);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer variable
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var[] values,
                                            Types.TypeConditionOperatorSet op,
                                            int[] set)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,
         count(x,y,IN,t);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • count

        default CtrEntities.CtrEntity count​(IVar.Var[] list,
                                            IVar.Var value,
                                            Types.TypeConditionOperatorSet op,
                                            int[] set)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the value must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,
         count(x,y,IN,t);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • atLeast

        default CtrEntities.CtrEntity atLeast​(IVar.Var[] list,
                                              int value,
                                              int k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is at least equal to k. As an illustration,
         atLeast(x,0,5);
         
        is equivalent (a shortcut) to:
         count(x,0,GE,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        k - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • atMost

        default CtrEntities.CtrEntity atMost​(IVar.Var[] list,
                                             int value,
                                             int k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is at most equal to k. As an illustration,
         atMost(x,0,5);
         
        is equivalent (a shortcut) to:
         count(x,0,LE,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        k - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • exactly

        default CtrEntities.CtrEntity exactly​(IVar.Var[] list,
                                              int value,
                                              int k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is exactly k. As an illustration,
         exactly(x,0,5);
         
        is equivalent (a shortcut) to:
         count(x,0,EQ,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        k - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • among

        default CtrEntities.CtrEntity among​(IVar.Var[] list,
                                            int[] values,
                                            int k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values is exactly k. As an illustration,
         among(x,vals(2,3,4),5);
         
        is equivalent (a shortcut) to:
         count(x,vals(2,3,4),EQ,5);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        k - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • atLeast

        default CtrEntities.CtrEntity atLeast​(IVar.Var[] list,
                                              int value,
                                              IVar.Var k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is at least equal to k. As an illustration,
         atLeast(x,0,k);
         
        is equivalent (a shortcut) to:
         count(x,0,GE,k);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        k - an integer variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • atMost

        default CtrEntities.CtrEntity atMost​(IVar.Var[] list,
                                             int value,
                                             IVar.Var k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is at most equal to k. As an illustration,
         atMost(x,0,k);
         
        is equivalent (a shortcut) to:
         count(x,0,LE,k);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        k - an integer variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • exactly

        default CtrEntities.CtrEntity exactly​(IVar.Var[] list,
                                              int value,
                                              IVar.Var k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is exactly k. As an illustration,
         exactly(x,0,k);
         
        is equivalent (a shortcut) to:
         count(x,0,EQ,k);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        k - an integer variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • among

        default CtrEntities.CtrEntity among​(IVar.Var[] list,
                                            int[] values,
                                            IVar.Var k)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take one of the specified values is exactly k. As an illustration,
         among(x,vals(2,3,4),k);
         
        is equivalent (a shortcut) to:
         count(x,vals(2,3,4),EQ,k);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        k - an integer variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • atLeast1

        default CtrEntities.CtrEntity atLeast1​(IVar.Var[] list,
                                               int value)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is at least 1. As an illustration,
         atLeast1(x,2);
         
        is equivalent (a shortcut) to:
         count(x,2,GE,1);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • atMost1

        default CtrEntities.CtrEntity atMost1​(IVar.Var[] list,
                                              int value)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is at most 1. As an illustration,
         atMost1(x,2);
         
        is equivalent (a shortcut) to:
         count(x,2,LE,1);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • exactly1

        default CtrEntities.CtrEntity exactly1​(IVar.Var[] list,
                                               int value)
        Builds a constraint count from the specified arguments: the number of variables in the specified list that take the specified value is exactly 1. As an illustration,
         exactly1(x,2);
         
        is equivalent (a shortcut) to:
         count(x,2,EQ,1);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Condition condition)
        Builds a constraint nValues from the specified arguments: the number of distinct values taken by variables of the specified list must respect the specified condition.
        Parameters:
        list - a 1-dimensional array of integer variables
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorRel op,
                                              int limit)
        Builds a constraint nValues from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         nValues(x,GE,3);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the number is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorRel op,
                                              IVar.Var limit)
        Builds a constraint nValues from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         nValues(x,GE,k);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the number is compared
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorSet op,
                                              Range range)
        Builds a constraint nValues from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified set operator and the specified interval (range). As an illustration,
         nValues(x,IN,range(1,3));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorSet op,
                                              int[] set)
        Builds a constraint nValues from the specified arguments: the number of distinct values taken by variables of the specified list must respect the condition expressed by the specified set operator and the specified set of values. As an illustration,
         nValues(x,IN,vals(2,3,4));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Condition condition,
                                              int... exceptValues)
        Builds a constraint nValues from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the specified condition.
        Parameters:
        list - a 1-dimensional array of integer variables
        condition - an object condition composed of an operator and an operand
        exceptValues - a sequence of integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorRel op,
                                              int limit,
                                              int... exceptValues)
        Builds a constraint nValues from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         nValues(x,GT,3,exceptValue(0));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the number is compared
        exceptValues - a sequence of integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorRel op,
                                              IVar.Var limit,
                                              int... exceptValues)
        Builds a constraint nValues from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified limit. As an illustration,
         nValuesExcept(x,GT,k,exceptValue(0));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a relational operator (LT, LE, GE, GT, NE, or EQ)
        limit - the right operand to which the number is compared
        exceptValues - a sequence of integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorSet op,
                                              Range range,
                                              int... exceptValues)
        Builds a constraint nValues from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified interval (range). As an illustration,
         nValuesExcept(x,IN,range(1,3),exceptValue(0));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        range - a range (interval) of values involved in the comparison
        exceptValues - a sequence of integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • nValues

        default CtrEntities.CtrEntity nValues​(IVar.Var[] list,
                                              Types.TypeConditionOperatorSet op,
                                              int[] set,
                                              int... exceptValues)
        Builds a constraint nValues from the specified arguments: the number of distinct values that are taken by variables of the specified list and that do not occur among those specified must respect the condition expressed by the specified operator and the specified set of values. As an illustration,
         nValuesExcept(x,IN,vals(1,3,5),exceptValue(0));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        op - a set operator (IN or NOTIN)
        set - the set of values involved in the comparison
        exceptValues - a sequence of integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • notAllEqual

        default CtrEntities.CtrEntity notAllEqual​(IVar.Var... list)
        Builds a constraint nValues from the specified arguments: at least two distinct values are assigned to the variables of the specified list.
        Parameters:
        list - a 1-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cardinality

        default CtrEntities.CtrEntity cardinality​(IVar.Var[] list,
                                                  int[] values,
                                                  boolean mustBeClosed,
                                                  ProblemAPIBase.Occurrences occurrences)
        Builds a constraint cardinality from the specified arguments: when considering the sequence of values assigned to the variables of list, each integer in values at index i must occur a number of times k_i that respects the conditions imposed by the object Occurrences. These conditions can be stated as follows:
        • when the object Occurrences represents a simple integer v, obtained by calling Method occursEachExactly(int), k_i must be exactly v
        • when the object Occurrences represents a 1-dimensional array of integers t, obtained by calling Method occurExactly(int[]), k_i must be exactly t[i]
        • when the object OccursEachBetweeen represents an interval of integers v..w, obtained by calling Method occursEachBetween(int,int), k_i must belong to v..w
        • when the object OccursBetween represents two 1-dimensional arrays of integers t1 and t2, obtained by calling Method occurBetween(int[],int[]), k_i must belong to t1[i]..t2[i]
        • when the object Occurrences represents a 1-dimensional array of integer variables x, obtained by calling Method occurExactly(Var[]), k_i must be the same value as x[i]
        Note that when the specified boolean is true, it is required that all variables in list are assigned a value in values.
        As an illustration, enforcing values 1 and 2 to occur exactly 5 times each is given by:
         cardinality(x,vals(1,2),true,occursEachExactly(5));
         
        Enforcing values 1 and 2 to occur between 3 and 5 times each is given by:
         cardinality(x,vals(1,2),true,occursEachBetween(3,5));
         
        Enforcing values 1 and 2 to occur exactly y1 and y2 times, with y1 and y2 two variables, each is given by:
         cardinality(x,vals(1,2),true,occurExactly(y1,y2));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        mustBeClosed - true iff all variables of list must necessarily be assigned to a value in values
        occurrences - an object Occurrences
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cardinality

        default CtrEntities.CtrEntity cardinality​(IVar.Var[] list,
                                                  int[] values,
                                                  ProblemAPIBase.Occurrences occurrences)
        Builds a constraint cardinality from the specified arguments: when considering the sequence of values assigned to the variables of list, each integer in values at index i must occur a number of times k_i that respects the conditions imposed by the object Occurrences. These conditions can be stated as follows:
        • when the object Occurrences represents a simple integer v, obtained by calling Method occursEachExactly(int), k_i must be exactly v
        • when the object Occurrences represents a 1-dimensional array of integers t, obtained by calling Method occurExactly(int[]), k_i must be exactly t[i]
        • when the object OccursEachBetweeen represents an interval of integers v..w, obtained by calling Method occursEachBetween(int,int), k_i must belong to v..w
        • when the object OccursBetween represents two 1-dimensional arrays of integers t1 and t2, obtained by calling Method occurBetween(int[],int[]), k_i must belong to t1[i]..t2[i]
        • when the object Occurrences represents a 1-dimensional array of integer variables x, obtained by calling Method occurExactly(Var[]), k_i must be the same value as x[i]
        As an illustration, enforcing values 1 and 2 to occur exactly 5 times each is given by:
         cardinality(x,vals(1,2),occursEachExactly(5));
         
        Enforcing values 1 and 2 to occur between 3 and 5 times each is given by:
         cardinality(x,vals(1,2),occursEachBetween(3,5));
         
        Enforcing values 1 and 2 to occur exactly y1 and y2 times, with y1 and y2 two variables, each is given by:
         cardinality(x,vals(1,2),occurExactly(y1,y2));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integers
        occurrences - an object Occurrences
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cardinality

        default CtrEntities.CtrEntity cardinality​(IVar.Var[] list,
                                                  Range values,
                                                  ProblemAPIBase.Occurrences occurrences)
        Builds a constraint cardinality from the specified arguments: when considering the sequence of values assigned to the variables of list, each integer in the range values at index i must occur a number of times k_i that respects the conditions imposed by the object Occurrences. These conditions can be stated as follows:
        • when the object Occurrences represents a simple integer v, obtained by calling Method occursEachExactly(int), k_i must be exactly v
        • when the object Occurrences represents a 1-dimensional array of integers t, obtained by calling Method occurExactly(int[]), k_i must be exactly t[i]
        • when the object OccursEachBetweeen represents an interval of integers v..w, obtained by calling Method occursEachBetween(int,int), k_i must belong to v..w
        • when the object OccursBetween represents two 1-dimensional arrays of integers t1 and t2, obtained by calling Method occurBetween(int[],int[]), k_i must belong to t1[i]..t2[i]
        • when the object Occurrences represents a 1-dimensional array of integer variables x, obtained by calling Method occurExactly(Var[]), k_i must be the same value as x[i]
        As an illustration, enforcing values 1, 2, 3 and 4 to occur exactly 5 times each is given by:
         cardinality(x,range(1,4),occursEachExactly(5));
         
        Enforcing values 1, 2, 3 and 4 to occur between 3 and 5 times each is given by:
         cardinality(x,range(1,4),occursEachBetween(3,5));
         
        Enforcing values 1, 2, 3 and 4 to occur exactly y[i] times, with y an array of variables and i the index of each value in turn, each is given by:
         cardinality(x,range(1,4),occurExactly(y));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a range of integers
        occurrences - an object Occurrences
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cardinality

        default CtrEntities.CtrEntity cardinality​(IVar.Var[] list,
                                                  IVar.Var[] values,
                                                  boolean mustBeClosed,
                                                  ProblemAPIBase.Occurrences occurrences)
        Builds a constraint cardinality from the specified arguments: when considering the sequence of values assigned to the variables of list, each integer in values at index i must occur a number of times k_i that respects the conditions imposed by the object Occurrences. These conditions can be stated as follows:
        • when the object Occurrences represents a simple integer v, obtained by calling Method occursEachExactly(int), k_i must be exactly v
        • when the object Occurrences represents a 1-dimensional array of integers t, obtained by calling Method occurExactly(int[]), k_i must be exactly t[i]
        • when the object OccursEachBetweeen represents an interval of integers v..w, obtained by calling Method occursEachBetween(int,int), k_i must belong to v..w
        • when the object OccursBetween represents two 1-dimensional arrays of integers t1 and t2, obtained by calling Method occurBetween(int[],int[]), k_i must belong to t1[i]..t2[i]
        • when the object Occurrences represents a 1-dimensional array of integer variables x, obtained by calling Method occurExactly(Var[]), k_i must be the same value as x[i]
        Note that when the specified boolean is true, it is required that all variables in list are assigned a value in values.
        As an illustration, enforcing values from array y to occur exactly 5 times each is given by:
         cardinality(x,y,true,occursEachExactly(5));
         
        Enforcing values from array y to occur between 3 and 5 times each is given by:
         cardinality(x,y,true,occursEachBetween(3,5));
         
        Enforcing value y[i] to occur exactly z[i] times is given by:
         cardinality(x,y,true,occurExactly(z));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        mustBeClosed - true iff all variables of list must necessarily be assigned to a value in values
        occurrences - an object Occurrences
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cardinality

        default CtrEntities.CtrEntity cardinality​(IVar.Var[] list,
                                                  IVar.Var[] values,
                                                  ProblemAPIBase.Occurrences occurs)
        Builds a constraint cardinality from the specified arguments: when considering the sequence of values assigned to the variables of list, each integer in values at index i must occur a number of times k_i that respects the conditions imposed by the object Occurrences. These conditions can be stated as follows:
        • when the object Occurrences represents a simple integer v, obtained by calling Method occursEachExactly(int), k_i must be exactly v
        • when the object Occurrences represents a 1-dimensional array of integers t, obtained by calling Method occurExactly(int[]), k_i must be exactly t[i]
        • when the object OccursEachBetweeen represents an interval of integers v..w, obtained by calling Method occursEachBetween(int,int), k_i must belong to v..w
        • when the object OccursBetween represents two 1-dimensional arrays of integers t1 and t2, obtained by calling Method occurBetween(int[],int[]), k_i must belong to t1[i]..t2[i]
        • when the object Occurrences represents a 1-dimensional array of integer variables x, obtained by calling Method occurExactly(Var[]), k_i must be the same value as x[i]
        As an illustration, enforcing values from array y to occur exactly 5 times each is given by:
         cardinality(x,y,occursEachExactly(5));
         
        Enforcing values from array y to occur between 3 and 5 times each is given by:
         cardinality(x,y,occursEachBetween(3,5));
         
        Enforcing value y[i] to occur exactly z[i] times is given by:
         cardinality(x,y,occurrences(z));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        values - a 1-dimensional array of integer variables
        occurs - an object Occurrences
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • maximum

        default CtrEntities.CtrEntity maximum​(IVar.Var[] list,
                                              Condition condition)
        Builds a constraint maximum from the specified arguments: the maximum of the values assigned to the variables of list must respect the specified condition. Note that the array list is cleaned (i.e., null values are discarded).
        As an illustration, enforcing the maximum value of x to be strictly less than 10 is given by:
         maximum(x,condition(LT,10));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        condition - an object Condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • maximum

        default CtrEntities.CtrEntity maximum​(IVar.Var[] list,
                                              IVar.Var value)
        Builds a constraint maximum from the specified arguments: the maximum of the values assigned to the variables of list must be equal to the value assigned to the variable value. Note that the array list is cleaned (i.e., null values are discarded).
        As an illustration, enforcing the maximum value of x to be m is given by:
         maximum(x,m);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • maximum

        default CtrEntities.CtrEntity maximum​(IVar.Var[] list,
                                              ProblemAPIBase.Index index)
        Builds a constraint maximum from the specified arguments: the maximum of the values assigned to the variables of list must be the value assigned to the variable of list at index.variable. Note that index.rank indicates if index.variable must be:
        • the smallest valid number (FIRST), meaning that index.variable must refer to the first variable in list with maximum value
        • the greatest valid number (LAST), meaning that index.variable must refer to the last variable in list with maximum value
        • or any valid number (ANY), meaning that index.variable can refer to any variable in list with maximum value.
        Important: for building an object Index, use Method index(Var) or Method index(Var,TypeRank).
        As an illustration, enforcing i to be the index of any variable in x (indexing being started at 0) with maximum value is given by:
         maximum(x,index(i));
         
        Enforcing i to be the index of the first variable in x (indexing being started at 0) with maximum value is given by:
         maximum(x,index(i,FIRST));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        index - an object wrapping the variable corresponding to the index of a variable in list with maximum value
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • maximum

        default CtrEntities.CtrEntity maximum​(IVar.Var[] list,
                                              int startIndex,
                                              ProblemAPIBase.Index index,
                                              Condition condition)
        Builds a constraint maximum from the specified arguments: the maximum of the values assigned to the variables of list must be the value assigned to the variable of list at index.variable and besides this value must respect the specified condition. Note that startIndex.value indicates the number used to access the first variable in list whereas index.rank indicates if index.variable must be:
        • the smallest valid number (FIRST), meaning that index.variable must refer to the first variable in list with maximum value
        • the greatest valid number (LAST), meaning that index.variable must refer to the last variable in list with maximum value
        • or any valid number (ANY), meaning that index.variable can refer to any variable in list with maximum value.
        Important: for building an object StartIndex, use Method startIndex(int), for building an object Index, use Method index(Var) or Method index(Var,TypeRank) and for building an object Condition use methods condition().
        As an illustration, enforcing i to be the index of any variable in x (indexing being started at 1) with maximum value strictly greater than 10 is given by:
         maximum(x,startIndex(1),index(i),condition(GT,10));
         
        Enforcing i to be the index of the first variable in x (indexing being started at 10) with maximum value strictly greater than 10 is given by:
         maximum(x,startIndex(10),index(i,FIRST),condition(GT,10));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        startIndex - the number used to access the first variable in list
        index - an object wrapping the variable corresponding to the index of a variable in list with maximum value
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • maximum

        default CtrEntities.CtrEntity maximum​(IVar.Var[] list,
                                              IVar.Var index,
                                              Condition condition)
        Builds a constraint maximum from the specified arguments: the maximum of the values assigned to the variables of list must be the value assigned to the variable of list at index.variable and besides this value must respect the specified condition. Note that indexing starts at 0 and that index.rank indicates if index.variable must be:
        • the smallest valid number (FIRST), meaning that index.variable must refer to the first variable in list with maximum value
        • the greatest valid number (LAST), meaning that index.variable must refer to the last variable in list with maximum value
        • or any valid number (ANY), meaning that index.variable can refer to any variable in list with maximum value.
        Important: for building an object Index, use Method index(Var) or Method index(Var,TypeRank) and for building an object Condition use methods condition().
        As an illustration, enforcing i to be the index of any variable in x (indexing starting at 0, by default) with maximum value strictly greater than 10 is given by:
         maximum(x, at(i),condition(GT,10));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        index - the variable corresponding to the index of a variable in list with maximum value
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • minimum

        default CtrEntities.CtrEntity minimum​(IVar.Var[] list,
                                              Condition condition)
        Builds a constraint minimum from the specified arguments: the minimum of the values assigned to the variables of list must respect the specified condition. Note that the array list is cleaned (i.e., null values are discarded).
        As an illustration, enforcing the minimum value of x to be strictly less than 10 is given by:
         minimum(x,condition(LT,10));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        condition - an object Condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • minimum

        default CtrEntities.CtrEntity minimum​(IVar.Var[] list,
                                              IVar.Var value)
        Builds a constraint minimum from the specified arguments: the minimum of the values assigned to the variables of list must be equal to the value assigned to the variable value. Note that the array list is cleaned (i.e., null values are discarded).
        As an illustration, enforcing the minimum value of x to be m is given by:
         minimum(x,m);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        value - an integer variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • minimum

        default CtrEntities.CtrEntity minimum​(IVar.Var[] list,
                                              ProblemAPIBase.Index index)
        Builds a constraint minimum from the specified arguments: the minimum of the values assigned to the variables of list must be the value assigned to the variable of list at index.variable. Note that index.rank indicates if index.variable must be:
        • the smallest valid number (FIRST), meaning that index.variable must refer to the first variable in list with minimum value
        • the greatest valid number (LAST), meaning that index.variable must refer to the last variable in list with minimum value
        • or any valid number (ANY), meaning that index.variable can refer to any variable in list with minimum value.
        Important: for building an object Index, use Method index(Var) or Method index(Var,TypeRank).
        As an illustration, enforcing i to be the index of any variable in x (indexing being started at 0) with minimum value is given by:
         minimum(x,index(i));
         
        Enforcing i to be the index of the first variable in x (indexing being started at 0) with minimum value is given by:
         minimum(x,index(i,FIRST));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        index - an object wrapping the variable corresponding to the index of a variable in list with minimum value
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • minimum

        default CtrEntities.CtrEntity minimum​(IVar.Var[] list,
                                              int startIndex,
                                              ProblemAPIBase.Index index,
                                              Condition condition)
        Builds a constraint minimum from the specified arguments: the minimum of the values assigned to the variables of list must be the value assigned to the variable of list at index.variable and besides this value must respect the specified condition. Note that startIndex.value indicates the number used to access the first variable in list whereas index.rank indicates if index.variable must be:
        • the smallest valid number (FIRST), meaning that index.variable must refer to the first variable in list with minimum value
        • the greatest valid number (LAST), meaning that index.variable must refer to the last variable in list with minimum value
        • or any valid number (ANY), meaning that index.variable can refer to any variable in list with minimum value.
        Important: for building an object StartIndex, use Method startIndex(int), for building an object Index, use Method index(Var) or Method index(Var,TypeRank) and for building an object Condition use methods condition().
        As an illustration, enforcing i to be the index of any variable in x (indexing being started at 1) with minimum value strictly greater than 10 is given by:
         minimum(x,startIndex(1),index(i),condition(GT,10));
         
        Enforcing i to be the index of the first variable in x (indexing being started at 10) with minimum value strictly greater than 10 is given by:
         minimum(x,startIndex(10),index(i,FIRST),condition(GT,10));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        startIndex - the number used to access the first variable in list
        index - an object wrapping the variable corresponding to the index of a variable in list with minimum value
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • minimum

        default CtrEntities.CtrEntity minimum​(IVar.Var[] list,
                                              IVar.Var index,
                                              Condition condition)
        Builds a constraint minimum from the specified arguments: the minimum of the values assigned to the variables of list must be the value assigned to the variable of list at index.variable and besides this value must respect the specified condition. Note that indexing starts at 0 and that index.rank indicates if index.variable must be:
        • the smallest valid number (FIRST), meaning that index.variable must refer to the first variable in list with minimum value
        • the greatest valid number (LAST), meaning that index.variable must refer to the last variable in list with minimum value
        • or any valid number (ANY), meaning that index.variable can refer to any variable in list with minimum value.
        Important: for building an object Index, use Method index(Var) or Method index(Var,TypeRank) and for building an object Condition use methods condition().
        As an illustration, enforcing i to be the index of any variable in x (indexing starting at 0, by default) with minimum value strictly greater than 10 is given by:
         minimum(x,index(i),condition(GT,10));
         
        Enforcing i to be the index of the first variable in x (indexing starting at 0, by default) with minimum value strictly greater than 10 is given by:
         minimum(x,index(i,FIRST),condition(GT,10));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        index - the variable corresponding to the index of a variable in list with minimum value
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • channel

        default CtrEntities.CtrEntity channel​(IVar.Var[] list,
                                              int startIndex)
        Builds a constraint channel from the specified arguments: the value j is assigned to the ith variable of list iff the value i is assigned to the jth variable of list. Note that startIndex.value indicates the number used to access the first variable in list. Important: for building an object StartIndex, use Method startIndex(int)
        As an illustration, enforcing a channeling constraint on x (indexing starting at 1) is given by:
         channel(x,startIndex(1));
         
        Parameters:
        list - a 1-dimensional array of integer variables
        startIndex - the number used to access the first variable in list
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • channel

        default CtrEntities.CtrEntity channel​(IVar.Var[] list)
        Builds a constraint channel from the specified arguments: the value j is assigned to the ith variable of list iff the value i is assigned to the jth variable of list. Note that indexing starts at 0 (default value).
        As an illustration, enforcing a channeling constraint on x (indexing starting at 0, by default) is given by:
         channel(x);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • channel

        default CtrEntities.CtrEntity channel​(IVar.Var[] list1,
                                              int startIndex1,
                                              IVar.Var[] list2,
                                              int startIndex2)
        Builds a constraint channel from the specified arguments: assuming for simplicity that indexing start at 0, the value j is assigned to the ith variable of list1 iff the value i is assigned to the jth variable of list2.
         list1[i] = j => list2|j] = i
         
        The size of the array list1 must be less than or equal to the size of list2. Still, assuming for simplicity that indexing starts at 0, When both arrays have the same size, we have:
         list1[i] = j <=> list2|j] = i
         
        Note that startIndex1.value indicates the number used to access the first variable in list1, and similarly startIndex2.value indicates the number used to access the first variable in list2. Important: for building an object StartIndex, use Method startIndex(int)
        As an illustration, enforcing a channeling constraint between x and y (indexing starting at 1 and 0, respectively) is given by:
         channel(x,startIndex(1),y,startIndex(0));
         
        Parameters:
        list1 - a first 1-dimensional array of integer variables
        startIndex1 - the number used to access the first variable in list1
        list2 - a second 1-dimensional array of integer variables
        startIndex2 - the number used to access the first variable in list2
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • channel

        default CtrEntities.CtrEntity channel​(IVar.Var[] list1,
                                              IVar.Var[] list2)
        Builds a constraint channel from the specified arguments. The value j is assigned to the ith variable of list1 implies that the value i is assigned to the jth variable of list2.
         list1[i] = j => list2|j] = i
         
        The size of the array list1 must be less than or equal to the size of list2. When both arrays have the same size, we have:
         list1[i] = j <=> list2|j] = i
         
        Note that indexing starts at 0 (default value).
        As an illustration, enforcing a channeling constraint between x and y (indexing starting at 0, by default) is given by:
         channel(x,y);
         
        Parameters:
        list1 - a first 1-dimensional array of integer variables
        list2 - a second 1-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • channel

        default CtrEntities.CtrEntity channel​(IVar.Var[] list,
                                              int startIndex,
                                              IVar.Var value)
        Builds a constraint channel from the specified arguments: the value i is assigned to value iff only the ith variable of list is assigned the value 1 (0 is the value assigned to the other variables of list). Note that list must only contain variables with domain 0/1 and that startIndex.value indicates the number used to access the first variable in list. Important: for building an object StartIndex, use Method startIndex(int)
        As an illustration, enforcing a channeling constraint between x (indexing starting at 1) and v is given by:
         channel(x,startIndex(1),v);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        startIndex - the number used to access the first variable in list
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • channel

        default CtrEntities.CtrEntity channel​(IVar.Var[] list,
                                              IVar.Var value)
        Builds a constraint channel from the specified arguments: the value i is assigned to value iff only the ith variable of list is assigned the value 1 (0 is the value assigned to the other variables of list). Note that list must only contain variables with domain 0/1 and that indexing starts at 0 (default value).
        As an illustration, enforcing a channeling constraint between x (indexing starting at 0, by default) and v is given by:
         channel(x,v);
         
        Parameters:
        list - a 1-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[] origins,
                                                int[] lengths,
                                                boolean zeroIgnored)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. When zeroIgnored is false, it means that zero-length tasks cannot be packed anywhere (cannot overlap with other tasks).
        As an illustration, enforcing that tasks defined by x (origins) and t (lengths) must not overlap is given by:
         noOverlap(x,t,true);
         
        Parameters:
        origins - a 1-dimensional array of integer variables
        lengths - a 1-dimensional array of integer integers
        zeroIgnored - indicates if tasks of length 0 can be ignored
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[] origins,
                                                int... lengths)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. Note that zero-length tasks are simply ignored (default value).
        As an illustration, enforcing that tasks defined by x (origins) and t (lengths) must not overlap is given by:
         noOverlap(x,t);
         
        Parameters:
        origins - a 1-dimensional array of integer variables
        lengths - a 1-dimensional array of integer integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var x1,
                                                IVar.Var x2,
                                                int length1,
                                                int length2)
        Builds a constraint noOverlap from the specified arguments: we are given two tasks, defined by their origins and durations (lengths), which must not overlap.
        As an illustration, enforcing that the task of origin x1 and length 5 must not overlap with the task of origin x2 and length 3 is given by:
         noOverlap(x1,x2,5,3);
         
        Parameters:
        x1 - a first integer variable, denoting the origin of a first task
        x2 - a second integer variable, denoting the origin of a second task
        length1 - the length associated with the first variable
        length2 - the length associated with the second variable
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[] origins,
                                                IVar.Var[] lengths,
                                                boolean zeroIgnored)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. When zeroIgnored is false, it means that zero-length tasks cannot be packed anywhere (cannot overlap with other tasks).
        As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:
         noOverlap(x,y,true);
         
        Parameters:
        origins - a 1-dimensional array of integer variables
        lengths - a 1-dimensional array of integer variables
        zeroIgnored - indicates if tasks of length 0 can be ignored
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[] origins,
                                                IVar.Var... lengths)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. Note that zero-length tasks are simply ignored (default value).
        As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:
         noOverlap(x,y);
         
        Parameters:
        origins - a 1-dimensional array of integer variables
        lengths - a 1-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var x1,
                                                IVar.Var x2,
                                                IVar.Var length1,
                                                IVar.Var length2)
        Builds a constraint noOverlap from the specified arguments: we are given two tasks, defined by their origins and durations (lengths), which must not overlap. Note that zero-length tasks are simply ignored (default value).
        As an illustration, enforcing that the task of origin x1 and length y1 must not overlap with the task of origin x2 and length y2 is given by:
         noOverlap(x1,x2,y1,y2);
         
        Parameters:
        x1 - a first integer variable, denoting the origin of a first task
        x2 - a second integer variable, denoting the origin of a second task
        length1 - the length associated with x1
        length2 - the length associated with x2
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[][] origins,
                                                int[][] lengths,
                                                boolean zeroIgnored)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its origin origins[i][j] wrt the jth axis and its length lengths[i][j] wrt the jth axis. When zeroIgnored is false, it means that tasks with a length 0 on some axis cannot be packed anywhere (cannot overlap with other tasks).
        As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:
         noOverlap(x,y,true);
         
        Parameters:
        origins - a 2-dimensional array of integer variables
        lengths - a 2-dimensional array of integer integers
        zeroIgnored - indicates if tasks of length 0 (on any axis) can be ignored
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[][] origins,
                                                int[]... lengths)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its origin origins[i][j] wrt the jth axis and its length lengths[i][j] wrt the jth axis. Note that tasks of length 0 on some axis are simply ignored (default value).
        As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:
         noOverlap(x,y);
         
        Parameters:
        origins - a 2-dimensional array of integer variables
        lengths - a 2-dimensional array of integer integers
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[][] origins,
                                                IVar.Var[][] lengths,
                                                boolean zeroIgnored)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its origin origins[i][j] wrt the jth axis and its length lengths[i][j] wrt the jth axis. When zeroIgnored is false, it means that tasks with a length 0 on some axis cannot be packed anywhere (cannot overlap with other tasks).
        As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:
         noOverlap(x,y,true);
         
        Parameters:
        origins - a 2-dimensional array of integer variables
        lengths - a 2-dimensional array of integer variables
        zeroIgnored - indicates if tasks of length 0 (on any axis) can be ignored
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • noOverlap

        default CtrEntities.CtrEntity noOverlap​(IVar.Var[][] origins,
                                                IVar.Var[]... lengths)
        Builds a constraint noOverlap from the specified arguments: we are given a set of tasks, defined by their origins and durations (lengths), which must not overlap. The ith task is defined by its origin origins[i][j] wrt the jth axis and its length lengths[i][j] wrt the jth axis. Note that tasks of length 0 on some axis are simply ignored (default value).
        As an illustration, enforcing that tasks defined by x (origins) and y (lengths) must not overlap is given by:
         noOverlap(x,y);
         
        Parameters:
        origins - a 2-dimensional array of integer variables
        lengths - a 2-dimensional array of integer variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 int[] lengths,
                                                 IVar.Var[] ends,
                                                 int[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        ends - the end of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 int[] lengths,
                                                 int[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 int[] lengths,
                                                 int[] heights,
                                                 long limit)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        limit - the limit that must not be exceeded
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 IVar.Var[] lengths,
                                                 IVar.Var[] ends,
                                                 int[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        ends - the end of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 IVar.Var[] lengths,
                                                 int[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 IVar.Var[] lengths,
                                                 int[] heights,
                                                 long limit)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        limit - the limit that must not be exceeded
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 int[] lengths,
                                                 IVar.Var[] ends,
                                                 IVar.Var[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        ends - the end of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 int[] lengths,
                                                 IVar.Var[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 int[] lengths,
                                                 IVar.Var[] heights,
                                                 long limit)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        limit - the limit that must not be exceeded
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 IVar.Var[] lengths,
                                                 IVar.Var[] ends,
                                                 IVar.Var[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), ends and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        ends - the end of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 IVar.Var[] lengths,
                                                 IVar.Var[] heights,
                                                 Condition condition)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point, respects a numerical condition. When the operator “le” is used, this corresponds to not exceeding a given limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        condition - an object condition composed of an operator and an operand
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • cumulative

        default CtrEntities.CtrEntity cumulative​(IVar.Var[] origins,
                                                 IVar.Var[] lengths,
                                                 IVar.Var[] heights,
                                                 long limit)
        Builds a constraint cumulative from the specified arguments: we are given a set of tasks, defined by their origins, durations (lengths), and heights. The constraint enforces that at each point in time, the summed height of tasks that overlap that point does not exceed the specified limit.
        Parameters:
        origins - the origin (beginning) of each task
        lengths - the duration (length) of each task
        heights - the height of each task
        limit - the limit that must not be exceeded
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • circuit

        default CtrEntities.CtrEntity circuit​(IVar.Var[] list,
                                              int startIndex)
        Builds a constraint circuit from the specified arguments.
        Parameters:
        list - an array of variables
        startIndex - the index used to refer to the first variable of the array
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • circuit

        default CtrEntities.CtrEntity circuit​(IVar.Var[] list)
        Builds a constraint circuit on the specified array of variables. Note that 0 is the index used to refer to the first variable of the array.
        Parameters:
        list - an array of variables
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • circuit

        default CtrEntities.CtrEntity circuit​(IVar.Var[] list,
                                              int startIndex,
                                              int size)
        Builds a constraint circuit from the specified arguments.
        Parameters:
        list - an array of variables
        startIndex - the index used to refer to the first variable of the array
        size - the size of the circuit
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • circuit

        default CtrEntities.CtrEntity circuit​(IVar.Var[] list,
                                              int startIndex,
                                              IVar.Var size)
        Builds a constraint circuit from the specified arguments.
        Parameters:
        list - an array of variables
        startIndex - the index used to refer to the first variable of the array
        size - the size of the circuit
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • circuit

        default CtrEntities.CtrEntity circuit​(IVar.Var[] list,
                                              IVar.Var size)
        Builds a constraint circuit from the specified arguments. Note that 0 is the index used to refer to the first variable of the array
        Parameters:
        list - an array of variables
        size - the size of the circuit
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • clause

        default CtrEntities.CtrEntity clause​(IVar.Var[] list,
                                             Boolean[] phases)
        Builds a constraint clause from the specified arguments. For each variable and its corresponding phase (i.e., at the same index), a literal is present in the clause: a positive literal when the phase is true and a negative literal when the phase is false.
        Parameters:
        list - an array of variables
        phases - an array of boolean values
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • clause

        default CtrEntities.CtrEntity clause​(IVar.Var[] pos,
                                             IVar.Var[] neg)
        Builds a constraint clause from the specified arguments. For each variable, a literal is present in the clause: a positive literal when the variable belongs to the first specified array and a negative literal when the variable belongs to the second specified array.
        Parameters:
        pos - a first array of variables involved in positive literals
        neg - a second array of variables involved in negative literals
        Returns:
        an object CtrEntity that wraps the built constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[] list,
                                                    int... values)
        Builds a constraint instantiation, assigning each specified variable with its corresponding value. For example:
         instantiation(x, t);
         
        Parameters:
        list - an array of variables
        values - an array of integers
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[] list,
                                                    Range values)
        Builds a constraint instantiation, assigning each specified variable with its corresponding value (from the range). For example:
         instantiation(x, range(10));
         
        Parameters:
        list - an array of variables
        values - a range of values
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[] list,
                                                    java.util.stream.IntStream values)
        Builds a constraint instantiation, assigning each specified variable with its corresponding value in the specified stream.
        Parameters:
        list - an array of variables
        values - a stream of integers
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[] list,
                                                    Collection<Integer> values)
        Builds a constraint instantiation, assigning each specified variable with its corresponding value in the specified collection.
        Parameters:
        list - an array of variables
        values - a collection of integers
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[] list,
                                                    int value)
        Builds a constraint instantiation, assigning each specified variable with the specified value. For example:
         instantiation(x, 0);
         
        Parameters:
        list - an array of variables
        value - an integer
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(java.util.stream.Stream<IVar.Var> list,
                                                    java.util.stream.IntStream values)
        Builds a constraint instantiation, assigning each specified variable with its corresponding value. For example:
         instantiation(x, t);
         
        Parameters:
        list - a stream of variables
        values - a stream of integers
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[] list,
                                                    int[] values,
                                                    FunctionalInterfaces.Intx1Predicate p)
        Builds a constraint instantiation, assigning each specified variable at index i with its corresponding value at index i, provided that the specified predicate accepts i. For example:
         instantiation(x, t, i -> i%2 == 0);
         
        Parameters:
        list - a 1-dimensional array of variables
        values - a 1-dimensional array of integers
        p - a predicate allowing us to test if a variable (and its value) at index i must be considered
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[][] list,
                                                    int[][] values,
                                                    FunctionalInterfaces.Intx2Predicate p)
        Builds a constraint instantiation, assigning each specified variable at index (i,j) with its corresponding value at index (i,j), provided that the specified predicate accepts (i,j). For example:
         instantiation(x, t, (i,j) -> i < j);
         
        Parameters:
        list - a 2-dimensional array of variables
        values - a 2-dimensional array of integers
        p - a predicate allowing us to test if a variable (and its value) at index (i,j) must be considered
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • instantiation

        default CtrEntities.CtrEntity instantiation​(IVar.Var[][][] list,
                                                    int[][][] values,
                                                    FunctionalInterfaces.Intx3Predicate p)
        Builds a constraint instantiation, assigning each specified variable at index (i,j,k) with its corresponding value at index (i,j,k), provided that the specified predicate accepts (i,j,k). For example:
         instantiation(x, t, (i,j,k) -> i == j+k);
         
        Parameters:
        list - a 3-dimensional array of variables
        values - a 3-dimensional array of integers
        p - a predicate allowing us to test if a variable (and its value) at index (i,j,k) must be considered
        Returns:
        an object CtrEntity that wraps the build constraint and allows us to provide note and tags by method chaining
      • slide

        default CtrEntities.CtrEntity slide​(IVar[] list,
                                            Range range,
                                            java.util.function.IntFunction<CtrEntities.CtrEntity> template)
        Builds a meta-constraint slide from the specified arguments. The specified template represents a sliding constraint over the specified variables. More precisely, for each value of the specified range, the specified template is called to generate a constraint using the specified variables. For example:
         slide(x, range(nCards - 1), i -> extension(vars(x[i], x[i + 1]), tuples)); 
         
        Parameters:
        list - a 1-dimensional array of variables
        range - a range of values
        template - a lambda used to generate a constraint for each value of the range
        Returns:
        an object CtrEntity that wraps the build meta-constraint and allows us to provide note and tags by method chaining
      • ifThen

        default CtrEntities.CtrEntity ifThen​(CtrEntities.CtrEntity c1,
                                             CtrEntities.CtrEntity c2)
        Builds a meta-constraint ifThen from the two specified constraints. This is equivalent to:
         
         if c1 then
           c2
         
         
        Parameters:
        c1 - a first constraint (used as condition of the alternative)
        c2 - a second constraint (used as "then" part of the alternative)
        Returns:
        an object CtrEntity that wraps the built meta-constraint and allows us to provide note and tags by method chaining
      • ifThenElse

        default CtrEntities.CtrEntity ifThenElse​(CtrEntities.CtrEntity c1,
                                                 CtrEntities.CtrEntity c2,
                                                 CtrEntities.CtrEntity c3)
        Builds a meta-constraint ifThenElse from the three specified constraints. This is equivalent to:
         
         if c1 then
           c2
         else
           c3
         
         
        Parameters:
        c1 - a first constraint (used as condition of the alternative)
        c2 - a second constraint (used as "then" part of the alternative)
        c3 - a third constraint (used as "else" part of the alternative)
        Returns:
        an object CtrEntity that wraps the built meta-constraint and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(IVar x)
        Builds an objective (function) to minimize: the value of the specified variable.
        Parameters:
        x - a variable
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(IVar x)
        Builds an objective (function) to maximize: the value of the specified variable.
        Parameters:
        x - a variable
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar... list)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified array of variables. For example:
         minimize(SUM,x,y,z);
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[][] list)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).
        Parameters:
        type - the type of the objective
        list - the involved variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[][][] list)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).
        Parameters:
        type - the type of the objective
        list - the involved variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar... list)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified array of variables. For example:
         maximize(SUM,x,y,z);
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[][] list)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).
        Parameters:
        type - the type of the objective
        list - the involved variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[][][] list)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables that will be flattened (i.e., converted into a 1-dimensional array of variables).
        Parameters:
        type - the type of the objective
        list - the involved variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[] list,
                                               int[] coeffs)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified array of variables, each of them being given a coefficient. For example:
         minimize(SUM,vars(x,y,z),vals(1,2,1));
         
        Parameters:
        type - the type of tProblemAPIhe objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[][] list,
                                               int[][] coeffs)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[][] list,
                                               int[][] coeffs,
                                               FunctionalInterfaces.Intx2Predicate p)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:
         minimize(SUM,x,t,(i,j)->i<j);
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        p - a predicate allowing us to test if a variable (and its coefficient) at index (i,j) must be considered.
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[][][] list,
                                               int[][][] coeffs)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • minimize

        default ObjEntities.ObjEntity minimize​(Types.TypeObjective type,
                                               IVar[][][] list,
                                               int[][][] coeffs,
                                               FunctionalInterfaces.Intx3Predicate p)
        Builds an objective (function) to minimize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:
         minimize(SUM,x,t,(i,j,k)->i<j+k);
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        p - a predicate allowing us to test if a variable (and its coefficient) at index (i,j,k) must be considered
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[] list,
                                               int[] coeffs)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified array of variables, each of them being given a coefficient. For example:
         maximize(SUM,vars(x,y,z),vals(1,2,1));
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[][] list,
                                               int[][] coeffs)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[][] list,
                                               int[][] coeffs,
                                               FunctionalInterfaces.Intx2Predicate p)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 2-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:
         maximize(SUM,x,t,(i,j)->i<j);
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        p - a predicate allowing us to test if a variable (and its coefficient) at index (i,j) must be considered.
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[][][] list,
                                               int[][][] coeffs)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays).
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • maximize

        default ObjEntities.ObjEntity maximize​(Types.TypeObjective type,
                                               IVar[][][] list,
                                               int[][][] coeffs,
                                               FunctionalInterfaces.Intx3Predicate p)
        Builds an objective (function) to maximize: the objective is defined by the specified type on the specified 3-dimensional array of variables, each of them being given a coefficient. The arrays will be flattened (i.e., converted into 1-dimensional arrays). Only variables at index accepted by the specified predicate are considered. For example:
         maximize(SUM,x,t,(i,j,k)->i<j+k);
         
        Parameters:
        type - the type of the objective
        list - the involved variables
        coeffs - the coefficients associated with the variables
        p - a predicate allowing us to test if a variable (and its coefficient) at index (i,j,k) must be considered.
        Returns:
        an object ObjEntity that wraps the built objective and allows us to provide note and tags by method chaining
      • model

        void model()
        Builds the model. You have to declare variables, constraints and objectives in this method.
      • prettyDisplay

        default void prettyDisplay​(String[] values)
        Called to display a solution given by the specified array. Advanced use: relevant if a solver is plugged. By default, it does nothing.
        Parameters:
        values - the values assigned to the variables
      • decisionVariables

        default void decisionVariables​(IVar[] list)
        Sets the specified variables as those on which a solver should branch in priority. This generates an annotation.
        Parameters:
        list - a 1-dimensional array of variables
      • decisionVariables

        default void decisionVariables​(IVar[][] list)
        Sets the specified variables as those on which a solver should branch in priority. This generates an annotation.
        Parameters:
        list - a 2-dimensional array of variables