public class SevenQueuesPropagatorEngine extends Object implements IPropagationEngine
onVariableUpdate, it stores the event generated and schedules the propagator in
one of the 7 queues wrt to its priority for future revision.
IPropagationEngine.Trace| Constructor and Description |
|---|
SevenQueuesPropagatorEngine(Model model)
A seven-queue propagation engine.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear internal structures
|
void |
delayedPropagation(Propagator propagator,
PropagatorEventType type)
Exeucte a delayed propagator
|
void |
desactivatePropagator(Propagator propagator)
Set the propagator as inactivated within the propagation engine
|
void |
dynamicAddition(boolean permanent,
Propagator... ps)
Add a constraint to the propagation engine
|
void |
dynamicDeletion(Propagator... ps)
Delete the list of propagators in input from the engine
|
void |
flush()
Flush
this, ie. remove every pending events |
void |
initialize()
Build up internal structure, if not yet done, in order to allow propagation.
|
boolean |
isInitialized()
Is the engine initialized?
|
void |
onPropagatorExecution(Propagator propagator)
Action to do when a propagator is executed
|
void |
onVariableUpdate(Variable variable,
IEventType type,
ICause cause)
Take into account the modification of a variable
|
void |
propagate()
Launch the proapagation, ie, active propagators if necessary, then reach a fix point
|
void |
propagateOnBacktrack(Propagator p)
State that the propagator needs to be propagated (coarse event) on backtrack.
|
void |
updateInvolvedVariables(Propagator p)
Update the scope of variable of a propagator (addition or deletion are allowed -- p.vars are scanned)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfails, getContradictionExceptionpublic SevenQueuesPropagatorEngine(Model model)
model - the declaring modelpublic void initialize()
throws SolverException
IPropagationEngineinitialize in interface IPropagationEngineSolverException - if a constraint is declared more than once in this propagation enginepublic boolean isInitialized()
IPropagationEngineisInitialized in interface IPropagationEnginepublic void propagate()
throws ContradictionException
IPropagationEnginepropagate in interface IPropagationEngineContradictionException - if a contradiction occurrspublic void flush()
IPropagationEnginethis, ie. remove every pending eventsflush in interface IPropagationEnginepublic void onVariableUpdate(Variable variable, IEventType type, ICause cause)
IPropagationEngineonVariableUpdate in interface IPropagationEnginevariable - modified variabletype - type of modification eventcause - origin of the modificationpublic void delayedPropagation(Propagator propagator, PropagatorEventType type) throws ContradictionException
IPropagationEnginedelayedPropagation in interface IPropagationEnginepropagator - propagator to executetype - type of event to executeContradictionException - if a failure is encounteredpublic void onPropagatorExecution(Propagator propagator)
IPropagationEngineonPropagatorExecution in interface IPropagationEnginepropagator - propagator to executepublic void desactivatePropagator(Propagator propagator)
IPropagationEnginedesactivatePropagator in interface IPropagationEnginepropagator - propagator to desactivatepublic void clear()
IPropagationEngineclear in interface IPropagationEnginepublic void dynamicAddition(boolean permanent,
Propagator... ps)
throws SolverException
IPropagationEnginedynamicAddition in interface IPropagationEnginepermanent - does the constraint is permanently addedps - propagators to add
* @throws SolverException if a constraint is declared more than once in this propagation engineSolverExceptionpublic void updateInvolvedVariables(Propagator p)
IPropagationEngineupdateInvolvedVariables in interface IPropagationEnginep - a propagatorpublic void propagateOnBacktrack(Propagator p)
IPropagationEnginepropagateOnBacktrack in interface IPropagationEnginep - a propagatorpublic void dynamicDeletion(Propagator... ps)
IPropagationEnginedynamicDeletion in interface IPropagationEngineps - a list of propagatorsCopyright © 2017. All rights reserved.