![]() |
OR-Tools
9.0
|
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 3303 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 3307 of file constraint_solver.h.
|
inlineoverride |
Definition at line 3308 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 >, CallMethod0< T >, SwigDirector_Demon, and SwigDirector_Demon.
Definition at line 200 of file constraint_solver.cc.
| void desinhibit | ( | Solver *const | s | ) |
This method un-inhibits the demon that was previously inhibited.
Definition at line 208 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 202 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 >, DelayedCallMethod0< T >, SwigDirector_Demon, and SwigDirector_Demon.
Definition at line 196 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 >, CallMethod0< T >, SwigDirector_Demon, and SwigDirector_Demon.