public class PropScalar extends PropSum
b, I, l, maxI, o, pos, sumLB, sumUB
constraint, model, priority, reactToFineEvt, vars
Constructor and Description |
---|
PropScalar(IntVar[] variables,
int[] coeffs,
int pos,
Operator o,
int b)
Create a scalar product: SUM(x_i*c_i) o b
Variables and coefficients are excepted to be ordered wrt to coefficients: first positive ones then negative ones.
|
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
|
protected void |
filterOnNeq()
Apply filtering when operator is NE
|
ESat |
isEntailed()
Check wether
this is entailed according to the current state of its internal structure. |
protected PropSum |
opposite() |
protected void |
prepare()
Prepare the propagation: compute sumLB, sumUB and I
|
String |
toString() |
check, computePriority, filter, getPropagationConditions, 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
public PropScalar(IntVar[] variables, int[] coeffs, int pos, Operator o, int b)
variables
- list of integer variablescoeffs
- list of coefficientspos
- position of the last positive coefficiento
- operatorb
- bound to respect.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 detectedprotected void filterOnNeq() throws ContradictionException
PropSum
filterOnNeq
in class PropSum
ContradictionException
- if contradiction is detectedpublic ESat isEntailed()
Propagator
this
is entailed according to the current state of its internal structure.
At least, should check the satisfaction of this
(when all is instantiated).isEntailed
in class PropSum
Copyright © 2018. All rights reserved.