Modifier and Type | Field and Description |
---|---|
Constraint |
Solver.FALSE
Two basic constraints TRUE and FALSE, cached to avoid multiple useless occurrences
|
Constraint |
Solver.TRUE
Two basic constraints TRUE and FALSE, cached to avoid multiple useless occurrences
|
Modifier and Type | Method and Description |
---|---|
Constraint[] |
Solver.getCstrs()
Returns the array of declared
Constraint objects defined in this Solver . |
Modifier and Type | Method and Description |
---|---|
void |
Solver.post(Constraint... cs)
Post constraints
cs permanently in the constraints network of this :
- add them to the data structure,
- set the fixed idx,
- checks for restrictions |
void |
Solver.post(Constraint c)
Post permanently a constraint
c in the constraints network of this :
- add it to the data structure,
- set the fixed idx,
- checks for restrictions |
void |
Solver.postTemp(Constraint c)
Post a constraint temporary, that is, it will be unposted upon backtrack.
|
void |
Solver.unpost(Constraint c)
Remove permanently the constraint
c from the constraint network. |
Modifier and Type | Class and Description |
---|---|
class |
Arithmetic
A constraint dedicated to arithmetic operations.
|
class |
ReificationConstraint
Implication constraint: boolean b => constraint c
Also known as half reification
|
Modifier and Type | Field and Description |
---|---|
protected Constraint |
Propagator.constraint |
Modifier and Type | Method and Description |
---|---|
static Constraint |
IntConstraintFactory.absolute(IntVar VAR1,
IntVar VAR2)
Enforces VAR1 = |VAR2|
|
static Constraint |
IntConstraintFactory.alldifferent_conditionnal(IntVar[] VARS,
Condition CONDITION)
Alldifferent holds on the subset of VARS which satisfies the given CONDITION
|
static Constraint |
IntConstraintFactory.alldifferent_conditionnal(IntVar[] VARS,
Condition CONDITION,
boolean AC)
Alldifferent holds on the subset of VARS which satisfies the given CONDITION
|
static Constraint |
IntConstraintFactory.alldifferent_except_0(IntVar[] VARS)
Variables in VARS must either be different or equal to 0
|
static Constraint |
IntConstraintFactory.alldifferent(IntVar[] VARS)
Ensures that all variables from VARS take a different value.
|
static Constraint |
IntConstraintFactory.alldifferent(IntVar[] VARS,
String CONSISTENCY)
Ensures that all variables from VARS take a different value.
|
static Constraint |
IntConstraintFactory.among(IntVar NVAR,
IntVar[] VARS,
int[] VALUES)
NVAR is the number of variables of the collection VARIABLES that take their value in VALUES.
|
static Constraint |
LogicalConstraintFactory.and(BoolVar... BOOLS)
Make a and constraint
|
static Constraint |
LogicalConstraintFactory.and(Constraint... CONS)
Make a and constraint
|
static Constraint |
IntConstraintFactory.arithm(IntVar VAR,
String OP,
int CSTE)
Ensures: VAR OP CSTE, where OP in {"=", "!
|
static Constraint |
IntConstraintFactory.arithm(IntVar VAR1,
String OP,
IntVar VAR2)
Ensures: VAR1 OP VAR2, where OP in {"=", "!
|
static Constraint |
IntConstraintFactory.arithm(IntVar VAR1,
String OP1,
IntVar VAR2,
String OP2,
int CSTE)
Ensures: VAR1 OP VAR2, where OP in {"=", "!
|
static Constraint |
IntConstraintFactory.atleast_nvalues(IntVar[] VARS,
IntVar NVALUES,
boolean AC)
Let N be the number of distinct values assigned to the variables of the VARS collection.
|
static Constraint |
IntConstraintFactory.atmost_nvalues(IntVar[] VARS,
IntVar NVALUES,
boolean STRONG)
Let N be the number of distinct values assigned to the variables of the VARS collection.
|
static Constraint[] |
IntConstraintFactory.bin_packing(IntVar[] ITEM_BIN,
int[] ITEM_SIZE,
IntVar[] BIN_LOAD,
int OFFSET)
Bin Packing formulation:
forall b in [0,BIN_LOAD.length-1],
BIN_LOAD[b]=sum(ITEM_SIZE[i] | i in [0,ITEM_SIZE.length-1], ITEM_BIN[i] = b+OFFSET
forall i in [0,ITEM_SIZE.length-1], ITEM_BIN is in [OFFSET,BIN_LOAD.length-1+OFFSET],
|
static Constraint |
IntConstraintFactory.bit_channeling(BoolVar[] BITS,
IntVar VAR)
Ensures that VAR = 20*BIT_1 + 21*BIT_2 + ... 2n-1*BIT_n.
|
static Constraint |
IntConstraintFactory.boolean_channeling(BoolVar[] BVARS,
IntVar VAR,
int OFFSET)
Maps the boolean assignments variables BVARS with the standard assignment variable VAR.
|
static Constraint |
IntConstraintFactory.circuit(IntVar[] VARS,
int OFFSET)
Creates a circuit constraint which ensures that
the elements of vars define a covering circuit
where VARS[i] = OFFSET+j means that j is the successor of i.
|
static Constraint |
IntConstraintFactory.circuit(IntVar[] VARS,
int OFFSET,
CircuitConf CONF)
Creates a circuit constraint which ensures that
the elements of vars define a covering circuit
where VARS[i] = OFFSET+j means that j is the successor of i.
|
static Constraint |
IntConstraintFactory.clause_channeling(IntVar VAR,
BoolVar[] EVARS,
BoolVar[] LVARS)
Link each value from the domain of VAR to two boolean variable:
one reifies the equality to the i^th value of the variable domain,
the other reifies the less-or-equality to the i^th value of the variable domain.
|
static Constraint |
IntConstraintFactory.cost_regular(IntVar[] VARS,
IntVar COST,
ICostAutomaton CAUTOMATON)
Ensures that the assignment of a sequence of variables is recognized by CAUTOMATON, a deterministic finite automaton,
and that the sum of the costs associated to each assignment is bounded by the cost variable.
|
static Constraint |
IntConstraintFactory.count(int VALUE,
IntVar[] VARS,
IntVar LIMIT)
Let N be the number of variables of the VARIABLES collection assigned to value VALUE;
Enforce condition N = LIMIT to hold.
|
static Constraint |
IntConstraintFactory.count(IntVar VALUE,
IntVar[] VARS,
IntVar LIMIT)
Let N be the number of variables of the VARIABLES collection assigned to value VALUE;
Enforce condition N = LIMIT to hold.
|
static Constraint |
IntConstraintFactory.cumulative(Task[] TASKS,
IntVar[] HEIGHTS,
IntVar CAPACITY)
Cumulative constraint: Enforces that at each point in time,
the cumulated height of the set of tasks that overlap that point
does not exceed a given limit.
|
static Constraint |
IntConstraintFactory.cumulative(Task[] TASKS,
IntVar[] HEIGHTS,
IntVar CAPACITY,
boolean INCREMENTAL)
Cumulative constraint: Enforces that at each point in time,
the cumulated height of the set of tasks that overlap that point
does not exceed a given limit.
|
static Constraint[] |
IntConstraintFactory.diffn(IntVar[] X,
IntVar[] Y,
IntVar[] WIDTH,
IntVar[] HEIGHT,
boolean USE_CUMUL)
Constrains each rectanglei, given by their origins Xi,Yi
and sizes WIDTHi,HEIGHTi, to be non-overlapping.
|
static Constraint |
IntConstraintFactory.distance(IntVar VAR1,
IntVar VAR2,
String OP,
int CSTE)
Ensures:
|VAR1-VAR2| OP CSTE where OP can take its value among {"=", ">", "<", "! |
static Constraint |
IntConstraintFactory.distance(IntVar VAR1,
IntVar VAR2,
String OP,
IntVar VAR3)
Ensures:
|VAR1-VAR2| OP VAR3 where OP can take its value among {"=", ">", "<"} |
static Constraint |
IntConstraintFactory.element(IntVar VALUE,
int[] TABLE,
IntVar INDEX)
Build ELEMENT constraint: VALUE = TABLE[INDEX]
|
static Constraint |
IntConstraintFactory.element(IntVar VALUE,
int[] TABLE,
IntVar INDEX,
int OFFSET,
String SORT)
Build ELEMENT constraint: VALUE = TABLE[INDEX-OFFSET]
|
static Constraint |
IntConstraintFactory.element(IntVar VALUE,
IntVar[] TABLE,
IntVar INDEX,
int OFFSET)
Build an ELEMENT constraint: VALUE = TABLE[INDEX-OFFSET] where TABLE is an array of variables.
|
static Constraint |
IntConstraintFactory.eucl_div(IntVar DIVIDEND,
IntVar DIVISOR,
IntVar RESULT)
Ensures DIVIDEND / DIVISOR = RESULT, rounding towards 0 -- Euclidean division
Also ensures DIVISOR !
|
static Constraint |
IntConstraintFactory.FALSE(Solver solver)
Ensures the FALSE constraint
|
Constraint |
Propagator.getConstraint() |
Constraint |
Constraint.getOpposite()
Get/make the opposite constraint of this
The default opposite constraint does not filter domains but fails if this constraint is satisfied
|
static Constraint |
IntConstraintFactory.global_cardinality(IntVar[] VARS,
int[] VALUES,
IntVar[] OCCURRENCES,
boolean CLOSED)
Global Cardinality constraint (GCC):
Each value VALUES[i] should be taken by exactly OCCURRENCES[i] variables of VARS.
|
static Constraint |
LogicalConstraintFactory.ifThen_reifiable(BoolVar BVAR,
Constraint CSTR)
Same as ifThen, but:
+ can be reified
- may be slower
|
static Constraint |
LogicalConstraintFactory.ifThen_reifiable(Constraint IF,
Constraint THEN)
Same as ifThen, but:
+ can be reified
- may be slower
|
static Constraint |
LogicalConstraintFactory.ifThenElse_reifiable(BoolVar BVAR,
Constraint THEN,
Constraint ELSE)
Same as ifThenElse, but:
+ can be reified
- may be slower
|
static Constraint |
LogicalConstraintFactory.ifThenElse_reifiable(Constraint IF,
Constraint THEN,
Constraint ELSE)
Same as ifThenElse, but:
+ can be reified
- may be slower
|
static Constraint |
IntConstraintFactory.inverse_channeling(IntVar[] VARS1,
IntVar[] VARS2,
int OFFSET1,
int OFFSET2)
Make an inverse channeling between VARS1 and VARS2:
VARS1[i-OFFSET2] = j <=> VARS2[j-OFFSET1] = i
Performs AC if domains are enumerated.
|
static Constraint |
IntConstraintFactory.knapsack(IntVar[] OCCURRENCES,
IntVar TOTAL_WEIGHT,
IntVar TOTAL_ENERGY,
int[] WEIGHT,
int[] ENERGY)
Ensures that :
- OCCURRENCES[i] * WEIGHT[i] ≤ TOTAL_WEIGHT - OCCURRENCES[i] * ENERGY[i] = TOTAL_ENERGY and maximizing the value of TOTAL_ENERGY. |
static Constraint |
IntConstraintFactory.lex_chain_less_eq(IntVar[]... VARS)
For each pair of consecutive vectors VARSi and VARSi+1 of the VARS collection
VARSi is lexicographically less or equal than than VARSi+1
|
static Constraint |
IntConstraintFactory.lex_chain_less(IntVar[]... VARS)
For each pair of consecutive vectors VARSi and VARSi+1 of the VARS collection
VARSi is lexicographically strictly less than than VARSi+1
|
static Constraint |
IntConstraintFactory.lex_less_eq(IntVar[] VARS1,
IntVar[] VARS2)
Ensures that VARS1 is lexicographically less or equal than VARS2.
|
static Constraint |
IntConstraintFactory.lex_less(IntVar[] VARS1,
IntVar[] VARS2)
Ensures that VARS1 is lexicographically strictly less than VARS2.
|
Constraint |
Constraint.makeOpposite()
Make the opposite constraint of this
BEWARE: this method should never be called by the user
but it can be overridden to provide better constraint negations
|
Constraint |
Arithmetic.makeOpposite() |
static Constraint |
IntConstraintFactory.maximum(BoolVar MAX,
BoolVar[] VARS)
MAX is the maximum value of the collection of boolean variables VARS
|
static Constraint |
IntConstraintFactory.maximum(IntVar MAX,
IntVar[] VARS)
MAX is the maximum value of the collection of domain variables VARS
|
static Constraint |
IntConstraintFactory.maximum(IntVar MAX,
IntVar VAR1,
IntVar VAR2)
Ensures: MAX = MAX(VAR1, VAR2)
(Bound Consistency)
|
static Constraint |
IntConstraintFactory.mddc(IntVar[] VARS,
MultivaluedDecisionDiagram MDD)
Create a constraint where solutions (tuples) are encoded by a multi-valued decision diagram.
|
static Constraint |
IntConstraintFactory.member(IntVar VAR,
int[] TABLE)
Ensures VAR takes its values in TABLE
|
static Constraint |
IntConstraintFactory.member(IntVar VAR,
int LB,
int UB)
Ensures VAR takes its values in [LB, UB]
|
static Constraint |
IntConstraintFactory.minimum(BoolVar MIN,
BoolVar[] VARS)
MIN is the minimum value of the collection of boolean variables VARS
|
static Constraint |
IntConstraintFactory.minimum(IntVar MIN,
IntVar[] VARS)
MIN is the minimum value of the collection of domain variables VARS
|
static Constraint |
IntConstraintFactory.minimum(IntVar MIN,
IntVar VAR1,
IntVar VAR2)
Ensures: VAR1 = MIN(VAR2, VAR3)
(Bound Consistency)
|
static Constraint |
IntConstraintFactory.mod(IntVar X,
IntVar Y,
IntVar Z)
Ensures X % Y = Z,
i.e. |
static Constraint |
IntConstraintFactory.multicost_regular(IntVar[] VARS,
IntVar[] CVARS,
ICostAutomaton CAUTOMATON)
Ensures that the assignment of a sequence of VARS is recognized by CAUTOMATON, a deterministic finite automaton,
and that the sum of the cost vector COSTS associated to each assignment is bounded by the variable vector CVARS.
|
static Constraint |
IntConstraintFactory.not_member(IntVar VAR,
int[] TABLE)
Ensures VAR does not take its values in TABLE
|
static Constraint |
IntConstraintFactory.not_member(IntVar VAR,
int LB,
int UB)
Ensures VAR does not take its values in [LB, UB]
|
static Constraint |
LogicalConstraintFactory.not(Constraint CONS)
Get the opposite of a constraint
Works for any constraint, but the associated performances might be weak
|
static Constraint[] |
IntConstraintFactory.nvalues(IntVar[] VARS,
IntVar NVALUES)
Let N be the number of distinct values assigned to the variables of the VARS collection.
|
static Constraint |
LogicalConstraintFactory.or(BoolVar... BOOLS)
Make an or constraint
|
static Constraint |
LogicalConstraintFactory.or(Constraint... CONS)
Make an or constraint
|
static Constraint[] |
IntConstraintFactory.path(IntVar[] VARS,
IntVar START,
IntVar END,
int OFFSET)
Creates a path constraint which ensures that
the elements of VARS define a covering path from START to END
where VARS[i] = OFFSET+j means that j is the successor of i.
|
static Constraint |
IntConstraintFactory.regular(IntVar[] VARS,
IAutomaton AUTOMATON)
Enforces the sequence of VARS to be a word
recognized by the deterministic finite automaton AUTOMATON.
|
static Constraint |
LogicalConstraintFactory.reification_reifiable(BoolVar BVAR,
Constraint CSTR)
Same as reification, but:
+ can be reified
- may be slower
|
static Constraint |
IntConstraintFactory.scalar(IntVar[] VARS,
int[] COEFFS,
IntVar SCALAR)
Enforces that ∑i in |VARS|COEFFSi * VARSi = SCALAR.
|
static Constraint |
IntConstraintFactory.scalar(IntVar[] VARS,
int[] COEFFS,
String OPERATOR,
IntVar SCALAR)
A scalar constraint which ensures that Sum(VARS[i]*COEFFS[i]) OPERATOR SCALAR
|
static Constraint |
IntConstraintFactory.sort(IntVar[] VARS,
IntVar[] SORTEDVARS)
Creates a sort constraint which ensures that the variables of SORTEDVARS correspond to the variables
of VARS according to a permutation.
|
static Constraint |
IntConstraintFactory.square(IntVar VAR1,
IntVar VAR2)
Enforces VAR1 = VAR2^2
|
static Constraint |
IntConstraintFactory.subcircuit(IntVar[] VARS,
int OFFSET,
IntVar SUBCIRCUIT_SIZE)
Creates a subcircuit constraint which ensures that
the elements of vars define a single circuit of subcircuitSize nodes where
VARS[i] = OFFSET+j means that j is the successor of i.
|
static Constraint[] |
IntConstraintFactory.subpath(IntVar[] VARS,
IntVar START,
IntVar END,
int OFFSET,
IntVar SIZE)
Creates a subpath constraint which ensures that
the elements of VARS define a path of SIZE vertices, leading from START to END
where VARS[i] = OFFSET+j means that j is the successor of i.
|
static Constraint |
IntConstraintFactory.sum(BoolVar[] VARS,
IntVar SUM)
Enforces that ∑i in |VARS|VARSi = SUM.
|
static Constraint |
IntConstraintFactory.sum(BoolVar[] VARS,
String OPERATOR,
IntVar SUM)
Enforces that ∑i in |VARS|VARSi OPERATOR SUM.
|
static Constraint |
IntConstraintFactory.sum(IntVar[] VARS,
IntVar SUM)
Enforces that ∑i in |VARS|VARSi = SUM.
|
static Constraint |
IntConstraintFactory.sum(IntVar[] VARS,
String OPERATOR,
IntVar SUM)
Enforces that ∑i in |VARS|VARSi OPERATOR SUM.
|
static Constraint |
IntConstraintFactory.table(IntVar[] VARS,
Tuples TUPLES,
String ALGORITHM)
Create a table constraint, with the specified algorithm defined ALGORITHM
- GAC2001: Arc Consistency version 2001 for tuples,
- GAC2001+: Arc Consistency version 2001 for allowed tuples, - GAC3rm: Arc Consistency version AC3 rm for tuples, - GAC3rm+ (default): Arc Consistency version 3rm for allowed tuples, - GACSTR+: Arc Consistency version STR for allowed tuples, - STR2+: Arc Consistency version STR2 for allowed tuples, - FC: Forward Checking. |
static Constraint |
IntConstraintFactory.table(IntVar VAR1,
IntVar VAR2,
Tuples TUPLES,
String ALGORITHM)
Create a table constraint over a couple of variables VAR1 and VAR2:
- AC2001: table constraint which applies the AC2001 algorithm, - AC3: table constraint which applies the AC3 algorithm, - AC3rm: table constraint which applies the AC3 rm algorithm, - AC3bit+rm (default): table constraint which applies the AC3 bit+rm algorithm, - FC: table constraint which applies forward checking algorithm. |
static Constraint |
IntConstraintFactory.times(IntVar X,
int Y,
IntVar Z)
Ensures: X * Y = Z
|
static Constraint |
IntConstraintFactory.times(IntVar X,
IntVar Y,
IntVar Z)
Ensures: X * Y = Z
|
static Constraint |
IntConstraintFactory.tree(IntVar[] SUCCS,
IntVar NBTREES,
int OFFSET)
Partition SUCCS variables into NBTREES (anti) arborescences
SUCCS[i] = OFFSET+j means that j is the successor of i.
|
static Constraint |
IntConstraintFactory.TRUE(Solver solver)
Ensures the TRUE constraint
|
static Constraint[] |
IntConstraintFactory.tsp(IntVar[] SUCCS,
IntVar COST,
int[][] COST_MATRIX)
A constraint for the Traveling Salesman Problem :
Enforces SUCCS to form a hamiltonian circuit of value COST
|
Modifier and Type | Method and Description |
---|---|
static Constraint |
LogicalConstraintFactory.and(Constraint... CONS)
Make a and constraint
|
void |
Propagator.defineIn(Constraint c)
Informs this propagator the (unique) constraint it filters.
|
static Constraint |
LogicalConstraintFactory.ifThen_reifiable(BoolVar BVAR,
Constraint CSTR)
Same as ifThen, but:
+ can be reified
- may be slower
|
static Constraint |
LogicalConstraintFactory.ifThen_reifiable(Constraint IF,
Constraint THEN)
Same as ifThen, but:
+ can be reified
- may be slower
|
static void |
LogicalConstraintFactory.ifThen(BoolVar BVAR,
Constraint CSTR)
Imply a constraint: BVAR => CSTR
Also called half reification constraint
Ensures:
- BVAR = 1 => CSTR is satisfied, - CSTR is not satisfied => BVAR = 0 Example : - ifThen(b1, arithm(v1, "=", 2)); :
b1 is equal to 1 => v1 = 2, so v1 ! |
static void |
LogicalConstraintFactory.ifThen(Constraint IF,
Constraint THEN)
Post a constraint ensuring that if IF is satisfied, then THEN is satisfied as well
BEWARE : it is automatically posted (it cannot be reified)
|
static Constraint |
LogicalConstraintFactory.ifThenElse_reifiable(BoolVar BVAR,
Constraint THEN,
Constraint ELSE)
Same as ifThenElse, but:
+ can be reified
- may be slower
|
static Constraint |
LogicalConstraintFactory.ifThenElse_reifiable(Constraint IF,
Constraint THEN,
Constraint ELSE)
Same as ifThenElse, but:
+ can be reified
- may be slower
|
static void |
LogicalConstraintFactory.ifThenElse(BoolVar BVAR,
Constraint THEN,
Constraint ELSE)
Implication constraint: BVAR => THEN && not(B) => ELSE.
|
static void |
LogicalConstraintFactory.ifThenElse(Constraint IF,
Constraint THEN,
Constraint ELSE)
Post a constraint ensuring that if IF is satisfied, then THEN is satisfied as well
Otherwise, ELSE must be satisfied
BEWARE : it is automatically posted (it cannot be reified)
|
static Constraint |
LogicalConstraintFactory.not(Constraint CONS)
Get the opposite of a constraint
Works for any constraint, but the associated performances might be weak
|
static Constraint |
LogicalConstraintFactory.or(Constraint... CONS)
Make an or constraint
|
static Constraint |
LogicalConstraintFactory.reification_reifiable(BoolVar BVAR,
Constraint CSTR)
Same as reification, but:
+ can be reified
- may be slower
|
static void |
LogicalConstraintFactory.reification(BoolVar BVAR,
Constraint CSTR)
Reify a constraint with a boolean variable: BVAR <=> CSTR
Ensures:
- BVAR = 1 <=> CSTR is satisfied, BEWARE : it is automatically posted (it cannot be reified) |
Constructor and Description |
---|
ReificationConstraint(BoolVar bVar,
Constraint consIfBoolTrue,
Constraint consIfBoolFalse) |
Modifier and Type | Class and Description |
---|---|
class |
DistanceXYC
Ensures:
|X-Y| OP C where OP can take its value among {=, >, <, =/=} |
Modifier and Type | Class and Description |
---|---|
class |
AllDifferent
Ensures that all variables from VARS take a different value.
|
Modifier and Type | Class and Description |
---|---|
class |
CostRegular
COST_REGULAR constraint
|
Modifier and Type | Class and Description |
---|---|
class |
SatConstraint
|
Modifier and Type | Class and Description |
---|---|
class |
Cumulative
Cumulative constraint
|
Modifier and Type | Class and Description |
---|---|
class |
GlobalCardinality
Global Cardinality constraint
|
Modifier and Type | Method and Description |
---|---|
static Constraint[] |
GlobalCardinality.reformulate(IntVar[] vars,
IntVar[] card,
Solver solver) |
Modifier and Type | Class and Description |
---|---|
class |
NogoodConstraint
Created by cprudhom on 21/01/15.
|
Modifier and Type | Class and Description |
---|---|
class |
Scalar
Bounds Consistency Techniques for Long Linear Constraint" W. |
Modifier and Type | Method and Description |
---|---|
static Constraint |
ScalarFactory.reduce(IntVar[] VARS,
int[] COEFFS,
String OPERATOR,
IntVar SCALAR) |
static Constraint |
ScalarFactory.reduce(IntVar[] VARS,
String OPERATOR,
IntVar SUM) |
Modifier and Type | Class and Description |
---|---|
class |
IntEqRealConstraint
Channeling constraint between integers and reals, to avoid views
|
class |
RealConstraint
A constraint on real variables, solved using IBEX.
|
Constructor and Description |
---|
PropConditionnal(Variable[] vars2observe,
Constraint[] condTrue,
Constraint[] condFalse) |
PropConditionnal(Variable[] vars2observe,
Constraint[] condTrue,
Constraint[] condFalse) |
PropOpposite(Constraint original,
Variable[] vars) |
PropReif(Variable[] allVars,
Constraint consIfBoolTrue,
Constraint consIfBoolFalse) |
Modifier and Type | Method and Description |
---|---|
static Constraint |
SetConstraintsFactory.all_different(SetVar[] SETS)
Sets in SETS are all different (not necessarily disjoint)
Note that there cannot be more than two empty sets
|
static Constraint |
SetConstraintsFactory.all_disjoint(SetVar[] SETS)
Sets in SETS are all disjoint
Note that there can be multiple empty sets
|
static Constraint |
SetConstraintsFactory.all_equal(SetVar[] SETS)
SETS are all equal
|
static Constraint |
SetConstraintsFactory.bool_channel(BoolVar[] BOOLEANS,
SetVar SET,
int OFFSET)
Channeling between a set variable SET and boolean variables BOOLEANS
i in SET <=> BOOLEANS[i-OFFSET] = TRUE
|
static Constraint |
SetConstraintsFactory.cardinality(SetVar SET,
IntVar CARD)
Cardinality constraint: |SET_VAR| = CARD
|
static Constraint |
SetConstraintsFactory.disjoint(SetVar SET_1,
SetVar SET_2)
SET_1 and SET_2 are disjoint, i.e. they cannot contain the same element.
|
static Constraint |
SetConstraintsFactory.element(IntVar INDEX,
SetVar[] SETS,
int OFFSET,
SetVar SET)
Element constraint over sets
states that SETS[INDEX-OFFSET] = SET
|
static Constraint |
SetConstraintsFactory.int_channel(SetVar[] SETS,
IntVar[] INTEGERS,
int OFFSET_1,
int OFFSET_2)
Channeling between set variables SETS and integer variables INTEGERS
x in SETS[y-OFFSET_1] <=> INTEGERS[x-OFFSET_2] = y
|
static Constraint |
SetConstraintsFactory.int_values_union(IntVar[] VARS,
SetVar VALUES)
Channeling constraint ensuring that
VALUES is exactly the set of values taken by VARS,
|
static Constraint |
SetConstraintsFactory.intersection(SetVar[] SETS,
SetVar INTERSECTION)
Constraint which ensures that the intersection of sets in SET_VAR is equal to the set SET_INTER
|
static Constraint |
SetConstraintsFactory.inverse_set(SetVar[] SETS,
SetVar[] INVERSE_SETS,
int OFFSET_1,
int OFFSET_2)
Inverse set constraint
x in SETS[y-OFFSET_1] <=> y in INVERSE_SETS[x-OFFSET_2]
|
static Constraint |
SetConstraintsFactory.max(SetVar INDEXES,
int[] WEIGHTS,
int OFFSET,
IntVar MAX_ELEMENT_VALUE,
boolean NOT_EMPTY)
Retrieves the maximum element MAX_ELEMENT_VALUE induced by INDEXES
max{WEIGHTS[i-OFFSET] | i in INDEXES} = MAX_ELEMENT_VALUE
|
static Constraint |
SetConstraintsFactory.max(SetVar SET,
IntVar MAX_ELEMENT_VALUE,
boolean NOT_EMPTY)
Retrieves the maximum element MAX_ELEMENT_VALUE of SET
max{i | i in set} = MAX_ELEMENT_VALUE
|
static Constraint |
SetConstraintsFactory.member(IntVar INTEGER,
SetVar SET)
Member constraint over an IntVar and a SetVar
states that INTEGER is included in SET
|
static Constraint |
SetConstraintsFactory.member(SetVar[] SETS,
SetVar SET)
Member constraint over sets
states that SET belongs to SETS
|
static Constraint |
SetConstraintsFactory.min(SetVar INDEXES,
int[] WEIGHTS,
int OFFSET,
IntVar MIN_ELEMENT_VALUE,
boolean NOT_EMPTY)
Retrieves the minimum element MIN_ELEMENT_VALUE induced by INDEXES
min{WEIGHTS[i-OFFSET] | i in INDEXES} = MIN_ELEMENT_VALUE
|
static Constraint |
SetConstraintsFactory.min(SetVar SET,
IntVar MIN_ELEMENT_VALUE,
boolean NOT_EMPTY)
Retrieves the minimum element MIN_ELEMENT_VALUE of SET:
min{i | i in SET} = MIN_ELEMENT_VALUE
|
static Constraint |
SetConstraintsFactory.nbEmpty(SetVar[] SETS,
IntVar NB_EMPTY_SETS)
Restricts the number of empty sets in SETS
|{s in SETS such that |s|=0}| = NB_EMPTY_SETS
|
static Constraint |
SetConstraintsFactory.not_member(IntVar INTEGER,
SetVar SET)
NotMember constraint over an IntVar and a SetVar
states that INTEGER is not included in SET
|
static Constraint |
SetConstraintsFactory.notEmpty(SetVar SET)
Prevents SET to be empty
|
static Constraint |
SetConstraintsFactory.offSet(SetVar SET_1,
SetVar SET_2,
int OFFSET)
links SET_1 and SET_2 with OFFSET
x in SET_1 <=> x+OFFSET in SET_2
|
static Constraint |
SetConstraintsFactory.partition(SetVar[] SETS,
SetVar UNIVERSE)
Partitions UNIVERSE into disjoint sets, SETS
|
static Constraint |
SetConstraintsFactory.subsetEq(SetVar[] SETS)
Constraint which ensures that i
|
static Constraint |
SetConstraintsFactory.sum(SetVar INDEXES,
int[] WEIGHTS,
int OFFSET,
IntVar SUM,
boolean NOT_EMPTY)
Sums weights given by a set of indexes INDEXES:
sum{WEIGHTS[i-OFFSET] | i in INDEXES} = SUM
|
static Constraint |
SetConstraintsFactory.sum(SetVar SET,
IntVar SUM,
boolean NOT_EMPTY)
Sums elements of a SET
sum{i | i in set} = SUM
|
static Constraint |
SetConstraintsFactory.symmetric(SetVar[] SETS,
int OFFSET)
Symmetric sets constraint
x in SETS[y-OFFSET] <=> y in SETS[x-OFFSET]
|
static Constraint |
SetConstraintsFactory.union(SetVar[] SETS,
SetVar UNION)
Constraint which ensures that the union of sets in SET_VARS is equal to the set SET_UNION
|
Modifier and Type | Class and Description |
---|---|
class |
DistanceXYZ
|X-Y| OP Z |
class |
Max
X = MAX(Y,Z)
|
class |
Min
X = MIN(Y,Z)
|
class |
Times
X*Y = Z
|
Modifier and Type | Class and Description |
---|---|
class |
Member
|
class |
NotMember
|
Modifier and Type | Method and Description |
---|---|
Constraint |
NotMember.makeOpposite() |
Constraint |
Member.makeOpposite() |
Constructor and Description |
---|
FailPerPropagator(Constraint[] constraints,
Solver solver) |
Modifier and Type | Field and Description |
---|---|
protected Constraint[] |
MeasuresRecorder.cstrs |
Copyright © 2015. All rights reserved.