Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ortools.constraint_solver.pywrapcp.Constraint Class Reference
Inheritance diagram for ortools.constraint_solver.pywrapcp.Constraint:
ortools.constraint_solver.pywrapcp.PropagationBaseObject ortools.constraint_solver.pywrapcp.BaseObject ortools.constraint_solver.pywrapcp.DisjunctiveConstraint ortools.constraint_solver.pywrapcp.GlobalVehicleBreaksConstraint ortools.constraint_solver.pywrapcp.Pack ortools.constraint_solver.pywrapcp.PyConstraint ortools.constraint_solver.pywrapcp.TypeRegulationsConstraint

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
 solver (self)
 
 Name (self)
 
- Public Member Functions inherited from ortools.constraint_solver.pywrapcp.BaseObject

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")
 

Detailed Description

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 2123 of file pywrapcp.py.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ __abs__()

ortools.constraint_solver.pywrapcp.Constraint.__abs__ ( self)

Definition at line 2198 of file pywrapcp.py.

◆ __add__()

ortools.constraint_solver.pywrapcp.Constraint.__add__ ( self,
* args )

Definition at line 2174 of file pywrapcp.py.

◆ __disown__()

ortools.constraint_solver.pywrapcp.Constraint.__disown__ ( self)

Reimplemented from ortools.constraint_solver.pywrapcp.PropagationBaseObject.

Definition at line 2227 of file pywrapcp.py.

◆ __eq__()

ortools.constraint_solver.pywrapcp.Constraint.__eq__ ( self,
* args )

Definition at line 2204 of file pywrapcp.py.

◆ __floordiv__()

ortools.constraint_solver.pywrapcp.Constraint.__floordiv__ ( self,
v )

Definition at line 2192 of file pywrapcp.py.

◆ __ge__()

ortools.constraint_solver.pywrapcp.Constraint.__ge__ ( self,
* args )

Definition at line 2210 of file pywrapcp.py.

◆ __gt__()

ortools.constraint_solver.pywrapcp.Constraint.__gt__ ( self,
* args )

Definition at line 2213 of file pywrapcp.py.

◆ __le__()

ortools.constraint_solver.pywrapcp.Constraint.__le__ ( self,
* args )

Definition at line 2216 of file pywrapcp.py.

◆ __lt__()

ortools.constraint_solver.pywrapcp.Constraint.__lt__ ( self,
* args )

Definition at line 2219 of file pywrapcp.py.

◆ __mul__()

ortools.constraint_solver.pywrapcp.Constraint.__mul__ ( self,
* args )

Definition at line 2186 of file pywrapcp.py.

◆ __ne__()

ortools.constraint_solver.pywrapcp.Constraint.__ne__ ( self,
* args )

Definition at line 2207 of file pywrapcp.py.

◆ __neg__()

ortools.constraint_solver.pywrapcp.Constraint.__neg__ ( self)

Definition at line 2195 of file pywrapcp.py.

◆ __radd__()

ortools.constraint_solver.pywrapcp.Constraint.__radd__ ( self,
v )

Definition at line 2177 of file pywrapcp.py.

◆ __repr__()

ortools.constraint_solver.pywrapcp.Constraint.__repr__ ( self)

Reimplemented from ortools.constraint_solver.pywrapcp.PropagationBaseObject.

Definition at line 2168 of file pywrapcp.py.

◆ __rmul__()

ortools.constraint_solver.pywrapcp.Constraint.__rmul__ ( self,
v )

Definition at line 2189 of file pywrapcp.py.

◆ __rsub__()

ortools.constraint_solver.pywrapcp.Constraint.__rsub__ ( self,
v )

Definition at line 2183 of file pywrapcp.py.

◆ __str__()

ortools.constraint_solver.pywrapcp.Constraint.__str__ ( self)

Reimplemented from ortools.constraint_solver.pywrapcp.BaseObject.

Definition at line 2171 of file pywrapcp.py.

◆ __sub__()

ortools.constraint_solver.pywrapcp.Constraint.__sub__ ( self,
* args )

Definition at line 2180 of file pywrapcp.py.

◆ DebugString()

◆ IndexOf()

ortools.constraint_solver.pywrapcp.Constraint.IndexOf ( self,
* args )

Definition at line 2225 of file pywrapcp.py.

◆ InitialPropagateWrapper()

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.GlobalVehicleBreaksConstraint, ortools.constraint_solver.pywrapcp.Pack, ortools.constraint_solver.pywrapcp.PyConstraint, and ortools.constraint_solver.pywrapcp.TypeRegulationsConstraint.

Definition at line 2150 of file pywrapcp.py.

◆ MapTo()

ortools.constraint_solver.pywrapcp.Constraint.MapTo ( self,
vars )

Definition at line 2222 of file pywrapcp.py.

◆ Post()

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.GlobalVehicleBreaksConstraint, ortools.constraint_solver.pywrapcp.Pack, and ortools.constraint_solver.pywrapcp.TypeRegulationsConstraint.

Definition at line 2143 of file pywrapcp.py.

◆ Square()

ortools.constraint_solver.pywrapcp.Constraint.Square ( self)

Definition at line 2201 of file pywrapcp.py.

◆ Var()

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 2160 of file pywrapcp.py.

Property Documentation

◆ thisown

ortools.constraint_solver.pywrapcp.Constraint.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

Definition at line 2133 of file pywrapcp.py.


The documentation for this class was generated from the following file: