|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.integer.constraints.AbstractIntConstraint
choco.integer.constraints.AbstractLargeIntConstraint
choco.integer.constraints.IntLinComb
choco.palm.integer.constraints.PalmIntLinComb
public class PalmIntLinComb
Created by IntelliJ IDEA. User: rochart Date: Jan 13, 2004 Time: 7:58:45 AM To change this template use Options | File Templates.
Field Summary |
---|
Fields inherited from class choco.integer.constraints.IntLinComb |
---|
coeffs, cste, EQ, GEQ, nbPosVars, NEQ, op |
Fields inherited from class choco.integer.constraints.AbstractLargeIntConstraint |
---|
cIndices, vars |
Fields inherited from class choco.integer.constraints.AbstractIntConstraint |
---|
logger |
Fields inherited from class choco.AbstractConstraint |
---|
active, constAwakeEvent, hook, priority |
Fields inherited from class choco.AbstractEntity |
---|
problem |
Constructor Summary | |
---|---|
PalmIntLinComb(IntDomainVar[] vars,
int[] coeffs,
int nbPositive,
int c,
int linOperator)
|
Method Summary | |
---|---|
void |
awakeOnRem(int idx,
int x)
Propagation whenever a value is removed from the variable domain. |
void |
awakeOnRemovals(int idx,
IntIterator it)
The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally. |
void |
awakeOnRestoreInf(int idx)
Handles an inf bound restoration on the constraint idx |
void |
awakeOnRestoreSup(int idx)
Handles a sup bound restoration on the constraint idx |
void |
awakeOnRestoreVal(int idx,
int val)
Handles a val restoration on the constraint idx |
void |
awakeOnRestoreVal(int idx,
IntIterator it)
Handles a val restoration on the constraint idx |
void |
awakeOnVar(int idx)
Generic propagation when a variable is modified. |
protected boolean |
propagateNewLowerBound(int mylb)
Propagates the constraint sigma(ai Xi) + c <= 0 where mylb = sigma(ai inf(Xi)) + c. |
protected boolean |
propagateNewUpperBound(int myub)
Propagates the constraint sigma(ai Xi) + c <= 0 where myub = sigma(ai sup(Xi)) + c. |
void |
takeIntoAccountStatusChange(int index)
Informs constraints that one of their children has a modified status (due to value restoration). |
void |
updateDataStructuresOnConstraint(int idx,
int select,
int newValue,
int oldValue)
Method called when one of the variables is modified. |
void |
updateDataStructuresOnRestoreConstraint(int idx,
int select,
int newValue,
int oldValue)
Method called when one of the variables has a restored value. |
java.util.Set |
whyIsFalse()
When all variables are instantiated, explains why the wonstraint is false. |
java.util.Set |
whyIsTrue()
When all variables are instantiated, explains why the wonstraint is true. |
Methods inherited from class choco.integer.constraints.IntLinComb |
---|
awakeOnInf, awakeOnInst, awakeOnSup, clone, computeLowerBound, computeUpperBound, filter, filterOnImprovedLowerBound, filterOnImprovedUpperBound, hasConsistentLowerBound, hasConsistentUpperBound, init, isConsistent, isEntailed, isEquivalentTo, isSatisfied, opposite, pretty, propagate |
Methods inherited from class choco.integer.constraints.AbstractLargeIntConstraint |
---|
assignIndices, getConstraintIdx, getIntVar, getNbVars, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
Methods inherited from class choco.integer.constraints.AbstractIntConstraint |
---|
awakeOnBounds, getSelfIndex |
Methods inherited from class choco.AbstractConstraint |
---|
addListener, awake, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.palm.PalmVarListener |
---|
getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.integer.var.IntVarEventListener |
---|
awakeOnInf, awakeOnInst, awakeOnSup, getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.Propagator |
---|
assignIndices, awake, constAwake, delete, getEvent, getPlugIn, getPriority, isCompletelyInstantiated, isConsistent, isEntailed, propagate |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.Constraint |
---|
clone, getConstraintIdx, getNbVars, getVar, getVarIdxInOpposite, isEquivalentTo, isSatisfied, opposite, setConstraintIndex, setVar |
Methods inherited from interface choco.Entity |
---|
getProblem, pretty |
Methods inherited from interface choco.palm.PalmVarListener |
---|
getConstraintIdx, setConstraintIndex |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Constructor Detail |
---|
public PalmIntLinComb(IntDomainVar[] vars, int[] coeffs, int nbPositive, int c, int linOperator)
Method Detail |
---|
public void awakeOnRem(int idx, int x) throws ContradictionException
IntLinComb
awakeOnRem
in interface IntVarEventListener
awakeOnRem
in class IntLinComb
idx
- the index of the modified variablex
- the removed value
ContradictionException
- if a domain empties or a contradiction is
inferedpublic void awakeOnVar(int idx) throws ContradictionException
IntLinComb
awakeOnVar
in interface VarEventListener
awakeOnVar
in interface Propagator
awakeOnVar
in class IntLinComb
idx
- the index of the modified variable
ContradictionException
- if a domain empties or a contradiction is
inferedpublic void awakeOnRemovals(int idx, IntIterator it) throws ContradictionException
AbstractIntConstraint
awakeOnRemovals
in interface IntConstraint
awakeOnRemovals
in class AbstractIntConstraint
ContradictionException
public void awakeOnRestoreInf(int idx) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreInf
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreSup(int idx) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreSup
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx, int val) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreVal
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx, IntIterator it) throws ContradictionException
PalmIntVarListener
idx
awakeOnRestoreVal
in interface PalmIntVarListener
idx
- Variable involved.
ContradictionException
public java.util.Set whyIsTrue()
PalmIntVarListener
whyIsTrue
in interface PalmIntVarListener
public java.util.Set whyIsFalse()
PalmIntVarListener
whyIsFalse
in interface PalmIntVarListener
public void updateDataStructuresOnConstraint(int idx, int select, int newValue, int oldValue)
PalmVarListener
updateDataStructuresOnConstraint
in interface PalmVarListener
idx
- Index of the variable.select
- Type of modification (PalmIntVar.INF
, PalmIntVar.SUP
,
PalmIntVar.VAL
).newValue
- New value (or modified value).oldValue
- Old value (or 0 if this a value removal).public void updateDataStructuresOnRestoreConstraint(int idx, int select, int newValue, int oldValue)
PalmVarListener
updateDataStructuresOnRestoreConstraint
in interface PalmVarListener
idx
- Index of the variable.select
- Type of modification.newValue
- New value (or modified value).oldValue
- Old value (or 0 if this a value removal).public void takeIntoAccountStatusChange(int index)
PalmConstraint
takeIntoAccountStatusChange
in interface PalmConstraint
protected boolean propagateNewLowerBound(int mylb) throws ContradictionException
IntLinComb
propagateNewLowerBound
in class IntLinComb
mylb
- the computed lower bound
ContradictionException
- if a domain empties or a contradiction
is inferedprotected boolean propagateNewUpperBound(int myub) throws ContradictionException
IntLinComb
propagateNewUpperBound
in class IntLinComb
myub
- the computed upper bound
ContradictionException
- if a domain empties or a contradiction
is infered
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |