public class PropSumFullBool extends PropSum
b, I, l, maxI, o, pos, sumLB, sumUBconstraint, 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. |
protected PropSum |
opposite() |
protected void |
prepare()
Prepare the propagation: compute sumLB, sumUB and I
|
String |
toString() |
check, computePriority, filter, filterOnNeq, isEntailed, nb, nop, propagate, whyaddVariable, arity, compareTo, dynPriority, equals, fails, forcePropagate, forcePropagationOnBacktrack, getConstraint, getId, getModel, getNbVars, getPriority, getVar, getVars, getVIndice, getVIndices, hashCode, isActive, isCompletelyInstantiated, isPassive, isReifiedAndSilent, isStateLess, linkVariables, propagate, reactToFineEvent, setActive, setPassive, setReifiedSilent, setReifiedTrue, setVIndices, unlinkVariablesprotected 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)
PropagatorPropagator 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 PropSumvIdx - index of the variable within the propagatorREMOVE and/or INSTANTIATE
and/or DECUPP and/or INCLOWprotected void prepare()
PropSumprotected void filterOnEq()
throws ContradictionException
PropSumfilterOnEq in class PropSumContradictionException - if contradiction is detectedprotected void filterOnLeq()
throws ContradictionException
PropSumfilterOnLeq in class PropSumContradictionException - if contradiction is detectedprotected void filterOnGeq()
throws ContradictionException
PropSumfilterOnGeq in class PropSumContradictionException - if contradiction is detectedCopyright © 2017. All rights reserved.