|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
public abstract class Propagator
An interface for all implementations of listeners.
Field Summary | |
---|---|
protected IStateBool |
active
a field for storing whether the constraint is active or not |
protected ConstraintEvent |
constAwakeEvent
The constraint awake var attached to the constraint. |
protected int |
priority
The priority of the constraint. |
protected PropagationEngine |
propagationEngine
|
Constructor Summary | |
---|---|
protected |
Propagator()
|
protected |
Propagator(int priority)
|
Method Summary | |
---|---|
void |
activate(IEnvironment environment)
Activate a constraint. |
abstract void |
addListener(boolean dynamicAddition)
This function connects a constraint with its variables in several ways. |
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
constAwake(boolean isInitialPropagation)
Forces a propagation of the constraint. |
void |
fail()
raise a contradiction during propagation when the constraint can definitely not be satisfied given the current domains |
PropagationEvent |
getEvent()
Returns the constraint awake var associated with this constraint. |
int |
getFilteredEventMask(int idx)
|
int |
getPriority()
Propagation: Accessing the priority level of the queue handling the propagation of the constraint. |
boolean |
isActive()
Checks if the constraint is active (e.g. plays a role in the propagation phase). |
abstract boolean |
isCompletelyInstantiated()
Utility: Testing if all the variables involved in the constraint are instantiated. |
abstract boolean |
isConsistent()
tests if the constraint is consistent with respect to the current state of domains |
abstract Boolean |
isEntailed()
Checks whether the constraint is definitely satisfied, no matter what further restrictions occur to the domain of its variables. |
abstract void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
setActive()
Un-freezing a constraint (this is useful for mimicking dynamic constraint posts...). |
void |
setActiveSilently()
|
void |
setEntailed()
records that a constraint is now entailed (therefore it is now useless to propagate it again) |
void |
setPassive()
Freezing a constraint (this is useful for backtracking when mimicking dynamic constraint posts...). |
void |
setPropagationEngine(PropagationEngine propEng)
Define the propagation engine within the constraint. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PropagationEngine propagationEngine
protected IStateBool active
protected final ConstraintEvent constAwakeEvent
protected final int priority
Constructor Detail |
---|
protected Propagator()
protected Propagator(int priority)
Method Detail |
---|
public abstract void addListener(boolean dynamicAddition)
dynamicAddition
- public abstract boolean isCompletelyInstantiated()
public final void constAwake(boolean isInitialPropagation)
isInitialPropagation
- indicates if it is the initial propagation or notpublic void awake() throws ContradictionException
ContradictionException
- contradiction exceptionpublic abstract void propagate() throws ContradictionException
ContradictionException
- contradiction exceptionpublic final void activate(IEnvironment environment)
environment
- current environmentpublic final void setActive()
public final void setActiveSilently()
public final void setPassive()
public final boolean isActive()
public final void setEntailed()
public final int getPriority()
public final PropagationEvent getEvent()
public abstract Boolean isEntailed()
public abstract boolean isConsistent()
public int getFilteredEventMask(int idx)
public void setPropagationEngine(PropagationEngine propEng)
ContradictionException
.
propEng
- the current propagation enginepublic void fail() throws ContradictionException
ContradictionException
- contradiction exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |