|
|||||||||
| 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)
Default propagation on one value removal: propagation on domain revision. |
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)
Default propagation on variable revision: full constraint re-propagation. |
protected boolean |
propagateNewLowerBound(int mylb)
propagates the constraint sigma(ai Xi) + c <= 0 where mylb = sigma(ai inf(Xi)) + c note: this does not reach saturation (fix point), but returns a boolean indicating whether it infered new information or not. |
protected boolean |
propagateNewUpperBound(int myub)
propagates the constraint sigma(ai Xi) + c <= 0 where myub = sigma(ai sup(Xi)) + c note: this does not reach saturation (fix point), but returns a boolean indicating whether it infered new information or not. |
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
AbstractIntConstraint
awakeOnRem in interface IntVarEventListenerawakeOnRem in class IntLinCombContradictionException
public void awakeOnVar(int idx)
throws ContradictionException
AbstractConstraint
awakeOnVar in interface VarEventListenerawakeOnVar in interface PropagatorawakeOnVar in class IntLinCombContradictionException
public void awakeOnRemovals(int idx,
IntIterator it)
throws ContradictionException
AbstractIntConstraint
awakeOnRemovals in interface IntConstraintawakeOnRemovals in class AbstractIntConstraintContradictionException
public void awakeOnRestoreInf(int idx)
throws ContradictionException
PalmIntVarListeneridx
awakeOnRestoreInf in interface PalmIntVarListeneridx - Variable involved.
ContradictionException
public void awakeOnRestoreSup(int idx)
throws ContradictionException
PalmIntVarListeneridx
awakeOnRestoreSup in interface PalmIntVarListeneridx - Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx,
int val)
throws ContradictionException
PalmIntVarListeneridx
awakeOnRestoreVal in interface PalmIntVarListeneridx - Variable involved.
ContradictionException
public void awakeOnRestoreVal(int idx,
IntIterator it)
throws ContradictionException
PalmIntVarListeneridx
awakeOnRestoreVal in interface PalmIntVarListeneridx - Variable involved.
ContradictionExceptionpublic java.util.Set whyIsTrue()
PalmIntVarListener
whyIsTrue in interface PalmIntVarListenerpublic java.util.Set whyIsFalse()
PalmIntVarListener
whyIsFalse in interface PalmIntVarListener
public void updateDataStructuresOnConstraint(int idx,
int select,
int newValue,
int oldValue)
PalmVarListener
updateDataStructuresOnConstraint in interface PalmVarListeneridx - 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 PalmVarListeneridx - 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 IntLinCombContradictionException
protected boolean propagateNewUpperBound(int myub)
throws ContradictionException
IntLinComb
propagateNewUpperBound in class IntLinCombContradictionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||