choco.real.constraint
Class MixedEqXY
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.real.constraint.AbstractBinRealIntConstraint
choco.real.constraint.MixedEqXY
- All Implemented Interfaces:
- Constraint, Entity, IntConstraint, IntVarEventListener, VarEventListener, Propagator, MixedConstraint, RealListener, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- PalmMixedEqXY
public class MixedEqXY
- extends AbstractBinRealIntConstraint
- implements MixedConstraint
Method Summary |
int |
assignIndices(AbstractCompositeConstraint root,
int i,
boolean dynamicAddition)
performs the global numbering (wrt root) of the variables contained in the subtree this, starting from i |
void |
awakeOnBounds(int varIdx)
|
void |
awakeOnInf(int idx)
Default propagation on improved lower bound: propagation on domain revision. |
void |
awakeOnInst(int varIdx)
Default propagation on instantiation: full constraint re-propagation. |
void |
awakeOnRem(int varIdx,
int val)
Default propagation on one value removal: propagation on domain revision. |
void |
awakeOnRemovals(int varIdx,
IntIterator deltaDomain)
|
void |
awakeOnSup(int idx)
Default propagation on improved upper bound: propagation on domain revision. |
java.lang.Object |
clone()
returns a copy of the constraint. |
boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
boolean |
isSatisfied()
Semantic:
Testing if the constraint is satisfied. |
void |
propagate()
Propagation:
Propagating the constraint until local consistency is reached. |
protected void |
updateIInf()
|
protected void |
updateISup()
|
protected void |
updateReal()
|
Methods inherited from class choco.AbstractConstraint |
addListener, awake, awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MixedEqXY
public MixedEqXY(RealVar v0,
IntDomainVar v1)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from interface:
Constraint
- returns a copy of the constraint. This copy is a new object, may be a recursive copy in case
of composite constraints. The original and the copy share the same variables & plugins
- Specified by:
clone
in interface Constraint
- Overrides:
clone
in class AbstractBinRealIntConstraint
- Returns:
-
- Throws:
java.lang.CloneNotSupportedException
assignIndices
public int assignIndices(AbstractCompositeConstraint root,
int i,
boolean dynamicAddition)
- Description copied from interface:
Propagator
- performs the global numbering (wrt root) of the variables contained in the subtree this, starting from i
- Specified by:
assignIndices
in interface Propagator
- Parameters:
root
- the overall root constraint, for which the variables are numberedi
- the index that will assigned to the first variable in the subtree this (originally 0)dynamicAddition
- whether the addition is undone automatically on backtracking
- Returns:
- the index of the last variable in the subtree
isConsistent
public boolean isConsistent()
- Description copied from interface:
Propagator
- tests if the constraint is consistent with respect to the current state of domains
- Specified by:
isConsistent
in interface Propagator
isSatisfied
public boolean isSatisfied()
- Description copied from interface:
Constraint
- Semantic:
Testing if the constraint is satisfied.
Note that all variables involved in the constraint must be
instantiated when this method is called.
- Specified by:
isSatisfied
in interface Constraint
propagate
public void propagate()
throws ContradictionException
- Description copied from interface:
Propagator
- Propagation:
Propagating the constraint until local consistency is reached.
- Specified by:
propagate
in interface Propagator
- Throws:
ContradictionException
awakeOnInf
public void awakeOnInf(int idx)
throws ContradictionException
- Description copied from interface:
IntVarEventListener
- Default propagation on improved lower bound: propagation on domain revision.
- Specified by:
awakeOnInf
in interface IntVarEventListener
- Specified by:
awakeOnInf
in interface RealListener
- Throws:
ContradictionException
awakeOnSup
public void awakeOnSup(int idx)
throws ContradictionException
- Description copied from interface:
IntVarEventListener
- Default propagation on improved upper bound: propagation on domain revision.
- Specified by:
awakeOnSup
in interface IntVarEventListener
- Specified by:
awakeOnSup
in interface RealListener
- Throws:
ContradictionException
awakeOnInst
public void awakeOnInst(int varIdx)
throws ContradictionException
- Description copied from interface:
IntVarEventListener
- Default propagation on instantiation: full constraint re-propagation.
- Specified by:
awakeOnInst
in interface IntVarEventListener
- Throws:
ContradictionException
awakeOnRem
public void awakeOnRem(int varIdx,
int val)
throws ContradictionException
- Description copied from interface:
IntVarEventListener
- Default propagation on one value removal: propagation on domain revision.
- Specified by:
awakeOnRem
in interface IntVarEventListener
- Throws:
ContradictionException
awakeOnRemovals
public void awakeOnRemovals(int varIdx,
IntIterator deltaDomain)
throws ContradictionException
- Specified by:
awakeOnRemovals
in interface IntConstraint
- Throws:
ContradictionException
awakeOnBounds
public void awakeOnBounds(int varIdx)
throws ContradictionException
- Specified by:
awakeOnBounds
in interface IntConstraint
- Throws:
ContradictionException
updateIInf
protected void updateIInf()
throws ContradictionException
- Throws:
ContradictionException
updateISup
protected void updateISup()
throws ContradictionException
- Throws:
ContradictionException
updateReal
protected void updateReal()
throws ContradictionException
- Throws:
ContradictionException