Google OR-Tools: operations_research::Demon Class Reference
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:
- Run() is the actual method called when the demon is processed.
- priority() returns its priority. Standard priorities are slow, normal or fast. "immediate" is reserved for variables and is treated separately.
Definition at line 3636 of file constraint_solver.h.
#include <constraint_solver.h>

Public Member Functions | |
| Demon () | |
| Demon (const Demon &)=delete | |
| Demon & | operator= (const Demon &)=delete |
| ~Demon () override | |
| virtual void | Run (Solver *s)=0 |
| This is the main callback of the demon. | |
| virtual Solver::DemonPriority | priority () const |
| std::string | DebugString () const override |
| void | inhibit (Solver *s) |
| void | desinhibit (Solver *s) |
| This method un-inhibits the demon that was previously inhibited. | |
| Public Member Functions inherited from operations_research::BaseObject | |
| BaseObject () | |
| BaseObject (const BaseObject &)=delete | |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
◆ Demon() [1/2]
|
inline |
This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables.
Definition at line 3640 of file constraint_solver.h.
◆ Demon() [2/2]
|
delete |
|
inlineoverride |
◆ DebugString()
|
overridevirtual |
◆ desinhibit()
| void operations_research::Demon::desinhibit | ( | Solver * | s | ) |
This method un-inhibits the demon that was previously inhibited.
Definition at line 214 of file constraint_solver.cc.
◆ inhibit()
| void operations_research::Demon::inhibit | ( | Solver * | s | ) |
This method inhibits the demon in the search tree below the current position.
Definition at line 208 of file constraint_solver.cc.
◆ operator=()
◆ priority()
◆ Run()
|
pure virtual |
This is the main callback of the demon.
Implemented in operations_research::CallMethod0< T >, operations_research::CallMethod1< T, P >, operations_research::CallMethod2< T, P, Q >, operations_research::CallMethod3< T, P, Q, R >, operations_research::DelayedCallMethod0< T >, operations_research::DelayedCallMethod1< T, P >, and operations_research::DelayedCallMethod2< T, P, Q >.
◆ Queue
The documentation for this class was generated from the following files:
- ortools/constraint_solver/constraint_solver.h
- ortools/constraint_solver/constraint_solver.cc