![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
A constraint is the main modeling object. It provides two methods:
- Post() is responsible for creating the demons and attaching them to
immediate demons().
- InitialPropagate() is called once just after Post and performs
the initial propagation. The subsequent propagations will be performed
by the demons Posted during the post() method.
Definition at line 2382 of file pywrapcp.py.
Public Member Functions | |
| __init__ (self, solver) | |
| Post (self) | |
| InitialPropagateWrapper (self) | |
| DebugString (self) | |
| Var (self) | |
| __repr__ (self) | |
| __str__ (self) | |
| __add__ (self, *args) | |
| __radd__ (self, v) | |
| __sub__ (self, *args) | |
| __rsub__ (self, v) | |
| __mul__ (self, *args) | |
| __rmul__ (self, v) | |
| __floordiv__ (self, v) | |
| __neg__ (self) | |
| __abs__ (self) | |
| Square (self) | |
| __eq__ (self, *args) | |
| __ne__ (self, *args) | |
| __ge__ (self, *args) | |
| __gt__ (self, *args) | |
| __le__ (self, *args) | |
| __lt__ (self, *args) | |
| MapTo (self, vars) | |
| IndexOf (self, *args) | |
| __disown__ (self) | |
| Public Member Functions inherited from ortools.constraint_solver.pywrapcp.PropagationBaseObject | |
| __init__ (self, s) | |
| solver (self) | |
| Name (self) | |
| __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.PropagationBaseObject | |
| 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.Constraint.__init__ | ( | self, | |
| solver ) |
Definition at line 2394 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__abs__ | ( | self | ) |
Definition at line 2457 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__add__ | ( | self, | |
| * | args ) |
Definition at line 2433 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__disown__ | ( | self | ) |
Definition at line 2486 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__eq__ | ( | self, | |
| * | args ) |
Definition at line 2463 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__floordiv__ | ( | self, | |
| v ) |
Definition at line 2451 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__ge__ | ( | self, | |
| * | args ) |
Definition at line 2469 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__gt__ | ( | self, | |
| * | args ) |
Definition at line 2472 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__le__ | ( | self, | |
| * | args ) |
Definition at line 2475 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__lt__ | ( | self, | |
| * | args ) |
Definition at line 2478 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__mul__ | ( | self, | |
| * | args ) |
Definition at line 2445 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__ne__ | ( | self, | |
| * | args ) |
Definition at line 2466 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__neg__ | ( | self | ) |
Definition at line 2454 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__radd__ | ( | self, | |
| v ) |
Definition at line 2436 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__repr__ | ( | self | ) |
Definition at line 2427 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__rmul__ | ( | self, | |
| v ) |
Definition at line 2448 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__rsub__ | ( | self, | |
| v ) |
Definition at line 2442 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__str__ | ( | self | ) |
Definition at line 2430 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.__sub__ | ( | self, | |
| * | args ) |
Definition at line 2439 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.DebugString | ( | self | ) |
Reimplemented from ortools.constraint_solver.pywrapcp.PropagationBaseObject.
Reimplemented in ortools.constraint_solver.pywrapcp.Pack, and ortools.constraint_solver.pywrapcp.PyConstraint.
Definition at line 2416 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.IndexOf | ( | self, | |
| * | args ) |
Definition at line 2484 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.InitialPropagateWrapper | ( | self | ) |
This method performs the initial propagation of the constraint. It is called just after the post.
Reimplemented in ortools.constraint_solver.pywrapcp.Pack, ortools.constraint_solver.pywrapcp.PyConstraint, and ortools.constraint_solver.pywrapcp.TypeRegulationsConstraint.
Definition at line 2409 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.MapTo | ( | self, | |
| vars ) |
Definition at line 2481 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.Post | ( | self | ) |
This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables.
Reimplemented in ortools.constraint_solver.pywrapcp.Pack, and ortools.constraint_solver.pywrapcp.TypeRegulationsConstraint.
Definition at line 2402 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.Square | ( | self | ) |
Definition at line 2460 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.Constraint.Var | ( | self | ) |
Creates a Boolean variable representing the status of the constraint (false = constraint is violated, true = constraint is satisfied). It returns nullptr if the constraint does not support this API.
Definition at line 2419 of file pywrapcp.py.
|
static |
Definition at line 2392 of file pywrapcp.py.