![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
The class IntVar is a subset of IntExpr. In addition to the IntExpr protocol, it offers persistence, removing values from the domains, and a finer model for events.
Definition at line 2795 of file pywrapcp.py.
Public Member Functions | |
| __init__ (self, *args, **kwargs) | |
| IsVar (self) | |
| Var (self) | |
| Value (self) | |
| RemoveValue (self, v) | |
| RemoveInterval (self, l, u) | |
| RemoveValues (self, values) | |
| SetValues (self, values) | |
| WhenBound (self, *args) | |
| WhenDomain (self, *args) | |
| Size (self) | |
| Contains (self, v) | |
| HoleIteratorAux (self, reversible) | |
| DomainIteratorAux (self, reversible) | |
| OldMin (self) | |
| OldMax (self) | |
| __repr__ (self) | |
| __str__ (self) | |
| DomainIterator (self) | |
| HoleIterator (self) | |
| Public Member Functions inherited from ortools.constraint_solver.pywrapcp.IntExpr | |
| __init__ (self, *args, **kwargs) | |
| Min (self) | |
| SetMin (self, m) | |
| Max (self) | |
| SetMax (self, m) | |
| SetRange (self, l, u) | |
| SetValue (self, v) | |
| Bound (self) | |
| VarWithName (self, name) | |
| WhenRange (self, *args) | |
| __repr__ (self) | |
| __str__ (self) | |
| __add__ (self, *args) | |
| __radd__ (self, v) | |
| __sub__ (self, *args) | |
| __rsub__ (self, v) | |
| __mul__ (self, *args) | |
| __rmul__ (self, v) | |
| __floordiv__ (self, *args) | |
| __mod__ (self, *args) | |
| __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) | |
| IsMember (self, values) | |
| Member (self, values) | |
| NotMember (self, starts, ends) | |
| Public Member Functions inherited from ortools.constraint_solver.pywrapcp.PropagationBaseObject | |
| __init__ (self, s) | |
| DebugString (self) | |
| 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.IntExpr | |
| 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.IntVar.__init__ | ( | self, | |
| * | args, | ||
| ** | kwargs ) |
Definition at line 2804 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.__repr__ | ( | self | ) |
Definition at line 2902 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.__str__ | ( | self | ) |
Definition at line 2905 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.Contains | ( | self, | |
| v ) |
This method returns whether the value 'v' is in the domain of the variable.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2871 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.DomainIterator | ( | self | ) |
Definition at line 2908 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.DomainIteratorAux | ( | self, | |
| reversible ) |
Creates a domain iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2886 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.HoleIterator | ( | self | ) |
Definition at line 2911 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.HoleIteratorAux | ( | self, | |
| reversible ) |
Creates a hole iterator. When 'reversible' is false, the returned object is created on the normal C++ heap and the solver does NOT take ownership of the object.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2878 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.IsVar | ( | self | ) |
Returns true if the expression is indeed a variable.
Reimplemented from ortools.constraint_solver.pywrapcp.IntExpr.
Definition at line 2807 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.OldMax | ( | self | ) |
Returns the previous max.
Definition at line 2898 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.OldMin | ( | self | ) |
Returns the previous min.
Definition at line 2894 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.RemoveInterval | ( | self, | |
| l, | |||
| u ) |
This method removes the interval 'l' .. 'u' from the domain of the variable. It assumes that 'l' <= 'u'.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2824 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.RemoveValue | ( | self, | |
| v ) |
This method removes the value 'v' from the domain of the variable.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2820 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.RemoveValues | ( | self, | |
| values ) |
This method remove the values from the domain of the variable.
Definition at line 2831 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.SetValues | ( | self, | |
| values ) |
This method intersects the current domain with the values in the array.
Definition at line 2835 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.Size | ( | self | ) |
This method returns the number of values in the domain of the variable.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2867 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.Value | ( | self | ) |
This method returns the value of the variable. This method checks before that the variable is bound.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2813 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.Var | ( | self | ) |
Creates a variable from the expression.
Reimplemented from ortools.constraint_solver.pywrapcp.IntExpr.
Definition at line 2810 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.WhenBound | ( | self, | |
| * | args ) |
*Overload 1:* This method attaches a demon that will be awakened when the variable is bound. | *Overload 2:* This method attaches a closure that will be awakened when the variable is bound.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2839 of file pywrapcp.py.
| ortools.constraint_solver.pywrapcp.IntVar.WhenDomain | ( | self, | |
| * | args ) |
*Overload 1:* This method attaches a demon that will watch any domain modification of the domain of the variable. | *Overload 2:* This method attaches a closure that will watch any domain modification of the domain of the variable.
Reimplemented in ortools.constraint_solver.pywrapcp.BooleanVar.
Definition at line 2853 of file pywrapcp.py.
|
static |
Definition at line 2802 of file pywrapcp.py.