|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropagationEngine
An interface for all implementations of propagation engines.
Field Summary | |
---|---|
static Logger |
LOGGER
|
Method Summary | |
---|---|
void |
addPropagationEngineListener(PropagationEngineListener listener)
Adds a new listener to some events occuring in the propagation engine. |
boolean |
checkCleanState()
checking that the propagation engine remains in a proper state |
void |
clear()
|
boolean |
containsPropagationListener(PropagationEngineListener listener)
Check wether this contains listener in its list of listeners |
void |
decPendingInitConstAwakeEvent()
Decrements the number of init constraint awake events. |
void |
desactivatePropagator(Propagator propagator)
Desactivate a constraint. |
void |
flushEvents()
Removes all pending events (used when interrupting a propagation because a contradiction has been raised) |
void |
freeze()
Freeze the current events contained in this . |
FailMeasure |
getFailMeasure()
Returns the fails counter, FailMeasure |
void |
incPendingInitConstAwakeEvent()
Increments the number of init constraint awake events. |
void |
loadSettings(Configuration configuration)
|
void |
postAddKer(SetVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of kernel addition event |
boolean |
postConstAwake(Propagator constraint,
boolean init)
Post a constraint event. |
void |
postEvent(Var v,
int basicEvt,
SConstraint constraint,
boolean forceAwake)
Generic method to post events. |
void |
postInstInt(IntDomainVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post instantiation event |
void |
postInstSet(SetVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post instantiation event |
void |
postRemEnv(SetVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of envelope removal event |
void |
postRemoveVal(IntDomainVar v,
int x,
SConstraint constraint,
boolean forceAwake)
Specific method to post removal event |
void |
postUpdateInf(IntDomainVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of lower bound event |
void |
postUpdateInf(RealVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of lower bound event |
void |
postUpdateSup(IntDomainVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of upper bound event |
void |
postUpdateSup(RealVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of upper bound event |
void |
propagateEvents()
Propagate one by one events registered |
void |
raiseContradiction(int cidx,
Var variable,
SConstraint cause)
Deprecated. |
void |
raiseContradiction(Object cause)
Raising a contradiction with a cause. |
void |
raiseContradiction(Object cause,
int move)
Raising a contradiction with a cause and a movement |
void |
registerPropagator(Propagator propagator)
Register a constraint. |
void |
removePropagationEngineListener(PropagationEngineListener listener)
Removes a old listener from the propagation engine |
void |
unfreeze()
Unfreeze the previously frozen events contained in this . |
Field Detail |
---|
static final Logger LOGGER
Method Detail |
---|
FailMeasure getFailMeasure()
void clear()
void loadSettings(Configuration configuration)
void raiseContradiction(Object cause) throws ContradictionException
cause
- contradiction cause
ContradictionException
void raiseContradiction(Object cause, int move) throws ContradictionException
cause
- contradiction causemove
- next move after throwing the contradiction
ContradictionException
@Deprecated void raiseContradiction(int cidx, Var variable, SConstraint cause) throws ContradictionException
cidx
- index of the constraint in the constraints networkvariable
- variable causing the contradictioncause
- constraint causing the contradiction
ContradictionException
void flushEvents()
boolean checkCleanState()
true
if the state is proper, false
otherwisevoid postEvent(Var v, int basicEvt, SConstraint constraint, boolean forceAwake)
v
- The modified variable.basicEvt
- integer specifying mdofication kind for the attachedconstraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postUpdateInf(IntDomainVar v, SConstraint constraint, boolean forceAwake)
v
- The modified integer variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postUpdateSup(IntDomainVar v, SConstraint constraint, boolean forceAwake)
v
- The modified integer variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postInstInt(IntDomainVar v, SConstraint constraint, boolean forceAwake)
v
- The modified integer variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postRemoveVal(IntDomainVar v, int x, SConstraint constraint, boolean forceAwake)
v
- The modified integer variable.x
- the value removedconstraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postUpdateInf(RealVar v, SConstraint constraint, boolean forceAwake)
v
- The modified real variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postUpdateSup(RealVar v, SConstraint constraint, boolean forceAwake)
v
- The modified real variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postRemEnv(SetVar v, SConstraint constraint, boolean forceAwake)
v
- The modified set variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postAddKer(SetVar v, SConstraint constraint, boolean forceAwake)
v
- The modified set variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventvoid postInstSet(SetVar v, SConstraint constraint, boolean forceAwake)
v
- The modified set variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventboolean postConstAwake(Propagator constraint, boolean init)
constraint
- constraint to callinit
- indicates wether this call should be a call to Propagator.awake()
(true
)
or to Propagator.Propagator()
(false
).
true
if the event has been added, false
if it was already presentvoid registerPropagator(Propagator propagator)
Solver
should be present in this
.
propagator
- element to declare to this
void desactivatePropagator(Propagator propagator)
propagator
- element to desactivatevoid propagateEvents() throws ContradictionException
ContradictionException
- if an event propagation creates a contradictionvoid decPendingInitConstAwakeEvent()
void incPendingInitConstAwakeEvent()
void freeze()
this
.
The behaviour of the engine is still the same, but those events won't be treated in next calls to propagateEvents()
void unfreeze()
this
. See freeze()
.
void addPropagationEngineListener(PropagationEngineListener listener)
listener
- a new listenervoid removePropagationEngineListener(PropagationEngineListener listener)
listener
- removal listenerboolean containsPropagationListener(PropagationEngineListener listener)
this
contains listener
in its list of listeners
listener
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |