choco
Class Choco

java.lang.Object
  extended by choco.Choco
Direct Known Subclasses:
DeprecatedChoco

public class Choco
extends Object

Created by IntelliJ IDEA. User: charles Date: 6 août 2008 Time: 16:08:55

This class must contain every current variable constructors and constraint constructors. The class must be uptodate permanently, because, it is the way common users declare Model.


Field Summary
static Constraint FALSE
           
protected static Logger LOGGER
           
static int MAX_UPPER_BOUND
           
static int MIN_LOWER_BOUND
           
static IntegerVariable ONE
           
static Constraint TRUE
           
static IntegerVariable ZERO
           
 
Method Summary
static IntegerExpressionVariable abs(IntegerExpressionVariable n)
           
static Constraint abs(IntegerVariable x, IntegerVariable y)
          Ensures x = Math.abs(y);
static Constraint allDifferent(IntegerVariable... vars)
          All different constraints with a global filtering : v1 !
static Constraint allDifferent(String options, IntegerVariable... vars)
          All different constraints with a global filtering : v1 !
static Constraint among(IntegerVariable var, int[] values)
          Deprecated. use member
static Constraint among(IntegerVariable nvar, IntegerVariable[] variables, int[] values)
          NVAR is the number of variables of the collection VARIABLES that take their value in VALUES.
static Constraint among(IntegerVariable nvar, IntegerVariable[] variables, SetVariable svar)
          NVAR is the number of variables of the collection VARIABLES that take their value in SVAR.
static Constraint and(Constraint... n)
           
static Constraint and(IntegerVariable... literals)
          A constraint for logical conjunction between boolean variables lit1 AND lit2 AND ...
static Constraint atMostNValue(IntegerVariable[] vars, IntegerVariable nvalue)
          Deprecated. reorder parameters
static Constraint atMostNValue(IntegerVariable nvalue, IntegerVariable[] vars)
          Enforce the number of distinct values among vars to be less than nvalue;
static Constraint boolChanneling(IntegerVariable b, IntegerVariable x, int j)
          State a simple channeling bewteen a boolean variable and an interger variable Ensures for that b = 1 iff x = j
static Constraint clause(IntegerVariable[] positiveLiterals, IntegerVariable[] negativeLiterals)
          A global constraint to store and propagate all clauses
static Constraint clause(String option, IntegerVariable[] positiveLiterals, IntegerVariable[] negativeLiterals)
          A global constraint to store and propagate all clauses The option can contain the folowing String : cp:entail ensure quick entailment tests
static Constraint[] clauses(ALogicTree tree)
          A global constraint to store and propagate all clauses extracted from a logic tree
static Constraint[] clauses(String option, ALogicTree tree)
          A global constraint to store and propagate all clauses extracted from a logic tree The option can contain the folowing String : cp:entail ensure quick entailment tests
static Constraint complementSet(SetVariable x, SetVariable y)
          complement(X) == Y
i.e.
static RealConstantVariable constant(double value)
          Create a real constant
static IntegerConstantVariable constant(int value)
          Create a integer constant
static SetConstantVariable constant(int[] values)
          Create a set constant
static RealConstantVariable[] constantArray(double[] values)
           
static IntegerConstantVariable[] constantArray(int[] values)
           
static IntegerConstantVariable[][] constantArray(int[][] values)
           
static RealExpressionVariable cos(RealExpressionVariable exp)
          Cosinus of an expression.
static Constraint costRegular(IntegerVariable[] vars, IntegerVariable costVar, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, Node source)
          Deprecated. reorder parameters
static Constraint costRegular(IntegerVariable[] vars, IntegerVariable costVar, IAutomaton auto, int[][][] costs)
          Deprecated. reorder parameters
static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, Node source)
          costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable.
static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, IAutomaton auto, int[][] costs)
          costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable.
static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, IAutomaton auto, int[][][] costs)
          costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable.
static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, ICostAutomaton auto)
          costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable.
static Constraint cumulative(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable consumption, IntegerVariable capacity, IntegerVariable uppBound, String... options)
          Builds Alternative cumulative Min-Max.
static Constraint cumulative(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable consumption, IntegerVariable capacity, String... options)
          Alternative Cumulative Min-Max : uppBound = null.
static Constraint cumulative(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable consumption, IntegerVariable capacity, String... options)
          Cumulative Min-Max : usages = null, uppBound = null.
static Constraint cumulativeMax(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable capacity, String... options)
          Alternative Cumulative Max : consumption=0, uppBound = null.
static Constraint cumulativeMax(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable capacity, String... options)
          Cumulative Max : consumption=0, usages = null, uppBound = null.
static Constraint cumulativeMax(TaskVariable[] tasks, int[] heights, int capacity, String... options)
          Cumulative Max : consumption=0, usages = null, uppBound = null.
static Constraint cumulativeMin(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable consumption, String... options)
          Alternative Cumulative Min : capacity=infinity, uppBound = null.
static Constraint cumulativeMin(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable consumption, String... options)
          Cumulative Min : capacity=infinity, usages = null, uppBound = null.
static Constraint cumulativeMin(TaskVariable[] tasks, int[] heights, int consumption, String... options)
          Cumulative Min : capacity=infinity, usages = null, uppBound = null.
static Constraint disjoint(IntegerVariable var, int[] values)
          Deprecated. rename as notMember
static Constraint[] disjoint(TaskVariable[] tasks1, TaskVariable[] tasks2)
          Each task of the collection tasks1 should not overlap any task of the collection tasks2.
static Constraint disjunctive(String name, TaskVariable[] tasks, IntegerVariable[] usages, IntegerVariable uppBound, String... options)
          Builds Alternative disjunctive.
static Constraint disjunctive(String name, TaskVariable[] tasks, IntegerVariable[] usages, String... options)
          Alternative Disjunctive : uppBound = null.
static Constraint disjunctive(String name, TaskVariable[] tasks, String... options)
          Disjunctive : usages = null, uppBound = null.
static Constraint disjunctive(TaskVariable[] tasks, IntegerVariable[] usages, String... options)
          Alternative Disjunctive : name = null, uppBound = null.
static Constraint disjunctive(TaskVariable[] tasks, String... options)
          Disjunctive : name = null, usages = null, uppBound = null.
static Constraint distanceEQ(IntegerVariable x, IntegerVariable y, int c)
          Ensures |x-y| = c;
static Constraint distanceEQ(IntegerVariable x, IntegerVariable y, IntegerVariable z)
          Ensures |x-y| = z;
static Constraint distanceEQ(IntegerVariable x, IntegerVariable y, IntegerVariable z, int c)
          Ensures |x-y| = z + c;
static Constraint distanceGT(IntegerVariable x, IntegerVariable y, int c)
          Ensures |x-y| > c;
static Constraint distanceGT(IntegerVariable x, IntegerVariable y, IntegerVariable z)
          Ensures |x-y| > z;
static Constraint distanceGT(IntegerVariable x, IntegerVariable y, IntegerVariable z, int c)
          Ensures |x-y| > z + c;
static Constraint distanceLT(IntegerVariable x, IntegerVariable y, int c)
          Ensures |x-y| < c;
static Constraint distanceLT(IntegerVariable x, IntegerVariable y, IntegerVariable z)
          Ensures |x-y| < z;
static Constraint distanceLT(IntegerVariable x, IntegerVariable y, IntegerVariable z, int c)
          Ensures |x-y| < z + c;
static Constraint distanceNEQ(IntegerVariable x, IntegerVariable y, int c)
          Ensures |x-y| !
static IntegerExpressionVariable div(IntegerExpressionVariable n1, int n2)
           
static IntegerExpressionVariable div(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static IntegerExpressionVariable div(int n1, IntegerExpressionVariable n2)
           
static Constraint domainChanneling(IntegerVariable x, IntegerVariable[] b)
          state a channeling between the domain of the variable x and the array of boolean variables b which enforce: x = i <=> b[i] = 1
static Constraint domainConstraint(IntegerVariable x, IntegerVariable[] b)
          Deprecated. see domainChannelling
static SetConstantVariable emptySet()
          Create an empty set constant
static Constraint endsAfter(TaskVariable t, int min)
          This task ends after min
static Constraint endsAfterBegin(TaskVariable t1, TaskVariable t2)
          This task ends after the start of the task 2
static Constraint endsAfterBegin(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint: end(t1) >= start(t2) + delta
static Constraint endsAfterEnd(TaskVariable t1, TaskVariable t2)
          Temporal constraint: end(t1) >= end(t2)
static Constraint endsAfterEnd(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint: end(t1) >= end(t2) + delta
static Constraint endsAt(TaskVariable t, int time)
          This task ends at time.
static Constraint endsBefore(TaskVariable t, int max)
          This task ends before max
static Constraint endsBeforeBegin(TaskVariable t1, TaskVariable t2)
          Temporal constraint: end(t1)<= start(t2)
static Constraint endsBeforeBegin(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint: end(t1) + delta <= start(t2)
static Constraint endsBeforeEnd(TaskVariable t1, TaskVariable t2)
          Temporal constraint: end(t1) <= end(t2)
static Constraint endsBeforeEnd(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint: end(t1) + delta <= end(t2)
static Constraint endsBetween(TaskVariable t, int min, int max)
          This task ends between min and max
static Constraint eq(double c, RealExpressionVariable x)
          Return a constraint that ensures x == c
static Constraint eq(IntegerExpressionVariable x, int c)
          Return a constraint that ensure x == c
static Constraint eq(IntegerExpressionVariable x, IntegerExpressionVariable y)
          Return a constraint that ensure x == y
static Constraint eq(IntegerVariable i, RealVariable r)
          Return a constraint that ensures r == i
static Constraint eq(int c, IntegerExpressionVariable x)
          Return a constraint that ensure x == c
static Constraint eq(RealExpressionVariable x, double c)
          Return a constraint that ensures x == c
static Constraint eq(RealExpressionVariable x, RealExpressionVariable y)
          Return a constraint that ensures x == y
static Constraint eq(RealVariable r, IntegerVariable i)
          Return a constraint that ensures r == i
static Constraint eq(SetVariable sv1, SetVariable sv2)
          Return a constraint that ensures sv1 == sv2
static Constraint eqCard(SetVariable sv, int val)
          Return a constraint that ensures |sv| = val
static Constraint eqCard(SetVariable sv, IntegerVariable v)
          Return a constraint that ensures |sv| = v
static Constraint equation(IntegerVariable[] vars, int[] coeffs, int val)
          Deprecated. reorder parameters
static Constraint equation(IntegerVariable z, IntegerVariable[] vars, int[] coeffs)
          State a constraint to enforce GAC on Sum_i coeffs[i] * vars[i] = z.
static Constraint equation(int val, IntegerVariable[] vars, int[] coeffs)
          State a constraint to enforce GAC on Sum_i coeffs[i] * vars[i] = val.
static Constraint equation(String option, IntegerVariable z, IntegerVariable[] vars, int[] coeffs)
          State constraint Sum_i coeffs[i] * vars[i] = z.
static Constraint equation(String option, int val, IntegerVariable[] vars, int[] coeffs)
          State constraint Sum_i coeffs[i] * vars[i] = val.
static Constraint exactly(int occurrence, IntegerVariable[] variables, int value)
          Deprecated. see among
static Constraint feasPairAC(IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
          Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables.
static Constraint feasPairAC(IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
          Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables.
static Constraint feasPairAC(String options, IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
          Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables
static Constraint feasPairAC(String options, IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
          Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables
static Constraint feasTupleAC(List<int[]> tuples, IntegerVariable... vars)
          Create a constraint enforcing Arc Consistency on a given a given list of feasible tuples
static Constraint feasTupleAC(String options, List<int[]> tuples, IntegerVariable... vars)
          Create a constraint enforcing Arc Consistency on a given a given list of feasible tuples
static Constraint feasTupleFC(List<int[]> tuples, IntegerVariable... vars)
          Create a constraint enforcing Forward Checking on a given a given list of feasible tuples
static Constraint forbiddenIntervals(String name, TaskVariable[] tasks)
          This redundant constraints applies additional search tree reduction based on Time intervals are in which no operation can start or end in an optimal solution.
static Constraint geost(int dim, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes, List<IExternalConstraint> eCtrs)
           
static Constraint geost(int dim, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes, List<IExternalConstraint> eCtrs, List<int[]> ctrlVs)
           
static Constraint geost(int dim, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes, List<IExternalConstraint> eCtrs, List<int[]> ctrlVs, GeostOptions opt)
           
static Constraint geost(int dim, Vector<GeostObject> objects, Vector<ShiftedBox> shiftedBoxes, Vector<IExternalConstraint> eCtrs)
          Deprecated. 
static Constraint geost(int dim, Vector<GeostObject> objects, Vector<ShiftedBox> shiftedBoxes, Vector<IExternalConstraint> eCtrs, Vector<int[]> ctrlVs)
          Deprecated. 
static Constraint geost(int dim, Vector<GeostObject> objects, Vector<ShiftedBox> shiftedBoxes, Vector<IExternalConstraint> eCtrs, Vector<int[]> ctrlVs, GeostOptions opt)
          Deprecated. 
static Constraint geq(double c, RealExpressionVariable x)
           
static Constraint geq(IntegerExpressionVariable x, int c)
           
static Constraint geq(IntegerExpressionVariable x, IntegerExpressionVariable y)
           
static Constraint geq(int c, IntegerExpressionVariable x)
           
static Constraint geq(RealExpressionVariable x, double c)
           
static Constraint geq(RealExpressionVariable x, RealExpressionVariable y)
           
static Constraint geqCard(SetVariable sv, int val)
           
static Constraint geqCard(SetVariable sv, IntegerVariable v)
           
static Constraint globalCardinality(IntegerVariable[] vars, int[] low, int[] up, int offset)
          Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min].

static Constraint globalCardinality(IntegerVariable[] vars, int[] values, int[] low, int[] up)
          Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, and an array of values, the constraint ensures that the number of occurences of the value i among the variables is between low[i] and up[i].

static Constraint globalCardinality(IntegerVariable[] vars, int[] values, IntegerVariable[] cards)
          * Bound Global cardinality : Given an array of variables vars, an array of values, an array of variables card to represent the cardinalities, the constraint ensures that the number of occurences of the value i among the variables is equal to card[i].
static Constraint globalCardinality(IntegerVariable[] vars, IntegerVariable[] card, int offset)
          * Bound Global cardinality : Given an array of variables vars, an array of variables card to represent the cardinalities, the constraint ensures that the number of occurences of the value i among the variables is equal to card[i].
static Constraint globalCardinality(IntegerVariable[] vars, int min, int max, int[] low, int[] up)
          Deprecated.  
static Constraint globalCardinality(IntegerVariable[] vars, int min, int max, IntegerVariable[] card)
          Deprecated.  
static Constraint globalCardinality(String options, IntegerVariable[] vars, int[] low, int[] up, int offset)
          Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min].

static Constraint globalCardinality(String options, IntegerVariable[] vars, int min, int max, int[] low, int[] up)
          Deprecated.  
static Constraint gt(IntegerExpressionVariable x, int c)
          Return a constraint that ensures x > c
static Constraint gt(IntegerExpressionVariable x, IntegerExpressionVariable y)
          Return a constraint that ensures x > y
static Constraint gt(int c, IntegerExpressionVariable x)
          Return a constraint that ensures c > x
static Constraint ifOnlyIf(Constraint n1, Constraint n2)
           
static Constraint ifThenElse(Constraint n1, Constraint n2, Constraint n3)
           
static IntegerExpressionVariable ifThenElse(Constraint n1, IntegerExpressionVariable n2, IntegerExpressionVariable n3)
           
static Constraint implies(Constraint n1, Constraint n2)
           
static Constraint increasing_nvalue(IntegerVariable nval, IntegerVariable[] vars)
          Deprecated. use increasingNValue
static Constraint increasing_nvalue(String option, IntegerVariable nval, IntegerVariable[] vars)
          Deprecated. use increasingNValue
static Constraint increasingNValue(IntegerVariable nval, IntegerVariable[] vars)
          The variables of the collection VARIABLES are increasing.
static Constraint increasingNValue(String option, IntegerVariable nval, IntegerVariable[] vars)
          The variables of the collection VARIABLES are increasing.
static Constraint increasingSum(IntegerVariable[] variables, IntegerVariable sum)
          A sum constraint with increasing variables
s = x_0 + x_1 + ... + x_(n-1)
and x_0 <= x_1 <= ... <= x_(n-1)

Bounds-consistency algorithm linear in n (the number of variables)

static Constraint infeasPairAC(IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
          Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables.
static Constraint infeasPairAC(IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
          Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables.
static Constraint infeasPairAC(String options, IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
          Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables
static Constraint infeasPairAC(String options, IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
          Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables
static Constraint infeasTupleAC(List<int[]> tuples, IntegerVariable... vars)
          Create a constraint enforcing Arc Consistency on a given a given list of infeasible tuples
static Constraint infeasTupleAC(String options, List<int[]> tuples, IntegerVariable... vars)
          Create a constraint enforcing Arc Consistency on a given a given list of infeasible tuples
static Constraint infeasTupleFC(List<int[]> tuples, IntegerVariable... vars)
          Create a constraint enforcing Forward Checking on a given a given list of infeasible tuples
static Constraint intDiv(IntegerVariable x, IntegerVariable y, IntegerVariable z)
          Enforce z = x / y
static Constraint inverseChanneling(IntegerVariable[] x, IntegerVariable[] y)
          State a channeling bewteen two arrays of integer variables x and y with the same domain which enforces x[i] = j <=> y[j] = i
static Constraint inverseChannelingWithinRange(IntegerVariable[] x, IntegerVariable[] y)
          State a channeling bewteen two arrays of integer variables x and y with the same domain which enforces:
- if the ith variable of the collection X is assigned to j and if j is less than or equal to the number of items of the collection Y then the jth variable of the collection Y is assigned to i.
static Constraint inverseSet(IntegerVariable[] iv, SetVariable[] sv)
          A constraint stating that value j belongs to the sv[i] set variable iff integer variable iv[j] equals to i.
static Constraint inverseSet(SetVariable[] xs, SetVariable[] ys)
          X collection set-variable
Y collection set-variable

Y should have enough slots to handle X domain size (ie.

static Constraint isIncluded(SetVariable sv1, SetVariable sv2)
          Checks that variable sv1 is included in sv2
static Constraint isNotIncluded(SetVariable sv1, SetVariable sv2)
          Checks that variable sv1 is not included in sv2
static Constraint knapsackProblem(IntegerVariable[] vars, IntegerVariable costVar, IntegerVariable weightVar, int[] costs, int[] weights)
          Deprecated. reorder parameters
static Constraint knapsackProblem(IntegerVariable costVar, IntegerVariable weightVar, IntegerVariable[] vars, int[] costs, int[] weights)
          The knapsack problem constraint ensures that costVar is the sum of the vars weighted by the costs and that weightVar is the sum of vars weighted by the weights Based on costRegular, it simulates Tricks's dynamic programming approach.
static Constraint leq(double c, RealExpressionVariable x)
           
static Constraint leq(IntegerExpressionVariable x, int c)
           
static Constraint leq(IntegerExpressionVariable x, IntegerExpressionVariable y)
           
static Constraint leq(int c, IntegerExpressionVariable x)
           
static Constraint leq(RealExpressionVariable x, double c)
           
static Constraint leq(RealExpressionVariable x, RealExpressionVariable y)
           
static Constraint leqCard(SetVariable sv, int val)
           
static Constraint leqCard(SetVariable sv, IntegerVariable v)
           
static Constraint lex(IntegerVariable[] v1, IntegerVariable[] v2)
          Enforce a strict lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = .
static Constraint lexChain(IntegerVariable[]... arrayOfVectors)
          Enforce a strict lexicographic ordering on a chain of integer vectors (X1 ,X2 ,X3,......) with X1 < lex X2 < lex X3 ....
static Constraint lexChainEq(IntegerVariable[]... arrayOfVectors)
          Enforce a lexicographic ordering on a chain of integer vectors (X1 ,X2 ,X3,......) with X1 <= lex X2 <= lex X3 ....
static Constraint lexeq(IntegerVariable[] v1, IntegerVariable[] v2)
          Deprecated. see lexEq
static Constraint lexEq(IntegerVariable[] v1, IntegerVariable[] v2)
          Enforce a lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = .
static Constraint leximin(int[] v1, IntegerVariable[] v2)
          Let x and y be two vectors of n integers, and let x?
static Constraint leximin(IntegerVariable[] v1, IntegerVariable[] v2)
          Let x and y be two vectors of n integers, and let x?
static Constraint lt(IntegerExpressionVariable x, int c)
          Return a constraint that ensures x < c
static Constraint lt(IntegerExpressionVariable x, IntegerExpressionVariable y)
          Return a constraint that ensures x < y
static Constraint lt(int c, IntegerExpressionVariable x)
          Return a constraint that ensures x < c
static BinRelation makeBinRelation(int[] min, int[] max, boolean[][] mat, boolean feas)
          Create a binary relation represented by the matrix of feasible/infeasible (depending on the feas parameters) pairs of values incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument.
static BinRelation makeBinRelation(int[] min, int[] max, boolean[][] mat, boolean feas, boolean bitset)
          Create a binary relation represented by the matrix of feasible/infeasible (depending on the feas parameters) pairs of values incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument.
static BinRelation makeBinRelation(int[] min, int[] max, List<int[]> mat, boolean feas)
          Create a binary relation that represent the list of compatible or incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument.
static BinRelation makeBinRelation(int[] min, int[] max, List<int[]> mat, boolean feas, boolean bitset)
          Create a binary relation that represent the list of compatible or incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument.
static IntegerVariable makeBooleanVar(String name, String... options)
          Make a boolean variable
static IntegerVariable[] makeBooleanVarArray(String name, int dim, String... options)
          Make an array of boolean variables
static IntegerVariable makeIntVar(String name, int[] valuesArray, String... options)
          Make an integer variable
static IntegerVariable makeIntVar(String name, int lowB, int uppB, String... options)
          Make an integer variable
static IntegerVariable makeIntVar(String name, List<Integer> valuesList, String... options)
          Make an integer variable
static IntegerVariable makeIntVar(String name, String... options)
          Make an integer variable with undefined bounds Create an integer variable with the bounded domain [MIN_LOWER_BOUND,MAX_LOWER_BOUND] BEWARE: bigger domain have unexpected behaviour
static IntegerVariable makeIntVar(String name, gnu.trove.TIntArrayList valuesList, String... options)
          Make an integer variable
static IntegerVariable[] makeIntVarArray(String name, int dim, int[] valuesArray, String... options)
          Make an array of integer variable wih the same values
static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, int[] valuesArray, String... options)
          Make a matrix of integer variable with the same values
static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, int lowB, int uppB, String... options)
          Make a matrix of integer variable with same lower and upper bound
static IntegerVariable[] makeIntVarArray(String name, int dim, int lowB, int uppB, String... options)
          Make a array of integer variable with same lower and upper bound
static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, List<Integer> valuesList, String... options)
          Make a matrix of integer variable with the same values
static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, String... options)
          Make a matrix of integer variable with undefined bounds Create an integer variable matrix with the following bounded domain [MIN_LOWER_BOUND,MAX_LOWER_BOUND] BEWARE: bigger domain have unexpected behaviour
static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, gnu.trove.TIntArrayList valuesArray, String... options)
          Make a matrix of integer variable with the same values
static IntegerVariable[] makeIntVarArray(String name, int dim, List<Integer> valuesList, String... options)
          Make an array of integer variable wih the same values
static IntegerVariable[] makeIntVarArray(String name, int dim, String... options)
          Make a array of integer variable with undefined bounds Create an integer variable array with the following bounded domain [MIN_LOWER_BOUND,MAX_LOWER_BOUND] BEWARE: bigger domain have unexpected behaviour
static IntegerVariable[] makeIntVarArray(String name, int dim, gnu.trove.TIntArrayList valuesArray, String... options)
          Make an array of integer variable wih the same values
static LargeRelation makeLargeRelation(int[] min, int[] max, List<int[]> tuples, boolean feas)
          Create a nary relationship that can be used to state a GAC constraint using after the api relationTupleAC(relation).
static LargeRelation makeLargeRelation(int[] min, int[] max, List<int[]> tuples, boolean feas, int scheme)
          Create a nary relationship that can be used to state a GAC constraint using after the api relationTupleAC(relation).
static RealVariable makeRealVar(String name, double lowB, double uppB, String... options)
          Make a real variable
static SetVariable makeSetVar(String name, int[] valuesArray, String... options)
          Make a set variable
static SetVariable makeSetVar(String name, int lowB, int uppB, String... options)
          Make a set variable
static SetVariable[] makeSetVarArray(String name, int dim, int lowB, int uppB, String... options)
          Make an array of set variables
static TaskVariable makeTaskVar(String name, IntegerVariable start, IntegerVariable end, IntegerVariable duration, String... options)
          create a task variable.
static TaskVariable makeTaskVar(String name, IntegerVariable start, IntegerVariable duration, String... options)
          create a task variable.
static TaskVariable makeTaskVar(String name, int bsup, IntegerVariable duration, String... options)
           
static TaskVariable makeTaskVar(String name, int binf, int bsup, IntegerVariable duration, String... options)
          Make a task variable.
static TaskVariable makeTaskVar(String name, int binf, int bsup, int duration, String... options)
           
static TaskVariable makeTaskVar(String name, int bsup, int duration, String... options)
           
static TaskVariable[] makeTaskVarArray(String name, int[] binf, int[] bsup, IntegerVariable[] durations, String... options)
          Create an array of task variables.
static TaskVariable[] makeTaskVarArray(String prefix, IntegerVariable[] starts, IntegerVariable[] ends, IntegerVariable[] durations, String... options)
          Create an array of task variables.
static TaskVariable[][] makeTaskVarArray(String name, int binf, int bsup, int[][] durations, String... options)
           
static TaskVariable[] makeTaskVarArray(String name, int binf, int bsup, int[] durations, String... options)
           
static TaskVariable[][] makeTaskVarArray(String name, int binf, int bsup, IntegerVariable[][] durations, String... options)
           
static TaskVariable[] makeTaskVarArray(String name, int binf, int bsup, IntegerVariable[] durations, String... options)
          Create an array of task variables.
static IntegerExpressionVariable max(IntegerExpressionVariable[] n1)
           
static IntegerExpressionVariable max(IntegerExpressionVariable n1, int n2)
           
static IntegerExpressionVariable max(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static Constraint max(IntegerVariable[] vars, IntegerVariable max)
          Ensures the variable "max" to represent the maximum value that occurs in the list vars
static Constraint max(IntegerVariable x, IntegerVariable y, IntegerVariable max)
          Ensures the variable "max" to represent the maximum value of x and y.
static Constraint max(IntegerVariable x, int y, IntegerVariable max)
          Ensures the variable "max" to represent the maximum value of x and y.
static IntegerExpressionVariable max(int n1, IntegerExpressionVariable n2)
           
static Constraint max(int x, IntegerVariable y, IntegerVariable max)
          Ensures the variable "max" to represent the maximum value of x and y.
static Constraint max(SetVariable svar, IntegerVariable[] ivars, IntegerVariable min, String... options)
          Ensures the variable min to represent the maximum value in ivars that occurs in the sublist associated with set.
static Constraint member(IntegerVariable var, int[] values)
          VAR takes it value in VALUES
static Constraint member(IntegerVariable var, int lower, int upper)
          VAR takes it value between LOWER and UPPER
static Constraint member(IntegerVariable var, SetVariable sv1)
          Ensures that the value of an integer variable is contained in a set variable.
static Constraint member(int val, SetVariable sv1)
          Ensures that a value is contained in a set variable.
static Constraint member(SetVariable sv1, int val)
          Ensures that a value is contained in a set variable.
static Constraint member(SetVariable sv, IntegerVariable... vars)
          Ensures that the values of integer variables are contained in a set variable.
static Constraint member(SetVariable sv1, IntegerVariable var)
          Ensures that the value of an integer variable is contained in a set variable.
static IntegerExpressionVariable min(IntegerExpressionVariable[] n1)
           
static IntegerExpressionVariable min(IntegerExpressionVariable n1, int n2)
           
static IntegerExpressionVariable min(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static Constraint min(IntegerVariable[] vars, IntegerVariable min)
          Ensures the variable "min" to represent the minimum value that occurs in the list vars
static Constraint min(IntegerVariable x, IntegerVariable y, IntegerVariable min)
          Ensures the variable "min" to represent the minimum value of x and y.
static Constraint min(IntegerVariable x, int y, IntegerVariable min)
          Ensures the variable "min" to represent the minimum value of x and y.
static IntegerExpressionVariable min(int n1, IntegerExpressionVariable n2)
           
static Constraint min(int x, IntegerVariable y, IntegerVariable min)
          Ensures the variable "min" to represent the minimum value of x and y.
static Constraint min(SetVariable svar, IntegerVariable[] ivars, IntegerVariable min, String... options)
          Ensures the variable min to represent the minimum value in ivars that occurs in the sublist associated with set.
static RealExpressionVariable minus(double c, RealExpressionVariable t)
           
static IntegerExpressionVariable minus(IntegerExpressionVariable t, int c)
           
static IntegerExpressionVariable minus(IntegerExpressionVariable t1, IntegerExpressionVariable t2)
          Subtracting two terms one from another
static IntegerExpressionVariable minus(int c, IntegerExpressionVariable t)
           
static RealExpressionVariable minus(RealExpressionVariable t, double c)
           
static RealExpressionVariable minus(RealExpressionVariable t1, RealExpressionVariable t2)
           
static IntegerExpressionVariable mod(IntegerExpressionVariable n1, int n2)
           
static IntegerExpressionVariable mod(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static Constraint mod(IntegerVariable v0, IntegerVariable v1, int c)
           
static IntegerExpressionVariable mod(int n1, IntegerExpressionVariable n2)
           
static RealExpressionVariable mult(double a, RealExpressionVariable x)
           
static IntegerExpressionVariable mult(IntegerExpressionVariable t1, int a)
           
static IntegerExpressionVariable mult(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static IntegerExpressionVariable mult(int a, IntegerExpressionVariable t1)
           
static RealExpressionVariable mult(RealExpressionVariable x, double a)
           
static RealExpressionVariable mult(RealExpressionVariable x, RealExpressionVariable y)
           
static Constraint multiCostRegular(IntegerVariable[] costVars, IntegerVariable[] vars, IAutomaton auto, int[][][] costs)
          multiCostRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the cost vectors associated to each assignment is bounded by the cost variable vector
static Constraint multiCostRegular(IntegerVariable[] costVars, IntegerVariable[] vars, IAutomaton auto, int[][][][] costs)
          multiCostRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the cost vectors associated to each assignment is bounded by the cost variable vector.
static Constraint multiCostRegular(IntegerVariable[] costVars, IntegerVariable[] vars, ICostAutomaton auto)
          multiCostRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the cost vectors associated to each assignment is bounded by the cost variable vector.
static Constraint nand(Constraint... n)
           
static Constraint nand(IntegerVariable... literals)
          A constraint for logical conjunction between boolean variables lit1 NAND lit2 NAND ...
static IntegerExpressionVariable neg(IntegerExpressionVariable n)
           
static Constraint neq(IntegerExpressionVariable x, int c)
          Creates a constraint by stating that a term is not equal than a constant
static Constraint neq(IntegerExpressionVariable x, IntegerExpressionVariable y)
           
static Constraint neq(int c, IntegerExpressionVariable x)
           
static Constraint neq(SetVariable sv1, SetVariable sv2)
          Ensure that the two variables are not equal (not exactly the same values in the set)
static Constraint neqCard(SetVariable sv, int val)
          Return a constraint that ensures |sv| !
static Constraint neqCard(SetVariable sv, IntegerVariable v)
          Return a constraint that ensures |sv| !
static Constraint nor(Constraint... n)
           
static Constraint nor(IntegerVariable... literals)
          A constraint for logical conjunction between boolean variables lit1 NOR lit2 NOR ...
static Constraint not(Constraint n)
           
static Constraint notMember(IntegerVariable var, int[] values)
          VAR takes it value out of VALUES
static Constraint notMember(IntegerVariable var, int lower, int upper)
          VAR does not take it value between LOWER and UPPER
static Constraint notMember(IntegerVariable var, SetVariable sv1)
          Ensures that the value of an integer variable is not contained in a set variable.
static Constraint notMember(int val, SetVariable sv1)
          Ensures that a value is not contained ina set variable.
static Constraint notMember(SetVariable sv1, int val)
          Ensures that a value is not contained ina set variable.
static Constraint notMember(SetVariable sv1, IntegerVariable var)
          Ensures that the value of an integer variable is not contained in a set variable.
static Constraint nth(IntegerVariable index, int[] values, IntegerVariable val)
          subscript constraint: accessing an array with a variable index
static Constraint nth(IntegerVariable index, int[] values, IntegerVariable val, int offset)
          subscript constraint: accessing an array with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)
static Constraint nth(IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val)
          subscript constraint: accessing an array of variables with a variable index
static Constraint nth(IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val, int offset)
          subscript constraint: accessing an array of variables with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)
static Constraint nth(IntegerVariable index, IntegerVariable index2, int[][] varArray, IntegerVariable val)
          subscript constraint: accessing a matix of variables with two variables indexes
static Constraint nth(String options, IntegerVariable index, int[] values, IntegerVariable val)
          subscript constraint: accessing an array with a variable index
static Constraint nth(String options, IntegerVariable index, int[] values, IntegerVariable val, int offset)
          subscript constraint: accessing an array with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)
static Constraint nth(String option, IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val)
          subscript constraint: accessing an array of variables with a variable index
static Constraint nth(String options, IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val, int offset)
          subscript constraint: accessing an array of variables with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)
static Constraint occurrence(IntegerVariable occurrence, IntegerVariable[] vars, int value)
          Ensures that the occurrence variable contains the number of occurrences of the given value in the list of variables
static Constraint occurrence(int occurrence, IntegerVariable[] variables, int value)
          Ensures that N variables of the VARIABLES collection are assigned to value VALUE.
static Constraint occurrence(int value, IntegerVariable occurrence, IntegerVariable... vars)
          Ensures that the occurrence variable contains the number of occurrences of the given value in the list of variables
static Constraint occurrenceMax(IntegerVariable occurrence, IntegerVariable[] vars, int value)
          Ensures that the upper bound of occurrence is at least equal to the number of occurrences size{forall v in vars | v = value} <= occurrence
static Constraint occurrenceMax(int value, IntegerVariable occurrence, IntegerVariable... vars)
          Ensures that the upper bound of occurrence is at least equal to the number of occurrences size{forall v in vars | v = value} <= occurrence
static Constraint occurrenceMin(IntegerVariable occurrence, IntegerVariable[] vars, int value)
          Ensures that the lower bound of occurrence is at most equal to the number of occurrences size{forall v in vars | v = value} >= occurrence
static Constraint occurrenceMin(int value, IntegerVariable occurrence, IntegerVariable... vars)
          Ensures that the lower bound of occurrence is at most equal to the number of occurrences size{forall v in vars | v = value} >= occurrence
static Constraint oppositeSign(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static Constraint or(Constraint... n)
           
static Constraint or(IntegerVariable... literals)
          A constraint for logical disjunction between boolean variables lit1 OR lit2 OR ...
static Constraint pack(PackModel packMod, String... options)
           
static Constraint pack(SetVariable[] itemSets, IntegerVariable[] loads, IntegerVariable[] bins, IntegerConstantVariable[] sizes, IntegerVariable nbNonEmpty, String... options)
           
static RealExpressionVariable plus(double c, RealExpressionVariable t)
           
static IntegerExpressionVariable plus(IntegerExpressionVariable t, int c)
           
static IntegerExpressionVariable plus(IntegerExpressionVariable t1, IntegerExpressionVariable t2)
          Adding two terms one to another
static IntegerExpressionVariable plus(int c, IntegerExpressionVariable t)
           
static RealExpressionVariable plus(RealExpressionVariable t, double c)
           
static RealExpressionVariable plus(RealExpressionVariable t1, RealExpressionVariable t2)
           
static IntegerExpressionVariable power(IntegerExpressionVariable n1, int n2)
           
static IntegerExpressionVariable power(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static IntegerExpressionVariable power(int n1, IntegerExpressionVariable n2)
           
static RealExpressionVariable power(RealExpressionVariable exp, int power)
          Power of an expression.
static Constraint precedence(TaskVariable t1, TaskVariable t2)
          T1 ends before t2 starts or t1 precedes t2.
static Constraint precedence(TaskVariable t1, TaskVariable t2, int delta)
          T1 ends before t2 starts or t1 precedes t2.
static Constraint precedenceDisjoint(IntegerVariable v1, int dur1, IntegerVariable v2, int dur2, IntegerVariable bool)
           direction = 1 => v1 + dur1 <= v2 (T1 << T2); direction = 0 => v2 + dur2 <= v1 (T2 << T1);
static Constraint precedenceDisjoint(TaskVariable t1, TaskVariable t2, IntegerVariable direction)
          represents a disjunction without setup times
static Constraint precedenceDisjoint(TaskVariable t1, TaskVariable t2, IntegerVariable direction, int forwardSetup, int backwardSetup)
          precedence disjoint with setup times: direction = 1 => t1.end() + forwardSetup <= t2.start() (T1 << T2); direction = 0 => t2.end() + backwardSetup <= t1.start() (T2 << T1);
static Constraint precedenceImplied(IntegerVariable x1, int k1, IntegerVariable x2, IntegerVariable b)
          represents an implied precedence: b = 1 => x1 + k1 <= x2 b = 0 => TRUE
static Constraint precedenceImplied(TaskVariable t1, int delta, TaskVariable t2, IntegerVariable b)
          represents a reidied precedence with setup times between a pair of tasks: b = 1 => e1 + delta <= s2 b = 0 => TRUE;
static Constraint precedenceReified(IntegerVariable x1, int k1, IntegerVariable x2, IntegerVariable b)
          represents a reidied precedence: b = 1 => x1 + k1 <= x2 b = 0 => x1 + k1 > x2
static Constraint precedenceReified(TaskVariable t1, int delta, TaskVariable t2, IntegerVariable b)
          represents a reidied precedence with setup times between a pair of tasks: b = 1 => e1 + delta <= s2 b = 0 => e1 + delta > s2
static Constraint regular(DFA auto, IntegerVariable[] vars)
          Deprecated. reorder parameters
static Constraint regular(IAutomaton auto, IntegerVariable[] vars)
          Deprecated. reorder parameters
static Constraint regular(IntegerVariable[] vars, DFA auto)
          Create a Regular constraint that enforce the sequence of variables to be a word recognized by the dfa auto.
static Constraint regular(IntegerVariable[] vars, IAutomaton auto)
          Create a Regular constraint that enforce the sequence of variables to be a word recognized by the dfa auto.
static Constraint regular(IntegerVariable[] vars, List<int[]> tuples)
          A Regular constraint based on a DFA which is built from a list of FEASIBLE tuples.
static Constraint regular(IntegerVariable[] vars, List<int[]> tuples, int[] min, int[] max)
          A Regular constraint based on a DFA which is built from a list of INFEASIBLE tuples As the relation is defined by infeasible tuples and we build the feasible automaton, we need to know the range of values by the max and min fields...
static Constraint regular(IntegerVariable[] vars, String regexp)
          Create a Regular constraint that enforce the sequence of variables to match the regular expression.
static Constraint regular(String regexp, IntegerVariable[] vars)
          Deprecated. reorder parameters
static Constraint reifiedAnd(IntegerVariable binVar, IntegerVariable... literals)
          A reified constraint for logical conjunction between boolean variables binVar = lit1 AND lit2 AND ...
static Constraint reifiedConstraint(IntegerVariable binVar, Constraint cst)
           
static Constraint reifiedConstraint(IntegerVariable binVar, Constraint cst, Constraint oppCst)
           
static Constraint reifiedIntConstraint(IntegerVariable binVar, Constraint cst)
          Deprecated. 
static Constraint reifiedIntConstraint(IntegerVariable binVar, Constraint cst, Constraint oppCst)
          Deprecated. 
static Constraint reifiedLeftImp(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
          A reified constraint for reverse implication binVar = lit1 implies lit2
static Constraint reifiedNand(IntegerVariable binVar, IntegerVariable... literals)
          A reified constraint for logical conjunction between boolean variables binVar = lit1 NAND lit2 NAND ...
static Constraint reifiedNor(IntegerVariable binVar, IntegerVariable... literals)
          A reified constraint for logical conjunction between boolean variables binVar = lit1 NOR lit2 NOR ...
static Constraint reifiedNot(IntegerVariable binVar, IntegerVariable lit)
          A reified constraint for logical negation binVar = NOT(lit)
static Constraint reifiedOr(IntegerVariable binVar, IntegerVariable... literals)
          A reified constraint for logical disjunction between boolean variables binVar = lit1 OR lit2 OR ...
static Constraint reifiedRightImp(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
          A reified constraint for forward implication binVar = lit2 implies lit1
static Constraint reifiedXnor(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
          A reified constraint for logical equality binVar = lit1 XNOR lit2
static Constraint reifiedXor(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
          A reified constraint for logical exclusive disjunction between boolean variables binVar = lit1 XOR lit2
static Constraint relationPairAC(IntegerVariable v1, IntegerVariable v2, BinRelation binR)
          Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables.
static Constraint relationPairAC(String options, IntegerVariable v1, IntegerVariable v2, BinRelation binR)
          Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables
static Constraint relationTupleAC(IntegerVariable[] vs, LargeRelation rela)
          Create a constraint enforcing Arc Consistency on a given consistency relation defined by infeasible tuples.
static Constraint relationTupleAC(String options, IntegerVariable[] vs, LargeRelation rela)
           
static Constraint relationTupleFC(IntegerVariable[] vs, LargeRelation rela)
          Create a constraint enforcing Forward Checking on a given consistency relation
static Constraint sameSign(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
           
static IntegerExpressionVariable scalar(int[] lc, IntegerVariable[] lv)
          Building a term from a scalar product of coefficients and variables
static IntegerExpressionVariable scalar(IntegerVariable[] lv, int[] lc)
          Building a term from a scalar product of coefficients and variables
static Constraint setDisjoint(SetVariable... sv)
          Ensure every set of sv are disjoints from each other.
static Constraint setInter(SetVariable sv1, SetVariable sv2, SetVariable inter)
          Enforce a set to be the intersection of two others.
static Constraint setLex(SetVariable x, SetVariable y)
          X <=lex Y
static Constraint setUnion(SetVariable[] sv, SetVariable union)
          Enforce a set to be the union of n others
static Constraint setUnion(SetVariable sv1, SetVariable sv2, SetVariable union)
          Enforce a set to be the union of two others
static Constraint setValuePrecede(SetVariable[] sv, int s, int t)
          If there exists a set variable v1 of VARIABLES such that S does not belong to v1 and T does, then there also exists a set variable v2 preceding v1 such that S belongs to v2 and T does not.
static RealExpressionVariable sin(RealExpressionVariable exp)
          Sinus of an expression.
static Constraint softMultiCostRegular(IntegerVariable[] vars, IntegerVariable[] counters, IntegerVariable[] penaltyVars, IntegerVariable globalPenalty, IPenaltyFunction[] pfunction, IAutomaton auto, int[][][][] costs)
           
static Constraint softMultiCostRegular(IntegerVariable[] vars, IntegerVariable[] counters, IntegerVariable[] penaltyVars, IntegerVariable globalPenalty, IPenaltyFunction[] pfunction, IAutomaton auto, int[][][][] costs, int... sumDimension)
           
static Constraint sorting(IntegerVariable[] v1, IntegerVariable[] v2)
          Let x and x' be two vectors of variables of the same length, and v be an instantiation.
static Constraint startsAfter(TaskVariable t, int min)
          This task begins before max
static Constraint startsAfterBegin(TaskVariable t1, TaskVariable t2)
          Temporal constraint : start(t1) >= start(t2)
static Constraint startsAfterBegin(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint : start(t1) >= start(t2) +delta
static Constraint startsAfterEnd(TaskVariable t1, TaskVariable t2)
          Temporal constraint: start(t1) >= end(t2)
static Constraint startsAfterEnd(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint: start(t1) >= end(t2) + delta
static Constraint startsAt(TaskVariable t, int time)
          This task starts at time.
static Constraint startsBefore(TaskVariable t, int max)
          This task starts before max
static Constraint startsBeforeBegin(TaskVariable t1, TaskVariable t2)
          Temporal constraint : start(t1) <= start(s2)
static Constraint startsBeforeBegin(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint : start(t1) +delta <= start(s2)
static Constraint startsBeforeEnd(TaskVariable t1, TaskVariable t2)
          Temporal constraint : start(t1) + delta <= end(t2)
static Constraint startsBeforeEnd(TaskVariable t1, TaskVariable t2, int delta)
          Temporal constraint : start(t1) + delta <= end(t2)
static Constraint startsBetween(TaskVariable t, int min, int max)
          This task ends between min and max
static Constraint stretchPath(List<int[]> stretchesParameters, IntegerVariable... vars)
          Enforce the minimal and maximal sizes of the streches of any value given in strechesParameters.
static IntegerExpressionVariable sum(IntegerExpressionVariable... lv)
          Building a term from a sum of integer expressions
static Constraint times(IntegerVariable x, IntegerVariable y, IntegerVariable z)
          Enforce z = x * y
static Constraint times(IntegerVariable x, int y, IntegerVariable z)
          Enforce z = x * y
static Constraint times(int x, IntegerVariable y, IntegerVariable z)
          Enforce z = x * y
protected static Constraint timeWindow(IntegerVariable var, int min, int max)
           
static Constraint tree(TreeParametersObject param)
           
static Constraint xnor(IntegerVariable lit1, IntegerVariable lit2)
          A reified constraint for logical equality lit1 XNOR lit2
static Constraint xor(IntegerVariable lit1, IntegerVariable lit2)
          A reified constraint for logical exclusive disjunctive lit1 XOR lit2
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER

MIN_LOWER_BOUND

public static final int MIN_LOWER_BOUND
See Also:
Constant Field Values

MAX_UPPER_BOUND

public static final int MAX_UPPER_BOUND
See Also:
Constant Field Values

ZERO

public static final IntegerVariable ZERO

ONE

public static final IntegerVariable ONE

TRUE

public static final Constraint TRUE

FALSE

public static final Constraint FALSE
Method Detail

makeIntVar

public static IntegerVariable makeIntVar(String name,
                                         int lowB,
                                         int uppB,
                                         String... options)
Make an integer variable

Parameters:
name - : name of the variable
lowB - : lower bound of the variable
uppB - : upper bound of the variable
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVar

public static IntegerVariable makeIntVar(String name,
                                         String... options)
Make an integer variable with undefined bounds Create an integer variable with the bounded domain [MIN_LOWER_BOUND,MAX_LOWER_BOUND] BEWARE: bigger domain have unexpected behaviour

Parameters:
name - : name of the variable
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are : Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVar

public static IntegerVariable makeIntVar(String name,
                                         gnu.trove.TIntArrayList valuesList,
                                         String... options)
Make an integer variable

Parameters:
name - : name of the variable
valuesList - : list of unsorted values
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVar

public static IntegerVariable makeIntVar(String name,
                                         List<Integer> valuesList,
                                         String... options)
Make an integer variable

Parameters:
name - : name of the variable
valuesList - : list of unsorted values
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVar

public static IntegerVariable makeIntVar(String name,
                                         int[] valuesArray,
                                         String... options)
Make an integer variable

Parameters:
name - : name of the variable
valuesArray - : array of values
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeBooleanVar

public static IntegerVariable makeBooleanVar(String name,
                                             String... options)
Make a boolean variable

Parameters:
name - : name of the variable
options - : options of the variable
Returns:
a boolean variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are : Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeBooleanVarArray

public static IntegerVariable[] makeBooleanVarArray(String name,
                                                    int dim,
                                                    String... options)
Make an array of boolean variables

Parameters:
name - : name of the variable
dim - : dimension of the array
options - : options of the variable
Returns:
a boolean variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are : Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[] makeIntVarArray(String name,
                                                int dim,
                                                int lowB,
                                                int uppB,
                                                String... options)
Make a array of integer variable with same lower and upper bound

Parameters:
name - : prefixe name of each variable
dim - : dimension of the array
lowB - : lower bound of each variable
uppB - : upper bound of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[] makeIntVarArray(String name,
                                                int dim,
                                                String... options)
Make a array of integer variable with undefined bounds Create an integer variable array with the following bounded domain [MIN_LOWER_BOUND,MAX_LOWER_BOUND] BEWARE: bigger domain have unexpected behaviour

Parameters:
name - : name of the variable
dim - : dimension of the array
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are : Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[] makeIntVarArray(String name,
                                                int dim,
                                                int[] valuesArray,
                                                String... options)
Make an array of integer variable wih the same values

Parameters:
name - : prefix name of each variable
dim - : dimension of the array
valuesArray - : values of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[] makeIntVarArray(String name,
                                                int dim,
                                                gnu.trove.TIntArrayList valuesArray,
                                                String... options)
Make an array of integer variable wih the same values

Parameters:
name - : prefix name of each variable
dim - : dimension of the array
valuesArray - : values of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[] makeIntVarArray(String name,
                                                int dim,
                                                List<Integer> valuesList,
                                                String... options)
Make an array of integer variable wih the same values

Parameters:
name - : prefix name of each variable
dim - : dimension of the array
valuesList - : values of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[][] makeIntVarArray(String name,
                                                  int dim1,
                                                  int dim2,
                                                  int lowB,
                                                  int uppB,
                                                  String... options)
Make a matrix of integer variable with same lower and upper bound

Parameters:
name - : prefixe name of each variable
dim1 - : first dimension of the matrix
dim2 - : second dimension of the matrix
lowB - : lower bound of each variable
uppB - : upper bound of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[][] makeIntVarArray(String name,
                                                  int dim1,
                                                  int dim2,
                                                  String... options)
Make a matrix of integer variable with undefined bounds Create an integer variable matrix with the following bounded domain [MIN_LOWER_BOUND,MAX_LOWER_BOUND] BEWARE: bigger domain have unexpected behaviour

Parameters:
name - : name of the variable
dim1 - : first dimension of the matrix
dim2 - : second dimension of the matrix
options - : options of the variable
Returns:
an integer variable

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are : Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[][] makeIntVarArray(String name,
                                                  int dim1,
                                                  int dim2,
                                                  int[] valuesArray,
                                                  String... options)
Make a matrix of integer variable with the same values

Parameters:
name - : prefixe name of each variable
dim1 - : first dimension of the matrix
dim2 - : second dimension of the matrix
valuesArray - : values of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[][] makeIntVarArray(String name,
                                                  int dim1,
                                                  int dim2,
                                                  gnu.trove.TIntArrayList valuesArray,
                                                  String... options)
Make a matrix of integer variable with the same values

Parameters:
name - : prefixe name of each variable
dim1 - : first dimension of the matrix
dim2 - : second dimension of the matrix
valuesArray - : values of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeIntVarArray

public static IntegerVariable[][] makeIntVarArray(String name,
                                                  int dim1,
                                                  int dim2,
                                                  List<Integer> valuesList,
                                                  String... options)
Make a matrix of integer variable with the same values

Parameters:
name - : prefixe name of each variable
dim1 - : first dimension of the matrix
dim2 - : second dimension of the matrix
valuesList - : values of each variable
options - : options of the variable
Returns:
an array of integer variables

Options of CPModel must be prefix with "cp:". For IntegerVariable, available options are :

  • cp:enum to force Solver to create enumerated variables (default options if options is empty)
  • cp:bound to force Solver to create bounded variables
  • cp:btree to force Solver to create binary tree variables
  • cp:blist to force Solver to create bipartite list variables
  • cp:link to force Solver to create linked list variables

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeSetVar

public static SetVariable makeSetVar(String name,
                                     int lowB,
                                     int uppB,
                                     String... options)
Make a set variable

Parameters:
name - : name of the variable
lowB - : lower bound of the variable
uppB - : upper bound of the variable
options - : options of the variable
Returns:
a set variable

Options of CPModel must be prefix with "cp:". For SetVariable, available options are :

  • cp:enum to force Solver to create set variables with enumerated caridinality (default options if options is empty)
  • cp:bound to force Solver to create set variables with bounded cardinality

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeSetVar

public static SetVariable makeSetVar(String name,
                                     int[] valuesArray,
                                     String... options)
Make a set variable

Parameters:
name - : name of the variable
valuesArray - : array of values
options - : options of the variable
Returns:
a set variable

Options of CPModel must be prefix with "cp:". For SetVariable, available options are :

  • cp:enum to force Solver to create set variables with enumerated caridinality (default options if options is empty)
  • cp:bound to force Solver to create set variables with bounded cardinality

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeSetVarArray

public static SetVariable[] makeSetVarArray(String name,
                                            int dim,
                                            int lowB,
                                            int uppB,
                                            String... options)
Make an array of set variables

Parameters:
name - : name of the variable
dim - : dimension of the array
lowB - : lower bound of the variable
uppB - : upper bound of the variable
options - : options of the variable
Returns:
a set variable

Options of CPModel must be prefix with "cp:". For SetVariable, available options are :

  • cp:enum to force Solver to create set variables with enumerated caridinality (default options if options is empty)
  • cp:bound to force Solver to create set variables with bounded cardinality

Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeRealVar

public static RealVariable makeRealVar(String name,
                                       double lowB,
                                       double uppB,
                                       String... options)
Make a real variable

Parameters:
name - : name of the variable
lowB - : lower bound of the variable
uppB - : upper bound of the variable
options - : options of the variable
Returns:
a real variable

Options of CPModel must be prefix with "cp:". For RealVariable, available options are : Options for undecisionnal variables

  • cp:no_decision to force variable to be removed from the pool of decisionnal variables
Options for optimization
  • cp:objective to define the variable to optimize

makeTaskVar

public static TaskVariable makeTaskVar(String name,
                                       IntegerVariable start,
                                       IntegerVariable end,
                                       IntegerVariable duration,
                                       String... options)
create a task variable.

Parameters:
name - the name of the task
start - starting time integer variable
end - ending time integer variable
duration - duration integer variable
options - options are added to the task but not added to the integer variables.
Returns:
a task variable

makeTaskVar

public static TaskVariable makeTaskVar(String name,
                                       IntegerVariable start,
                                       IntegerVariable duration,
                                       String... options)
create a task variable. The ending variable is created.

Parameters:
name - the name of the task
start - starting time integer variable
duration - duration integer variable
options - options are added to the task and the end variable.
Returns:
a task variable

makeTaskVar

public static TaskVariable makeTaskVar(String name,
                                       int binf,
                                       int bsup,
                                       IntegerVariable duration,
                                       String... options)
Make a task variable.

Parameters:
name - the name of the task
binf - release time (earliest starting time)
bsup - due date (latest completion time)
duration - duration of the task.
options - options are also added to the start and end variables.
Returns:
a task variable

makeTaskVar

public static TaskVariable makeTaskVar(String name,
                                       int binf,
                                       int bsup,
                                       int duration,
                                       String... options)

makeTaskVar

public static TaskVariable makeTaskVar(String name,
                                       int bsup,
                                       IntegerVariable duration,
                                       String... options)

makeTaskVar

public static TaskVariable makeTaskVar(String name,
                                       int bsup,
                                       int duration,
                                       String... options)

makeTaskVarArray

public static TaskVariable[] makeTaskVarArray(String prefix,
                                              IntegerVariable[] starts,
                                              IntegerVariable[] ends,
                                              IntegerVariable[] durations,
                                              String... options)
Create an array of task variables.

Parameters:
prefix - The name's prefix
starts - start variables
ends - end variables (could be null)
durations - duration variables
options - options are also added to the start and end variables.
Returns:
a task variable

makeTaskVarArray

public static TaskVariable[] makeTaskVarArray(String name,
                                              int[] binf,
                                              int[] bsup,
                                              IntegerVariable[] durations,
                                              String... options)
Create an array of task variables.

Parameters:
name - name of the variable
binf - release times (earliest starting times)
bsup - due dates (latest completion times)
durations - duration variables
options - options are also added to the start and end variables.
Returns:
a task variable

makeTaskVarArray

public static TaskVariable[] makeTaskVarArray(String name,
                                              int binf,
                                              int bsup,
                                              IntegerVariable[] durations,
                                              String... options)
Create an array of task variables.

Parameters:
name - name of the variable
binf - common release time (earliest starting time)
bsup - common due date (latest completion time)
durations - duration variables
options - options are also added to the start and end variables.
Returns:
a task variable

makeTaskVarArray

public static TaskVariable[] makeTaskVarArray(String name,
                                              int binf,
                                              int bsup,
                                              int[] durations,
                                              String... options)

makeTaskVarArray

public static TaskVariable[][] makeTaskVarArray(String name,
                                                int binf,
                                                int bsup,
                                                IntegerVariable[][] durations,
                                                String... options)

makeTaskVarArray

public static TaskVariable[][] makeTaskVarArray(String name,
                                                int binf,
                                                int bsup,
                                                int[][] durations,
                                                String... options)

constant

public static IntegerConstantVariable constant(int value)
Create a integer constant

Parameters:
value - constant value
Returns:
IntegerConstantVariable

constant

public static SetConstantVariable constant(int[] values)
Create a set constant

Parameters:
values - array of constant values
Returns:
IntegerConstantVariable

emptySet

public static SetConstantVariable emptySet()
Create an empty set constant

Returns:
SetConstantVariable

constant

public static RealConstantVariable constant(double value)
Create a real constant

Parameters:
value - constant value
Returns:
RealConstantVariable

constantArray

public static IntegerConstantVariable[] constantArray(int[] values)

constantArray

public static IntegerConstantVariable[][] constantArray(int[][] values)

constantArray

public static RealConstantVariable[] constantArray(double[] values)

neq

public static Constraint neq(IntegerExpressionVariable x,
                             int c)
Creates a constraint by stating that a term is not equal than a constant

Parameters:
x - the expression
c - the constant
Returns:
the linear disequality constraint

neq

public static Constraint neq(int c,
                             IntegerExpressionVariable x)

neq

public static Constraint neq(IntegerExpressionVariable x,
                             IntegerExpressionVariable y)

geq

public static Constraint geq(IntegerExpressionVariable x,
                             IntegerExpressionVariable y)

geq

public static Constraint geq(IntegerExpressionVariable x,
                             int c)

geq

public static Constraint geq(int c,
                             IntegerExpressionVariable x)

geq

public static Constraint geq(RealExpressionVariable x,
                             RealExpressionVariable y)

geq

public static Constraint geq(RealExpressionVariable x,
                             double c)

geq

public static Constraint geq(double c,
                             RealExpressionVariable x)

gt

public static Constraint gt(IntegerExpressionVariable x,
                            IntegerExpressionVariable y)
Return a constraint that ensures x > y

Parameters:
x - an expression variable or an integer variable
y - an expression variable or an integer variable
Returns:
a constraint that ensures x > y

gt

public static Constraint gt(IntegerExpressionVariable x,
                            int c)
Return a constraint that ensures x > c

Parameters:
x - an expression variable or an integer variable
c - an integer
Returns:
a constraint that ensures x > y

gt

public static Constraint gt(int c,
                            IntegerExpressionVariable x)
Return a constraint that ensures c > x

Parameters:
x - an expression variable or an integer variable
c - an integer
Returns:
a constraint that ensures x > y

eq

public static Constraint eq(IntegerExpressionVariable x,
                            IntegerExpressionVariable y)
Return a constraint that ensure x == y

Parameters:
x - an expression variable or integer variable
y - an expression variable or integer variable
Returns:
a constraint that ensures x == y

eq

public static Constraint eq(IntegerExpressionVariable x,
                            int c)
Return a constraint that ensure x == c

Parameters:
x - an expression variable or integer variable
c - a constant
Returns:
a constraint that ensure x == c

eq

public static Constraint eq(int c,
                            IntegerExpressionVariable x)
Return a constraint that ensure x == c

Parameters:
x - an expression variable or integer variable
c - a constant
Returns:
a constraint that ensure x == c

eq

public static Constraint eq(RealExpressionVariable x,
                            RealExpressionVariable y)
Return a constraint that ensures x == y

Parameters:
x - an expression variable or real variable
y - an expression variable or real variable
Returns:
a constraint that ensures x == y

eq

public static Constraint eq(RealExpressionVariable x,
                            double c)
Return a constraint that ensures x == c

Parameters:
x - an expression variable or real variable
c - a double
Returns:
a constraint that ensures x == c

eq

public static Constraint eq(double c,
                            RealExpressionVariable x)
Return a constraint that ensures x == c

Parameters:
x - an expression variable or real variable
c - a double
Returns:
a constraint that ensures x == c

eq

public static Constraint eq(RealVariable r,
                            IntegerVariable i)
Return a constraint that ensures r == i

Parameters:
r - a real variable
i - an integer variable
Returns:
a constraint that ensures r == i

eq

public static Constraint eq(IntegerVariable i,
                            RealVariable r)
Return a constraint that ensures r == i

Parameters:
r - a real variable
i - an integer variable
Returns:
a constraint that ensures r == i

leq

public static Constraint leq(IntegerExpressionVariable x,
                             int c)

leq

public static Constraint leq(int c,
                             IntegerExpressionVariable x)

leq

public static Constraint leq(IntegerExpressionVariable x,
                             IntegerExpressionVariable y)

leq

public static Constraint leq(RealExpressionVariable x,
                             double c)

leq

public static Constraint leq(double c,
                             RealExpressionVariable x)

leq

public static Constraint leq(RealExpressionVariable x,
                             RealExpressionVariable y)

lt

public static Constraint lt(IntegerExpressionVariable x,
                            int c)
Return a constraint that ensures x < c

Parameters:
x - an integer expression variable
c - an integer
Returns:
a constraint that ensures x < c

lt

public static Constraint lt(int c,
                            IntegerExpressionVariable x)
Return a constraint that ensures x < c

Parameters:
x - an integer expression variable
c - an integer
Returns:
a constraint that ensures x < c

lt

public static Constraint lt(IntegerExpressionVariable x,
                            IntegerExpressionVariable y)
Return a constraint that ensures x < y

Parameters:
x - an integer expression variable
y - an integer expression variable
Returns:
a constraint that ensures x < y

times

public static Constraint times(IntegerVariable x,
                               IntegerVariable y,
                               IntegerVariable z)
Enforce z = x * y

Parameters:
x - the first integer variable
y - the second integer variable
z - the result of x*y
Returns:
the times constraint

times

public static Constraint times(int x,
                               IntegerVariable y,
                               IntegerVariable z)
Enforce z = x * y

Parameters:
x - the first integer variable
y - the second integer variable
z - the result of x*y
Returns:
the times constraint

times

public static Constraint times(IntegerVariable x,
                               int y,
                               IntegerVariable z)
Enforce z = x * y

Parameters:
x - the first integer variable
y - the second integer variable
z - the result of x*y
Returns:
the times constraint

intDiv

public static Constraint intDiv(IntegerVariable x,
                                IntegerVariable y,
                                IntegerVariable z)
Enforce z = x / y

Parameters:
x - the first integer variable
y - the second integer variable
z - the result of x/y
Returns:
the intDiv constraint

makeBinRelation

public static BinRelation makeBinRelation(int[] min,
                                          int[] max,
                                          List<int[]> mat,
                                          boolean feas,
                                          boolean bitset)
Create a binary relation that represent the list of compatible or incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument. So such that : min[0] <= x.getInf(), max[0] >= x.getSup(), min[1] <= x.getSup(), min[1] >= y.getInf(), max[1] >= y.getSup() for any pairs of variable x,y where an ac algorithm will be used with this relation. This is mandatory in the api to be able to compute the opposite of the relation if needed so the min[i]/max[i] can be smaller/bigger than min_{j \in pairs} pairs.get(j)[i] or max_{j \in pairs} pairs.get(j)[i]

Parameters:
min - array of min values
max - array of max values
mat - the list of tuples defined as int[] of size 2
feas - specify if the relation is defined in feasibility or not i.e. if the tuples corresponds to feasible or infeasible tuples
bitset - specify if the relation is intended to be used in ac3rm enhanced with bitwise operations
Returns:
a binary relation that can be used with the api relationPairAC(v1,v2,relation)

makeBinRelation

public static BinRelation makeBinRelation(int[] min,
                                          int[] max,
                                          List<int[]> mat,
                                          boolean feas)
Create a binary relation that represent the list of compatible or incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument. So such that : min[0] <= x.getInf(), max[0] >= x.getSup(), min[1] <= x.getSup(), min[1] >= y.getInf(), max[1] >= y.getSup() for any pairs of variable x,y where an ac algorithm will be used with this relation. This is mandatory in the api to be able to compute the opposite of the relation if needed so the min[i]/max[i] can be smaller/bigger than min_{j \in pairs} pairs.get(j)[i] or max_{j \in pairs} pairs.get(j)[i] This relation can not be used with ac3 with residues and BitSet.

Parameters:
min - array of min values
max - arrau of max values
mat - the list of tuples defined as int[] of size 2
feas - specify if the relation is defined in feasibility or not i.e. if the tuples corresponds to feasible or infeasible tuples
Returns:
a binary relation that can be used with the api relationPairAC(v1,v2,relation)

makeBinRelation

public static BinRelation makeBinRelation(int[] min,
                                          int[] max,
                                          boolean[][] mat,
                                          boolean feas,
                                          boolean bitset)
Create a binary relation represented by the matrix of feasible/infeasible (depending on the feas parameters) pairs of values incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument. So such that : min[0] <= x.getInf(), max[0] >= x.getSup(), min[1] <= x.getSup(), min[1] >= y.getInf(), max[1] >= y.getSup() for any pairs of variable x,y where an ac algorithm will be used with this relation. This is mandatory in the api to be able to compute the opposite of the relation if needed.

This constructor allows toshare a relation among binary constraints

Parameters:
min - array of min values
max - array of max values
mat - the consistency matrix
feas - specify if the relation is defined in feasibility or not
bitset - specify if the relation is intended to be used in ac3rm enhanced with bitwise operations
Returns:
a binary relation that can be used with the api relationPairAC(v1,v2,relation)

makeBinRelation

public static BinRelation makeBinRelation(int[] min,
                                          int[] max,
                                          boolean[][] mat,
                                          boolean feas)
Create a binary relation represented by the matrix of feasible/infeasible (depending on the feas parameters) pairs of values incompatible pairs of values (depending on feas) given in argument tp be stated on any pair of variables (x,y) whose domain is included in the min max given in argument. So such that : min[0] <= x.getInf(), max[0] >= x.getSup(), min[1] <= x.getSup(), min[1] >= y.getInf(), max[1] >= y.getSup() for any pairs of variable x,y where an ac algorithm will be used with this relation. This is mandatory in the api to be able to compute the opposite of the relation if needed.

This constructor allows toshare a relation among binary constraints

Parameters:
min - array of min values
max - array of max values
mat - the consistency matrix
feas - specify if the relation is defined in feasibility or not
Returns:
a binary relation that can be used with the api relationPairAC(v1,v2,relation)

infeasPairAC

public static Constraint infeasPairAC(IntegerVariable v1,
                                      IntegerVariable v2,
                                      List<int[]> mat)
Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables. Default ac algorithm is ac3 with residues.

Parameters:
v1 - : first variable
v2 - : second variable
mat - : the list of tuples defining the relation (the infeasible pairs)
Returns:
Constraint

infeasPairAC

public static Constraint infeasPairAC(String options,
                                      IntegerVariable v1,
                                      IntegerVariable v2,
                                      List<int[]> mat)
Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables

Parameters:
v1 - : first variable
v2 - : second variable
options - : used to define the desired arc consistency algorithm "cp:ac3" to get ac3 "cp:ac2001" to get ac2001 "cp:ac32" to get ac3 with residues (ac2001 where the support is not stored) "cp:ac322" to get ac3 with the used of BitSet to know if a support still exists
mat - : the list of tuples defining the relation (the infeasible pairs)
Returns:
Constraint

feasPairAC

public static Constraint feasPairAC(IntegerVariable v1,
                                    IntegerVariable v2,
                                    List<int[]> mat)
Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables. Default ac algorithm is ac3 with residues.

Parameters:
v1 - : first variable
v2 - : second variable
mat - : the list of tuples defining the relation (the feasible pairs)
Returns:
Constraint

feasPairAC

public static Constraint feasPairAC(String options,
                                    IntegerVariable v1,
                                    IntegerVariable v2,
                                    List<int[]> mat)
Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables

Parameters:
v1 - : first variable
v2 - : second variable
options - : used to define the desired arc consistency algorithm "cp:ac3" to get ac3 "cp:ac2001" to get ac2001 "cp:ac32" to get ac3 with residues (ac2001 where the support is not stored) "cp:ac322" to get ac3 with the used of BitSet to know if a support still exists
mat - : the list of tuples defining the relation (the feasible pairs)
Returns:
Constraint

infeasPairAC

public static Constraint infeasPairAC(IntegerVariable v1,
                                      IntegerVariable v2,
                                      boolean[][] mat)
Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables. Default ac algorithm is ac3 with residue

Parameters:
v1 - : first variable
v2 - : second variable
mat - : a boolean matrice indicating the consistency relation (the infeasible pairs)
Returns:
Constraint

infeasPairAC

public static Constraint infeasPairAC(String options,
                                      IntegerVariable v1,
                                      IntegerVariable v2,
                                      boolean[][] mat)
Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables

Parameters:
v1 - : first variable
v2 - : second variable
options - : used to define the desired arc consistency algorithm "cp:ac3" to get ac3 "cp:ac2001" to get ac2001 "cp:ac32" to get ac3 with residues (ac2001 where the support is not stored) "cp:ac322" to get ac3 with the used of BitSet to know if a support still exists
mat - : a boolean matrice indicating the consistency relation (the infeasible pairs)
Returns:
Constraint

feasPairAC

public static Constraint feasPairAC(IntegerVariable v1,
                                    IntegerVariable v2,
                                    boolean[][] mat)
Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables. Default ac algorithm is ac3 with residues.

Parameters:
v1 - : first variable
v2 - : second variable
mat - : a boolean matrice indicating the consistency relation (the feasible pairs) *
Returns:
Constraint

feasPairAC

public static Constraint feasPairAC(String options,
                                    IntegerVariable v1,
                                    IntegerVariable v2,
                                    boolean[][] mat)
Build a Table constraint defined extensionnaly by the set of feasibles pairs of values for the corresponding variables

Parameters:
v1 - : first variable
v2 - : second variable
options - : used to define the desired arc consistency algorithm "cp:ac3" to get ac3 "cp:ac2001" to get ac2001 "cp:ac32" to get ac3 with residues (ac2001 where the support is not stored) "cp:ac322" to get ac3 with the used of BitSet to know if a support still exists
mat - : a boolean matrice indicating the consistency relation (the feasible pairs)
Returns:
Constraint

relationPairAC

public static Constraint relationPairAC(IntegerVariable v1,
                                        IntegerVariable v2,
                                        BinRelation binR)
Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables. Default algorithm is ac3 with residues.

Parameters:
v1 - : first variable
v2 - : second variable
binR - : a binary relation standing for the consistency relation. Notice that the same relation can therefore be shared among constraints.
Returns:
Constraint

relationPairAC

public static Constraint relationPairAC(String options,
                                        IntegerVariable v1,
                                        IntegerVariable v2,
                                        BinRelation binR)
Build a Table constraint defined extensionnaly by the set of infeasibles pairs of values for the corresponding variables

Parameters:
v1 - : first variable
v2 - : second variable
options - : used to define the desired arc consistency algorithm "cp:ac3" to get ac3 "cp:ac2001" to get ac2001 "cp:ac32" to get ac3 with residues (ac2001 where the support is not stored) "cp:ac322" to get ac3 with the used of BitSet to know if a support still exists
binR - : a binary relation standing for the consistency relation. Notice that the same relation can therefore be shared among constraints.
Returns:
Constraint

makeLargeRelation

public static LargeRelation makeLargeRelation(int[] min,
                                              int[] max,
                                              List<int[]> tuples,
                                              boolean feas)
Create a nary relationship that can be used to state a GAC constraint using after the api relationTupleAC(relation). Typically GAC algorithms uses two main schemes to seek the next support : - either by looking in the domain of the variable (here put feas = false to get such a relation and give the negative tuples) - or in the table itself in which case one need to be able to iterate over the tuples and not only check consistency (here put feas = true to get such a relation and gives the positive tuples) So the scheme is choosed automatically depending if you are in feasible or infeasible tuples. See the api that allows to select the scheme to have more control.

Parameters:
min - : min[i] has to be greater or equal the minimum value of any i-th variable on which this relation will be used
max - : max[i] has to be greater or equal the maximum value of any i-th variable on which this relation will be used
tuples - : list of tuples
feas - : specifies if the tuples are feasible or infeasible tuples
Returns:
an nary relation.

makeLargeRelation

public static LargeRelation makeLargeRelation(int[] min,
                                              int[] max,
                                              List<int[]> tuples,
                                              boolean feas,
                                              int scheme)
Create a nary relationship that can be used to state a GAC constraint using after the api relationTupleAC(relation). Typically GAC algorithms uses two main schemes to seek the next support : - either by looking in the domain of the variable (here put scheme = 1 to get such a relation) - or in the table itself in which case one need to be able to iterate over the tuples and not only check consistency (here put scheme = 0 or 2 (for GACstr) to get such a relation) and gives the positive tuples)

Parameters:
min - : min[i] has to be greater or equal the minimum value of any i-th variable on which this relation will be used
max - : max[i] has to be greater or equal the maximum value of any i-th variable on which this relation will be used
tuples - : list of tuples
feas - : specifies if the tuples are feasible or infeasible tuples
scheme - : specifies the desired scheme allowed tuples (0) or valid tuples (1) or both (2). The GAC constraint stated on this relation will then work in the corresponding scheme. Allowed means that the search for support is made through the lists of tuples and valid that it is made through the domains of the variables.
Returns:
an nary relation.

infeasTupleFC

public static Constraint infeasTupleFC(List<int[]> tuples,
                                       IntegerVariable... vars)
Create a constraint enforcing Forward Checking on a given a given list of infeasible tuples

Parameters:
tuples - : a list of int[] corresponding to infeasible tuples
vars - : scope of variables
Returns:
Constraint

feasTupleFC

public static Constraint feasTupleFC(List<int[]> tuples,
                                     IntegerVariable... vars)
Create a constraint enforcing Forward Checking on a given a given list of feasible tuples

Parameters:
tuples - : a list of int[] corresponding to feasible tuples
vars - : scope of variables
Returns:
Constraint

infeasTupleAC

public static Constraint infeasTupleAC(List<int[]> tuples,
                                       IntegerVariable... vars)
Create a constraint enforcing Arc Consistency on a given a given list of infeasible tuples

Parameters:
tuples - : a list of int[] corresponding to infeasible tuples
vars - : scope of variables
Returns:
Constraint

feasTupleAC

public static Constraint feasTupleAC(List<int[]> tuples,
                                     IntegerVariable... vars)
Create a constraint enforcing Arc Consistency on a given a given list of feasible tuples

Parameters:
tuples - : a list of int[] corresponding to feasible tuples
vars - : scope of variables
Returns:
Constraint

infeasTupleAC

public static Constraint infeasTupleAC(String options,
                                       List<int[]> tuples,
                                       IntegerVariable... vars)
Create a constraint enforcing Arc Consistency on a given a given list of infeasible tuples

Parameters:
options - : specifies the desired ac algorithm : 32 or 2001
tuples - : a list of int[] corresponding to infeasible tuples
vars - : scope variables
Returns:
Constraint

feasTupleAC

public static Constraint feasTupleAC(String options,
                                     List<int[]> tuples,
                                     IntegerVariable... vars)
Create a constraint enforcing Arc Consistency on a given a given list of feasible tuples

Parameters:
options - : specifies the desired ac algorithm among : 32 or 2001
tuples - : a list of int[] corresponding to feasible tuples
vars - : scope of variables
Returns:
Constraint

relationTupleFC

public static Constraint relationTupleFC(IntegerVariable[] vs,
                                         LargeRelation rela)
Create a constraint enforcing Forward Checking on a given consistency relation

Parameters:
vs - array of variables
rela - relation
Returns:
Constraint

relationTupleAC

public static Constraint relationTupleAC(IntegerVariable[] vs,
                                         LargeRelation rela)
Create a constraint enforcing Arc Consistency on a given consistency relation defined by infeasible tuples. It can also be used for feasible tuples but will be less efficient than the use of an IterLargeRelation

Parameters:
vs - array of variables
rela - relation
Returns:
Constraint

relationTupleAC

public static Constraint relationTupleAC(String options,
                                         IntegerVariable[] vs,
                                         LargeRelation rela)

member

public static Constraint member(IntegerVariable var,
                                int[] values)
VAR takes it value in VALUES

Parameters:
var - int variable
values - array of int
Returns:
AMONG constraint

member

public static Constraint member(IntegerVariable var,
                                int lower,
                                int upper)
VAR takes it value between LOWER and UPPER

Parameters:
var - int variable
lower - lower bound
upper - upper bound
Returns:
AMONG constraint

among

@Deprecated
public static Constraint among(IntegerVariable var,
                                          int[] values)
Deprecated. use member

VAR takes it value in VALUES

Parameters:
var - int variable
values - array of int
Returns:
AMONG constraint

among

public static Constraint among(IntegerVariable nvar,
                               IntegerVariable[] variables,
                               int[] values)
NVAR is the number of variables of the collection VARIABLES that take their value in VALUES.

Parameters:
nvar - counter
variables - collection of variables
values - array of values
Returns:
AMONG constraint

among

public static Constraint among(IntegerVariable nvar,
                               IntegerVariable[] variables,
                               SetVariable svar)
NVAR is the number of variables of the collection VARIABLES that take their value in SVAR.

Parameters:
nvar - counter
variables - collection of variables
svar - set variable
Returns:
AMONG constraint

notMember

public static Constraint notMember(IntegerVariable var,
                                   int[] values)
VAR takes it value out of VALUES

Parameters:
var - int variable
values - array of int
Returns:
DISJOINT constraint

notMember

public static Constraint notMember(IntegerVariable var,
                                   int lower,
                                   int upper)
VAR does not take it value between LOWER and UPPER

Parameters:
var - int variable
lower - lower bound
upper - upper bound
Returns:
DISJOINT constraint

disjoint

@Deprecated
public static Constraint disjoint(IntegerVariable var,
                                             int[] values)
Deprecated. rename as notMember

VAR takes it value out of VALUES

Parameters:
var - int variable
values - array of int
Returns:
DISJOINT constraint

distanceEQ

public static Constraint distanceEQ(IntegerVariable x,
                                    IntegerVariable y,
                                    int c)
Ensures |x-y| = c;

Parameters:
x - the first variable
y - the second variable
c - : the distance
Returns:
Constraint

distanceNEQ

public static Constraint distanceNEQ(IntegerVariable x,
                                     IntegerVariable y,
                                     int c)
Ensures |x-y| != c;

Parameters:
x - the first variable
y - the second variable
c - : the distance
Returns:
Constraint

distanceLT

public static Constraint distanceLT(IntegerVariable x,
                                    IntegerVariable y,
                                    int c)
Ensures |x-y| < c;

Parameters:
x - the first variable
y - the second variable
c - : the distance
Returns:
Constraint

distanceGT

public static Constraint distanceGT(IntegerVariable x,
                                    IntegerVariable y,
                                    int c)
Ensures |x-y| > c;

Parameters:
x - the first variable
y - the second variable
c - : the distance
Returns:
Constraint

distanceEQ

public static Constraint distanceEQ(IntegerVariable x,
                                    IntegerVariable y,
                                    IntegerVariable z,
                                    int c)
Ensures |x-y| = z + c;

Parameters:
x - the first variable
y - the second variable
z - = the third variable
c - : the constant
Returns:
Constraint

distanceEQ

public static Constraint distanceEQ(IntegerVariable x,
                                    IntegerVariable y,
                                    IntegerVariable z)
Ensures |x-y| = z;

Parameters:
x - the first variable
y - the second variable
z - the third variable
Returns:
Constraint

distanceLT

public static Constraint distanceLT(IntegerVariable x,
                                    IntegerVariable y,
                                    IntegerVariable z,
                                    int c)
Ensures |x-y| < z + c;

Parameters:
x - the first variable
y - the second variable
z - the third variable
c - the constant
Returns:
Constraint

distanceLT

public static Constraint distanceLT(IntegerVariable x,
                                    IntegerVariable y,
                                    IntegerVariable z)
Ensures |x-y| < z;

Parameters:
x - the first variable
y - the second variable
z - the third variable
Returns:
Constraint

distanceGT

public static Constraint distanceGT(IntegerVariable x,
                                    IntegerVariable y,
                                    IntegerVariable z,
                                    int c)
Ensures |x-y| > z + c;

Parameters:
x - the first variable
y - the second variable
z - the third variable
c - the constant
Returns:
Constraint

distanceGT

public static Constraint distanceGT(IntegerVariable x,
                                    IntegerVariable y,
                                    IntegerVariable z)
Ensures |x-y| > z;

Parameters:
x - the first variable
y - the second variable
z - the third variable
Returns:
Constraint

abs

public static Constraint abs(IntegerVariable x,
                             IntegerVariable y)
Ensures x = Math.abs(y);

Parameters:
x - the first variable
y - the second variable
Returns:
Constraint

min

public static Constraint min(SetVariable svar,
                             IntegerVariable[] ivars,
                             IntegerVariable min,
                             String... options)
Ensures the variable min to represent the minimum value in ivars that occurs in the sublist associated with set. An element vars[i] belongs to the sublist if the set contains i.

Parameters:
svar - the set which defined the sublist
ivars - List of variables
min - Variable to represent the maximum among the sublist
options - Options.C_MINMAX_INF, Options.C_MINMAX_SUP
Returns:
Constraint

min

public static Constraint min(IntegerVariable[] vars,
                             IntegerVariable min)
Ensures the variable "min" to represent the minimum value that occurs in the list vars

Parameters:
vars - List of variables
min - Variable to represent the minimum among vars
Returns:
Constraint

max

public static Constraint max(SetVariable svar,
                             IntegerVariable[] ivars,
                             IntegerVariable min,
                             String... options)
Ensures the variable min to represent the maximum value in ivars that occurs in the sublist associated with set. An element vars[i] belongs to the sublist if the set contains i.

Parameters:
svar - the set which defined the sublist
ivars - List of variables
min - Variable to represent the maximum among the sublist
options - Options.C_MINMAX_INF, Options.C_MINMAX_SUP
Returns:
Constraint

max

public static Constraint max(IntegerVariable[] vars,
                             IntegerVariable max)
Ensures the variable "max" to represent the maximum value that occurs in the list vars

Parameters:
vars - List of variables
max - Variable to represent the maximum among vars
Returns:
Constraint

min

public static Constraint min(IntegerVariable x,
                             IntegerVariable y,
                             IntegerVariable min)
Ensures the variable "min" to represent the minimum value of x and y.

Parameters:
x - the first variable
y - the second variable
min - Variable to represent the minimum among vars
Returns:
Constraint

min

public static Constraint min(int x,
                             IntegerVariable y,
                             IntegerVariable min)
Ensures the variable "min" to represent the minimum value of x and y.

Parameters:
x - the first variable
y - the second variable
min - Variable to represent the minimum among vars
Returns:
Constraint

min

public static Constraint min(IntegerVariable x,
                             int y,
                             IntegerVariable min)
Ensures the variable "min" to represent the minimum value of x and y.

Parameters:
x - the first variable
y - the second variable
min - Variable to represent the minimum among vars
Returns:
Constraint

max

public static Constraint max(IntegerVariable x,
                             IntegerVariable y,
                             IntegerVariable max)
Ensures the variable "max" to represent the maximum value of x and y.

Parameters:
x - the first variable
y - the second variable
max - Variable to represent the maximum among vars
Returns:
Constraint

max

public static Constraint max(int x,
                             IntegerVariable y,
                             IntegerVariable max)
Ensures the variable "max" to represent the maximum value of x and y.

Parameters:
x - the first variable
y - the second variable
max - Variable to represent the maximum among vars
Returns:
Constraint

max

public static Constraint max(IntegerVariable x,
                             int y,
                             IntegerVariable max)
Ensures the variable "max" to represent the maximum value of x and y.

Parameters:
x - the first variable
y - the second variable
max - Variable to represent the maximum among vars
Returns:
Constraint

occurrence

public static Constraint occurrence(int value,
                                    IntegerVariable occurrence,
                                    IntegerVariable... vars)
Ensures that the occurrence variable contains the number of occurrences of the given value in the list of variables

Parameters:
value - the observed value
vars - List of variables where the value can appear
occurrence - The variable that should contain the occurence number
Returns:
Constraint

occurrence

public static Constraint occurrence(IntegerVariable occurrence,
                                    IntegerVariable[] vars,
                                    int value)
Ensures that the occurrence variable contains the number of occurrences of the given value in the list of variables

Parameters:
vars - List of variables where the value can appear
occurrence - The variable that should contain the occurrence number
value - the observed value
Returns:
Constraint

occurrenceMin

public static Constraint occurrenceMin(int value,
                                       IntegerVariable occurrence,
                                       IntegerVariable... vars)
Ensures that the lower bound of occurrence is at most equal to the number of occurrences size{forall v in vars | v = value} >= occurrence

Parameters:
value - the observed value
occurrence - the variable that should contain the occurrence number
vars - list of variable where the value can appear
Returns:
Constraint

occurrenceMin

public static Constraint occurrenceMin(IntegerVariable occurrence,
                                       IntegerVariable[] vars,
                                       int value)
Ensures that the lower bound of occurrence is at most equal to the number of occurrences size{forall v in vars | v = value} >= occurrence

Parameters:
occurrence - the variable that should contain the occurrence number
vars - list of variable where the value can appear
value - the observed value
Returns:
Constraint

occurrenceMax

public static Constraint occurrenceMax(int value,
                                       IntegerVariable occurrence,
                                       IntegerVariable... vars)
Ensures that the upper bound of occurrence is at least equal to the number of occurrences size{forall v in vars | v = value} <= occurrence

Parameters:
value - the observed value
occurrence - the variable that should contain the occurrence number
vars - list of variable where the value can appear
Returns:
Constraint

occurrenceMax

public static Constraint occurrenceMax(IntegerVariable occurrence,
                                       IntegerVariable[] vars,
                                       int value)
Ensures that the upper bound of occurrence is at least equal to the number of occurrences size{forall v in vars | v = value} <= occurrence

Parameters:
occurrence - the variable that should contain the occurence number
vars - list of variable where the value can appear
value - the observed value
Returns:
Constraint

occurrence

public static Constraint occurrence(int occurrence,
                                    IntegerVariable[] variables,
                                    int value)
Ensures that N variables of the VARIABLES collection are assigned to value VALUE.

Parameters:
occurrence - counter
variables - collection of variables
value - int
Returns:
EXACTLY constraint

exactly

@Deprecated
public static Constraint exactly(int occurrence,
                                            IntegerVariable[] variables,
                                            int value)
Deprecated. see among

Ensures that N variables of the VARIABLES collection are assigned to value VALUE.

Parameters:
occurrence - counter
variables - collection of variables
value - int
Returns:
EXACTLY constraint

increasingSum

public static Constraint increasingSum(IntegerVariable[] variables,
                                       IntegerVariable sum)
A sum constraint with increasing variables
s = x_0 + x_1 + ... + x_(n-1)
and x_0 <= x_1 <= ... <= x_(n-1)

Bounds-consistency algorithm linear in n (the number of variables)

Parameters:
variables - collection of variables
sum - resulting variable
Returns:
Constraint

nth

public static Constraint nth(IntegerVariable index,
                             int[] values,
                             IntegerVariable val)
subscript constraint: accessing an array with a variable index

Parameters:
index - the index variable
values - the possible value
val - the indexth value
Returns:
Constraint

nth

public static Constraint nth(String options,
                             IntegerVariable index,
                             int[] values,
                             IntegerVariable val)
subscript constraint: accessing an array with a variable index

Parameters:
index - the index variable
values - the possible value
val - the indexth value
Returns:
Constraint

nth

public static Constraint nth(IntegerVariable index,
                             int[] values,
                             IntegerVariable val,
                             int offset)
subscript constraint: accessing an array with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)

Parameters:
index - the index variable
values - the possible value
offset - the offset value
val - the indexth value
Returns:
Constraint

nth

public static Constraint nth(String options,
                             IntegerVariable index,
                             int[] values,
                             IntegerVariable val,
                             int offset)
subscript constraint: accessing an array with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)

Parameters:
index - the index variable
values - the possible value
offset - the offset value
val - the indexth value
Returns:
Constraint

nth

public static Constraint nth(IntegerVariable index,
                             IntegerVariable[] varArray,
                             IntegerVariable val)
subscript constraint: accessing an array of variables with a variable index

Parameters:
index - the index variable
varArray - array of possible variables
val - indexth variable
Returns:
Constraint

nth

public static Constraint nth(String option,
                             IntegerVariable index,
                             IntegerVariable[] varArray,
                             IntegerVariable val)
subscript constraint: accessing an array of variables with a variable index

Parameters:
index - the index variable
varArray - array of possible variables
val - indexth variable
Returns:
Constraint

nth

public static Constraint nth(IntegerVariable index,
                             IntegerVariable index2,
                             int[][] varArray,
                             IntegerVariable val)
subscript constraint: accessing a matix of variables with two variables indexes

Parameters:
index - variable index in the first dimension
index2 - variable index in the first dimension
varArray - matrix of value
val - the resulting variable
Returns:
Constraint

nth

public static Constraint nth(IntegerVariable index,
                             IntegerVariable[] varArray,
                             IntegerVariable val,
                             int offset)
subscript constraint: accessing an array of variables with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)

Parameters:
index - index variable in the array
varArray - array of variables
val - resulting variable
offset - the offset value
Returns:
Constraint

nth

public static Constraint nth(String options,
                             IntegerVariable index,
                             IntegerVariable[] varArray,
                             IntegerVariable val,
                             int offset)
subscript constraint: accessing an array of variables with a variable index The offset can be used when the index variable needs to be shifted of a given value (the offset)

Parameters:
index - index variable in the array
varArray - array of variables
val - resulting variable
offset - the offset value
Returns:
Constraint

boolChanneling

public static Constraint boolChanneling(IntegerVariable b,
                                        IntegerVariable x,
                                        int j)
State a simple channeling bewteen a boolean variable and an interger variable Ensures for that b = 1 iff x = j

Parameters:
b - : a boolean variable
x - : an integer variable
j - : the value such that b = 1 ssi x = j, and b = 0 otherwise
Returns:
Constraint

inverseChanneling

public static Constraint inverseChanneling(IntegerVariable[] x,
                                           IntegerVariable[] y)
State a channeling bewteen two arrays of integer variables x and y with the same domain which enforces x[i] = j <=> y[j] = i

Parameters:
x - the first array of variables
y - the second array of variables
Returns:
Constraint

inverseChannelingWithinRange

public static Constraint inverseChannelingWithinRange(IntegerVariable[] x,
                                                      IntegerVariable[] y)
State a channeling bewteen two arrays of integer variables x and y with the same domain which enforces:
- if the ith variable of the collection X is assigned to j and if j is less than or equal to the number of items of the collection Y then the jth variable of the collection Y is assigned to i.
- Conversely, if the jth variable of the collection Y is assigned to i and if i is less than or equal to the number of items of the collection X then the ith variable of the collection X is assigned to j.

See inverse_within_range

Parameters:
x - the first array of variables
y - the second array of variables
Returns:
Constraint

domainChanneling

public static Constraint domainChanneling(IntegerVariable x,
                                          IntegerVariable[] b)
state a channeling between the domain of the variable x and the array of boolean variables b which enforce: x = i <=> b[i] = 1

Parameters:
x - domain variable
b - 0-1 variables for potential values
Returns:
DomainConstraint

domainConstraint

@Deprecated
public static Constraint domainConstraint(IntegerVariable x,
                                                     IntegerVariable[] b)
Deprecated. see domainChannelling

state a channeling between the domain of the variable x and the array of boolean variables b which enforce: x = i <=> b[i] = 1

Parameters:
x - domain variable
b - 0-1 variables for potential values
Returns:
DomainConstraint

allDifferent

public static Constraint allDifferent(IntegerVariable... vars)
All different constraints with a global filtering : v1 != v2, v1 != v3, v2 != v3 ... For each (i,j), v_i != v_j If vars is a table of BoundIntegerVariable a dedicated algorithm is used. In case of EnumIntegerVariable it is the regin alldifferent.

Parameters:
vars - list of variables
Returns:
Constraint

allDifferent

public static Constraint allDifferent(String options,
                                      IntegerVariable... vars)
All different constraints with a global filtering : v1 != v2, v1 != v3, v2 != v3 ... For each (i,j), v_i != v_j The options can contain the folowing options :

Parameters:
options - options of the constraint
vars - list of variables
Returns:
Constraint

globalCardinality

public static Constraint globalCardinality(IntegerVariable[] vars,
                                           int min,
                                           int max,
                                           int[] low,
                                           int[] up)
Deprecated. 

Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, min the minimal value over all variables, and max the maximal value over all variables, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1.

Bound Global cardinality : Given an array of variables vars, min the minimal value over all variables, and max the maximal value over all variables, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1. Use the propagator of : C.-G. Quimper, P. van Beek, A. Lopez-Ortiz, A. Golynski, and S.B. Sadjad. An efficient bounds consistency algorithm for the global cardinality constraint. CP-2003.

Parameters:
vars - list of variables
min - minimum allowed value
max - maximum allowed value
low - array of lower occurence
up - array of upper occurence
Returns:
Constraint
See Also:
globalCardinality(choco.kernel.model.variables.integer.IntegerVariable[], int[], int[], int)

globalCardinality

public static Constraint globalCardinality(String options,
                                           IntegerVariable[] vars,
                                           int min,
                                           int max,
                                           int[] low,
                                           int[] up)
Deprecated. 

Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, min the minimal value over all variables, and max the maximal value over all variables, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1.

Bound Global cardinality : Given an array of variables vars, min the minimal value over all variables, and max the maximal value over all variables, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1. Use the propagator of : C.-G. Quimper, P. van Beek, A. Lopez-Ortiz, A. Golynski, and S.B. Sadjad. An efficient bounds consistency algorithm for the global cardinality constraint. CP-2003.

Available options are:

Parameters:
options - options of the constraint
vars - list of variables
min - minimum allowed value
max - maximum allowed value
low - array of lower occurence
up - array of upper occurence
Returns:
Constraint
See Also:
globalCardinality(String, choco.kernel.model.variables.integer.IntegerVariable[], int[], int[], int)

globalCardinality

public static Constraint globalCardinality(IntegerVariable[] vars,
                                           int[] low,
                                           int[] up,
                                           int offset)
Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1. (min is the minimal value over all variables, and max the maximal value over all variables)

Bound Global cardinality : Given an array of variables vars, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1. (min is the minimal value over all variables, and max the maximal value over all variables) Use the propagator of : C.-G. Quimper, P. van Beek, A. Lopez-Ortiz, A. Golynski, and S.B. Sadjad. An efficient bounds consistency algorithm for the global cardinality constraint. CP-2003.

Available options are:

Parameters:
vars - list of variables
low - array of lower occurence
up - array of upper occurence
offset - first value constrained by low[0] and up[0]
Returns:
Constraint

globalCardinality

public static Constraint globalCardinality(IntegerVariable[] vars,
                                           int[] values,
                                           int[] low,
                                           int[] up)
Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, and an array of values, the constraint ensures that the number of occurences of the value i among the variables is between low[i] and up[i]. Note that the length of low and up and values should be the same.

Bound Global cardinality : Given an array of variables vars and an array of values, the constraint ensures that the number of occurences of the value i among the variables is between low[i] and up[i]. Note that the length of low and up and values should be the same.

Use the propagator of : C.-G. Quimper, P. van Beek, A. Lopez-Ortiz, A. Golynski, and S.B. Sadjad. An efficient bounds consistency algorithm for the global cardinality constraint. CP-2003.

Available options are:

Parameters:
vars - list of variables
values - restricted values
low - array of lower occurence
up - array of upper occurence
Returns:
Constraint

globalCardinality

public static Constraint globalCardinality(IntegerVariable[] vars,
                                           int[] values,
                                           IntegerVariable[] cards)
* Bound Global cardinality : Given an array of variables vars, an array of values, an array of variables card to represent the cardinalities, the constraint ensures that the number of occurences of the value i among the variables is equal to card[i]. this constraint enforces : - Bound Consistency over vars regarding the lower and upper bounds of cards - maintain the upperbound of card by counting the number of variables in which each value can occur - maintain the lowerbound of card by counting the number of variables instantiated to a value - enforce card[0] + ... + card[m] = n (n = the number of variables, m = number of values)

Parameters:
vars - list of variables
values - restricted values
cards - array of cardinality variables
Returns:
Constraint

globalCardinality

public static Constraint globalCardinality(String options,
                                           IntegerVariable[] vars,
                                           int[] low,
                                           int[] up,
                                           int offset)
Concerns GCC and boundGCC

Global cardinality : Given an array of variables vars, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1. (min is the minimal value over all variables, and max the maximal value over all variables)

Bound Global cardinality : Given an array of variables vars, the constraint ensures that the number of occurences of the value i among the variables is between low[i - min] and up[i - min]. Note that the length of low and up should be max - min + 1. (min is the minimal value over all variables, and max the maximal value over all variables) Use the propagator of : C.-G. Quimper, P. van Beek, A. Lopez-Ortiz, A. Golynski, and S.B. Sadjad. An efficient bounds consistency algorithm for the global cardinality constraint. CP-2003.

Available options are:

Parameters:
options - options of the constraint
vars - list of variables
low - array of lower occurence
up - array of upper occurence
offset - first value constrained by low[0] and up[0]
Returns:
Constraint

globalCardinality

public static Constraint globalCardinality(IntegerVariable[] vars,
                                           int min,
                                           int max,
                                           IntegerVariable[] card)
Deprecated. 

* Bound Global cardinality : Given an array of variables vars, an array of variables card to represent the cardinalities, the constraint ensures that the number of occurences of the value i among the variables is equal to card[i]. this constraint enforces : - Bound Consistency over vars regarding the lower and upper bounds of cards - maintain the upperbound of card by counting the number of variables in which each value can occur - maintain the lowerbound of card by counting the number of variables instantiated to a value - enforce card[0] + ... + card[m] = n (n = the number of variables, m = number of values)

Parameters:
vars - list of variables
min - minimum allowed value
max - maximum allowed value
card - array of cardinality variables
Returns:
Constraint
See Also:
globalCardinality(choco.kernel.model.variables.integer.IntegerVariable[], choco.kernel.model.variables.integer.IntegerVariable[], int)

globalCardinality

public static Constraint globalCardinality(IntegerVariable[] vars,
                                           IntegerVariable[] card,
                                           int offset)
* Bound Global cardinality : Given an array of variables vars, an array of variables card to represent the cardinalities, the constraint ensures that the number of occurences of the value i among the variables is equal to card[i]. this constraint enforces : - Bound Consistency over vars regarding the lower and upper bounds of cards - maintain the upperbound of card by counting the number of variables in which each value can occur - maintain the lowerbound of card by counting the number of variables instantiated to a value - enforce card[0] + ... + card[m] = n (n = the number of variables, m = number of values)

Parameters:
vars - list of variables
card - array of cardinality variables
offset - first value constrained by card[0]
Returns:
Constraint

stretchPath

public static Constraint stretchPath(List<int[]> stretchesParameters,
                                     IntegerVariable... vars)
Enforce the minimal and maximal sizes of the streches of any value given in strechesParameters. Usefull for Rostering Problems. The constraint is implemented by a Regular constraint that perform GAC.

Parameters:
vars - : a sequence of variables
stretchesParameters - : a list of triples of integers : (value, occmin, occmax) denoting for each value the minimal and maximal lenght of any stretch of the corresponding value.
Returns:
Constraint

increasingNValue

public static Constraint increasingNValue(String option,
                                          IntegerVariable nval,
                                          IntegerVariable[] vars)
The variables of the collection VARIABLES are increasing. In addition, NVAL is the number of distinct values taken by the variables of the collection VARIABLES.

Parameters:
option - Available options are:
  • cp:atleast: filter on lower bound only
  • cp:atmost: filter on upper bound only
  • cp:both: (default value) filter on lower bound and upper bound
nval - number of distinct values
vars - collection of variables
Returns:
increasing n value constraint

increasingNValue

public static Constraint increasingNValue(IntegerVariable nval,
                                          IntegerVariable[] vars)
The variables of the collection VARIABLES are increasing. In addition, NVAL is the number of distinct values taken by the variables of the collection VARIABLES.

Parameters:
nval - number of distinct values
vars - collection of variables
Returns:
increasing n value constraint

increasing_nvalue

@Deprecated
public static Constraint increasing_nvalue(IntegerVariable nval,
                                                      IntegerVariable[] vars)
Deprecated. use increasingNValue

The variables of the collection VARIABLES are increasing. In addition, NVAL is the number of distinct values taken by the variables of the collection VARIABLES.

Parameters:
nval - number of distinct values
vars - collection of variables

increasing_nvalue

@Deprecated
public static Constraint increasing_nvalue(String option,
                                                      IntegerVariable nval,
                                                      IntegerVariable[] vars)
Deprecated. use increasingNValue

The variables of the collection VARIABLES are increasing. In addition, NVAL is the number of distinct values taken by the variables of the collection VARIABLES.

Parameters:
option - Available options are:
  • cp:atleast: filter on lower bound only
  • cp:atmost: filter on upper bound only
  • cp:both: (default value) filter on lower bound and upper bound
nval - number of distinct values
vars - collection of variables
Returns:
increasing n value constraint

pack

public static Constraint pack(SetVariable[] itemSets,
                              IntegerVariable[] loads,
                              IntegerVariable[] bins,
                              IntegerConstantVariable[] sizes,
                              IntegerVariable nbNonEmpty,
                              String... options)

pack

public static Constraint pack(PackModel packMod,
                              String... options)

cumulative

public static Constraint cumulative(String name,
                                    TaskVariable[] tasks,
                                    IntegerVariable[] heights,
                                    IntegerVariable[] usages,
                                    IntegerVariable consumption,
                                    IntegerVariable capacity,
                                    IntegerVariable uppBound,
                                    String... options)
Builds Alternative cumulative Min-Max.
cumulative : Given a array of tasks defined by their starting dates, ending dates, durations and heights, the cumulative ensures that at any time t, the sum of the heights of the tasks which are executed at time t does not exceed a given limit C (the capacity of the ressource) and stays greater than C2 (the minimal consumption of the resource).
The Implementation is based on the paper of Bediceanu and al : "A new multi-resource cumulatives constraint with negative heights" in CP02. Other optional filtering policies include Task Intervals and Edge Finding.

Parameters:
name - name of the resource (null is authorized)
tasks - the set of involved tasks
heights - the heights of the tasks for the given resource
usages - are boolean variables which indicates if optional tasks are executed by the resource. If usages.length is lower than tasks.length, then the last tasks are optional whereas the first ones are regular.
consumption - the minimal consumption of resource
capacity - the capacity of the resource
uppBound - an upper bound for the makespan of the resource. If the value is null, then we set the project makespan variable (solver level).
options - filtering options, see Options class.
Returns:
Constraint

cumulative

public static Constraint cumulative(String name,
                                    TaskVariable[] tasks,
                                    IntegerVariable[] heights,
                                    IntegerVariable consumption,
                                    IntegerVariable capacity,
                                    String... options)
Cumulative Min-Max : usages = null, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulativeMax

public static Constraint cumulativeMax(String name,
                                       TaskVariable[] tasks,
                                       IntegerVariable[] heights,
                                       IntegerVariable capacity,
                                       String... options)
Cumulative Max : consumption=0, usages = null, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulativeMax

public static Constraint cumulativeMax(TaskVariable[] tasks,
                                       int[] heights,
                                       int capacity,
                                       String... options)
Cumulative Max : consumption=0, usages = null, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulativeMin

public static Constraint cumulativeMin(String name,
                                       TaskVariable[] tasks,
                                       IntegerVariable[] heights,
                                       IntegerVariable consumption,
                                       String... options)
Cumulative Min : capacity=infinity, usages = null, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulativeMin

public static Constraint cumulativeMin(TaskVariable[] tasks,
                                       int[] heights,
                                       int consumption,
                                       String... options)
Cumulative Min : capacity=infinity, usages = null, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulative

public static Constraint cumulative(String name,
                                    TaskVariable[] tasks,
                                    IntegerVariable[] heights,
                                    IntegerVariable[] usages,
                                    IntegerVariable consumption,
                                    IntegerVariable capacity,
                                    String... options)
Alternative Cumulative Min-Max : uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulativeMax

public static Constraint cumulativeMax(String name,
                                       TaskVariable[] tasks,
                                       IntegerVariable[] heights,
                                       IntegerVariable[] usages,
                                       IntegerVariable capacity,
                                       String... options)
Alternative Cumulative Max : consumption=0, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

cumulativeMin

public static Constraint cumulativeMin(String name,
                                       TaskVariable[] tasks,
                                       IntegerVariable[] heights,
                                       IntegerVariable[] usages,
                                       IntegerVariable consumption,
                                       String... options)
Alternative Cumulative Min : capacity=infinity, uppBound = null.

Returns:
Constraint
See Also:
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)

disjunctive

public static Constraint disjunctive(String name,
                                     TaskVariable[] tasks,
                                     IntegerVariable[] usages,
                                     IntegerVariable uppBound,
                                     String... options)
Builds Alternative disjunctive.
disjunctive : Given a array of tasks defined by their starting dates, ending dates, durations and heights, the disjunctive ensures that all pairs of regular tasks that have a duration strictly greater than 0 do not overlap.
The Implementation is based on the balanced binary trees proposed by P. Vilim. Filtering policies are overload checking, not first/not last, edge finding, detectable precedence.

Parameters:
name - name of the resource (null is authorized)
tasks - the set of involved tasks
usages - are boolean variables which indicates if optional tasks are executed by the resource. If usages.length is lower than tasks.length, then the last tasks are optional whereas the first ones are regular.
uppBound - an upper bound for the makespan of the resource. If the value is null, then we set the project makespan variable (solver level).
options - filtering options, see Options class.
Returns:
Constraint

disjunctive

public static Constraint disjunctive(TaskVariable[] tasks,
                                     String... options)
Disjunctive : name = null, usages = null, uppBound = null.

Returns:
Constraint
See Also:
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)

disjunctive

public static Constraint disjunctive(String name,
                                     TaskVariable[] tasks,
                                     String... options)
Disjunctive : usages = null, uppBound = null.

Returns:
Constraint
See Also:
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)

disjunctive

public static Constraint disjunctive(TaskVariable[] tasks,
                                     IntegerVariable[] usages,
                                     String... options)
Alternative Disjunctive : name = null, uppBound = null.

Returns:
Constraint
See Also:
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)

disjunctive

public static Constraint disjunctive(String name,
                                     TaskVariable[] tasks,
                                     IntegerVariable[] usages,
                                     String... options)
Alternative Disjunctive : uppBound = null.

Returns:
Constraint
See Also:
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)

forbiddenIntervals

public static Constraint forbiddenIntervals(String name,
                                            TaskVariable[] tasks)
This redundant constraints applies additional search tree reduction based on Time intervals are in which no operation can start or end in an optimal solution. The tasks must all belong to one disjunctive resource and have fixed durations.


disjoint

public static Constraint[] disjoint(TaskVariable[] tasks1,
                                    TaskVariable[] tasks2)
Each task of the collection tasks1 should not overlap any task of the collection tasks2. The model only provides a decomposition with reified precedences because the coloured cumulative is not available.

Parameters:
tasks1 - first set of tasks
tasks2 - second set of tasks
Returns:
Constraint disjoint
See Also:
{http://www.emn.fr/x-info/sdemasse/gccat/Cdisjoint_tasks.html#uid11633}

precedence

public static Constraint precedence(TaskVariable t1,
                                    TaskVariable t2)
T1 ends before t2 starts or t1 precedes t2.

Parameters:
t1 - a task
t2 - another task
Returns:
precedence constraint

precedence

public static Constraint precedence(TaskVariable t1,
                                    TaskVariable t2,
                                    int delta)
T1 ends before t2 starts or t1 precedes t2.

Parameters:
t1 - a task
t2 - another task
Returns:
precedence constraint

precedenceDisjoint

public static Constraint precedenceDisjoint(IntegerVariable v1,
                                            int dur1,
                                            IntegerVariable v2,
                                            int dur2,
                                            IntegerVariable bool)


precedenceDisjoint

public static Constraint precedenceDisjoint(TaskVariable t1,
                                            TaskVariable t2,
                                            IntegerVariable direction)
represents a disjunction without setup times

Parameters:
t1 - a task
t2 - another task
direction -
Returns:
precedence disjoint constraint

precedenceDisjoint

public static Constraint precedenceDisjoint(TaskVariable t1,
                                            TaskVariable t2,
                                            IntegerVariable direction,
                                            int forwardSetup,
                                            int backwardSetup)
precedence disjoint with setup times:

Parameters:
t1 - a task
t2 - the other task
direction - boolean variable which reified the precedence relation.
forwardSetup - setup times between t1 and t2
backwardSetup - setup times between t2 and t1.
Returns:
precedence disjoint constraint

precedenceReified

public static Constraint precedenceReified(IntegerVariable x1,
                                           int k1,
                                           IntegerVariable x2,
                                           IntegerVariable b)
represents a reidied precedence:

Parameters:
x1 - the first integer variable.
k1 - the duration of the precedence.
x2 - the other integer variable.
b - the reification boolean variable

precedenceReified

public static Constraint precedenceReified(TaskVariable t1,
                                           int delta,
                                           TaskVariable t2,
                                           IntegerVariable b)
represents a reidied precedence with setup times between a pair of tasks:


precedenceImplied

public static Constraint precedenceImplied(IntegerVariable x1,
                                           int k1,
                                           IntegerVariable x2,
                                           IntegerVariable b)
represents an implied precedence:


precedenceImplied

public static Constraint precedenceImplied(TaskVariable t1,
                                           int delta,
                                           TaskVariable t2,
                                           IntegerVariable b)
represents a reidied precedence with setup times between a pair of tasks:


geost

@Deprecated
public static Constraint geost(int dim,
                                          Vector<GeostObject> objects,
                                          Vector<ShiftedBox> shiftedBoxes,
                                          Vector<IExternalConstraint> eCtrs)
Deprecated. 


geost

@Deprecated
public static Constraint geost(int dim,
                                          Vector<GeostObject> objects,
                                          Vector<ShiftedBox> shiftedBoxes,
                                          Vector<IExternalConstraint> eCtrs,
                                          Vector<int[]> ctrlVs)
Deprecated. 


geost

@Deprecated
public static Constraint geost(int dim,
                                          Vector<GeostObject> objects,
                                          Vector<ShiftedBox> shiftedBoxes,
                                          Vector<IExternalConstraint> eCtrs,
                                          Vector<int[]> ctrlVs,
                                          GeostOptions opt)
Deprecated. 


geost

public static Constraint geost(int dim,
                               List<GeostObject> objects,
                               List<ShiftedBox> shiftedBoxes,
                               List<IExternalConstraint> eCtrs)

geost

public static Constraint geost(int dim,
                               List<GeostObject> objects,
                               List<ShiftedBox> shiftedBoxes,
                               List<IExternalConstraint> eCtrs,
                               List<int[]> ctrlVs)

geost

public static Constraint geost(int dim,
                               List<GeostObject> objects,
                               List<ShiftedBox> shiftedBoxes,
                               List<IExternalConstraint> eCtrs,
                               List<int[]> ctrlVs,
                               GeostOptions opt)

lexEq

public static Constraint lexEq(IntegerVariable[] v1,
                               IntegerVariable[] v2)
Enforce a lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = . ref : Global Constraints for Lexicographic Orderings (Frisch and al)

Parameters:
v1 - the first array of variables
v2 - the second array of variables
Returns:
Constraint

lexeq

@Deprecated
public static Constraint lexeq(IntegerVariable[] v1,
                                          IntegerVariable[] v2)
Deprecated. see lexEq

Enforce a lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = . ref : Global Constraints for Lexicographic Orderings (Frisch and al)

Parameters:
v1 - the first array of variables
v2 - the second array of variables
Returns:
Constraint

lex

public static Constraint lex(IntegerVariable[] v1,
                             IntegerVariable[] v2)
Enforce a strict lexicographic ordering on two vectors of integer variables x <_lex y with x = , and y = . ref : Global Constraints for Lexicographic Orderings (Frisch and al)

Parameters:
v1 - the first array of variables
v2 - the second array of variables
Returns:
Constraint

lexChain

public static Constraint lexChain(IntegerVariable[]... arrayOfVectors)
Enforce a strict lexicographic ordering on a chain of integer vectors (X1 ,X2 ,X3,......) with X1 < lex X2 < lex X3 .... X1 = ref : Arc- Consistency for a chain of Lexicographic Ordering Constraints ( N. Beldiceanu and Carlsson)

Parameters:
arrayOfVectors - array of variables
Returns:
Constraint

lexChainEq

public static Constraint lexChainEq(IntegerVariable[]... arrayOfVectors)
Enforce a lexicographic ordering on a chain of integer vectors (X1 ,X2 ,X3,......) with X1 <= lex X2 <= lex X3 .... X1 = ref : Arc- Consistency for a chain of Lexicographic Ordering Constraints ( N. Beldiceanu and Carlsson)

Parameters:
arrayOfVectors - array of variables
Returns:
Constraint

sorting

public static Constraint sorting(IntegerVariable[] v1,
                                 IntegerVariable[] v2)
Let x and x' be two vectors of variables of the same length, and v be an instantiation. The sorting constraint sorting(x, x') holds on the set of variables being either in x or in x', and is satisfied by v if and only if v(x') is the sorted version of v(x) in increasing order. This constraint is called the Sortedness Constraint in [Bleuzen-Guernalec and Colmerauer 1997] and in [Mehlhorn and Thiel 2000].

Parameters:
v1 - the first array of variables
v2 - the second array of variables
Returns:
Constraint

leximin

public static Constraint leximin(IntegerVariable[] v1,
                                 IntegerVariable[] v2)
Let x and y be two vectors of n integers, and let x? and y? be the version of x and y rearranged in increasing order. x and y are said leximin-indifferent if x?=y?. y is leximin-preferred to x (written y>leximinx if and only if there is an i< n such that for all j� i: - the jth component of x? is equal to the jth component of y? - the ith component of x? is lower than the ith component of y? Let x and x' be two vectors of variables, and v be an instantiation. The constraint Leximin(x, x') holds on the set of variables belonging to x or x', and is satisfied by v if and only if v(x)
Parameters:
v1 - the first array of variables
v2 - the second array of variables
Returns:
Constraint

leximin

public static Constraint leximin(int[] v1,
                                 IntegerVariable[] v2)
Let x and y be two vectors of n integers, and let x? and y? be the version of x and y rearranged in increasing order. x and y are said leximin-indifferent if x?=y?. y is leximin-preferred to x (written y>leximinx if and only if there is an i< n such that for all j� i: - the jth component of x? is equal to the jth component of y? - the ith component of x? is lower than the ith component of y? Let x and x' be two vectors of variables, and v be an instantiation. The constraint Leximin(x, x') holds on the set of variables belonging to x or x', and is satisfied by v if and only if v(x)
Parameters:
v1 - array of values
v2 - array of variables
Returns:
Constraint

atMostNValue

public static Constraint atMostNValue(IntegerVariable nvalue,
                                      IntegerVariable[] vars)
Enforce the number of distinct values among vars to be less than nvalue;

Parameters:
nvalue - number of distinct values
vars - list of variables
Returns:
Constraint

atMostNValue

@Deprecated
public static Constraint atMostNValue(IntegerVariable[] vars,
                                                 IntegerVariable nvalue)
Deprecated. reorder parameters

Enforce the number of distinct values among vars to be less than nvalue;

Parameters:
vars - list of variables
nvalue - number of distinct values
Returns:
Constraint

complementSet

public static Constraint complementSet(SetVariable x,
                                       SetVariable y)
complement(X) == Y
i.e.
let min = minimum possible value for x or y
and max = maximum possible value for x or y

forall i in min .. max,
i in x <=> i notin y

Parameters:
x - a set variable
y - the complement set variable
Returns:
Constraint

setInter

public static Constraint setInter(SetVariable sv1,
                                  SetVariable sv2,
                                  SetVariable inter)
Enforce a set to be the intersection of two others.

Parameters:
sv1 - the first set variable
sv2 - the second set variable
inter - the intersection of sv1 and sv2
Returns:
Constraint

setUnion

public static Constraint setUnion(SetVariable sv1,
                                  SetVariable sv2,
                                  SetVariable union)
Enforce a set to be the union of two others

Parameters:
sv1 - the first set variable
sv2 - the second set variable
union - the union of sv1 and sv2
Returns:
the union constraint

setUnion

public static Constraint setUnion(SetVariable[] sv,
                                  SetVariable union)
Enforce a set to be the union of n others

Parameters:
sv - array of set variables
union - the union of sv
Returns:
the union constraint

eq

public static Constraint eq(SetVariable sv1,
                            SetVariable sv2)
Return a constraint that ensures sv1 == sv2

Parameters:
sv1 - a set variable
sv2 - a set variable
Returns:
a constraint that ensures sv1 == sv2

eqCard

public static Constraint eqCard(SetVariable sv,
                                IntegerVariable v)
Return a constraint that ensures |sv| = v

Parameters:
sv - a set variable
v - an integer variable
Returns:
a constraint that ensures |sv| = v

eqCard

public static Constraint eqCard(SetVariable sv,
                                int val)
Return a constraint that ensures |sv| = val

Parameters:
sv - a set variable
val - an integer
Returns:
a constraint that ensures |sv| = val

neqCard

public static Constraint neqCard(SetVariable sv,
                                 IntegerVariable v)
Return a constraint that ensures |sv| != v

Parameters:
sv - a set variable
v - an integer variable
Returns:
a constraint that ensures |sv| != v

neqCard

public static Constraint neqCard(SetVariable sv,
                                 int val)
Return a constraint that ensures |sv| != val

Parameters:
sv - a set variable
val - an integer
Returns:
a constraint that ensures |sv| != val

geqCard

public static Constraint geqCard(SetVariable sv,
                                 IntegerVariable v)

geqCard

public static Constraint geqCard(SetVariable sv,
                                 int val)

leqCard

public static Constraint leqCard(SetVariable sv,
                                 IntegerVariable v)

leqCard

public static Constraint leqCard(SetVariable sv,
                                 int val)

setDisjoint

public static Constraint setDisjoint(SetVariable... sv)
Ensure every set of sv are disjoints from each other.

Parameters:
sv - array of set variables
Returns:
disjoint constraint

member

public static Constraint member(int val,
                                SetVariable sv1)
Ensures that a value is contained in a set variable.

Parameters:
val - the obligatory value
sv1 - the set variable
Returns:
the new constraint

member

public static Constraint member(SetVariable sv1,
                                int val)
Ensures that a value is contained in a set variable.

Parameters:
val - the obligatory value
sv1 - the set variable
Returns:
the new constraint

member

public static Constraint member(SetVariable sv1,
                                IntegerVariable var)
Ensures that the value of an integer variable is contained in a set variable.

Parameters:
sv1 - the set variable
var - the integer variable whose value should be contained in the set
Returns:
the new constraint

member

public static Constraint member(IntegerVariable var,
                                SetVariable sv1)
Ensures that the value of an integer variable is contained in a set variable.

Parameters:
sv1 - the set variable
var - the integer variable whose value should be contained in the set
Returns:
the new constraint

member

public static Constraint member(SetVariable sv,
                                IntegerVariable... vars)
Ensures that the values of integer variables are contained in a set variable.
∀ i in [1,n], vars_i ∈ sv

Parameters:
sv - the set variable
vars - integer variables whose values should be contained in the set
Returns:
the new constraint

notMember

public static Constraint notMember(int val,
                                   SetVariable sv1)
Ensures that a value is not contained ina set variable.

Parameters:
val - the forbidden value
sv1 - the set variable
Returns:
the new constraint

notMember

public static Constraint notMember(SetVariable sv1,
                                   int val)
Ensures that a value is not contained ina set variable.

Parameters:
val - the forbidden value
sv1 - the set variable
Returns:
the new constraint

notMember

public static Constraint notMember(SetVariable sv1,
                                   IntegerVariable var)
Ensures that the value of an integer variable is not contained in a set variable.

Parameters:
sv1 - the set variable
var - the integer variable whose value should not be contained in the set
Returns:
the new constraint

notMember

public static Constraint notMember(IntegerVariable var,
                                   SetVariable sv1)
Ensures that the value of an integer variable is not contained in a set variable.

Parameters:
sv1 - the set variable
var - the integer variable whose value should not be contained in the set
Returns:
the new constraint

inverseSet

public static Constraint inverseSet(IntegerVariable[] iv,
                                    SetVariable[] sv)
A constraint stating that value j belongs to the sv[i] set variable iff integer variable iv[j] equals to i. This constraint models the inverse s: I -> P(J) of a function x: J -> I (I and J sets of integers) adapted from InverseChanneling, see gccat.

Parameters:
iv - the integer variables
sv - the set variables
Returns:
the new constraint

inverseSet

public static Constraint inverseSet(SetVariable[] xs,
                                    SetVariable[] ys)
X collection set-variable
Y collection set-variable

Y should have enough slots to handle X domain size (ie. Y.length <= X.max)

j in X[i] <=> i in Y[j]

cf. http://www.emn.fr/z-info/sdemasse/gccat/Cinverse_set.html

Parameters:
xs - an array of set variable
ys - another array set variables
Returns:
the new constraint

setLex

public static Constraint setLex(SetVariable x,
                                SetVariable y)
X <=lex Y

Parameters:
x - a set variable
y - a set variable
Returns:
Constraint

setValuePrecede

public static Constraint setValuePrecede(SetVariable[] sv,
                                         int s,
                                         int t)
If there exists a set variable v1 of VARIABLES such that S does not belong to v1 and T does, then there also exists a set variable v2 preceding v1 such that S belongs to v2 and T does not.

based on the paper Y. C. Law, J. H. M. Lee, Global Constraints for Integer and Set Value Precedence Principles and Practice of Constraint Programming (CP'2004) LNCS 3258 Springer -Verlag M. G. Wallace, 362–376 2004

Parameters:
sv - set variables
s - first value
t - second value
Returns:
Constraint

neq

public static Constraint neq(SetVariable sv1,
                             SetVariable sv2)
Ensure that the two variables are not equal (not exactly the same values in the set)

Parameters:
sv1 - first variable
sv2 - second variable
Returns:
the new constraint

isIncluded

public static Constraint isIncluded(SetVariable sv1,
                                    SetVariable sv2)
Checks that variable sv1 is included in sv2

Parameters:
sv1 - variable that should be included (smaller)
sv2 - variable that should include (bigger)
Returns:
the new constraint

isNotIncluded

public static Constraint isNotIncluded(SetVariable sv1,
                                       SetVariable sv2)
Checks that variable sv1 is not included in sv2

Parameters:
sv1 - variable that should not be included (bigger)
sv2 - variable that should not include (smaller)
Returns:
the new constraint

regular

public static Constraint regular(IntegerVariable[] vars,
                                 IAutomaton auto)
Create a Regular constraint that enforce the sequence of variables to be a word recognized by the dfa auto. For example regexp = "(1|2)(3*)(4|5)"; The same dfa can be used for different propagators.

Parameters:
vars - the variables of the constraint
auto - the DFA
Returns:
the new constraint

regular

public static Constraint regular(IntegerVariable[] vars,
                                 DFA auto)
Create a Regular constraint that enforce the sequence of variables to be a word recognized by the dfa auto. For example regexp = "(1|2)(3*)(4|5)"; The same dfa can be used for different propagators.

Parameters:
vars - the variables of the constraint
auto - the DFA
Returns:
the new constraint

regular

public static Constraint regular(IntegerVariable[] vars,
                                 String regexp)
Create a Regular constraint that enforce the sequence of variables to match the regular expression.

Parameters:
vars - the variables of the constraint
regexp - a regexp for the DFA
Returns:
the new constraint

regular

@Deprecated
public static Constraint regular(DFA auto,
                                            IntegerVariable[] vars)
Deprecated. reorder parameters

Create a Regular constraint that enforce the sequence of variables to be a word recognized by the dfa auto. For example regexp = "(1|2)(3*)(4|5)"; The same dfa can be used for different propagators.

Parameters:
auto - the DFA
vars - the variables of the constraint
Returns:
the new constraint

regular

@Deprecated
public static Constraint regular(IAutomaton auto,
                                            IntegerVariable[] vars)
Deprecated. reorder parameters

Create a Regular constraint that enforce the sequence of variables to be a word recognized by the dfa auto. For example regexp = "(1|2)(3*)(4|5)"; The same dfa can be used for different propagators.

Parameters:
auto - the DFA
vars - the variables of the constraint
Returns:
the new constraint

regular

@Deprecated
public static Constraint regular(String regexp,
                                            IntegerVariable[] vars)
Deprecated. reorder parameters

Create a Regular constraint that enforce the sequence of variables to match the regular expression.

Parameters:
regexp - a regexp for the DFA
vars - the variables of the constraint
Returns:
the new constraint

regular

public static Constraint regular(IntegerVariable[] vars,
                                 List<int[]> tuples)
A Regular constraint based on a DFA which is built from a list of FEASIBLE tuples. This api provides a GAC algorithm for a constraint defined by its allowed tuples. This can be more efficient than a standart GAC algorithm if the tuples are really structured so that the dfa is compact. The minimal dfa is built from the list by computing incrementally the minimal dfa after each addition of tuple.

Parameters:
vars - variables of the constraint
tuples - : a list of int[] corresponding to the allowed tuples
Returns:
the new constraint

regular

public static Constraint regular(IntegerVariable[] vars,
                                 List<int[]> tuples,
                                 int[] min,
                                 int[] max)
A Regular constraint based on a DFA which is built from a list of INFEASIBLE tuples As the relation is defined by infeasible tuples and we build the feasible automaton, we need to know the range of values by the max and min fields... This api provides a GAC algorithm for a constraint defined by its allowed tuples. This can be more efficient than a standart GAC algorithm if the tuples are really structured so that the dfa is compact. The minimal dfa is built from the list by computing incrementally the minimal dfa after each addition of tuple.

Parameters:
vars - : scope of the constraint
tuples - : a list of int[] corresponding to tuple
max - : The maximum value of the alphabet used for each layer (upper bound of each variables).
min - : The minimum value of the alphabet used for each layer (lower bound of each variables).
Returns:
a constraint

costRegular

public static Constraint costRegular(IntegerVariable costVar,
                                     IntegerVariable[] vars,
                                     IAutomaton auto,
                                     int[][] costs)
costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable.

Parameters:
costVar - the cost variable
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the automaton defining the regular language
costs - the assignment costs: costs[i][j] is the cost associated to the assignment of variable i to value j
Returns:
an instance of the costRegular constraint

costRegular

public static Constraint costRegular(IntegerVariable costVar,
                                     IntegerVariable[] vars,
                                     IAutomaton auto,
                                     int[][][] costs)
costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable. This version allows to specify different costs according to the automaton state at which the assignment occurs (i.e. the transition starts)

Parameters:
costVar - the cost variable
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the automaton defining the regular language
costs - the assignment costs: costs[i][j][s] is the cost associated to the assignment of variable i to value j at state s
Returns:
an instance of the costRegular constraint

costRegular

public static Constraint costRegular(IntegerVariable costVar,
                                     IntegerVariable[] vars,
                                     ICostAutomaton auto)
costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable. This version allows to specify different costs according to the automaton state at which the assignment occurs (i.e. the transition starts)

Parameters:
costVar - the cost variable
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the cost-automaton defining the regular language and the costs
Returns:
an instance of the costRegular constraint

costRegular

public static Constraint costRegular(IntegerVariable costVar,
                                     IntegerVariable[] vars,
                                     org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph,
                                     Node source)
costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable. In this version, the specified DFA is already unfolded as a layered multi-graph so as it recognizes only words of fixed length vars.length

Parameters:
costVar - the cost variable
vars - the sequence of variables the constraint must ensure it belongs to the regular language
graph - a layered directed multigraph
source - the source node of the graph
Returns:
an instance of the costRegular constraint

costRegular

@Deprecated
public static Constraint costRegular(IntegerVariable[] vars,
                                                IntegerVariable costVar,
                                                IAutomaton auto,
                                                int[][][] costs)
Deprecated. reorder parameters

costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable. This version allows to specify different costs according to the automaton state at which the assignment occurs (i.e. the transition starts)

Parameters:
costVar - the cost variable
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the automaton defining the regular language
costs - the assignment costs: costs[i][j][s] is the cost associated to the assignment of variable i to value j at state s
Returns:
an instance of the costRegular constraint

costRegular

@Deprecated
public static Constraint costRegular(IntegerVariable[] vars,
                                                IntegerVariable costVar,
                                                org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph,
                                                Node source)
Deprecated. reorder parameters

costRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the costs associated to each assignment is bounded by the cost variable. In this version, the specified DFA is already unfolded as a layered multi-graph so as it recognizes only words of fixed length vars.length

Parameters:
costVar - the cost variable
vars - the sequence of variables the constraint must ensure it belongs to the regular language
graph - a layered directed multigraph
source - the source node of the graph
Returns:
an instance of the costRegular constraint

knapsackProblem

public static Constraint knapsackProblem(IntegerVariable costVar,
                                         IntegerVariable weightVar,
                                         IntegerVariable[] vars,
                                         int[] costs,
                                         int[] weights)
The knapsack problem constraint ensures that costVar is the sum of the vars weighted by the costs and that weightVar is the sum of vars weighted by the weights Based on costRegular, it simulates Tricks's dynamic programming approach.

Parameters:
costVar - cost variable
weightVar - weight variable
vars - item variables
costs - cost coefficients
weights - weight coefficients
Returns:
an instance of a knapsack problem constraint.

knapsackProblem

@Deprecated
public static Constraint knapsackProblem(IntegerVariable[] vars,
                                                    IntegerVariable costVar,
                                                    IntegerVariable weightVar,
                                                    int[] costs,
                                                    int[] weights)
Deprecated. reorder parameters

The knapsack problem constraint ensures that costVar is the sum of the vars weighted by the costs and that weightVar is the sum of vars weighted by the weights Based on costRegular, it simulates Tricks's dynamic programming approach.

Parameters:
vars - item variables
costVar - cost variable
weightVar - weight variable
costs - cost coefficients
weights - weight coefficients
Returns:
an instance of a knapsack problem constraint.

multiCostRegular

public static Constraint multiCostRegular(IntegerVariable[] costVars,
                                          IntegerVariable[] vars,
                                          IAutomaton auto,
                                          int[][][] costs)
multiCostRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the cost vectors associated to each assignment is bounded by the cost variable vector

Parameters:
costVars - the cost variable vector
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the automaton defining the regular language
costs - the assignment cost vectors: costs[i][j][k] is the k-th element of the cost vector associated to the assignment of variable i to value j
Returns:
an instance of the multiCostRegular constraint

multiCostRegular

public static Constraint multiCostRegular(IntegerVariable[] costVars,
                                          IntegerVariable[] vars,
                                          IAutomaton auto,
                                          int[][][][] costs)
multiCostRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the cost vectors associated to each assignment is bounded by the cost variable vector. This version allows to specify different costs according to the automaton state at which the assignment occurs (i.e. the transition starts)

Parameters:
costVars - the cost variable vector
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the automaton defining the regular language
costs - the assignment cost vectors: costs[i][j][k][s] is the k-th element of the cost vector associated to the assignment of variable i to value j at state s of the DFA
Returns:
an instance of the multiCostRegular constraint

multiCostRegular

public static Constraint multiCostRegular(IntegerVariable[] costVars,
                                          IntegerVariable[] vars,
                                          ICostAutomaton auto)
multiCostRegular constraint ensures that the assignment of a sequence of variables is recognized by a DFA and that the sum of the cost vectors associated to each assignment is bounded by the cost variable vector. This version allows to specify different costs according to the automaton state at which the assignment occurs (i.e. the transition starts)

Parameters:
costVars - the cost variable vector
vars - the sequence of variables the constraint must ensure it belongs to the regular language
auto - the automaton defining the regular language
Returns:
an instance of the multiCostRegular constraint

softMultiCostRegular

public static Constraint softMultiCostRegular(IntegerVariable[] vars,
                                              IntegerVariable[] counters,
                                              IntegerVariable[] penaltyVars,
                                              IntegerVariable globalPenalty,
                                              IPenaltyFunction[] pfunction,
                                              IAutomaton auto,
                                              int[][][][] costs)

softMultiCostRegular

public static Constraint softMultiCostRegular(IntegerVariable[] vars,
                                              IntegerVariable[] counters,
                                              IntegerVariable[] penaltyVars,
                                              IntegerVariable globalPenalty,
                                              IPenaltyFunction[] pfunction,
                                              IAutomaton auto,
                                              int[][][][] costs,
                                              int... sumDimension)

tree

public static Constraint tree(TreeParametersObject param)

equation

public static Constraint equation(int val,
                                  IntegerVariable[] vars,
                                  int[] coeffs)
State a constraint to enforce GAC on Sum_i coeffs[i] * vars[i] = val. It is using the regular to state a "knapsack" constraint.

Parameters:
val - : the value to reach
vars - : a table of variables
coeffs - : a table of coefficients
Returns:
a constraint

equation

public static Constraint equation(IntegerVariable z,
                                  IntegerVariable[] vars,
                                  int[] coeffs)
State a constraint to enforce GAC on Sum_i coeffs[i] * vars[i] = z. It is using the regular to state a "knapsack" constraint.

Parameters:
z - : the result variable
vars - : a table of variables
coeffs - : a table of coefficients
Returns:
a constraint

equation

public static Constraint equation(String option,
                                  int val,
                                  IntegerVariable[] vars,
                                  int[] coeffs)
State constraint Sum_i coeffs[i] * vars[i] = val. The option can be set to either :

Parameters:
val - : the value to reach
vars - : a table of variables
coeffs - : a table of coefficients
Returns:
a constraint

equation

public static Constraint equation(String option,
                                  IntegerVariable z,
                                  IntegerVariable[] vars,
                                  int[] coeffs)
State constraint Sum_i coeffs[i] * vars[i] = z. The option can be set to either :

Parameters:
option - : the consistency level to achieve
z - : the result variable
vars - : a table of variables
coeffs - : a table of coefficients
Returns:
a constraint

equation

@Deprecated
public static Constraint equation(IntegerVariable[] vars,
                                             int[] coeffs,
                                             int val)
Deprecated. reorder parameters

State a constraint to enforce GAC on Sum_i coeffs[i] * vars[i] = val. It is using the regular to state a "knapsack" constraint.

Parameters:
vars - : a table of variables
coeffs - : a table of coefficients
val - : the value to reach
Returns:
a constraint

sameSign

public static Constraint sameSign(IntegerExpressionVariable n1,
                                  IntegerExpressionVariable n2)

oppositeSign

public static Constraint oppositeSign(IntegerExpressionVariable n1,
                                      IntegerExpressionVariable n2)

mod

public static Constraint mod(IntegerVariable v0,
                             IntegerVariable v1,
                             int c)

reifiedIntConstraint

@Deprecated
public static Constraint reifiedIntConstraint(IntegerVariable binVar,
                                                         Constraint cst)
Deprecated. 


reifiedIntConstraint

@Deprecated
public static Constraint reifiedIntConstraint(IntegerVariable binVar,
                                                         Constraint cst,
                                                         Constraint oppCst)
Deprecated. 


reifiedConstraint

public static Constraint reifiedConstraint(IntegerVariable binVar,
                                           Constraint cst)

reifiedConstraint

public static Constraint reifiedConstraint(IntegerVariable binVar,
                                           Constraint cst,
                                           Constraint oppCst)

clause

public static Constraint clause(IntegerVariable[] positiveLiterals,
                                IntegerVariable[] negativeLiterals)
A global constraint to store and propagate all clauses

Parameters:
positiveLiterals - list of positive literals
negativeLiterals - list of negative lliterals
Returns:
Constraint

clause

public static Constraint clause(String option,
                                IntegerVariable[] positiveLiterals,
                                IntegerVariable[] negativeLiterals)
A global constraint to store and propagate all clauses The option can contain the folowing String :

Parameters:
option - option of the constraint
positiveLiterals - list of positive literals
negativeLiterals - list of negative lliterals
Returns:
Constraint

clauses

public static Constraint[] clauses(String option,
                                   ALogicTree tree)
A global constraint to store and propagate all clauses extracted from a logic tree The option can contain the folowing String :

Parameters:
tree - a logoc tree
option - option of the constraint
Returns:
Constraint

clauses

public static Constraint[] clauses(ALogicTree tree)
A global constraint to store and propagate all clauses extracted from a logic tree

Parameters:
tree - a logoc tree
Returns:
Constraint

or

public static Constraint or(IntegerVariable... literals)
A constraint for logical disjunction between boolean variables lit1 OR lit2 OR ... OR litn

Parameters:
literals - list of boolean variables
Returns:
Constraint

reifiedOr

public static Constraint reifiedOr(IntegerVariable binVar,
                                   IntegerVariable... literals)
A reified constraint for logical disjunction between boolean variables binVar = lit1 OR lit2 OR ... OR litn

Parameters:
binVar - reified variable
literals - list of boolean variables
Returns:
Constraint

and

public static Constraint and(IntegerVariable... literals)
A constraint for logical conjunction between boolean variables lit1 AND lit2 AND ... AND litn

Parameters:
literals - list of boolean variables
Returns:
Constraint

reifiedAnd

public static Constraint reifiedAnd(IntegerVariable binVar,
                                    IntegerVariable... literals)
A reified constraint for logical conjunction between boolean variables binVar = lit1 AND lit2 AND ... AND litn

Parameters:
binVar - reified variable
literals - list of boolean variables
Returns:
Constraint

nand

public static Constraint nand(IntegerVariable... literals)
A constraint for logical conjunction between boolean variables lit1 NAND lit2 NAND ... NAND litn

Parameters:
literals - list of boolean variables
Returns:
Constraint

reifiedNand

public static Constraint reifiedNand(IntegerVariable binVar,
                                     IntegerVariable... literals)
A reified constraint for logical conjunction between boolean variables binVar = lit1 NAND lit2 NAND ... NAND litn

Parameters:
binVar - reified variable
literals - list of boolean variables
Returns:
Constraint

nor

public static Constraint nor(IntegerVariable... literals)
A constraint for logical conjunction between boolean variables lit1 NOR lit2 NOR ... NOR litn

Parameters:
literals - list of boolean variables
Returns:
Constraint

reifiedNor

public static Constraint reifiedNor(IntegerVariable binVar,
                                    IntegerVariable... literals)
A reified constraint for logical conjunction between boolean variables binVar = lit1 NOR lit2 NOR ... NOR litn

Parameters:
binVar - reified variable
literals - list of boolean variables
Returns:
Constraint

reifiedNot

public static Constraint reifiedNot(IntegerVariable binVar,
                                    IntegerVariable lit)
A reified constraint for logical negation binVar = NOT(lit)

Parameters:
binVar - reified variable
lit - literal
Returns:
Constraint

xor

public static Constraint xor(IntegerVariable lit1,
                             IntegerVariable lit2)
A reified constraint for logical exclusive disjunctive lit1 XOR lit2

Parameters:
lit1 - literal
lit2 - literal
Returns:
Constraint

reifiedXor

public static Constraint reifiedXor(IntegerVariable binVar,
                                    IntegerVariable lit1,
                                    IntegerVariable lit2)
A reified constraint for logical exclusive disjunction between boolean variables binVar = lit1 XOR lit2

Parameters:
binVar - reified variable
lit1 - literal
lit2 - literal
Returns:
Constraint

xnor

public static Constraint xnor(IntegerVariable lit1,
                              IntegerVariable lit2)
A reified constraint for logical equality lit1 XNOR lit2

Parameters:
lit1 - literal
lit2 - literal
Returns:
Constraint

reifiedXnor

public static Constraint reifiedXnor(IntegerVariable binVar,
                                     IntegerVariable lit1,
                                     IntegerVariable lit2)
A reified constraint for logical equality binVar = lit1 XNOR lit2

Parameters:
binVar - reified variable
lit1 - literal
lit2 - literal
Returns:
Constraint

reifiedLeftImp

public static Constraint reifiedLeftImp(IntegerVariable binVar,
                                        IntegerVariable lit1,
                                        IntegerVariable lit2)
A reified constraint for reverse implication binVar = lit1 implies lit2

Parameters:
binVar - reified variable
lit1 - literal
lit2 - literal
Returns:
Constraint

reifiedRightImp

public static Constraint reifiedRightImp(IntegerVariable binVar,
                                         IntegerVariable lit1,
                                         IntegerVariable lit2)
A reified constraint for forward implication binVar = lit2 implies lit1

Parameters:
binVar - reified variable
lit1 - literal
lit2 - literal
Returns:
Constraint

mult

public static IntegerExpressionVariable mult(IntegerExpressionVariable t1,
                                             int a)

mult

public static IntegerExpressionVariable mult(int a,
                                             IntegerExpressionVariable t1)

mult

public static IntegerExpressionVariable mult(IntegerExpressionVariable n1,
                                             IntegerExpressionVariable n2)

plus

public static IntegerExpressionVariable plus(IntegerExpressionVariable t1,
                                             IntegerExpressionVariable t2)
Adding two terms one to another

Parameters:
t1 - first term
t2 - second term
Returns:
the term (a fresh one)

plus

public static IntegerExpressionVariable plus(IntegerExpressionVariable t,
                                             int c)

plus

public static IntegerExpressionVariable plus(int c,
                                             IntegerExpressionVariable t)

minus

public static IntegerExpressionVariable minus(IntegerExpressionVariable t1,
                                              IntegerExpressionVariable t2)
Subtracting two terms one from another

Parameters:
t1 - first term
t2 - second term
Returns:
the term (a fresh one)

minus

public static IntegerExpressionVariable minus(IntegerExpressionVariable t,
                                              int c)

minus

public static IntegerExpressionVariable minus(int c,
                                              IntegerExpressionVariable t)

scalar

public static IntegerExpressionVariable scalar(int[] lc,
                                               IntegerVariable[] lv)
Building a term from a scalar product of coefficients and variables

Parameters:
lc - the array of coefficients
lv - the array of variables
Returns:
the term

scalar

public static IntegerExpressionVariable scalar(IntegerVariable[] lv,
                                               int[] lc)
Building a term from a scalar product of coefficients and variables

Parameters:
lv - the array of variables
lc - the array of coefficients
Returns:
the term

sum

public static IntegerExpressionVariable sum(IntegerExpressionVariable... lv)
Building a term from a sum of integer expressions

Parameters:
lv - the array of integer expressions
Returns:
the term

abs

public static IntegerExpressionVariable abs(IntegerExpressionVariable n)

div

public static IntegerExpressionVariable div(IntegerExpressionVariable n1,
                                            IntegerExpressionVariable n2)

div

public static IntegerExpressionVariable div(IntegerExpressionVariable n1,
                                            int n2)

div

public static IntegerExpressionVariable div(int n1,
                                            IntegerExpressionVariable n2)

max

public static IntegerExpressionVariable max(IntegerExpressionVariable n1,
                                            IntegerExpressionVariable n2)

max

public static IntegerExpressionVariable max(int n1,
                                            IntegerExpressionVariable n2)

max

public static IntegerExpressionVariable max(IntegerExpressionVariable n1,
                                            int n2)

max

public static IntegerExpressionVariable max(IntegerExpressionVariable[] n1)

min

public static IntegerExpressionVariable min(IntegerExpressionVariable n1,
                                            IntegerExpressionVariable n2)

min

public static IntegerExpressionVariable min(int n1,
                                            IntegerExpressionVariable n2)

min

public static IntegerExpressionVariable min(IntegerExpressionVariable n1,
                                            int n2)

min

public static IntegerExpressionVariable min(IntegerExpressionVariable[] n1)

mod

public static IntegerExpressionVariable mod(IntegerExpressionVariable n1,
                                            IntegerExpressionVariable n2)

mod

public static IntegerExpressionVariable mod(int n1,
                                            IntegerExpressionVariable n2)

mod

public static IntegerExpressionVariable mod(IntegerExpressionVariable n1,
                                            int n2)

neg

public static IntegerExpressionVariable neg(IntegerExpressionVariable n)

power

public static IntegerExpressionVariable power(IntegerExpressionVariable n1,
                                              IntegerExpressionVariable n2)

power

public static IntegerExpressionVariable power(int n1,
                                              IntegerExpressionVariable n2)

power

public static IntegerExpressionVariable power(IntegerExpressionVariable n1,
                                              int n2)

ifThenElse

public static IntegerExpressionVariable ifThenElse(Constraint n1,
                                                   IntegerExpressionVariable n2,
                                                   IntegerExpressionVariable n3)

mult

public static RealExpressionVariable mult(double a,
                                          RealExpressionVariable x)

mult

public static RealExpressionVariable mult(RealExpressionVariable x,
                                          double a)

mult

public static RealExpressionVariable mult(RealExpressionVariable x,
                                          RealExpressionVariable y)

plus

public static RealExpressionVariable plus(RealExpressionVariable t1,
                                          RealExpressionVariable t2)

plus

public static RealExpressionVariable plus(RealExpressionVariable t,
                                          double c)

plus

public static RealExpressionVariable plus(double c,
                                          RealExpressionVariable t)

minus

public static RealExpressionVariable minus(RealExpressionVariable t1,
                                           RealExpressionVariable t2)

minus

public static RealExpressionVariable minus(RealExpressionVariable t,
                                           double c)

minus

public static RealExpressionVariable minus(double c,
                                           RealExpressionVariable t)

power

public static RealExpressionVariable power(RealExpressionVariable exp,
                                           int power)
Power of an expression.

Parameters:
exp - the expression to x
power - the second expression
Returns:
the difference of exp1 and exp2 (exp1-exp2)

cos

public static RealExpressionVariable cos(RealExpressionVariable exp)
Cosinus of an expression.

Parameters:
exp - the real expression
Returns:
RealExpression

sin

public static RealExpressionVariable sin(RealExpressionVariable exp)
Sinus of an expression.

Parameters:
exp - the real expression
Returns:
RealExpression

and

public static Constraint and(Constraint... n)

ifOnlyIf

public static Constraint ifOnlyIf(Constraint n1,
                                  Constraint n2)

ifThenElse

public static Constraint ifThenElse(Constraint n1,
                                    Constraint n2,
                                    Constraint n3)

implies

public static Constraint implies(Constraint n1,
                                 Constraint n2)

nand

public static Constraint nand(Constraint... n)

not

public static Constraint not(Constraint n)

nor

public static Constraint nor(Constraint... n)

or

public static Constraint or(Constraint... n)

timeWindow

protected static Constraint timeWindow(IntegerVariable var,
                                       int min,
                                       int max)

endsBetween

public static Constraint endsBetween(TaskVariable t,
                                     int min,
                                     int max)
This task ends between min and max

Parameters:
t - the task
min - the minimum ending time
max - the maximum ending time
Returns:
Constraint

startsBetween

public static Constraint startsBetween(TaskVariable t,
                                       int min,
                                       int max)
This task ends between min and max

Parameters:
t - the task
min - the minimum starting time
max - the maximum starting time
Returns:
Constraint

endsAt

public static Constraint endsAt(TaskVariable t,
                                int time)
This task ends at time.

Parameters:
t - the task
Returns:
Constraint

startsAt

public static Constraint startsAt(TaskVariable t,
                                  int time)
This task starts at time.

Parameters:
t - the task
Returns:
Constraint

endsBefore

public static Constraint endsBefore(TaskVariable t,
                                    int max)
This task ends before max

Parameters:
t - the task
max - the maximum ending time
Returns:
Constraint

startsBefore

public static Constraint startsBefore(TaskVariable t,
                                      int max)
This task starts before max

Parameters:
t - the task
max - the maximum starting time
Returns:
Constraint

endsAfter

public static Constraint endsAfter(TaskVariable t,
                                   int min)
This task ends after min

Parameters:
t - the task
min - the minimum ending time
Returns:
Constraint

startsAfter

public static Constraint startsAfter(TaskVariable t,
                                     int min)
This task begins before max

Parameters:
t - the task
min - the minimum starting time
Returns:
Constraint

startsBeforeBegin

public static Constraint startsBeforeBegin(TaskVariable t1,
                                           TaskVariable t2,
                                           int delta)
Temporal constraint : start(t1) +delta <= start(s2)

Parameters:
t1 - the first task
t2 - the second task
delta - the delta
Returns:
Constraint

startsBeforeBegin

public static Constraint startsBeforeBegin(TaskVariable t1,
                                           TaskVariable t2)
Temporal constraint : start(t1) <= start(s2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

startsAfterBegin

public static Constraint startsAfterBegin(TaskVariable t1,
                                          TaskVariable t2,
                                          int delta)
Temporal constraint : start(t1) >= start(t2) +delta

Parameters:
t1 - the first task
t2 - the second task
delta - the delta
Returns:
Constraint

startsAfterBegin

public static Constraint startsAfterBegin(TaskVariable t1,
                                          TaskVariable t2)
Temporal constraint : start(t1) >= start(t2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

startsAfterEnd

public static Constraint startsAfterEnd(TaskVariable t1,
                                        TaskVariable t2,
                                        int delta)
Temporal constraint: start(t1) >= end(t2) + delta

Parameters:
t1 - the starting task
t2 - the ending task
delta - the setup time between t1 and t2
Returns:
Constraint

startsAfterEnd

public static Constraint startsAfterEnd(TaskVariable t1,
                                        TaskVariable t2)
Temporal constraint: start(t1) >= end(t2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

endsBeforeBegin

public static Constraint endsBeforeBegin(TaskVariable t1,
                                         TaskVariable t2,
                                         int delta)
Temporal constraint: end(t1) + delta <= start(t2)

Parameters:
t1 - the ending task
t2 - the starting task
delta - the setup between t1 and t2
Returns:
Constraint

endsBeforeBegin

public static Constraint endsBeforeBegin(TaskVariable t1,
                                         TaskVariable t2)
Temporal constraint: end(t1)<= start(t2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

startsBeforeEnd

public static Constraint startsBeforeEnd(TaskVariable t1,
                                         TaskVariable t2,
                                         int delta)
Temporal constraint : start(t1) + delta <= end(t2)

Parameters:
t1 - the first task
t2 - the second task
delta - the delta
Returns:
Constraint

startsBeforeEnd

public static Constraint startsBeforeEnd(TaskVariable t1,
                                         TaskVariable t2)
Temporal constraint : start(t1) + delta <= end(t2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

endsAfterBegin

public static Constraint endsAfterBegin(TaskVariable t1,
                                        TaskVariable t2,
                                        int delta)
Temporal constraint: end(t1) >= start(t2) + delta

Parameters:
t1 - the first task
t2 - the second task
delta - the delta
Returns:
Constraint

endsAfterBegin

public static Constraint endsAfterBegin(TaskVariable t1,
                                        TaskVariable t2)
This task ends after the start of the task 2

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

endsBeforeEnd

public static Constraint endsBeforeEnd(TaskVariable t1,
                                       TaskVariable t2,
                                       int delta)
Temporal constraint: end(t1) + delta <= end(t2)

Parameters:
t1 - the first task
t2 - the second task
delta - the delta
Returns:
Constraint

endsBeforeEnd

public static Constraint endsBeforeEnd(TaskVariable t1,
                                       TaskVariable t2)
Temporal constraint: end(t1) <= end(t2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint

endsAfterEnd

public static Constraint endsAfterEnd(TaskVariable t1,
                                      TaskVariable t2,
                                      int delta)
Temporal constraint: end(t1) >= end(t2) + delta

Parameters:
t1 - the first task
t2 - the second task
delta - the delta
Returns:
Constraint

endsAfterEnd

public static Constraint endsAfterEnd(TaskVariable t1,
                                      TaskVariable t2)
Temporal constraint: end(t1) >= end(t2)

Parameters:
t1 - the first task
t2 - the second task
Returns:
Constraint


Copyright © 2012. All Rights Reserved.