![]() |
OR-Tools
8.2
|
A Demon is the base element of a propagation queue.
It is the main object responsible for implementing the actual propagation of the constraint and pruning the inconsistent values in the domains of the variables. The main concept is that demons are listeners that are attached to the variables and listen to their modifications. There are two methods:
Definition at line 3301 of file constraint_solver.h.
Public Member Functions | |
Demon () | |
This indicates the priority of a demon. More... | |
~Demon () override | |
virtual void | Run (Solver *const s)=0 |
This is the main callback of the demon. More... | |
virtual Solver::DemonPriority | priority () const |
This method returns the priority of the demon. More... | |
std::string | DebugString () const override |
void | inhibit (Solver *const s) |
This method inhibits the demon in the search tree below the current position. More... | |
void | desinhibit (Solver *const s) |
This method un-inhibits the demon that was previously inhibited. More... | |
|
inline |
This indicates the priority of a demon.
Immediate demons are treated separately and corresponds to variables.
Definition at line 3305 of file constraint_solver.h.
|
inlineoverride |
Definition at line 3306 of file constraint_solver.h.
|
overridevirtual |
Reimplemented from BaseObject.
Reimplemented in DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, DelayedCallMethod0< T >, CallMethod3< T, P, Q, R >, CallMethod2< T, P, Q >, CallMethod1< T, P >, and CallMethod0< T >.
Definition at line 197 of file constraint_solver.cc.
void desinhibit | ( | Solver *const | s | ) |
This method un-inhibits the demon that was previously inhibited.
Definition at line 205 of file constraint_solver.cc.
void inhibit | ( | Solver *const | s | ) |
This method inhibits the demon in the search tree below the current position.
Definition at line 199 of file constraint_solver.cc.
|
virtual |
This method returns the priority of the demon.
Usually a demon is fast, slow or normal. Immediate demons are reserved for internal use to maintain variables.
Reimplemented in DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, and DelayedCallMethod0< T >.
Definition at line 193 of file constraint_solver.cc.
|
pure virtual |
This is the main callback of the demon.
Implemented in DelayedCallMethod2< T, P, Q >, DelayedCallMethod1< T, P >, DelayedCallMethod0< T >, CallMethod3< T, P, Q, R >, CallMethod2< T, P, Q >, CallMethod1< T, P >, and CallMethod0< T >.