Uses of Interface
org.chocosolver.solver.variables.SetVar
-
-
Uses of SetVar in org.chocosolver.solver
Methods in org.chocosolver.solver that return SetVar Modifier and Type Method Description SetVar[]Model. retrieveSetVars()Iterate over the variable ofthisand build an array that contains theSetVaronly.Methods in org.chocosolver.solver with parameters of type SetVar Modifier and Type Method Description int[]Solution. getSetVal(SetVar s)Get the value of variable s in this solution.voidSolution. setSetVal(SetVar var, int[] val)Set the value of variable v in this solution -
Uses of SetVar in org.chocosolver.solver.constraints
Methods in org.chocosolver.solver.constraints with parameters of type SetVar Modifier and Type Method Description default ConstraintISetConstraintFactory. 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 setdefault ConstraintISetConstraintFactory. allDisjoint(SetVar... sets)Creates a constraint stating that the intersection of sets should be empty Note that there can be multiple empty setsdefault ConstraintISetConstraintFactory. allEqual(SetVar... sets)Creates a constraint stating that sets should be all equaldefault ConstraintISetConstraintFactory. 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 emptydefault ConstraintISetConstraintFactory. element(IntVar index, SetVar[] sets, int offset, SetVar set)Creates a constraint enabling to retrieve an element set in sets: sets[index-offset] = setdefault ConstraintISetConstraintFactory. element(IntVar index, SetVar[] sets, SetVar set)Creates a constraint enabling to retrieve an element set in sets: sets[index] = setdefault ConstraintISetConstraintFactory. intersection(SetVar[] sets, SetVar intersectionSet)Creates a constraint which ensures that the intersection of sets is equal to intersectionSetdefault ConstraintISetConstraintFactory. intersection(SetVar[] sets, SetVar intersectionSet, boolean boundConsistent)Creates a constraint which ensures that the intersection of sets is equal to intersectionSetdefault ConstraintISetConstraintFactory. 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 ConstraintISetConstraintFactory. 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} = maxElementValuedefault ConstraintISetConstraintFactory. max(SetVar set, IntVar maxElementValue, boolean notEmpty)Creates a constraint over the maximum element in a set: max{i | i in set} = maxElementValuedefault ConstraintISetConstraintFactory. member(int cst, SetVar set)Creates a member constraint stating that the constant cst is in setdefault ConstraintISetConstraintFactory. member(IntVar intVar, SetVar set)Creates a member constraint stating that the value of intVar is in setdefault ConstraintISetConstraintFactory. member(SetVar[] sets, SetVar set)Creates a member constraint stating that set belongs to setsdefault ConstraintISetConstraintFactory. 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} = minElementValuedefault ConstraintISetConstraintFactory. min(SetVar set, IntVar minElementValue, boolean notEmpty)Creates a constraint over the minimum element in a set: min{i | i in set} = minElementValuedefault ConstraintISetConstraintFactory. nbEmpty(SetVar[] sets, int nbEmpty)Creates a constraint counting the number of empty sets sets |{s in sets where |s|=0}| = nbEmptydefault ConstraintISetConstraintFactory. nbEmpty(SetVar[] sets, IntVar nbEmpty)Creates a constraint counting the number of empty sets sets |{s in sets where |s|=0}| = nbEmptydefault ConstraintISetConstraintFactory. notEmpty(SetVar set)Creates a constraint preventing set to be emptydefault ConstraintISetConstraintFactory. notMember(int cst, SetVar set)Creates a member constraint stating that the constant cst is not in setdefault ConstraintISetConstraintFactory. notMember(IntVar intVar, SetVar set)Creates a member constraint stating that the value of intVar is not in setdefault ConstraintISetConstraintFactory. offSet(SetVar set1, SetVar set2, int offset)Creates a constraint linking set1 and set2 with an index offset : x in set1 <=> x+offset in set2default ConstraintISetConstraintFactory. partition(SetVar[] sets, SetVar universe)Creates a constraint stating that partitions universe into sets: union(sets) = universe intersection(sets) = {}default ConstraintISetConstraintFactory. setBoolsChanneling(BoolVar[] bools, SetVar set)Creates a constraint channeling a set variable with boolean variables : i in set <=> bools[i] = TRUEdefault ConstraintISetConstraintFactory. setBoolsChanneling(BoolVar[] bools, SetVar set, int offset)Creates a constraint channeling a set variable with boolean variables : i in set <=> bools[i-offset] = TRUEdefault ConstraintISetConstraintFactory. setsIntsChanneling(SetVar[] sets, IntVar[] ints)Creates a constraint channeling set variables and integer variables : x in sets[y] <=> ints[x] = ydefault ConstraintISetConstraintFactory. 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] = ydefault ConstraintISetConstraintFactory. subsetEq(SetVar... sets)Creates a constraint establishing that sets[i] is a subset of sets[j] if idefault ConstraintISetConstraintFactory. sum(SetVar set, IntVar sum)Creates a constraint summing elements of set sum{i | i in set} = sumdefault ConstraintISetConstraintFactory. 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 ConstraintISetConstraintFactory. 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 ConstraintISetConstraintFactory. symmetric(SetVar... sets)Creates a constraint stating that sets are symmetric sets: x in sets[y] <=> y in sets[x]default ConstraintISetConstraintFactory. 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 ConstraintISetConstraintFactory. union(IntVar[] ints, SetVar union)Creates a constraint ensuring that union is exactly the union of values taken by ints,default ConstraintISetConstraintFactory. union(SetVar[] sets, SetVar unionSet)Creates a constraint which ensures that the union of sets is equal to unionSet -
Uses of SetVar in org.chocosolver.solver.constraints.set
Constructors in org.chocosolver.solver.constraints.set with parameters of type SetVar Constructor Description PropAllDiff(SetVar[] sets)Ensures that all sets are differentPropAllDisjoint(SetVar[] sets)Ensures that all non-empty sets are disjoint In order to forbid multiple empty set, use propagator PropAtMost1Empty in additionPropAllEqual(SetVar[] sets)Ensures that all sets are equalPropAtMost1Empty(SetVar[] sets)At most one set in the array sets can be emptyPropBoolChannel(SetVar setVar, BoolVar[] boolVars, int offSet)Channeling between a set variable and boolean variables i in setVar <=> boolVars[i-offSet] = TRUEPropCardinality(SetVar setVar, IntVar cardinality)Propagator ensuring that |setVar| = cardinalityPropElement(IntVar index, SetVar[] array, int offSet, SetVar set)Propagator for element constraint over sets states that array[index-offSet] = setPropIntBoundedMemberSet(SetVar setVar, IntVar intVar)Propagator for Member constraint val(intVar) is in setVarPropIntChannel(SetVar[] setsV, IntVar[] intsV, int offSet1, int offSet2)Channeling between set variables and integer variables x in sets[y-offSet1] <=> ints[x-offSet2] = yPropIntCstMemberSet(SetVar setVar, int cst)Propagator for Member constraint: cst is in setVarPropIntCstNotMemberSet(SetVar setVar, int cst)Propagator for Member constraint: cst is not in setVarPropIntEnumMemberSet(SetVar setVar, IntVar intVar)Propagator for Member constraint val(intVar) is in setVarPropIntersection(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]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} = maxPropMaxElement(SetVar setVar, IntVar max, boolean notEmpty)Retrieves the maximum element of the set MAX{i | i in setVar} = maxPropMinElement(SetVar setVar, int[] weights, int offSet, IntVar min, boolean notEmpty)Retrieves the minimum element induced by setVar MIN{weights[i-offSet] | i in setVar} = minPropMinElement(SetVar setVar, IntVar min, boolean notEmpty)Retrieves the minimum element of the set MIN(i | i in setVar) = minPropNbEmpty(SetVar[] sets, IntVar nbEmpty)Restricts the number of empty sets |{s in sets such that |s|=0}| = nbEmptyPropNotEmpty(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 set2PropSetIntValuesUnion(IntVar[] X, SetVar values)PropSubsetEq(SetVar X, SetVar Y)Ensures that X subseteq YPropSumOfElements(SetVar setVar, int[] weights, int offset, IntVar sum)Sums elements given by a set variable: if(weights !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 -
Uses of SetVar in org.chocosolver.solver.search.strategy
Methods in org.chocosolver.solver.search.strategy with parameters of type SetVar Modifier and Type Method Description static SetStrategySearch. setVarSearch(VariableSelector<SetVar> varS, SetValueSelector valS, boolean enforceFirst, SetVar... sets)Generic strategy to branch on set variablesstatic SetStrategySearch. setVarSearch(SetVar... sets)strategy to branch on sets by choosing the first unfixed variable and forcing its first unfixed valueMethod parameters in org.chocosolver.solver.search.strategy with type arguments of type SetVar Modifier and Type Method Description static SetStrategySearch. setVarSearch(VariableSelector<SetVar> varS, SetValueSelector valS, boolean enforceFirst, SetVar... sets)Generic strategy to branch on set variables -
Uses of SetVar in org.chocosolver.solver.search.strategy.assignments
Methods in org.chocosolver.solver.search.strategy.assignments that return types with arguments of type SetVar Modifier and Type Method Description static DecisionOperator<SetVar>DecisionOperatorFactory. makeSetForce()static DecisionOperator<SetVar>DecisionOperatorFactory. makeSetRemove() -
Uses of SetVar in org.chocosolver.solver.search.strategy.decision
Methods in org.chocosolver.solver.search.strategy.decision with parameters of type SetVar Modifier and Type Method Description SetDecisionDecisionMaker. makeSetDecision(SetVar var, DecisionOperator<SetVar> dop, int value)voidSetDecision. set(SetVar v, int value, DecisionOperator<SetVar> operator)Instantiate this decision with the parametersMethod parameters in org.chocosolver.solver.search.strategy.decision with type arguments of type SetVar Modifier and Type Method Description SetDecisionDecisionMaker. makeSetDecision(SetVar var, DecisionOperator<SetVar> dop, int value)voidSetDecision. set(SetVar v, int value, DecisionOperator<SetVar> operator)Instantiate this decision with the parameters -
Uses of SetVar in org.chocosolver.solver.search.strategy.selectors.values
Methods in org.chocosolver.solver.search.strategy.selectors.values with parameters of type SetVar Modifier and Type Method Description intSetDomainMin. selectValue(SetVar s)intSetValueSelector. selectValue(SetVar v)Value selection heuristic -
Uses of SetVar in org.chocosolver.solver.search.strategy.selectors.variables
Methods in org.chocosolver.solver.search.strategy.selectors.variables that return SetVar Modifier and Type Method Description SetVarMaxDelta. getVariable(SetVar[] variables)SetVarMinDelta. getVariable(SetVar[] variables)Methods in org.chocosolver.solver.search.strategy.selectors.variables with parameters of type SetVar Modifier and Type Method Description doubleMaxDelta. evaluate(SetVar variable)doubleMinDelta. evaluate(SetVar variable)SetVarMaxDelta. getVariable(SetVar[] variables)SetVarMinDelta. getVariable(SetVar[] variables) -
Uses of SetVar in org.chocosolver.solver.search.strategy.strategy
Fields in org.chocosolver.solver.search.strategy.strategy with type parameters of type SetVar Modifier and Type Field Description protected DecisionOperator<SetVar>SetStrategy. operatorA decision operatorprotected VariableSelector<SetVar>SetStrategy. varSelectorHow a variable is selectedMethods in org.chocosolver.solver.search.strategy.strategy that return types with arguments of type SetVar Modifier and Type Method Description Decision<SetVar>SetStrategy. computeDecision(SetVar s)Decision<SetVar>SetStrategy. getDecision()Methods in org.chocosolver.solver.search.strategy.strategy with parameters of type SetVar Modifier and Type Method Description Decision<SetVar>SetStrategy. computeDecision(SetVar s)Constructors in org.chocosolver.solver.search.strategy.strategy with parameters of type SetVar Constructor Description SetStrategy(SetVar[] scope, VariableSelector<SetVar> varS, SetValueSelector valS, boolean enforceFirst)Generic strategy to branch on set variablesConstructor parameters in org.chocosolver.solver.search.strategy.strategy with type arguments of type SetVar Constructor Description SetStrategy(SetVar[] scope, VariableSelector<SetVar> varS, SetValueSelector valS, boolean enforceFirst)Generic strategy to branch on set variables -
Uses of SetVar in org.chocosolver.solver.variables
Methods in org.chocosolver.solver.variables that return SetVar Modifier and Type Method Description SetVarVariable. asSetVar()default SetVarIVariableFactory. setVar(int... value)Creates a constant set variable, equal to valuedefault SetVarIVariableFactory. 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 2default SetVarIVariableFactory. setVar(String name, int... value)Creates a constant set variable, equal to valuedefault SetVarIVariableFactory. 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 2default 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] -
Uses of SetVar in org.chocosolver.solver.variables.impl
Classes in org.chocosolver.solver.variables.impl that implement SetVar Modifier and Type Class Description classSetVarImplSet variable to represent a set of integers, i.e. a value is a setMethods in org.chocosolver.solver.variables.impl that return SetVar Modifier and Type Method Description SetVarAbstractVariable. asSetVar()
-