|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.cp.solver.propagation.AbstractPropagationEngine
public abstract class AbstractPropagationEngine
An abstract class for all implementations of propagation engines.
Field Summary | |
---|---|
protected FailMeasure |
failMeasure
|
protected int |
pelIdx
|
protected PropagationEngineListener[] |
propagationEngineListeners
List of all listeners of events occuring in this engine. |
protected ContradictionException |
reuseException
Storing the last contradiction (reusable). |
Solver |
solver
|
Fields inherited from interface choco.kernel.solver.propagation.PropagationEngine |
---|
LOGGER |
Constructor Summary | |
---|---|
AbstractPropagationEngine(Solver solver)
|
Method Summary | |
---|---|
void |
addPropagationEngineListener(PropagationEngineListener listener)
Adds a new listener to some events occuring in the propagation engine. |
void |
clear()
|
boolean |
containsPropagationListener(PropagationEngineListener listener)
Check wether this contains listener in its list of listeners |
FailMeasure |
getFailMeasure()
Returns the fails counter, FailMeasure |
Solver |
getSolver()
|
void |
postAddKer(SetVar v,
SConstraint constraint,
boolean forceAwake)
Specific method to post modification of kernel addition event |
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 |
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 |
removePropagationEngineListener(PropagationEngineListener listener)
Removes a old listener from the propagation engine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.kernel.solver.propagation.PropagationEngine |
---|
checkCleanState, decPendingInitConstAwakeEvent, desactivatePropagator, flushEvents, freeze, incPendingInitConstAwakeEvent, loadSettings, postConstAwake, postEvent, propagateEvents, registerPropagator, unfreeze |
Field Detail |
---|
public final Solver solver
protected final FailMeasure failMeasure
protected PropagationEngineListener[] propagationEngineListeners
protected int pelIdx
protected final ContradictionException reuseException
Constructor Detail |
---|
public AbstractPropagationEngine(Solver solver)
Method Detail |
---|
public final Solver getSolver()
public final FailMeasure getFailMeasure()
PropagationEngine
getFailMeasure
in interface PropagationEngine
public void clear()
clear
in interface PropagationEngine
public final void raiseContradiction(Object cause) throws ContradictionException
raiseContradiction
in interface PropagationEngine
cause
- contradiction cause
ContradictionException
public final void raiseContradiction(Object cause, int move) throws ContradictionException
raiseContradiction
in interface PropagationEngine
cause
- contradiction causemove
- next move after throwing the contradiction
ContradictionException
@Deprecated public final void raiseContradiction(int cidx, Var variable, SConstraint cause) throws ContradictionException
raiseContradiction
in interface PropagationEngine
cidx
- index of the constraint in the constraints networkvariable
- variable causing the contradictioncause
- constraint causing the contradiction
ContradictionException
public final void addPropagationEngineListener(PropagationEngineListener listener)
addPropagationEngineListener
in interface PropagationEngine
listener
- a new listenerpublic final void removePropagationEngineListener(PropagationEngineListener listener)
removePropagationEngineListener
in interface PropagationEngine
listener
- removal listenerpublic boolean containsPropagationListener(PropagationEngineListener listener)
this
contains listener
in its list of listeners
containsPropagationListener
in interface PropagationEngine
public final void postInstInt(IntDomainVar v, SConstraint constraint, boolean forceAwake)
postInstInt
in interface PropagationEngine
v
- The modified integer variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postUpdateInf(IntDomainVar v, SConstraint constraint, boolean forceAwake)
postUpdateInf
in interface PropagationEngine
v
- The modified integer variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postUpdateSup(IntDomainVar v, SConstraint constraint, boolean forceAwake)
postUpdateSup
in interface PropagationEngine
v
- The modified integer variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postRemoveVal(IntDomainVar v, int x, SConstraint constraint, boolean forceAwake)
postRemoveVal
in interface PropagationEngine
v
- The modified integer variable.x
- the value removedconstraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postUpdateInf(RealVar v, SConstraint constraint, boolean forceAwake)
postUpdateInf
in interface PropagationEngine
v
- The modified real variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postUpdateSup(RealVar v, SConstraint constraint, boolean forceAwake)
postUpdateSup
in interface PropagationEngine
v
- The modified real variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postRemEnv(SetVar v, SConstraint constraint, boolean forceAwake)
postRemEnv
in interface PropagationEngine
v
- The modified set variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postAddKer(SetVar v, SConstraint constraint, boolean forceAwake)
postAddKer
in interface PropagationEngine
v
- The modified set variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current eventpublic final void postInstSet(SetVar v, SConstraint constraint, boolean forceAwake)
postInstSet
in interface PropagationEngine
v
- The modified set variable.constraint
- constraint at the origin of the modificationforceAwake
- should the constraint be informed of the current event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |