|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.Choco
public class Choco
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 = |
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 = |
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 |
---|
protected static final Logger LOGGER
public static final int MIN_LOWER_BOUND
public static final int MAX_UPPER_BOUND
public static final IntegerVariable ZERO
public static final IntegerVariable ONE
public static final Constraint TRUE
public static final Constraint FALSE
Method Detail |
---|
public static IntegerVariable makeIntVar(String name, int lowB, int uppB, String... options)
name
- : name of the variablelowB
- : lower bound of the variableuppB
- : upper bound of the variableoptions
- : options of the variable
public static IntegerVariable makeIntVar(String name, String... options)
name
- : name of the variableoptions
- : options of the variable
public static IntegerVariable makeIntVar(String name, gnu.trove.TIntArrayList valuesList, String... options)
name
- : name of the variablevaluesList
- : list of unsorted valuesoptions
- : options of the variable
public static IntegerVariable makeIntVar(String name, List<Integer> valuesList, String... options)
name
- : name of the variablevaluesList
- : list of unsorted valuesoptions
- : options of the variable
public static IntegerVariable makeIntVar(String name, int[] valuesArray, String... options)
name
- : name of the variablevaluesArray
- : array of valuesoptions
- : options of the variable
public static IntegerVariable makeBooleanVar(String name, String... options)
name
- : name of the variableoptions
- : options of the variable
public static IntegerVariable[] makeBooleanVarArray(String name, int dim, String... options)
name
- : name of the variabledim
- : dimension of the arrayoptions
- : options of the variable
public static IntegerVariable[] makeIntVarArray(String name, int dim, int lowB, int uppB, String... options)
name
- : prefixe name of each variabledim
- : dimension of the arraylowB
- : lower bound of each variableuppB
- : upper bound of each variableoptions
- : options of the variable
public static IntegerVariable[] makeIntVarArray(String name, int dim, String... options)
name
- : name of the variabledim
- : dimension of the arrayoptions
- : options of the variable
public static IntegerVariable[] makeIntVarArray(String name, int dim, int[] valuesArray, String... options)
name
- : prefix name of each variabledim
- : dimension of the arrayvaluesArray
- : values of each variableoptions
- : options of the variable
public static IntegerVariable[] makeIntVarArray(String name, int dim, gnu.trove.TIntArrayList valuesArray, String... options)
name
- : prefix name of each variabledim
- : dimension of the arrayvaluesArray
- : values of each variableoptions
- : options of the variable
public static IntegerVariable[] makeIntVarArray(String name, int dim, List<Integer> valuesList, String... options)
name
- : prefix name of each variabledim
- : dimension of the arrayvaluesList
- : values of each variableoptions
- : options of the variable
public static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, int lowB, int uppB, String... options)
name
- : prefixe name of each variabledim1
- : first dimension of the matrixdim2
- : second dimension of the matrixlowB
- : lower bound of each variableuppB
- : upper bound of each variableoptions
- : options of the variable
public static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, String... options)
name
- : name of the variabledim1
- : first dimension of the matrixdim2
- : second dimension of the matrixoptions
- : options of the variable
public static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, int[] valuesArray, String... options)
name
- : prefixe name of each variabledim1
- : first dimension of the matrixdim2
- : second dimension of the matrixvaluesArray
- : values of each variableoptions
- : options of the variable
public static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, gnu.trove.TIntArrayList valuesArray, String... options)
name
- : prefixe name of each variabledim1
- : first dimension of the matrixdim2
- : second dimension of the matrixvaluesArray
- : values of each variableoptions
- : options of the variable
public static IntegerVariable[][] makeIntVarArray(String name, int dim1, int dim2, List<Integer> valuesList, String... options)
name
- : prefixe name of each variabledim1
- : first dimension of the matrixdim2
- : second dimension of the matrixvaluesList
- : values of each variableoptions
- : options of the variable
public static SetVariable makeSetVar(String name, int lowB, int uppB, String... options)
name
- : name of the variablelowB
- : lower bound of the variableuppB
- : upper bound of the variableoptions
- : options of the variable
public static SetVariable makeSetVar(String name, int[] valuesArray, String... options)
name
- : name of the variablevaluesArray
- : array of valuesoptions
- : options of the variable
public static SetVariable[] makeSetVarArray(String name, int dim, int lowB, int uppB, String... options)
name
- : name of the variabledim
- : dimension of the arraylowB
- : lower bound of the variableuppB
- : upper bound of the variableoptions
- : options of the variable
public static RealVariable makeRealVar(String name, double lowB, double uppB, String... options)
name
- : name of the variablelowB
- : lower bound of the variableuppB
- : upper bound of the variableoptions
- : options of the variable
public static TaskVariable makeTaskVar(String name, IntegerVariable start, IntegerVariable end, IntegerVariable duration, String... options)
name
- the name of the taskstart
- starting time integer variableend
- ending time integer variableduration
- duration integer variableoptions
- options are added to the task but not added to the integer variables.
public static TaskVariable makeTaskVar(String name, IntegerVariable start, IntegerVariable duration, String... options)
name
- the name of the taskstart
- starting time integer variableduration
- duration integer variableoptions
- options are added to the task and the end variable.
public static TaskVariable makeTaskVar(String name, int binf, int bsup, IntegerVariable duration, String... options)
name
- the name of the taskbinf
- 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.
public static TaskVariable makeTaskVar(String name, int binf, int bsup, int duration, String... options)
public static TaskVariable makeTaskVar(String name, int bsup, IntegerVariable duration, String... options)
public static TaskVariable makeTaskVar(String name, int bsup, int duration, String... options)
public static TaskVariable[] makeTaskVarArray(String prefix, IntegerVariable[] starts, IntegerVariable[] ends, IntegerVariable[] durations, String... options)
prefix
- The name's prefixstarts
- start variablesends
- end variables (could be null)durations
- duration variablesoptions
- options are also added to the start and end variables.
public static TaskVariable[] makeTaskVarArray(String name, int[] binf, int[] bsup, IntegerVariable[] durations, String... options)
name
- name of the variablebinf
- release times (earliest starting times)bsup
- due dates (latest completion times)durations
- duration variablesoptions
- options are also added to the start and end variables.
public static TaskVariable[] makeTaskVarArray(String name, int binf, int bsup, IntegerVariable[] durations, String... options)
name
- name of the variablebinf
- common release time (earliest starting time)bsup
- common due date (latest completion time)durations
- duration variablesoptions
- options are also added to the start and end variables.
public static TaskVariable[] makeTaskVarArray(String name, int binf, int bsup, int[] durations, String... options)
public static TaskVariable[][] makeTaskVarArray(String name, int binf, int bsup, IntegerVariable[][] durations, String... options)
public static TaskVariable[][] makeTaskVarArray(String name, int binf, int bsup, int[][] durations, String... options)
public static IntegerConstantVariable constant(int value)
value
- constant value
public static SetConstantVariable constant(int[] values)
values
- array of constant values
public static SetConstantVariable emptySet()
public static RealConstantVariable constant(double value)
value
- constant value
public static IntegerConstantVariable[] constantArray(int[] values)
public static IntegerConstantVariable[][] constantArray(int[][] values)
public static RealConstantVariable[] constantArray(double[] values)
public static Constraint neq(IntegerExpressionVariable x, int c)
x
- the expressionc
- the constant
public static Constraint neq(int c, IntegerExpressionVariable x)
public static Constraint neq(IntegerExpressionVariable x, IntegerExpressionVariable y)
public static Constraint geq(IntegerExpressionVariable x, IntegerExpressionVariable y)
public static Constraint geq(IntegerExpressionVariable x, int c)
public static Constraint geq(int c, IntegerExpressionVariable x)
public static Constraint geq(RealExpressionVariable x, RealExpressionVariable y)
public static Constraint geq(RealExpressionVariable x, double c)
public static Constraint geq(double c, RealExpressionVariable x)
public static Constraint gt(IntegerExpressionVariable x, IntegerExpressionVariable y)
x
- an expression variable or an integer variabley
- an expression variable or an integer variable
public static Constraint gt(IntegerExpressionVariable x, int c)
x
- an expression variable or an integer variablec
- an integer
public static Constraint gt(int c, IntegerExpressionVariable x)
x
- an expression variable or an integer variablec
- an integer
public static Constraint eq(IntegerExpressionVariable x, IntegerExpressionVariable y)
x
- an expression variable or integer variabley
- an expression variable or integer variable
public static Constraint eq(IntegerExpressionVariable x, int c)
x
- an expression variable or integer variablec
- a constant
public static Constraint eq(int c, IntegerExpressionVariable x)
x
- an expression variable or integer variablec
- a constant
public static Constraint eq(RealExpressionVariable x, RealExpressionVariable y)
x
- an expression variable or real variabley
- an expression variable or real variable
public static Constraint eq(RealExpressionVariable x, double c)
x
- an expression variable or real variablec
- a double
public static Constraint eq(double c, RealExpressionVariable x)
x
- an expression variable or real variablec
- a double
public static Constraint eq(RealVariable r, IntegerVariable i)
r
- a real variablei
- an integer variable
public static Constraint eq(IntegerVariable i, RealVariable r)
r
- a real variablei
- an integer variable
public static Constraint leq(IntegerExpressionVariable x, int c)
public static Constraint leq(int c, IntegerExpressionVariable x)
public static Constraint leq(IntegerExpressionVariable x, IntegerExpressionVariable y)
public static Constraint leq(RealExpressionVariable x, double c)
public static Constraint leq(double c, RealExpressionVariable x)
public static Constraint leq(RealExpressionVariable x, RealExpressionVariable y)
public static Constraint lt(IntegerExpressionVariable x, int c)
x
- an integer expression variablec
- an integer
public static Constraint lt(int c, IntegerExpressionVariable x)
x
- an integer expression variablec
- an integer
public static Constraint lt(IntegerExpressionVariable x, IntegerExpressionVariable y)
x
- an integer expression variabley
- an integer expression variable
public static Constraint times(IntegerVariable x, IntegerVariable y, IntegerVariable z)
x
- the first integer variabley
- the second integer variablez
- the result of x*y
public static Constraint times(int x, IntegerVariable y, IntegerVariable z)
x
- the first integer variabley
- the second integer variablez
- the result of x*y
public static Constraint times(IntegerVariable x, int y, IntegerVariable z)
x
- the first integer variabley
- the second integer variablez
- the result of x*y
public static Constraint intDiv(IntegerVariable x, IntegerVariable y, IntegerVariable z)
x
- the first integer variabley
- the second integer variablez
- the result of x/y
public static BinRelation makeBinRelation(int[] min, int[] max, List<int[]> mat, boolean feas, boolean bitset)
min
- array of min valuesmax
- array of max valuesmat
- the list of tuples defined as int[] of size 2feas
- specify if the relation is defined in feasibility or not i.e. if the tuples corresponds to feasible or infeasible tuplesbitset
- specify if the relation is intended to be used in ac3rm enhanced with bitwise operations
public static BinRelation makeBinRelation(int[] min, int[] max, List<int[]> mat, boolean feas)
min
- array of min valuesmax
- arrau of max valuesmat
- the list of tuples defined as int[] of size 2feas
- specify if the relation is defined in feasibility or not i.e. if the tuples corresponds to feasible or infeasible tuples
public static BinRelation makeBinRelation(int[] min, int[] max, boolean[][] mat, boolean feas, boolean bitset)
min
- array of min valuesmax
- array of max valuesmat
- the consistency matrixfeas
- specify if the relation is defined in feasibility or notbitset
- specify if the relation is intended to be used in ac3rm enhanced with bitwise operations
public static BinRelation makeBinRelation(int[] min, int[] max, boolean[][] mat, boolean feas)
min
- array of min valuesmax
- array of max valuesmat
- the consistency matrixfeas
- specify if the relation is defined in feasibility or not
public static Constraint infeasPairAC(IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
v1
- : first variablev2
- : second variablemat
- : the list of tuples defining the relation (the infeasible pairs)
public static Constraint infeasPairAC(String options, IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
v1
- : first variablev2
- : second variableoptions
- : 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 existsmat
- : the list of tuples defining the relation (the infeasible pairs)
public static Constraint feasPairAC(IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
v1
- : first variablev2
- : second variablemat
- : the list of tuples defining the relation (the feasible pairs)
public static Constraint feasPairAC(String options, IntegerVariable v1, IntegerVariable v2, List<int[]> mat)
v1
- : first variablev2
- : second variableoptions
- : 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 existsmat
- : the list of tuples defining the relation (the feasible pairs)
public static Constraint infeasPairAC(IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
v1
- : first variablev2
- : second variablemat
- : a boolean matrice indicating the consistency relation (the infeasible pairs)
public static Constraint infeasPairAC(String options, IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
v1
- : first variablev2
- : second variableoptions
- : 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 existsmat
- : a boolean matrice indicating the consistency relation (the infeasible pairs)
public static Constraint feasPairAC(IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
v1
- : first variablev2
- : second variablemat
- : a boolean matrice indicating the consistency relation (the feasible pairs) *
public static Constraint feasPairAC(String options, IntegerVariable v1, IntegerVariable v2, boolean[][] mat)
v1
- : first variablev2
- : second variableoptions
- : 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 existsmat
- : a boolean matrice indicating the consistency relation (the feasible pairs)
public static Constraint relationPairAC(IntegerVariable v1, IntegerVariable v2, BinRelation binR)
v1
- : first variablev2
- : second variablebinR
- : a binary relation standing for the consistency relation. Notice that the same relation can therefore
be shared among constraints.
public static Constraint relationPairAC(String options, IntegerVariable v1, IntegerVariable v2, BinRelation binR)
v1
- : first variablev2
- : second variableoptions
- : 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 existsbinR
- : a binary relation standing for the consistency relation. Notice that the same relation can therefore
be shared among constraints.
public static LargeRelation makeLargeRelation(int[] min, int[] max, List<int[]> tuples, boolean feas)
min
- : min[i] has to be greater or equal the minimum value of any i-th variable on which this relation will be usedmax
- : max[i] has to be greater or equal the maximum value of any i-th variable on which this relation will be usedtuples
- : list of tuplesfeas
- : specifies if the tuples are feasible or infeasible tuples
public static LargeRelation makeLargeRelation(int[] min, int[] max, List<int[]> tuples, boolean feas, int scheme)
min
- : min[i] has to be greater or equal the minimum value of any i-th variable on which this relation will be usedmax
- : max[i] has to be greater or equal the maximum value of any i-th variable on which this relation will be usedtuples
- : list of tuplesfeas
- : specifies if the tuples are feasible or infeasible tuplesscheme
- : 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.
public static Constraint infeasTupleFC(List<int[]> tuples, IntegerVariable... vars)
tuples
- : a list of int[] corresponding to infeasible tuplesvars
- : scope of variables
public static Constraint feasTupleFC(List<int[]> tuples, IntegerVariable... vars)
tuples
- : a list of int[] corresponding to feasible tuplesvars
- : scope of variables
public static Constraint infeasTupleAC(List<int[]> tuples, IntegerVariable... vars)
tuples
- : a list of int[] corresponding to infeasible tuplesvars
- : scope of variables
public static Constraint feasTupleAC(List<int[]> tuples, IntegerVariable... vars)
tuples
- : a list of int[] corresponding to feasible tuplesvars
- : scope of variables
public static Constraint infeasTupleAC(String options, List<int[]> tuples, IntegerVariable... vars)
options
- : specifies the desired ac algorithm : 32 or 2001tuples
- : a list of int[] corresponding to infeasible tuplesvars
- : scope variables
public static Constraint feasTupleAC(String options, List<int[]> tuples, IntegerVariable... vars)
options
- : specifies the desired ac algorithm among : 32 or 2001tuples
- : a list of int[] corresponding to feasible tuplesvars
- : scope of variables
public static Constraint relationTupleFC(IntegerVariable[] vs, LargeRelation rela)
vs
- array of variablesrela
- relation
public static Constraint relationTupleAC(IntegerVariable[] vs, LargeRelation rela)
vs
- array of variablesrela
- relation
public static Constraint relationTupleAC(String options, IntegerVariable[] vs, LargeRelation rela)
public static Constraint member(IntegerVariable var, int[] values)
var
- int variablevalues
- array of int
public static Constraint member(IntegerVariable var, int lower, int upper)
var
- int variablelower
- lower boundupper
- upper bound
@Deprecated public static Constraint among(IntegerVariable var, int[] values)
var
- int variablevalues
- array of int
public static Constraint among(IntegerVariable nvar, IntegerVariable[] variables, int[] values)
nvar
- countervariables
- collection of variablesvalues
- array of values
public static Constraint among(IntegerVariable nvar, IntegerVariable[] variables, SetVariable svar)
nvar
- countervariables
- collection of variablessvar
- set variable
public static Constraint notMember(IntegerVariable var, int[] values)
var
- int variablevalues
- array of int
public static Constraint notMember(IntegerVariable var, int lower, int upper)
var
- int variablelower
- lower boundupper
- upper bound
@Deprecated public static Constraint disjoint(IntegerVariable var, int[] values)
var
- int variablevalues
- array of int
public static Constraint distanceEQ(IntegerVariable x, IntegerVariable y, int c)
x
- the first variabley
- the second variablec
- : the distance
public static Constraint distanceNEQ(IntegerVariable x, IntegerVariable y, int c)
x
- the first variabley
- the second variablec
- : the distance
public static Constraint distanceLT(IntegerVariable x, IntegerVariable y, int c)
x
- the first variabley
- the second variablec
- : the distance
public static Constraint distanceGT(IntegerVariable x, IntegerVariable y, int c)
x
- the first variabley
- the second variablec
- : the distance
public static Constraint distanceEQ(IntegerVariable x, IntegerVariable y, IntegerVariable z, int c)
x
- the first variabley
- the second variablez
- = the third variablec
- : the constant
public static Constraint distanceEQ(IntegerVariable x, IntegerVariable y, IntegerVariable z)
x
- the first variabley
- the second variablez
- the third variable
public static Constraint distanceLT(IntegerVariable x, IntegerVariable y, IntegerVariable z, int c)
x
- the first variabley
- the second variablez
- the third variablec
- the constant
public static Constraint distanceLT(IntegerVariable x, IntegerVariable y, IntegerVariable z)
x
- the first variabley
- the second variablez
- the third variable
public static Constraint distanceGT(IntegerVariable x, IntegerVariable y, IntegerVariable z, int c)
x
- the first variabley
- the second variablez
- the third variablec
- the constant
public static Constraint distanceGT(IntegerVariable x, IntegerVariable y, IntegerVariable z)
x
- the first variabley
- the second variablez
- the third variable
public static Constraint abs(IntegerVariable x, IntegerVariable y)
x
- the first variabley
- the second variable
public static Constraint min(SetVariable svar, IntegerVariable[] ivars, IntegerVariable min, String... options)
svar
- the set which defined the sublistivars
- List of variablesmin
- Variable to represent the maximum among the sublistoptions
- Options.C_MINMAX_INF
, Options.C_MINMAX_SUP
public static Constraint min(IntegerVariable[] vars, IntegerVariable min)
vars
- List of variablesmin
- Variable to represent the minimum among vars
public static Constraint max(SetVariable svar, IntegerVariable[] ivars, IntegerVariable min, String... options)
svar
- the set which defined the sublistivars
- List of variablesmin
- Variable to represent the maximum among the sublistoptions
- Options.C_MINMAX_INF
, Options.C_MINMAX_SUP
public static Constraint max(IntegerVariable[] vars, IntegerVariable max)
vars
- List of variablesmax
- Variable to represent the maximum among vars
public static Constraint min(IntegerVariable x, IntegerVariable y, IntegerVariable min)
x
- the first variabley
- the second variablemin
- Variable to represent the minimum among vars
public static Constraint min(int x, IntegerVariable y, IntegerVariable min)
x
- the first variabley
- the second variablemin
- Variable to represent the minimum among vars
public static Constraint min(IntegerVariable x, int y, IntegerVariable min)
x
- the first variabley
- the second variablemin
- Variable to represent the minimum among vars
public static Constraint max(IntegerVariable x, IntegerVariable y, IntegerVariable max)
x
- the first variabley
- the second variablemax
- Variable to represent the maximum among vars
public static Constraint max(int x, IntegerVariable y, IntegerVariable max)
x
- the first variabley
- the second variablemax
- Variable to represent the maximum among vars
public static Constraint max(IntegerVariable x, int y, IntegerVariable max)
x
- the first variabley
- the second variablemax
- Variable to represent the maximum among vars
public static Constraint occurrence(int value, IntegerVariable occurrence, IntegerVariable... vars)
value
- the observed valuevars
- List of variables where the value can appearoccurrence
- The variable that should contain the occurence number
public static Constraint occurrence(IntegerVariable occurrence, IntegerVariable[] vars, int value)
vars
- List of variables where the value can appearoccurrence
- The variable that should contain the occurrence numbervalue
- the observed value
public static Constraint occurrenceMin(int value, IntegerVariable occurrence, IntegerVariable... vars)
value
- the observed valueoccurrence
- the variable that should contain the occurrence numbervars
- list of variable where the value can appear
public static Constraint occurrenceMin(IntegerVariable occurrence, IntegerVariable[] vars, int value)
occurrence
- the variable that should contain the occurrence numbervars
- list of variable where the value can appearvalue
- the observed value
public static Constraint occurrenceMax(int value, IntegerVariable occurrence, IntegerVariable... vars)
value
- the observed valueoccurrence
- the variable that should contain the occurrence numbervars
- list of variable where the value can appear
public static Constraint occurrenceMax(IntegerVariable occurrence, IntegerVariable[] vars, int value)
occurrence
- the variable that should contain the occurence numbervars
- list of variable where the value can appearvalue
- the observed value
public static Constraint occurrence(int occurrence, IntegerVariable[] variables, int value)
occurrence
- countervariables
- collection of variablesvalue
- int
@Deprecated public static Constraint exactly(int occurrence, IntegerVariable[] variables, int value)
occurrence
- countervariables
- collection of variablesvalue
- int
public static Constraint increasingSum(IntegerVariable[] variables, IntegerVariable sum)
variables
- collection of variablessum
- resulting variable
public static Constraint nth(IntegerVariable index, int[] values, IntegerVariable val)
index
- the index variablevalues
- the possible valueval
- the indexth value
public static Constraint nth(String options, IntegerVariable index, int[] values, IntegerVariable val)
index
- the index variablevalues
- the possible valueval
- the indexth value
public static Constraint nth(IntegerVariable index, int[] values, IntegerVariable val, int offset)
index
- the index variablevalues
- the possible valueoffset
- the offset valueval
- the indexth value
public static Constraint nth(String options, IntegerVariable index, int[] values, IntegerVariable val, int offset)
index
- the index variablevalues
- the possible valueoffset
- the offset valueval
- the indexth value
public static Constraint nth(IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val)
index
- the index variablevarArray
- array of possible variablesval
- indexth variable
public static Constraint nth(String option, IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val)
index
- the index variablevarArray
- array of possible variablesval
- indexth variable
public static Constraint nth(IntegerVariable index, IntegerVariable index2, int[][] varArray, IntegerVariable val)
index
- variable index in the first dimensionindex2
- variable index in the first dimensionvarArray
- matrix of valueval
- the resulting variable
public static Constraint nth(IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val, int offset)
index
- index variable in the arrayvarArray
- array of variablesval
- resulting variableoffset
- the offset value
public static Constraint nth(String options, IntegerVariable index, IntegerVariable[] varArray, IntegerVariable val, int offset)
index
- index variable in the arrayvarArray
- array of variablesval
- resulting variableoffset
- the offset value
public static Constraint boolChanneling(IntegerVariable b, IntegerVariable x, int j)
b
- : a boolean variablex
- : an integer variablej
- : the value such that b = 1 ssi x = j, and b = 0 otherwise
public static Constraint inverseChanneling(IntegerVariable[] x, IntegerVariable[] y)
x
- the first array of variablesy
- the second array of variables
public static Constraint inverseChannelingWithinRange(IntegerVariable[] x, IntegerVariable[] y)
x
- the first array of variablesy
- the second array of variables
public static Constraint domainChanneling(IntegerVariable x, IntegerVariable[] b)
x
- domain variableb
- 0-1 variables for potential values
@Deprecated public static Constraint domainConstraint(IntegerVariable x, IntegerVariable[] b)
x
- domain variableb
- 0-1 variables for potential values
public static Constraint allDifferent(IntegerVariable... vars)
vars
- list of variables
public static Constraint allDifferent(String options, IntegerVariable... vars)
options
- options of the constraintvars
- list of variables
public static Constraint globalCardinality(IntegerVariable[] vars, int min, int max, int[] low, int[] up)
vars
- list of variablesmin
- minimum allowed valuemax
- maximum allowed valuelow
- array of lower occurenceup
- array of upper occurence
globalCardinality(choco.kernel.model.variables.integer.IntegerVariable[], int[], int[], int)
public static Constraint globalCardinality(String options, IntegerVariable[] vars, int min, int max, int[] low, int[] up)
options
- options of the constraintvars
- list of variablesmin
- minimum allowed valuemax
- maximum allowed valuelow
- array of lower occurenceup
- array of upper occurence
globalCardinality(String, choco.kernel.model.variables.integer.IntegerVariable[], int[], int[], int)
public static Constraint globalCardinality(IntegerVariable[] vars, int[] low, int[] up, int offset)
vars
- list of variableslow
- array of lower occurenceup
- array of upper occurenceoffset
- first value constrained by low[0]
and up[0]
public static Constraint globalCardinality(IntegerVariable[] vars, int[] values, int[] low, int[] up)
vars
- list of variablesvalues
- restricted valueslow
- array of lower occurenceup
- array of upper occurence
public static Constraint globalCardinality(IntegerVariable[] vars, int[] values, IntegerVariable[] cards)
vars
- list of variablesvalues
- restricted valuescards
- array of cardinality variables
public static Constraint globalCardinality(String options, IntegerVariable[] vars, int[] low, int[] up, int offset)
options
- options of the constraintvars
- list of variableslow
- array of lower occurenceup
- array of upper occurenceoffset
- first value constrained by low[0]
and up[0]
public static Constraint globalCardinality(IntegerVariable[] vars, int min, int max, IntegerVariable[] card)
vars
- list of variablesmin
- minimum allowed valuemax
- maximum allowed valuecard
- array of cardinality variables
globalCardinality(choco.kernel.model.variables.integer.IntegerVariable[], choco.kernel.model.variables.integer.IntegerVariable[], int)
public static Constraint globalCardinality(IntegerVariable[] vars, IntegerVariable[] card, int offset)
vars
- list of variablescard
- array of cardinality variablesoffset
- first value constrained by card[0]
public static Constraint stretchPath(List<int[]> stretchesParameters, IntegerVariable... vars)
vars
- : a sequence of variablesstretchesParameters
- : 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.
public static Constraint increasingNValue(String option, IntegerVariable nval, IntegerVariable[] vars)
option
- Available options are:
nval
- number of distinct valuesvars
- collection of variables
public static Constraint increasingNValue(IntegerVariable nval, IntegerVariable[] vars)
nval
- number of distinct valuesvars
- collection of variables
@Deprecated public static Constraint increasing_nvalue(IntegerVariable nval, IntegerVariable[] vars)
nval
- number of distinct valuesvars
- collection of variables@Deprecated public static Constraint increasing_nvalue(String option, IntegerVariable nval, IntegerVariable[] vars)
option
- Available options are:
nval
- number of distinct valuesvars
- collection of variables
public static Constraint pack(SetVariable[] itemSets, IntegerVariable[] loads, IntegerVariable[] bins, IntegerConstantVariable[] sizes, IntegerVariable nbNonEmpty, String... options)
public static Constraint pack(PackModel packMod, String... options)
public static Constraint cumulative(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable consumption, IntegerVariable capacity, IntegerVariable uppBound, String... options)
name
- name of the resource (null
is authorized)tasks
- the set of involved tasksheights
- the heights of the tasks for the given resourceusages
- 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 resourcecapacity
- the capacity of the resourceuppBound
- 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.
public static Constraint cumulative(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable consumption, IntegerVariable capacity, String... options)
null
, uppBound = null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulativeMax(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable capacity, String... options)
null
, uppBound = null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulativeMax(TaskVariable[] tasks, int[] heights, int capacity, String... options)
null
, uppBound = null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulativeMin(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable consumption, String... options)
null
, uppBound = null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulativeMin(TaskVariable[] tasks, int[] heights, int consumption, String... options)
null
, uppBound = null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulative(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable consumption, IntegerVariable capacity, String... options)
null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulativeMax(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable capacity, String... options)
null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint cumulativeMin(String name, TaskVariable[] tasks, IntegerVariable[] heights, IntegerVariable[] usages, IntegerVariable consumption, String... options)
null
.
cumulative(String, TaskVariable[], IntegerVariable[], IntegerVariable[], IntegerVariable, IntegerVariable, IntegerVariable, String...)
public static Constraint disjunctive(String name, TaskVariable[] tasks, IntegerVariable[] usages, IntegerVariable uppBound, String... options)
name
- name of the resource (null
is authorized)tasks
- the set of involved tasksusages
- 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.
public static Constraint disjunctive(TaskVariable[] tasks, String... options)
null
, usages = null
, uppBound = null
.
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)
public static Constraint disjunctive(String name, TaskVariable[] tasks, String... options)
null
, uppBound = null
.
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)
public static Constraint disjunctive(TaskVariable[] tasks, IntegerVariable[] usages, String... options)
null
, uppBound = null
.
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)
public static Constraint disjunctive(String name, TaskVariable[] tasks, IntegerVariable[] usages, String... options)
null
.
disjunctive(String, TaskVariable[], IntegerVariable[], IntegerVariable, String...)
public static Constraint forbiddenIntervals(String name, TaskVariable[] tasks)
public static Constraint[] disjoint(TaskVariable[] tasks1, TaskVariable[] tasks2)
tasks1
- first set of taskstasks2
- second set of tasks
{http://www.emn.fr/x-info/sdemasse/gccat/Cdisjoint_tasks.html#uid11633}
public static Constraint precedence(TaskVariable t1, TaskVariable t2)
t1
- a taskt2
- another task
public static Constraint precedence(TaskVariable t1, TaskVariable t2, int delta)
t1
- a taskt2
- another task
public static Constraint precedenceDisjoint(IntegerVariable v1, int dur1, IntegerVariable v2, int dur2, IntegerVariable bool)
public static Constraint precedenceDisjoint(TaskVariable t1, TaskVariable t2, IntegerVariable direction)
t1
- a taskt2
- another taskdirection
-
public static Constraint precedenceDisjoint(TaskVariable t1, TaskVariable t2, IntegerVariable direction, int forwardSetup, int backwardSetup)
t1
- a taskt2
- the other taskdirection
- boolean variable which reified the precedence relation.forwardSetup
- setup times between t1 and t2backwardSetup
- setup times between t2 and t1.
public static Constraint precedenceReified(IntegerVariable x1, int k1, IntegerVariable x2, IntegerVariable b)
x1
- the first integer variable.k1
- the duration of the precedence.x2
- the other integer variable.b
- the reification boolean variablepublic static Constraint precedenceReified(TaskVariable t1, int delta, TaskVariable t2, IntegerVariable b)
public static Constraint precedenceImplied(IntegerVariable x1, int k1, IntegerVariable x2, IntegerVariable b)
public static Constraint precedenceImplied(TaskVariable t1, int delta, TaskVariable t2, IntegerVariable b)
@Deprecated public static Constraint geost(int dim, Vector<GeostObject> objects, Vector<ShiftedBox> shiftedBoxes, Vector<IExternalConstraint> eCtrs)
@Deprecated public static Constraint geost(int dim, Vector<GeostObject> objects, Vector<ShiftedBox> shiftedBoxes, Vector<IExternalConstraint> eCtrs, Vector<int[]> ctrlVs)
@Deprecated public static Constraint geost(int dim, Vector<GeostObject> objects, Vector<ShiftedBox> shiftedBoxes, Vector<IExternalConstraint> eCtrs, Vector<int[]> ctrlVs, GeostOptions opt)
public static Constraint geost(int dim, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes, List<IExternalConstraint> eCtrs)
public static Constraint geost(int dim, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes, List<IExternalConstraint> eCtrs, List<int[]> ctrlVs)
public static Constraint geost(int dim, List<GeostObject> objects, List<ShiftedBox> shiftedBoxes, List<IExternalConstraint> eCtrs, List<int[]> ctrlVs, GeostOptions opt)
public static Constraint lexEq(IntegerVariable[] v1, IntegerVariable[] v2)
v1
- the first array of variablesv2
- the second array of variables
@Deprecated public static Constraint lexeq(IntegerVariable[] v1, IntegerVariable[] v2)
v1
- the first array of variablesv2
- the second array of variables
public static Constraint lex(IntegerVariable[] v1, IntegerVariable[] v2)
v1
- the first array of variablesv2
- the second array of variables
public static Constraint lexChain(IntegerVariable[]... arrayOfVectors)
arrayOfVectors
- array of variables
public static Constraint lexChainEq(IntegerVariable[]... arrayOfVectors)
arrayOfVectors
- array of variables
public static Constraint sorting(IntegerVariable[] v1, IntegerVariable[] v2)
v1
- the first array of variablesv2
- the second array of variables
public static Constraint leximin(IntegerVariable[] v1, IntegerVariable[] v2)
v1
- the first array of variablesv2
- the second array of variables
public static Constraint leximin(int[] v1, IntegerVariable[] v2)
v1
- array of valuesv2
- array of variables
public static Constraint atMostNValue(IntegerVariable nvalue, IntegerVariable[] vars)
nvalue
- number of distinct valuesvars
- list of variables
@Deprecated public static Constraint atMostNValue(IntegerVariable[] vars, IntegerVariable nvalue)
vars
- list of variablesnvalue
- number of distinct values
public static Constraint complementSet(SetVariable x, SetVariable y)
x
- a set variabley
- the complement set variable
public static Constraint setInter(SetVariable sv1, SetVariable sv2, SetVariable inter)
sv1
- the first set variablesv2
- the second set variableinter
- the intersection of sv1 and sv2
public static Constraint setUnion(SetVariable sv1, SetVariable sv2, SetVariable union)
sv1
- the first set variablesv2
- the second set variableunion
- the union of sv1 and sv2
public static Constraint setUnion(SetVariable[] sv, SetVariable union)
sv
- array of set variablesunion
- the union of sv
public static Constraint eq(SetVariable sv1, SetVariable sv2)
sv1
- a set variablesv2
- a set variable
public static Constraint eqCard(SetVariable sv, IntegerVariable v)
sv
- a set variablev
- an integer variable
public static Constraint eqCard(SetVariable sv, int val)
sv
- a set variableval
- an integer
public static Constraint neqCard(SetVariable sv, IntegerVariable v)
sv
- a set variablev
- an integer variable
public static Constraint neqCard(SetVariable sv, int val)
sv
- a set variableval
- an integer
public static Constraint geqCard(SetVariable sv, IntegerVariable v)
public static Constraint geqCard(SetVariable sv, int val)
public static Constraint leqCard(SetVariable sv, IntegerVariable v)
public static Constraint leqCard(SetVariable sv, int val)
public static Constraint setDisjoint(SetVariable... sv)
sv
are disjoints from each other.
sv
- array of set variables
public static Constraint member(int val, SetVariable sv1)
val
- the obligatory valuesv1
- the set variable
public static Constraint member(SetVariable sv1, int val)
val
- the obligatory valuesv1
- the set variable
public static Constraint member(SetVariable sv1, IntegerVariable var)
sv1
- the set variablevar
- the integer variable whose value should be contained in the set
public static Constraint member(IntegerVariable var, SetVariable sv1)
sv1
- the set variablevar
- the integer variable whose value should be contained in the set
public static Constraint member(SetVariable sv, IntegerVariable... vars)
sv
- the set variablevars
- integer variables whose values should be contained in the set
public static Constraint notMember(int val, SetVariable sv1)
val
- the forbidden valuesv1
- the set variable
public static Constraint notMember(SetVariable sv1, int val)
val
- the forbidden valuesv1
- the set variable
public static Constraint notMember(SetVariable sv1, IntegerVariable var)
sv1
- the set variablevar
- the integer variable whose value should not be contained in the set
public static Constraint notMember(IntegerVariable var, SetVariable sv1)
sv1
- the set variablevar
- the integer variable whose value should not be contained in the set
public static Constraint inverseSet(IntegerVariable[] iv, SetVariable[] sv)
iv
- the integer variablessv
- the set variables
public static Constraint inverseSet(SetVariable[] xs, SetVariable[] ys)
xs
- an array of set variableys
- another array set variables
public static Constraint setLex(SetVariable x, SetVariable y)
x
- a set variabley
- a set variable
public static Constraint setValuePrecede(SetVariable[] sv, int s, int t)
sv
- set variabless
- first valuet
- second value
public static Constraint neq(SetVariable sv1, SetVariable sv2)
sv1
- first variablesv2
- second variable
public static Constraint isIncluded(SetVariable sv1, SetVariable sv2)
sv1
- variable that should be included (smaller)sv2
- variable that should include (bigger)
public static Constraint isNotIncluded(SetVariable sv1, SetVariable sv2)
sv1
- variable that should not be included (bigger)sv2
- variable that should not include (smaller)
public static Constraint regular(IntegerVariable[] vars, IAutomaton auto)
vars
- the variables of the constraintauto
- the DFA
public static Constraint regular(IntegerVariable[] vars, DFA auto)
vars
- the variables of the constraintauto
- the DFA
public static Constraint regular(IntegerVariable[] vars, String regexp)
vars
- the variables of the constraintregexp
- a regexp for the DFA
@Deprecated public static Constraint regular(DFA auto, IntegerVariable[] vars)
auto
- the DFAvars
- the variables of the constraint
@Deprecated public static Constraint regular(IAutomaton auto, IntegerVariable[] vars)
auto
- the DFAvars
- the variables of the constraint
@Deprecated public static Constraint regular(String regexp, IntegerVariable[] vars)
regexp
- a regexp for the DFAvars
- the variables of the constraint
public static Constraint regular(IntegerVariable[] vars, List<int[]> tuples)
vars
- variables of the constrainttuples
- : a list of int[] corresponding to the allowed tuples
public static Constraint regular(IntegerVariable[] vars, List<int[]> tuples, int[] min, int[] max)
vars
- : scope of the constrainttuples
- : a list of int[] corresponding to tuplemax
- : 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).
public static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, IAutomaton auto, int[][] costs)
costVar
- the cost variablevars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the automaton defining the regular languagecosts
- the assignment costs: costs[i][j] is the cost associated to the assignment of variable i to value j
public static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, IAutomaton auto, int[][][] costs)
costVar
- the cost variablevars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the automaton defining the regular languagecosts
- the assignment costs: costs[i][j][s] is the cost associated to the assignment of variable i to value j at state s
public static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, ICostAutomaton auto)
costVar
- the cost variablevars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the cost-automaton defining the regular language and the costs
public static Constraint costRegular(IntegerVariable costVar, IntegerVariable[] vars, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, Node source)
costVar
- the cost variablevars
- the sequence of variables the constraint must ensure it belongs to the regular languagegraph
- a layered directed multigraphsource
- the source node of the graph
@Deprecated public static Constraint costRegular(IntegerVariable[] vars, IntegerVariable costVar, IAutomaton auto, int[][][] costs)
costVar
- the cost variablevars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the automaton defining the regular languagecosts
- the assignment costs: costs[i][j][s] is the cost associated to the assignment of variable i to value j at state s
@Deprecated public static Constraint costRegular(IntegerVariable[] vars, IntegerVariable costVar, org.jgrapht.graph.DirectedMultigraph<Node,Arc> graph, Node source)
costVar
- the cost variablevars
- the sequence of variables the constraint must ensure it belongs to the regular languagegraph
- a layered directed multigraphsource
- the source node of the graph
public static Constraint knapsackProblem(IntegerVariable costVar, IntegerVariable weightVar, IntegerVariable[] vars, int[] costs, int[] weights)
costVar
- cost variableweightVar
- weight variablevars
- item variablescosts
- cost coefficientsweights
- weight coefficients
@Deprecated public static Constraint knapsackProblem(IntegerVariable[] vars, IntegerVariable costVar, IntegerVariable weightVar, int[] costs, int[] weights)
vars
- item variablescostVar
- cost variableweightVar
- weight variablecosts
- cost coefficientsweights
- weight coefficients
public static Constraint multiCostRegular(IntegerVariable[] costVars, IntegerVariable[] vars, IAutomaton auto, int[][][] costs)
costVars
- the cost variable vectorvars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the automaton defining the regular languagecosts
- 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
public static Constraint multiCostRegular(IntegerVariable[] costVars, IntegerVariable[] vars, IAutomaton auto, int[][][][] costs)
costVars
- the cost variable vectorvars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the automaton defining the regular languagecosts
- 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
public static Constraint multiCostRegular(IntegerVariable[] costVars, IntegerVariable[] vars, ICostAutomaton auto)
costVars
- the cost variable vectorvars
- the sequence of variables the constraint must ensure it belongs to the regular languageauto
- the automaton defining the regular language
public static Constraint softMultiCostRegular(IntegerVariable[] vars, IntegerVariable[] counters, IntegerVariable[] penaltyVars, IntegerVariable globalPenalty, IPenaltyFunction[] pfunction, IAutomaton auto, int[][][][] costs)
public static Constraint softMultiCostRegular(IntegerVariable[] vars, IntegerVariable[] counters, IntegerVariable[] penaltyVars, IntegerVariable globalPenalty, IPenaltyFunction[] pfunction, IAutomaton auto, int[][][][] costs, int... sumDimension)
public static Constraint tree(TreeParametersObject param)
public static Constraint equation(int val, IntegerVariable[] vars, int[] coeffs)
val
- : the value to reachvars
- : a table of variablescoeffs
- : a table of coefficients
public static Constraint equation(IntegerVariable z, IntegerVariable[] vars, int[] coeffs)
z
- : the result variablevars
- : a table of variablescoeffs
- : a table of coefficients
public static Constraint equation(String option, int val, IntegerVariable[] vars, int[] coeffs)
val
- : the value to reachvars
- : a table of variablescoeffs
- : a table of coefficients
public static Constraint equation(String option, IntegerVariable z, IntegerVariable[] vars, int[] coeffs)
option
- : the consistency level to achievez
- : the result variablevars
- : a table of variablescoeffs
- : a table of coefficients
@Deprecated public static Constraint equation(IntegerVariable[] vars, int[] coeffs, int val)
vars
- : a table of variablescoeffs
- : a table of coefficientsval
- : the value to reach
public static Constraint sameSign(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static Constraint oppositeSign(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static Constraint mod(IntegerVariable v0, IntegerVariable v1, int c)
@Deprecated public static Constraint reifiedIntConstraint(IntegerVariable binVar, Constraint cst)
@Deprecated public static Constraint reifiedIntConstraint(IntegerVariable binVar, Constraint cst, Constraint oppCst)
public static Constraint reifiedConstraint(IntegerVariable binVar, Constraint cst)
public static Constraint reifiedConstraint(IntegerVariable binVar, Constraint cst, Constraint oppCst)
public static Constraint clause(IntegerVariable[] positiveLiterals, IntegerVariable[] negativeLiterals)
positiveLiterals
- list of positive literalsnegativeLiterals
- list of negative lliterals
public static Constraint clause(String option, IntegerVariable[] positiveLiterals, IntegerVariable[] negativeLiterals)
option
- option of the constraintpositiveLiterals
- list of positive literalsnegativeLiterals
- list of negative lliterals
public static Constraint[] clauses(String option, ALogicTree tree)
tree
- a logoc treeoption
- option of the constraint
public static Constraint[] clauses(ALogicTree tree)
tree
- a logoc tree
public static Constraint or(IntegerVariable... literals)
literals
- list of boolean variables
public static Constraint reifiedOr(IntegerVariable binVar, IntegerVariable... literals)
binVar
- reified variableliterals
- list of boolean variables
public static Constraint and(IntegerVariable... literals)
literals
- list of boolean variables
public static Constraint reifiedAnd(IntegerVariable binVar, IntegerVariable... literals)
binVar
- reified variableliterals
- list of boolean variables
public static Constraint nand(IntegerVariable... literals)
literals
- list of boolean variables
public static Constraint reifiedNand(IntegerVariable binVar, IntegerVariable... literals)
binVar
- reified variableliterals
- list of boolean variables
public static Constraint nor(IntegerVariable... literals)
literals
- list of boolean variables
public static Constraint reifiedNor(IntegerVariable binVar, IntegerVariable... literals)
binVar
- reified variableliterals
- list of boolean variables
public static Constraint reifiedNot(IntegerVariable binVar, IntegerVariable lit)
binVar
- reified variablelit
- literal
public static Constraint xor(IntegerVariable lit1, IntegerVariable lit2)
lit1
- literallit2
- literal
public static Constraint reifiedXor(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
binVar
- reified variablelit1
- literallit2
- literal
public static Constraint xnor(IntegerVariable lit1, IntegerVariable lit2)
lit1
- literallit2
- literal
public static Constraint reifiedXnor(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
binVar
- reified variablelit1
- literallit2
- literal
public static Constraint reifiedLeftImp(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
binVar
- reified variablelit1
- literallit2
- literal
public static Constraint reifiedRightImp(IntegerVariable binVar, IntegerVariable lit1, IntegerVariable lit2)
binVar
- reified variablelit1
- literallit2
- literal
public static IntegerExpressionVariable mult(IntegerExpressionVariable t1, int a)
public static IntegerExpressionVariable mult(int a, IntegerExpressionVariable t1)
public static IntegerExpressionVariable mult(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable plus(IntegerExpressionVariable t1, IntegerExpressionVariable t2)
t1
- first termt2
- second term
public static IntegerExpressionVariable plus(IntegerExpressionVariable t, int c)
public static IntegerExpressionVariable plus(int c, IntegerExpressionVariable t)
public static IntegerExpressionVariable minus(IntegerExpressionVariable t1, IntegerExpressionVariable t2)
t1
- first termt2
- second term
public static IntegerExpressionVariable minus(IntegerExpressionVariable t, int c)
public static IntegerExpressionVariable minus(int c, IntegerExpressionVariable t)
public static IntegerExpressionVariable scalar(int[] lc, IntegerVariable[] lv)
lc
- the array of coefficientslv
- the array of variables
public static IntegerExpressionVariable scalar(IntegerVariable[] lv, int[] lc)
lv
- the array of variableslc
- the array of coefficients
public static IntegerExpressionVariable sum(IntegerExpressionVariable... lv)
lv
- the array of integer expressions
public static IntegerExpressionVariable abs(IntegerExpressionVariable n)
public static IntegerExpressionVariable div(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable div(IntegerExpressionVariable n1, int n2)
public static IntegerExpressionVariable div(int n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable max(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable max(int n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable max(IntegerExpressionVariable n1, int n2)
public static IntegerExpressionVariable max(IntegerExpressionVariable[] n1)
public static IntegerExpressionVariable min(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable min(int n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable min(IntegerExpressionVariable n1, int n2)
public static IntegerExpressionVariable min(IntegerExpressionVariable[] n1)
public static IntegerExpressionVariable mod(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable mod(int n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable mod(IntegerExpressionVariable n1, int n2)
public static IntegerExpressionVariable neg(IntegerExpressionVariable n)
public static IntegerExpressionVariable power(IntegerExpressionVariable n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable power(int n1, IntegerExpressionVariable n2)
public static IntegerExpressionVariable power(IntegerExpressionVariable n1, int n2)
public static IntegerExpressionVariable ifThenElse(Constraint n1, IntegerExpressionVariable n2, IntegerExpressionVariable n3)
public static RealExpressionVariable mult(double a, RealExpressionVariable x)
public static RealExpressionVariable mult(RealExpressionVariable x, double a)
public static RealExpressionVariable mult(RealExpressionVariable x, RealExpressionVariable y)
public static RealExpressionVariable plus(RealExpressionVariable t1, RealExpressionVariable t2)
public static RealExpressionVariable plus(RealExpressionVariable t, double c)
public static RealExpressionVariable plus(double c, RealExpressionVariable t)
public static RealExpressionVariable minus(RealExpressionVariable t1, RealExpressionVariable t2)
public static RealExpressionVariable minus(RealExpressionVariable t, double c)
public static RealExpressionVariable minus(double c, RealExpressionVariable t)
public static RealExpressionVariable power(RealExpressionVariable exp, int power)
exp
- the expression to xpower
- the second expression
public static RealExpressionVariable cos(RealExpressionVariable exp)
exp
- the real expression
public static RealExpressionVariable sin(RealExpressionVariable exp)
exp
- the real expression
public static Constraint and(Constraint... n)
public static Constraint ifOnlyIf(Constraint n1, Constraint n2)
public static Constraint ifThenElse(Constraint n1, Constraint n2, Constraint n3)
public static Constraint implies(Constraint n1, Constraint n2)
public static Constraint nand(Constraint... n)
public static Constraint not(Constraint n)
public static Constraint nor(Constraint... n)
public static Constraint or(Constraint... n)
protected static Constraint timeWindow(IntegerVariable var, int min, int max)
public static Constraint endsBetween(TaskVariable t, int min, int max)
t
- the taskmin
- the minimum ending timemax
- the maximum ending time
public static Constraint startsBetween(TaskVariable t, int min, int max)
t
- the taskmin
- the minimum starting timemax
- the maximum starting time
public static Constraint endsAt(TaskVariable t, int time)
t
- the task
public static Constraint startsAt(TaskVariable t, int time)
t
- the task
public static Constraint endsBefore(TaskVariable t, int max)
t
- the taskmax
- the maximum ending time
public static Constraint startsBefore(TaskVariable t, int max)
t
- the taskmax
- the maximum starting time
public static Constraint endsAfter(TaskVariable t, int min)
t
- the taskmin
- the minimum ending time
public static Constraint startsAfter(TaskVariable t, int min)
t
- the taskmin
- the minimum starting time
public static Constraint startsBeforeBegin(TaskVariable t1, TaskVariable t2, int delta)
t1
- the first taskt2
- the second taskdelta
- the delta
public static Constraint startsBeforeBegin(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint startsAfterBegin(TaskVariable t1, TaskVariable t2, int delta)
t1
- the first taskt2
- the second taskdelta
- the delta
public static Constraint startsAfterBegin(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint startsAfterEnd(TaskVariable t1, TaskVariable t2, int delta)
t1
- the starting taskt2
- the ending taskdelta
- the setup time between t1 and t2
public static Constraint startsAfterEnd(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint endsBeforeBegin(TaskVariable t1, TaskVariable t2, int delta)
t1
- the ending taskt2
- the starting taskdelta
- the setup between t1 and t2
public static Constraint endsBeforeBegin(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint startsBeforeEnd(TaskVariable t1, TaskVariable t2, int delta)
t1
- the first taskt2
- the second taskdelta
- the delta
public static Constraint startsBeforeEnd(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint endsAfterBegin(TaskVariable t1, TaskVariable t2, int delta)
t1
- the first taskt2
- the second taskdelta
- the delta
public static Constraint endsAfterBegin(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint endsBeforeEnd(TaskVariable t1, TaskVariable t2, int delta)
t1
- the first taskt2
- the second taskdelta
- the delta
public static Constraint endsBeforeEnd(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
public static Constraint endsAfterEnd(TaskVariable t1, TaskVariable t2, int delta)
t1
- the first taskt2
- the second taskdelta
- the delta
public static Constraint endsAfterEnd(TaskVariable t1, TaskVariable t2)
t1
- the first taskt2
- the second task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |