Package | Description |
---|---|
org.chocosolver.solver |
A package devoted to Solver and resolution tools.
|
org.chocosolver.solver.constraints | |
org.chocosolver.solver.constraints.nary.channeling | |
org.chocosolver.solver.constraints.nary.cnf | |
org.chocosolver.solver.constraints.nary.min_max | |
org.chocosolver.solver.constraints.nary.sum | |
org.chocosolver.solver.constraints.set | |
org.chocosolver.solver.explanations | |
org.chocosolver.solver.variables | |
org.chocosolver.solver.variables.impl | |
org.chocosolver.solver.variables.observers | |
org.chocosolver.solver.variables.view | |
org.chocosolver.util |
A package devoted to non-backtrackable data structures.
|
Modifier and Type | Field and Description |
---|---|
BoolVar |
Solver.ONE
Two basic constants ZERO and ONE, cached to avoid multiple useless occurrences.
|
BoolVar |
Solver.ZERO
Two basic constants ZERO and ONE, cached to avoid multiple useless occurrences.
|
Modifier and Type | Method and Description |
---|---|
BoolVar[] |
Solver.retrieveBoolVars()
Iterate over the variable of
this and build an array that contains the BoolVar only. |
Modifier and Type | Method and Description |
---|---|
BoolVar |
Constraint.reif()
Get/make the boolean variable indicating whether the constraint is satisfied or not
|
Modifier and Type | Method and Description |
---|---|
static boolean |
SatFactory.addAtMostNMinusOne(BoolVar[] BOOLVARS)
Add a clause stating that: ∑ BOOLVARSi ≤ n-1
|
static boolean |
SatFactory.addAtMostOne(BoolVar[] BOOLVARS)
Add a clause stating that: ∑ BOOLVARSi ≤ 1
|
static boolean |
SatFactory.addBoolAndArrayEqualFalse(BoolVar[] BOOLVARS)
Add a clause stating that: BOOLVARS1∧BOOLVARS2∧...
|
static boolean |
SatFactory.addBoolAndArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∧BOOLVARS2∧...
|
static boolean |
SatFactory.addBoolAndArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∧BOOLVARS2∧...
|
static boolean |
SatFactory.addBoolAndEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ∧ RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addBoolEq(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT == RIGHT
|
static boolean |
SatFactory.addBoolIsEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT == RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addBoolIsLeVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ≤ RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addBoolIsLtVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT < RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addBoolIsNeqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ≠ RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addBoolLe(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT ≤ RIGHT
|
static boolean |
SatFactory.addBoolLt(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT < RIGHT
|
static boolean |
SatFactory.addBoolNot(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT !
|
static boolean |
SatFactory.addBoolOrArrayEqualTrue(BoolVar[] BOOLVARS)
Add a clause stating that: BOOLVARS1∨BOOLVARS2∨...
|
static boolean |
SatFactory.addBoolOrArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∨BOOLVARS2∨...
|
static boolean |
SatFactory.addBoolOrArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∨BOOLVARS2∨...
|
static boolean |
SatFactory.addBoolOrEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ∨ RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addBoolXorEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ⊕ RIGHT) ⇔ TARGET
|
static boolean |
SatFactory.addClauses(BoolVar[] POSLITS,
BoolVar[] NEGLITS)
Ensures that the clause defined by POSLITS and NEGLITS is satisfied.
|
static boolean |
SatFactory.addClauses(BoolVar[] POSLITS,
BoolVar[] NEGLITS)
Ensures that the clause defined by POSLITS and NEGLITS is satisfied.
|
static boolean |
SatFactory.addFalse(BoolVar BOOLVAR)
Add a unit clause stating that BOOLVAR must be false
|
static boolean |
SatFactory.addMaxBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: max(BOOLVARSi) ≤ TARGET
|
static boolean |
SatFactory.addMaxBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: max(BOOLVARSi) ≤ TARGET
|
static boolean |
SatFactory.addSumBoolArrayGreaterEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≥ TARGET
|
static boolean |
SatFactory.addSumBoolArrayGreaterEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≥ TARGET
|
static boolean |
SatFactory.addSumBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≤ TARGET
|
static boolean |
SatFactory.addSumBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≤ TARGET
|
static boolean |
SatFactory.addTrue(BoolVar BOOLVAR)
Add a unit clause stating that BOOLVAR must be true
|
static Constraint |
LogicalConstraintFactory.and(BoolVar... BOOLS)
Make a and constraint
|
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.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.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 |
LogicalConstraintFactory.ifThen_reifiable(BoolVar BVAR,
Constraint CSTR)
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 Constraint |
LogicalConstraintFactory.ifThenElse_reifiable(BoolVar BVAR,
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 Constraint |
IntConstraintFactory.maximum(BoolVar MAX,
BoolVar[] VARS)
MAX is the maximum value of the collection of boolean variables VARS
|
static Constraint |
IntConstraintFactory.maximum(BoolVar MAX,
BoolVar[] VARS)
MAX is the maximum value of the collection of boolean variables VARS
|
static Constraint |
IntConstraintFactory.minimum(BoolVar MIN,
BoolVar[] VARS)
MIN is the minimum value of the collection of boolean variables VARS
|
static Constraint |
IntConstraintFactory.minimum(BoolVar MIN,
BoolVar[] VARS)
MIN is the minimum value of the collection of boolean variables VARS
|
static Constraint |
LogicalConstraintFactory.or(BoolVar... BOOLS)
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) |
void |
Constraint.reifyWith(BoolVar bool)
Reifies the constraint with a boolean variable
If the reified boolean variable already exists, an additional (equality) constraint is automatically posted.
|
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.
|
Constructor and Description |
---|
ReificationConstraint(BoolVar bVar,
Constraint consIfBoolTrue,
Constraint consIfBoolFalse) |
Constructor and Description |
---|
PropBitChanneling(IntVar OCTET,
BoolVar[] BITS) |
PropClauseChanneling(IntVar iv,
BoolVar[] eb,
BoolVar[] lb) |
PropClauseChanneling(IntVar iv,
BoolVar[] eb,
BoolVar[] lb) |
PropEnumDomainChanneling(BoolVar[] bvars,
IntVar aVar,
int offSet) |
Modifier and Type | Method and Description |
---|---|
BoolVar[] |
LogOp.flattenBoolVar()
Extracts and returns the flatten array of BoolVar contained in
this . |
Modifier and Type | Method and Description |
---|---|
static void |
PropSat.declareVariable(PropSat sat,
BoolVar var) |
int |
PropSat.Literal(BoolVar expr) |
static LogOp |
LogOp.reified(BoolVar b,
ILogical tree)
create a logical connection between ``b`` and ``tree``.
|
Constructor and Description |
---|
PropClause(BoolVar bv)
Deprecated.
|
PropFalse(BoolVar zero) |
PropTrue(BoolVar one) |
Constructor and Description |
---|
PropBoolMax(BoolVar[] variables,
BoolVar maxVar) |
PropBoolMax(BoolVar[] variables,
BoolVar maxVar) |
PropBoolMin(BoolVar[] variables,
BoolVar maxVar) |
PropBoolMin(BoolVar[] variables,
BoolVar maxVar) |
Constructor and Description |
---|
PropBoolSumCoarse(BoolVar[] variables,
IntVar sum)
Constraint that state that the sum of boolean variables vars is equal to the integer variable sum
|
PropBoolSumIncremental(BoolVar[] variables,
IntVar sum)
Constraint that state that the sum of boolean variables vars is equal to the integer variable sum
Works in O(1) per instantiation event
|
Modifier and Type | Method and Description |
---|---|
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
|
Constructor and Description |
---|
PropBoolChannel(SetVar setVar,
BoolVar[] boolVars,
int offSet)
Channeling between a set variable and boolean variables
i in setVar <=> boolVars[i-offSet] = TRUE
|
Modifier and Type | Method and Description |
---|---|
void |
ExplanationEngine.activePropagator(BoolVar var,
Propagator propagator) |
Modifier and Type | Method and Description |
---|---|
static BoolVar |
VariableFactory.bool(String NAME,
Solver SOLVER)
Build a boolean variable, ie domain is [0,1]
|
static BoolVar[] |
VariableFactory.boolArray(String NAME,
int SIZE,
Solver SOLVER)
Build a boolean variable array, ie each variable's domain is [0,1]
|
static BoolVar[][] |
VariableFactory.boolMatrix(String NAME,
int DIM1,
int DIM2,
Solver SOLVER)
Build a DIM1*DIM2-sized boolean variable matrix
|
static BoolVar |
VariableFactory.eq(BoolVar VAR)
Create a kind of clone of VAR such that, the resulting view is defined on VAR.
|
BoolVar |
BoolVar.not() |
static BoolVar |
VariableFactory.not(BoolVar BOOL)
Create a view over BOOL holding the logical negation of BOOL (ie, ¬BOOL).
|
static BoolVar |
VariableFactory.one(Solver SOLVER)
Retrieve the specific one/true boolvar.
|
static BoolVar |
VariableFactory.zero(Solver SOLVER)
Retrieve the specific zero/false boolvar.
|
Modifier and Type | Method and Description |
---|---|
void |
BoolVar._setNot(BoolVar not) |
void |
FilteringMonitor.activePropagator(BoolVar var,
Propagator propagator)
Explain the activation of a propagator involved in a reified constraint
|
static BoolVar |
VariableFactory.eq(BoolVar VAR)
Create a kind of clone of VAR such that, the resulting view is defined on VAR.
|
static BoolVar |
VariableFactory.not(BoolVar BOOL)
Create a view over BOOL holding the logical negation of BOOL (ie, ¬BOOL).
|
Modifier and Type | Class and Description |
---|---|
class |
BoolVarImpl
|
class |
FixedBoolVarImpl
A constant view specific to boolean variable
Based on "Views and Iterators for Generic Constraint Implementations",
C.
|
Modifier and Type | Method and Description |
---|---|
BoolVar |
BoolVarImpl.duplicate() |
BoolVar |
FixedBoolVarImpl.not() |
BoolVar |
BoolVarImpl.not() |
Modifier and Type | Method and Description |
---|---|
void |
FixedBoolVarImpl._setNot(BoolVar not) |
void |
BoolVarImpl._setNot(BoolVar neg) |
Modifier and Type | Method and Description |
---|---|
void |
FilteringMonitorList.activePropagator(BoolVar var,
Propagator propagator) |
Modifier and Type | Class and Description |
---|---|
class |
BoolEqView
A specific view for equality on bool var
|
class |
BoolNotView
A view for boolean variable, that enforce not(b).
|
Modifier and Type | Field and Description |
---|---|
protected BoolVar |
BoolNotView.var |
protected BoolVar |
BoolEqView.var |
Modifier and Type | Method and Description |
---|---|
BoolVar |
BoolNotView.duplicate() |
BoolVar |
BoolEqView.duplicate() |
BoolVar |
BoolNotView.not() |
BoolVar |
BoolEqView.not() |
Modifier and Type | Method and Description |
---|---|
void |
BoolNotView._setNot(BoolVar not) |
void |
BoolEqView._setNot(BoolVar not) |
Constructor and Description |
---|
BoolEqView(BoolVar var,
Solver solver) |
BoolNotView(BoolVar var,
Solver solver) |
Modifier and Type | Method and Description |
---|---|
static BoolVar[] |
VariableUtilities.nonReundantVars(BoolVar[] v) |
Modifier and Type | Method and Description |
---|---|
static BoolVar[] |
VariableUtilities.nonReundantVars(BoolVar[] v) |
Copyright © 2015. All rights reserved.