Modifier and Type | Method and Description |
---|---|
SetVar[] |
Model.retrieveSetVars()
Iterate over the variable of
this and build an array that contains the SetVar only. |
Modifier and Type | Method and Description |
---|---|
int[] |
Solution.getSetVal(SetVar s)
Get the value of variable s in this solution.
|
void |
Solution.setSetVal(SetVar var,
int[] val)
Set the value of variable v in this solution
|
Modifier and Type | Method and Description |
---|---|
default Constraint |
ISetConstraintFactory.allDifferent(SetVar... sets)
Creates a constraint stating that sets should all be different (not necessarily disjoint)
Note that there cannot be more than one empty set
|
default Constraint |
ISetConstraintFactory.allDisjoint(SetVar... sets)
Creates a constraint stating that the intersection of sets should be empty
Note that there can be multiple empty sets
|
default Constraint |
ISetConstraintFactory.allEqual(SetVar... sets)
Creates a constraint stating that sets should be all equal
|
default Constraint |
ISetConstraintFactory.disjoint(SetVar set1,
SetVar set2)
Creates a constraint stating that the intersection of set1 and set2 should be empty
Note that they can be both empty
|
default Constraint |
ISetConstraintFactory.element(IntVar index,
SetVar[] sets,
int offset,
SetVar set)
Creates a constraint enabling to retrieve an element set in sets:
sets[index-offset] = set
|
default Constraint |
ISetConstraintFactory.element(IntVar index,
SetVar[] sets,
int offset,
SetVar set)
Creates a constraint enabling to retrieve an element set in sets:
sets[index-offset] = set
|
default Constraint |
ISetConstraintFactory.element(IntVar index,
SetVar[] sets,
SetVar set)
Creates a constraint enabling to retrieve an element set in sets:
sets[index] = set
|
default Constraint |
ISetConstraintFactory.element(IntVar index,
SetVar[] sets,
SetVar set)
Creates a constraint enabling to retrieve an element set in sets:
sets[index] = set
|
default Constraint |
ISetConstraintFactory.intersection(SetVar[] sets,
SetVar intersectionSet)
Creates a constraint which ensures that the intersection of sets is equal to intersectionSet
|
default Constraint |
ISetConstraintFactory.intersection(SetVar[] sets,
SetVar intersectionSet)
Creates a constraint which ensures that the intersection of sets is equal to intersectionSet
|
default Constraint |
ISetConstraintFactory.intersection(SetVar[] sets,
SetVar intersectionSet,
boolean boundConsistent)
Creates a constraint which ensures that the intersection of sets is equal to intersectionSet
|
default Constraint |
ISetConstraintFactory.intersection(SetVar[] sets,
SetVar intersectionSet,
boolean boundConsistent)
Creates a constraint which ensures that the intersection of sets is equal to intersectionSet
|
default Constraint |
ISetConstraintFactory.inverseSet(SetVar[] sets,
SetVar[] invSets,
int offset1,
int offset2)
Creates a constraint stating that :
x in sets[y-offset1] <=> y in invSets[x-offset2]
|
default Constraint |
ISetConstraintFactory.inverseSet(SetVar[] sets,
SetVar[] invSets,
int offset1,
int offset2)
Creates a constraint stating that :
x in sets[y-offset1] <=> y in invSets[x-offset2]
|
default Constraint |
ISetConstraintFactory.max(SetVar indices,
int[] weights,
int offset,
IntVar maxElementValue,
boolean notEmpty)
Creates a constraint over the maximum element induces by a set:
max{weights[i-offset] | i in indices} = maxElementValue
|
default Constraint |
ISetConstraintFactory.max(SetVar set,
IntVar maxElementValue,
boolean notEmpty)
Creates a constraint over the maximum element in a set:
max{i | i in set} = maxElementValue
|
default Constraint |
ISetConstraintFactory.member(int cst,
SetVar set)
Creates a member constraint stating that the constant cst is in set
|
default Constraint |
ISetConstraintFactory.member(IntVar intVar,
SetVar set)
Creates a member constraint stating that the value of intVar is in set
|
default Constraint |
ISetConstraintFactory.member(SetVar[] sets,
SetVar set)
Creates a member constraint stating that set belongs to sets
|
default Constraint |
ISetConstraintFactory.member(SetVar[] sets,
SetVar set)
Creates a member constraint stating that set belongs to sets
|
default Constraint |
ISetConstraintFactory.min(SetVar indices,
int[] weights,
int offset,
IntVar minElementValue,
boolean notEmpty)
Creates a constraint over the minimum element induces by a set:
min{weights[i-offset] | i in indices} = minElementValue
|
default Constraint |
ISetConstraintFactory.min(SetVar set,
IntVar minElementValue,
boolean notEmpty)
Creates a constraint over the minimum element in a set:
min{i | i in set} = minElementValue
|
default Constraint |
ISetConstraintFactory.nbEmpty(SetVar[] sets,
int nbEmpty)
Creates a constraint counting the number of empty sets sets
|{s in sets where |s|=0}| = nbEmpty
|
default Constraint |
ISetConstraintFactory.nbEmpty(SetVar[] sets,
IntVar nbEmpty)
Creates a constraint counting the number of empty sets sets
|{s in sets where |s|=0}| = nbEmpty
|
default Constraint |
ISetConstraintFactory.notEmpty(SetVar set)
Creates a constraint preventing set to be empty
|
default Constraint |
ISetConstraintFactory.notMember(int cst,
SetVar set)
Creates a member constraint stating that the constant cst is not in set
|
default Constraint |
ISetConstraintFactory.notMember(IntVar intVar,
SetVar set)
Creates a member constraint stating that the value of intVar is not in set
|
default Constraint |
ISetConstraintFactory.offSet(SetVar set1,
SetVar set2,
int offset)
Creates a constraint linking set1 and set2 with an index offset :
x in set1 <=> x+offset in set2
|
default Constraint |
ISetConstraintFactory.partition(SetVar[] sets,
SetVar universe)
Creates a constraint stating that partitions universe into sets:
union(sets) = universe
intersection(sets) = {}
|
default Constraint |
ISetConstraintFactory.partition(SetVar[] sets,
SetVar universe)
Creates a constraint stating that partitions universe into sets:
union(sets) = universe
intersection(sets) = {}
|
default Constraint |
ISetConstraintFactory.setBoolsChanneling(BoolVar[] bools,
SetVar set)
Creates a constraint channeling a set variable with boolean variables :
i in set <=> bools[i] = TRUE
|
default Constraint |
ISetConstraintFactory.setBoolsChanneling(BoolVar[] bools,
SetVar set,
int offset)
Creates a constraint channeling a set variable with boolean variables :
i in set <=> bools[i-offset] = TRUE
|
default Constraint |
ISetConstraintFactory.setsIntsChanneling(SetVar[] sets,
IntVar[] ints)
Creates a constraint channeling set variables and integer variables :
x in sets[y] <=> ints[x] = y
|
default Constraint |
ISetConstraintFactory.setsIntsChanneling(SetVar[] sets,
IntVar[] ints,
int offset1,
int offset2)
Creates a constraint channeling set variables and integer variables :
x in sets[y-offset1] <=> ints[x-offset2] = y
|
default Constraint |
ISetConstraintFactory.subsetEq(SetVar... sets)
Creates a constraint establishing that sets[i] is a subset of sets[j] if i |
default Constraint |
ISetConstraintFactory.sum(SetVar set,
IntVar sum)
Creates a constraint summing elements of set
sum{i | i in set} = sum
|
default Constraint |
ISetConstraintFactory.sumElements(SetVar indices,
int[] weights,
int offset,
IntVar sum)
Creates a constraint summing weights given by a set of indices:
sum{weights[i-offset] | i in indices} = sum
Also ensures that elements in indices belong to [offset, offset+weights.length-1]
|
default Constraint |
ISetConstraintFactory.sumElements(SetVar indices,
int[] weights,
IntVar sum)
Creates a constraint summing weights given by a set of indices:
sum{weights[i] | i in indices} = sum
Also ensures that elements in indices belong to [0, weights.length-1]
|
default Constraint |
ISetConstraintFactory.symmetric(SetVar... sets)
Creates a constraint stating that sets are symmetric sets:
x in sets[y] <=> y in sets[x]
|
default Constraint |
ISetConstraintFactory.symmetric(SetVar[] sets,
int offset)
Creates a constraint stating that sets are symmetric sets:
x in sets[y-offset] <=> y in sets[x-offset]
|
default Constraint |
ISetConstraintFactory.union(IntVar[] ints,
SetVar union)
Creates a constraint ensuring that union is exactly the union of values taken by ints,
|
default Constraint |
ISetConstraintFactory.union(SetVar[] sets,
SetVar unionSet)
Creates a constraint which ensures that the union of sets is equal to unionSet
|
default Constraint |
ISetConstraintFactory.union(SetVar[] sets,
SetVar unionSet)
Creates a constraint which ensures that the union of sets is equal to unionSet
|
Constructor and Description |
---|
PropAllDiff(SetVar[] sets)
Ensures that all sets are different
|
PropAllDisjoint(SetVar[] sets)
Ensures that all non-empty sets are disjoint
In order to forbid multiple empty set, use propagator PropAtMost1Empty in addition
|
PropAllEqual(SetVar[] sets)
Ensures that all sets are equal
|
PropAtMost1Empty(SetVar[] sets)
At most one set in the array sets can be empty
|
PropBoolChannel(SetVar setVar,
BoolVar[] boolVars,
int offSet)
Channeling between a set variable and boolean variables
i in setVar <=> boolVars[i-offSet] = TRUE
|
PropCardinality(SetVar setVar,
IntVar cardinality)
Propagator ensuring that |setVar| = cardinality
|
PropElement(IntVar index,
SetVar[] array,
int offSet,
SetVar set)
Propagator for element constraint over sets
states that array[index-offSet] = set
|
PropElement(IntVar index,
SetVar[] array,
int offSet,
SetVar set)
Propagator for element constraint over sets
states that array[index-offSet] = set
|
PropIntBoundedMemberSet(SetVar setVar,
IntVar intVar)
Propagator for Member constraint
val(intVar) is in setVar
|
PropIntChannel(SetVar[] setsV,
IntVar[] intsV,
int offSet1,
int offSet2)
Channeling between set variables and integer variables
x in sets[y-offSet1] <=> ints[x-offSet2] = y
|
PropIntCstMemberSet(SetVar setVar,
int cst)
Propagator for Member constraint: cst is in setVar
|
PropIntCstNotMemberSet(SetVar setVar,
int cst)
Propagator for Member constraint: cst is not in setVar
|
PropIntEnumMemberSet(SetVar setVar,
IntVar intVar)
Propagator for Member constraint
val(intVar) is in setVar
|
PropIntersection(SetVar[] sets,
SetVar intersection) |
PropIntersection(SetVar[] sets,
SetVar intersection) |
PropIntersectionFilterSets(SetVar[] sets,
SetVar intersection) |
PropIntersectionFilterSets(SetVar[] sets,
SetVar intersection) |
PropInverse(SetVar[] sets,
SetVar[] invsets,
int offSet1,
int offSet2)
Inverse set propagator
x in sets[y-offSet1] <=> y in inverses[x-offSet2]
|
PropInverse(SetVar[] sets,
SetVar[] invsets,
int offSet1,
int offSet2)
Inverse set propagator
x in sets[y-offSet1] <=> y in inverses[x-offSet2]
|
PropMaxElement(SetVar setVar,
int[] weights,
int offset,
IntVar max,
boolean notEmpty)
Retrieves the maximum element induced by set
MAX{weight[i-offset] | i in setVar} = max
|
PropMaxElement(SetVar setVar,
IntVar max,
boolean notEmpty)
Retrieves the maximum element of the set
MAX{i | i in setVar} = max
|
PropMinElement(SetVar setVar,
int[] weights,
int offSet,
IntVar min,
boolean notEmpty)
Retrieves the minimum element induced by setVar
MIN{weights[i-offSet] | i in setVar} = min
|
PropMinElement(SetVar setVar,
IntVar min,
boolean notEmpty)
Retrieves the minimum element of the set
MIN(i | i in setVar) = min
|
PropNbEmpty(SetVar[] sets,
IntVar nbEmpty)
Restricts the number of empty sets
|{s in sets such that |s|=0}| = nbEmpty
|
PropNotEmpty(SetVar set) |
PropNotMemberIntSet(IntVar iv,
SetVar sv) |
PropNotMemberSetInt(IntVar intVar,
SetVar setVar) |
PropOffSet(SetVar set1,
SetVar set2,
int offSet)
set2 is an offSet view of set1
x in set1 <=> x+offSet in set2
|
PropSetIntValuesUnion(IntVar[] X,
SetVar values) |
PropSubsetEq(SetVar X,
SetVar Y)
Ensures that X subseteq Y
|
PropSumOfElements(SetVar setVar,
int[] weights,
int offset,
IntVar sum)
Sums elements given by a set variable:
if(weights !=null){
SUM(weights[i-offset] | i in setVar) = sum
(also ensures indexes is a subset of [offset, offset+weights.length-1])
}else{
SUM(i | i in setVar) = sum
}
|
PropSymmetric(SetVar[] sets,
int offSet)
Propagator for symmetric sets
x in set[y-offSet] <=> y in set[x-offSet]
|
PropUnion(SetVar[] sets,
SetVar union)
The union of sets is equal to union
|
PropUnion(SetVar[] sets,
SetVar union)
The union of sets is equal to union
|
Modifier and Type | Method and Description |
---|---|
static SetStrategy |
Search.setVarSearch(SetVar... sets)
strategy to branch on sets by choosing the first unfixed variable and forcing its first unfixed value
|
static SetStrategy |
Search.setVarSearch(VariableSelector<SetVar> varS,
SetValueSelector valS,
boolean enforceFirst,
SetVar... sets)
Generic strategy to branch on set variables
|
Modifier and Type | Method and Description |
---|---|
static SetStrategy |
Search.setVarSearch(VariableSelector<SetVar> varS,
SetValueSelector valS,
boolean enforceFirst,
SetVar... sets)
Generic strategy to branch on set variables
|
Modifier and Type | Method and Description |
---|---|
static DecisionOperator<SetVar> |
DecisionOperatorFactory.makeSetForce() |
static DecisionOperator<SetVar> |
DecisionOperatorFactory.makeSetRemove() |
Modifier and Type | Method and Description |
---|---|
SetDecision |
DecisionMaker.makeSetDecision(SetVar var,
DecisionOperator<SetVar> dop,
int value)
|
void |
SetDecision.set(SetVar v,
int value,
DecisionOperator<SetVar> operator)
Instantiate this decision with the parameters
|
Modifier and Type | Method and Description |
---|---|
SetDecision |
DecisionMaker.makeSetDecision(SetVar var,
DecisionOperator<SetVar> dop,
int value)
|
void |
SetDecision.set(SetVar v,
int value,
DecisionOperator<SetVar> operator)
Instantiate this decision with the parameters
|
Modifier and Type | Method and Description |
---|---|
int |
SetDomainMin.selectValue(SetVar s) |
int |
SetValueSelector.selectValue(SetVar v)
Value selection heuristic
|
Modifier and Type | Method and Description |
---|---|
SetVar |
MaxDelta.getVariable(SetVar[] variables) |
SetVar |
MinDelta.getVariable(SetVar[] variables) |
Modifier and Type | Method and Description |
---|---|
double |
MaxDelta.evaluate(SetVar variable) |
double |
MinDelta.evaluate(SetVar variable) |
SetVar |
MaxDelta.getVariable(SetVar[] variables) |
SetVar |
MinDelta.getVariable(SetVar[] variables) |
Modifier and Type | Field and Description |
---|---|
protected DecisionOperator<SetVar> |
SetStrategy.operator
A decision operator
|
protected VariableSelector<SetVar> |
SetStrategy.varSelector
How a variable is selected
|
Modifier and Type | Method and Description |
---|---|
Decision<SetVar> |
SetStrategy.computeDecision(SetVar s) |
Decision<SetVar> |
SetStrategy.getDecision() |
Modifier and Type | Method and Description |
---|---|
Decision<SetVar> |
SetStrategy.computeDecision(SetVar s) |
Constructor and Description |
---|
SetStrategy(SetVar[] scope,
VariableSelector<SetVar> varS,
SetValueSelector valS,
boolean enforceFirst)
Generic strategy to branch on set variables
|
Constructor and Description |
---|
SetStrategy(SetVar[] scope,
VariableSelector<SetVar> varS,
SetValueSelector valS,
boolean enforceFirst)
Generic strategy to branch on set variables
|
Modifier and Type | Method and Description |
---|---|
SetVar |
Variable.asSetVar() |
default SetVar |
IVariableFactory.setVar(int... value)
Creates a constant set variable, equal to value
|
default SetVar |
IVariableFactory.setVar(int[] lb,
int[] ub)
Creates a set variable taking its domain in [lb, ub],
For instance [{0,3},{-2,0,2,3}] means the variable must include both 0 and 3 and can additionnaly include -2, and 2
|
default SetVar |
IVariableFactory.setVar(String name,
int... value)
Creates a constant set variable, equal to value
|
default SetVar |
IVariableFactory.setVar(String name,
int[] lb,
int[] ub)
Creates a set variable taking its domain in [lb, ub],
For instance [{0,3},{-2,0,2,3}] means the variable must include both 0 and 3 and can additionnaly include -2, and 2
|
default SetVar[] |
IVariableFactory.setVarArray(int size,
int[] lb,
int[] ub)
Creates an array of size set variables, taking their domain in [lb, ub]
|
default SetVar[] |
IVariableFactory.setVarArray(String name,
int size,
int[] lb,
int[] ub)
Creates an array of size set variables, taking their domain in [lb, ub]
|
default SetVar[][] |
IVariableFactory.setVarMatrix(int dim1,
int dim2,
int[] lb,
int[] ub)
Creates a matrix of dim1*dim2 set variables, taking their domain in [lb, ub]
|
default SetVar[][] |
IVariableFactory.setVarMatrix(String name,
int dim1,
int dim2,
int[] lb,
int[] ub)
Creates a matrix of dim1*dim2 set variables, taking their domain in [lb, ub]
|
Modifier and Type | Class and Description |
---|---|
class |
SetVarImpl
Set variable to represent a set of integers, i.e.
|
Modifier and Type | Method and Description |
---|---|
SetVar |
AbstractVariable.asSetVar() |
Copyright © 2018. All rights reserved.