|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.real.constraint.AbstractUnRealConstraint
choco.palm.real.constraints.AbstractPalmUnRealConstraint
choco.palm.real.constraints.AbstractPalmSplit
public abstract class AbstractPalmSplit
An abstract implementation of a split constraint used for search algorithm. It is specialized for left split or right split (that lower half of the current interval or upper half).
| Field Summary | |
|---|---|
protected RealInterval |
current
The propagated interval value (instantiated on creation on the specialized class). |
protected RealInterval |
previous
The previous value of the variable. |
| Fields inherited from class choco.real.constraint.AbstractUnRealConstraint |
|---|
cIdx0, v0 |
| Fields inherited from class choco.AbstractConstraint |
|---|
active, constAwakeEvent, hook, priority |
| Fields inherited from class choco.AbstractEntity |
|---|
problem |
| Constructor Summary | |
|---|---|
AbstractPalmSplit(RealVar var,
RealInterval interval)
Asbtract constructor: stores the variable, the previous value of this variable, and creates the PaLM plug-in. |
|
| Method Summary | |
|---|---|
void |
addListener(boolean dynamicAddition)
This function connects a constraint with its variables in several ways. |
void |
awake()
First propagation of the constraint. |
void |
awakeOnInf(int idx)
Awakes on lower bound (does nothing). |
void |
awakeOnRestoreInf(int idx)
On lower bound restoration, launches the generic propagation. |
void |
awakeOnRestoreSup(int idx)
On upper bound restoration, launches the generic propagation. |
void |
awakeOnSup(int idx)
Awakes on upper bound (does nothing). |
java.lang.Object |
clone()
returns a copy of the constraint. |
boolean |
isConsistent()
Checks if the constraint is satisfied. |
boolean |
isSatisfied()
Checks if the constraint is satisfied (should be called when completely instantiated). |
void |
propagate()
Generic propagation of the constraint. |
void |
takeIntoAccountStatusChange(int index)
Informs constraints that one of their children has a modified status (due to value restoration). |
java.lang.String |
toString()
Returns this constraint as string: the name of the variable and the affected value. |
| Methods inherited from class choco.palm.real.constraints.AbstractPalmUnRealConstraint |
|---|
updateDataStructuresOnConstraint, updateDataStructuresOnRestoreConstraint |
| Methods inherited from class choco.real.constraint.AbstractUnRealConstraint |
|---|
assignIndices, getConstraintIdx, getNbVars, getRealVar, getRealVarNb, getVar, isCompletelyInstantiated, setConstraintIndex, setVar |
| Methods inherited from class choco.AbstractConstraint |
|---|
awakeOnVar, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
| Methods inherited from class choco.AbstractEntity |
|---|
pretty |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface choco.palm.dbt.search.DecisionConstraint |
|---|
getBranch, negate |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
isActive, setActive, setPassive |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
isActive, setActive, setPassive |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
isActive, setActive, setPassive |
| Methods inherited from interface choco.prop.VarEventListener |
|---|
isActive, setActive, setPassive |
| Methods inherited from interface choco.real.constraint.RealConstraint |
|---|
getRealVar, getRealVarNb |
| Methods inherited from interface choco.real.constraint.RealListener |
|---|
getConstraintIdx, setConstraintIndex |
| Methods inherited from interface choco.real.constraint.RealListener |
|---|
getConstraintIdx, setConstraintIndex |
| Field Detail |
|---|
protected RealInterval previous
protected RealInterval current
| Constructor Detail |
|---|
public AbstractPalmSplit(RealVar var,
RealInterval interval)
| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Constraint
clone in interface Constraintclone in class AbstractConstraintjava.lang.CloneNotSupportedExceptionpublic void addListener(boolean dynamicAddition)
AbstractConstraint
addListener in interface VarEventListeneraddListener in class AbstractConstraintpublic java.lang.String toString()
toString in class java.lang.Object
public void awake()
throws ContradictionException
awake in interface Propagatorawake in class AbstractConstraintContradictionException
public void propagate()
throws ContradictionException
propagate in interface PropagatorContradictionException
public void awakeOnInf(int idx)
throws ContradictionException
awakeOnInf in interface RealListenerContradictionException
public void awakeOnSup(int idx)
throws ContradictionException
awakeOnSup in interface RealListenerContradictionException
public void awakeOnRestoreInf(int idx)
throws ContradictionException
awakeOnRestoreInf in interface PalmRealVarListeneridx - Variable involved.
ContradictionException
public void awakeOnRestoreSup(int idx)
throws ContradictionException
awakeOnRestoreSup in interface PalmRealVarListeneridx - Variable involved.
ContradictionExceptionpublic void takeIntoAccountStatusChange(int index)
PalmConstraint
takeIntoAccountStatusChange in interface PalmConstraintpublic boolean isSatisfied()
isSatisfied in interface Constraintpublic boolean isConsistent()
isConsistent in interface Propagator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||