![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
__init__ (self, *args, **kwargs) | |
AddWeightedSumLessOrEqualConstantDimension (self, *args) | |
AddWeightedSumEqualVarDimension (self, *args) | |
AddSumVariableWeightsLessOrEqualConstantDimension (self, usage, capacity) | |
AddWeightedSumOfAssignedDimension (self, weights, cost_var) | |
AddCountUsedBinDimension (self, count_var) | |
AddCountAssignedItemsDimension (self, count_var) | |
Post (self) | |
InitialPropagateWrapper (self) | |
DebugString (self) | |
![]() | |
__init__ (self, solver) | |
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) | |
![]() | |
__init__ (self, s) | |
solver (self) | |
Name (self) | |
__disown__ (self) | |
![]() | |
__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") | |
![]() | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
![]() | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
![]() | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
Definition at line 3894 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.__init__ | ( | self, | |
* | args, | ||
** | kwargs ) |
Definition at line 3897 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.AddCountAssignedItemsDimension | ( | self, | |
count_var ) |
This dimension links 'count_var' to the actual number of items assigned to a bin in the pack.
Definition at line 3973 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.AddCountUsedBinDimension | ( | self, | |
count_var ) |
This dimension links 'count_var' to the actual number of bins used in the pack.
Definition at line 3966 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.AddSumVariableWeightsLessOrEqualConstantDimension | ( | self, | |
usage, | |||
capacity ) |
This dimension imposes: forall b in bins, sum (i in items: usage[i] * is_assigned(i, b)) <= capacity[b] where is_assigned(i, b) is true if and only if item i is assigned to the bin b. This can be used to model shapes of items by linking variables of the same item on parallel dimensions with an allowed assignment constraint.
Definition at line 3945 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.AddWeightedSumEqualVarDimension | ( | self, | |
* | args ) |
*Overload 1:* This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is equal to loads[b]. | *Overload 2:* This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b)) of all objects i assigned to 'b' is equal to loads[b].
Definition at line 3930 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.AddWeightedSumLessOrEqualConstantDimension | ( | self, | |
* | args ) |
*Overload 1:* Dimensions are additional constraints than can restrict what is possible with the pack constraint. It can be used to set capacity limits, to count objects per bin, to compute unassigned penalties... This dimension imposes that for all bins b, the weighted sum (weights[i]) of all objects i assigned to 'b' is less or equal 'bounds[b]'. | *Overload 2:* This dimension imposes that for all bins b, the weighted sum (weights->Run(i)) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint. | *Overload 3:* This dimension imposes that for all bins b, the weighted sum (weights->Run(i, b) of all objects i assigned to 'b' is less or equal to 'bounds[b]'. Ownership of the callback is transferred to the pack constraint.
Definition at line 3901 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.AddWeightedSumOfAssignedDimension | ( | self, | |
weights, | |||
cost_var ) |
This dimension enforces that cost_var == sum of weights[i] for all objects 'i' assigned to a bin.
Definition at line 3959 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.DebugString | ( | self | ) |
Reimplemented from ortools.constraint_solver.pywrapcp.Constraint.
Definition at line 3986 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.InitialPropagateWrapper | ( | self | ) |
This method performs the initial propagation of the constraint. It is called just after the post.
Reimplemented from ortools.constraint_solver.pywrapcp.Constraint.
Definition at line 3983 of file pywrapcp.py.
ortools.constraint_solver.pywrapcp.Pack.Post | ( | self | ) |
This method is called when the constraint is processed by the solver. Its main usage is to attach demons to variables.
Reimplemented from ortools.constraint_solver.pywrapcp.Constraint.
Definition at line 3980 of file pywrapcp.py.
|
static |
Definition at line 3895 of file pywrapcp.py.