![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
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 2322 of file pywrapcp.py.
Public Member Functions | |
| __init__ (self) | |
| RunWrapper (self, s) | |
| Priority (self) | |
| DebugString (self) | |
| Inhibit (self, s) | |
| Desinhibit (self, s) | |
| __disown__ (self) | |
| Public Member Functions inherited from ortools.constraint_solver.pywrapcp.BaseObject | |
| __init__ (self) | |
| __str__ (self) | |
| __repr__ (self) | |
| __disown__ (self) | |
Properties | |
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
| Properties inherited from ortools.constraint_solver.pywrapcp.BaseObject | |
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
| ortools.constraint_solver.pywrapcp.Demon.__init__ | ( | self | ) |
This indicates the priority of a demon. Immediate demons are treated separately and corresponds to variables.
Definition at line 2338 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Demon.__disown__ | ( | self | ) |
Definition at line 2375 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Demon.DebugString | ( | self | ) |
Reimplemented from ortools.constraint_solver.pywrapcp.BaseObject.
Reimplemented in ortools.constraint_solver.pywrapcp.PyConstraintDemon, and ortools.constraint_solver.pywrapcp.PyDemon.
Definition at line 2362 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Demon.Desinhibit | ( | self, | |
| s ) |
This method un-inhibits the demon that was previously inhibited.
Definition at line 2372 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Demon.Inhibit | ( | self, | |
| s ) |
This method inhibits the demon in the search tree below the current position.
Definition at line 2365 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Demon.Priority | ( | self | ) |
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 ortools.constraint_solver.pywrapcp.PyConstraintDemon.
Definition at line 2354 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Demon.RunWrapper | ( | self, | |
| s ) |
This is the main callback of the demon.
Reimplemented in ortools.constraint_solver.pywrapcp.PyDemon.
Definition at line 2350 of file pywrapcp.py.
|
static |
Definition at line 2335 of file pywrapcp.py.