public class PropSumFullBool extends PropSum
b, I, l, maxI, o, pos, sumLB, sumUB
constraint, model, priority, reactToFineEvt, vars
Modifier | Constructor and Description |
---|---|
|
PropSumFullBool(BoolVar[] variables,
int pos,
Operator o,
int b)
Creates a sum propagator: SUM(x_i) Op b, where x_i are boolean variables.
|
protected |
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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
filterOnEq()
Apply filtering when operator is EQ
|
protected void |
filterOnGeq()
Apply filtering when operator is GE
|
protected void |
filterOnLeq()
Apply filtering when operator is LE
|
int |
getPropagationConditions(int vIdx)
Returns the specific mask indicating the variable events on which this
Propagator object can react.A mask is a bitwise OR operations over IEventType this can react on. |
protected PropSum |
opposite() |
protected void |
prepare()
Prepare the propagation: compute sumLB, sumUB and I
|
String |
toString() |
check, computePriority, filter, filterOnNeq, isEntailed, nb, nop, propagate, why
addVariable, arity, compareTo, doFinePropagation, doFlush, doSchedule, doScheduleEvent, dynPriority, equals, fails, forcePropagate, forcePropagationOnBacktrack, getConstraint, getId, getModel, getNbVars, getPosition, getPriority, getVar, getVars, getVIndice, getVIndices, hashCode, isActive, isCompletelyInstantiated, isPassive, isReifiedAndSilent, isStateLess, linkVariables, propagate, reactToFineEvent, setActive, setPassive, setPosition, setReifiedSilent, setReifiedTrue, setVIndices, unlinkVariables, unschedule
protected PropSumFullBool(BoolVar[] variables, int pos, Operator o, int b, boolean reactOnFineEvent)
pos
:
those before pos
(included) are equal to 1,
the other ones are equal to -1.variables
- list of boolean variablespos
- position of the last positive (induced) coefficiento
- operatorb
- bound to respectreactOnFineEvent
- set to true to react on fine eventspublic PropSumFullBool(BoolVar[] variables, int pos, Operator o, int b)
pos
:
those before pos
(included) are equal to 1,
the other ones are equal to -1.variables
- list of boolean variablespos
- position of the last positive (induced) coefficiento
- operatorb
- bound to respectpublic int getPropagationConditions(int vIdx)
Propagator
Propagator
object can react.IEventType
this can react on.
For example, consider a propagator that can deduce filtering based on the lower bound of the integer variable X.
Then, for this variable, the mask should be equal to :
int mask = IntEventType.INCLOW.getMask() | IntEventType.INSTANTIATE.getMask();or, in a more convenient way:
int mask = IntEvtType.combine(IntEventType.INCLOW,IntEventType.INSTANTIATE);That indicates the following behavior:
IntEventType.VOID
which states
that this propagator should not be aware of modifications applied to the variable in position vIdx.getPropagationConditions
in class PropSum
vIdx
- index of the variable within the propagatorREMOVE
and/or INSTANTIATE
and/or DECUPP
and/or INCLOW
protected void prepare()
PropSum
protected void filterOnEq() throws ContradictionException
PropSum
filterOnEq
in class PropSum
ContradictionException
- if contradiction is detectedprotected void filterOnLeq() throws ContradictionException
PropSum
filterOnLeq
in class PropSum
ContradictionException
- if contradiction is detectedprotected void filterOnGeq() throws ContradictionException
PropSum
filterOnGeq
in class PropSum
ContradictionException
- if contradiction is detectedCopyright © 2018. All rights reserved.