Modifier and Type | Method and Description |
---|---|
int |
PropSat.makeLiteral(BoolVar expr,
boolean sign)
Creates, or returns if already existing, the literal corresponding to :
|
int |
PropSat.makeVar(BoolVar expr)
Creates, or returns if already existing, the literal corresponding to :
|
Modifier and Type | Method and Description |
---|---|
BoolVar[] |
Model.retrieveBoolVars()
Iterate over the variable of
this and build an array that contains the BoolVar only. |
Modifier and Type | Field and Description |
---|---|
protected BoolVar |
ReificationConstraint.bool |
protected BoolVar |
Constraint.boolReif
BoolVar that reifies this constraint, unique.
|
Modifier and Type | Method and Description |
---|---|
BoolVar |
Constraint.reify()
Get/make the boolean variable indicating whether the constraint is satisfied or not
This should not be posted.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
ISatFactory.addClauseFalse(BoolVar BOOLVAR)
Add a unit clause stating that BOOLVAR must be false
|
default boolean |
ISatFactory.addClauses(BoolVar[] POSLITS,
BoolVar[] NEGLITS)
Ensures that the clause defined by POSLITS and NEGLITS is satisfied.
|
default boolean |
ISatFactory.addClauses(BoolVar[] POSLITS,
BoolVar[] NEGLITS)
Ensures that the clause defined by POSLITS and NEGLITS is satisfied.
|
default boolean |
ISatFactory.addClausesAtMostNMinusOne(BoolVar[] BOOLVARS)
Add a clause stating that: ∑ BOOLVARSi ≤ n-1
|
default boolean |
ISatFactory.addClausesAtMostOne(BoolVar[] BOOLVARS)
Add a clause stating that: ∑ BOOLVARSi ≤ 1
|
default boolean |
ISatFactory.addClausesBoolAndArrayEqualFalse(BoolVar[] BOOLVARS)
Add a clause stating that: BOOLVARS1∧BOOLVARS2∧...∧BOOLVARSn
|
default boolean |
ISatFactory.addClausesBoolAndArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∧BOOLVARS2∧...∧BOOLVARSn) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolAndArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∧BOOLVARS2∧...∧BOOLVARSn) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolAndEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ∧ RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolEq(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT == RIGHT
|
default boolean |
ISatFactory.addClausesBoolIsEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT == RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolIsLeVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ≤ RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolIsLtVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT < RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolIsNeqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ≠ RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolLe(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT ≤ RIGHT
|
default boolean |
ISatFactory.addClausesBoolLt(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT < RIGHT
|
default boolean |
ISatFactory.addClausesBoolNot(BoolVar LEFT,
BoolVar RIGHT)
Add a clause stating that: LEFT != RIGHT
|
default boolean |
ISatFactory.addClausesBoolOrArrayEqualTrue(BoolVar[] BOOLVARS)
Add a clause stating that: BOOLVARS1∨BOOLVARS2∨...∨BOOLVARSn
|
default boolean |
ISatFactory.addClausesBoolOrArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∨BOOLVARS2∨...∨BOOLVARSn) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolOrArrayEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: (BOOLVARS1∨BOOLVARS2∨...∨BOOLVARSn) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolOrEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ∨ RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesBoolXorEqVar(BoolVar LEFT,
BoolVar RIGHT,
BoolVar TARGET)
Add a clause stating that: (LEFT ⊕ RIGHT) ⇔ TARGET
|
default boolean |
ISatFactory.addClausesMaxBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: max(BOOLVARSi) ≤ TARGET
|
default boolean |
ISatFactory.addClausesMaxBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: max(BOOLVARSi) ≤ TARGET
|
default boolean |
ISatFactory.addClausesSumBoolArrayGreaterEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≥ TARGET
|
default boolean |
ISatFactory.addClausesSumBoolArrayGreaterEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≥ TARGET
|
default boolean |
ISatFactory.addClausesSumBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≤ TARGET
|
default boolean |
ISatFactory.addClausesSumBoolArrayLessEqVar(BoolVar[] BOOLVARS,
BoolVar TARGET)
Add a clause stating that: sum(BOOLVARSi) ≤ TARGET
|
default boolean |
ISatFactory.addClauseTrue(BoolVar BOOLVAR)
Add a unit clause stating that BOOLVAR must be true
|
default Constraint |
IIntConstraintFactory.and(BoolVar... bools)
Creates an and constraint that is satisfied if all boolean variables in bools are true
|
default Constraint |
IIntConstraintFactory.bitsIntChanneling(BoolVar[] bits,
IntVar var)
Creates an channeling constraint between an integer variable and a set of bit variables.
|
default Constraint |
IIntConstraintFactory.boolsIntChanneling(BoolVar[] bVars,
IntVar var,
int offset)
Creates an channeling constraint between an integer variable and a set of boolean variables.
|
default Constraint |
IIntConstraintFactory.clausesIntChanneling(IntVar var,
BoolVar[] eVars,
BoolVar[] lVars)
Creates an channeling constraint between an integer variable and a set of clauses.
|
default Constraint |
IIntConstraintFactory.clausesIntChanneling(IntVar var,
BoolVar[] eVars,
BoolVar[] lVars)
Creates an channeling constraint between an integer variable and a set of clauses.
|
default void |
IReificationFactory.ifThen(BoolVar ifVar,
Constraint thenCstr)
Posts an implication constraint: ifVar => thenCstr
Also called half reification constraint
Ensures:
- ifVar = 1 => thenCstr is satisfied, - thenCstr is not satisfied => ifVar = 0 Example : - ifThen(b1, arithm(v1, "=", 2)); :
b1 is equal to 1 => v1 = 2, so v1 != 2 => b1 is equal to 0
But if b1 is equal to 0, nothing happens
BEWARE : it is automatically posted (it cannot be reified)
|
default void |
IReificationFactory.ifThenElse(BoolVar ifVar,
Constraint thenCstr,
Constraint elseCstr)
Posts an implication constraint: ifVar => thenCstr && not(ifVar) => elseCstr.
|
default Constraint |
IIntConstraintFactory.max(BoolVar max,
BoolVar[] vars)
Creates a maximum constraint.
|
default Constraint |
IIntConstraintFactory.max(BoolVar max,
BoolVar[] vars)
Creates a maximum constraint.
|
default Constraint |
IIntConstraintFactory.min(BoolVar min,
BoolVar[] vars)
Creates a minimum constraint.
|
default Constraint |
IIntConstraintFactory.min(BoolVar min,
BoolVar[] vars)
Creates a minimum constraint.
|
default Constraint |
IIntConstraintFactory.or(BoolVar... bools)
Creates an or constraint that is satisfied if at least one boolean variables in bools is true
|
default void |
IReificationFactory.reification(BoolVar var,
Constraint cstr)
Reify a constraint with a boolean variable:
var = 1 <=> cstr is satisfied,
Equivalent to ifOnlyIf
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.
|
default void |
IReificationFactory.reifyXeqC(IntVar X,
int C,
BoolVar B)
Posts one constraint that expresses : (x = c) ⇔ b.
|
default void |
IReificationFactory.reifyXeqY(IntVar X,
IntVar Y,
BoolVar B)
Posts one constraint that expresses : (x = y) ⇔ b.
|
default void |
IReificationFactory.reifyXgtC(IntVar X,
int C,
BoolVar B)
Posts one constraint that expresses : (x > c) ⇔ b.
|
default void |
IReificationFactory.reifyXinS(IntVar X,
IntIterableRangeSet S,
BoolVar B)
Posts one constraint that expresses : (X ∈ S) ⇔ B.
|
default void |
IReificationFactory.reifyXleY(IntVar X,
IntVar Y,
BoolVar B)
Posts one constraint that expresses : (x ≤ y) ⇔ b.
|
default void |
IReificationFactory.reifyXltC(IntVar X,
int C,
BoolVar B)
Posts one constraint that expresses : (x < c) ⇔ b.
|
default void |
IReificationFactory.reifyXltY(IntVar X,
IntVar Y,
BoolVar B)
Posts one constraint that expresses : (x < y) ⇔ b.
|
default void |
IReificationFactory.reifyXltYC(IntVar X,
IntVar Y,
int C,
BoolVar B)
Posts one constraint that expresses : (x < y + c) ⇔ b.
|
default void |
IReificationFactory.reifyXneC(IntVar X,
int C,
BoolVar B)
Posts one constraint that expresses : (x ≠ c) ⇔ b.
|
default void |
IReificationFactory.reifyXneY(IntVar X,
IntVar Y,
BoolVar B)
Posts one constraint that expresses : (x ≠ y) ⇔ b.
|
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 |
IIntConstraintFactory.sum(BoolVar[] vars,
String operator,
int sum)
Creates a sum constraint.
|
default Constraint |
IIntConstraintFactory.sum(BoolVar[] vars,
String operator,
IntVar sum)
Creates a sum constraint.
|
default Constraint |
IIntConstraintFactory.sum(BoolVar[] vars,
String operator,
IntVar sum,
int minCardForDecomp)
Creates a sum constraint.
|
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 | Field and Description |
---|---|
protected BoolVar[] |
LogOp.varsAsArray |
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 LogOp |
LogOp.reified(BoolVar b,
ILogical tree)
create a logical connection between ``b`` and ``tree``.
|
Constructor and Description |
---|
PropFalse(BoolVar zero) |
PropTrue(BoolVar one) |
Constructor and Description |
---|
PropBoolMax(BoolVar[] variables,
BoolVar maxVar) |
PropBoolMax(BoolVar[] variables,
BoolVar maxVar) |
PropBoolMin(BoolVar[] variables,
BoolVar minVar) |
PropBoolMin(BoolVar[] variables,
BoolVar minVar) |
Constructor and Description |
---|
PropSumBool(BoolVar[] variables,
int pos,
Operator o,
IntVar sum,
int b)
Creates a sum propagator: SUM(x_i) Op sum + b, where x_i are boolean variables.
|
PropSumBool(BoolVar[] variables,
int pos,
Operator o,
IntVar sum,
int b,
boolean reactOnFineEvent)
Creates a sum propagator: SUM(x_i) Op sum + b, where x_i are boolean variables.
|
PropSumBoolIncr(BoolVar[] variables,
int pos,
Operator o,
IntVar sum,
int b)
Creates a sum propagator: SUM(x_i) Op sum + b, where x_i are boolean variables, maintained incrementally.
|
PropSumFullBool(BoolVar[] variables,
int pos,
Operator o,
int b)
Creates a sum propagator: SUM(x_i) Op b, where x_i are boolean variables.
|
PropSumFullBool(BoolVar[] variables,
int pos,
Operator o,
int b,
boolean reactOnFineEvent)
Creates a sum propagator: SUM(x_i) Op b, where x_i are boolean variables.
|
PropSumFullBoolIncr(BoolVar[] variables,
int pos,
Operator o,
int b)
Creates a sum propagator: SUM(x_i) Op b, where x_i are boolean variables, maintained incrementally.
|
Modifier and Type | Method and Description |
---|---|
protected void |
RealPropagator.reify(BoolVar r) |
void |
RealConstraint.reifyWith(BoolVar bool)
Reifies the constraint with a boolean variable
If the reified boolean variable already exists, an additional (equality) constraint is automatically posted.
|
Constructor and Description |
---|
PropXeqCReif(IntVar x,
int c,
BoolVar r) |
PropXeqYReif(IntVar x,
IntVar y,
BoolVar r) |
PropXgtCReif(IntVar x,
int c,
BoolVar r) |
PropXinSReif(IntVar x,
IntIterableRangeSet set,
BoolVar r) |
PropXltCReif(IntVar x,
int c,
BoolVar r) |
PropXltYCReif(IntVar x,
IntVar y,
int c,
BoolVar r) |
PropXltYReif(IntVar x,
IntVar y,
BoolVar r) |
PropXneCReif(IntVar x,
int c,
BoolVar r) |
PropXneYReif(IntVar x,
IntVar y,
BoolVar r) |
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)
Explain the activation of a propagator involved in a reified constraint
|
default void |
IExplanationEngine.activePropagator(BoolVar var,
Propagator propagator)
Explain the activation of a propagator involved in a reified constraint
|
Modifier and Type | Field and Description |
---|---|
protected BoolVar |
LoExpression.me
Lazy creation of the underlying variable
|
Modifier and Type | Method and Description |
---|---|
BoolVar |
NaLoExpression.boolVar() |
abstract BoolVar |
LoExpression.boolVar() |
BoolVar |
BiLoExpression.boolVar() |
BoolVar |
UnLoExpression.boolVar() |
Modifier and Type | Method and Description |
---|---|
BoolVar |
ReExpression.boolVar() |
BoolVar |
BiReExpression.boolVar() |
BoolVar |
NaReExpression.boolVar() |
Modifier and Type | Method and Description |
---|---|
BoolVar |
Variable.asBoolVar() |
default BoolVar |
IViewFactory.boolNotView(BoolVar bool)
Creates a view over bool holding the logical negation of bool (ie, ¬BOOL).
|
default BoolVar |
BoolVar.boolVar() |
default BoolVar |
IVariableFactory.boolVar()
Create a boolean variable, i.e.
|
default BoolVar |
IVariableFactory.boolVar(boolean value)
Create a constant boolean variable equal to 1 if value is true and 0 otherwise
|
default BoolVar |
IVariableFactory.boolVar(String name)
Create a boolean variable
|
default BoolVar |
IVariableFactory.boolVar(String name,
boolean value)
Create a constant boolean variable equal to 1 if value is true and 0 otherwise
|
default BoolVar[] |
IVariableFactory.boolVarArray(int size)
Create an array of size boolean variables
|
default BoolVar[] |
IVariableFactory.boolVarArray(String name,
int size)
Create an array of size boolean variables
|
default BoolVar[][] |
IVariableFactory.boolVarMatrix(int dim1,
int dim2)
Create a dim1*dim2-sized matrix of boolean variables
|
default BoolVar[][] |
IVariableFactory.boolVarMatrix(String name,
int dim1,
int dim2)
Create a dim1*dim2-sized matrix of boolean variables
|
BoolVar |
BoolVar.not() |
default BoolVar[] |
IVariableFactory.toBoolVar(IntVar... ivars)
Converts ivars into an array of boolean variables
|
Modifier and Type | Method and Description |
---|---|
void |
BoolVar._setNot(BoolVar not) |
default BoolVar |
IViewFactory.boolNotView(BoolVar bool)
Creates 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 |
AbstractVariable.asBoolVar() |
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 | Class and Description |
---|---|
class |
BoolNotView
A view for boolean variable, that enforce not(b).
|
Modifier and Type | Method and Description |
---|---|
BoolVar |
BoolNotView.not() |
Modifier and Type | Method and Description |
---|---|
void |
BoolNotView._setNot(BoolVar not) |
Constructor and Description |
---|
BoolNotView(BoolVar var)
Create a not view based on var
|
Modifier and Type | Method and Description |
---|---|
static BoolVar[] |
ArrayUtils.append(BoolVar[]... toAppend)
Append two Arrays
|
static BoolVar[] |
ArrayUtils.concat(BoolVar[] array,
BoolVar... elements)
Append elements at the end of another array
|
Modifier and Type | Method and Description |
---|---|
static BoolVar[] |
ArrayUtils.append(BoolVar[]... toAppend)
Append two Arrays
|
static BoolVar[] |
ArrayUtils.concat(BoolVar[] array,
BoolVar... elements)
Append elements at the end of another array
|
static BoolVar[] |
ArrayUtils.concat(BoolVar[] array,
BoolVar... elements)
Append elements at the end of another array
|
Copyright © 2018. All rights reserved.