#include <constraint_solver.h>

|
| | Pack (Solver *s, const std::vector< IntVar * > &vars, int number_of_bins) |
| | ~Pack () override |
| void | AddWeightedSumLessOrEqualConstantDimension (const std::vector< int64_t > &weights, const std::vector< int64_t > &bounds) |
| void | AddWeightedSumLessOrEqualConstantDimension (Solver::IndexEvaluator1 weights, const std::vector< int64_t > &bounds) |
| void | AddWeightedSumLessOrEqualConstantDimension (Solver::IndexEvaluator2 weights, const std::vector< int64_t > &bounds) |
| void | AddWeightedSumEqualVarDimension (const std::vector< int64_t > &weights, const std::vector< IntVar * > &loads) |
| void | AddWeightedSumEqualVarDimension (Solver::IndexEvaluator2 weights, const std::vector< IntVar * > &loads) |
| void | AddSumVariableWeightsLessOrEqualConstantDimension (const std::vector< IntVar * > &usage, const std::vector< int64_t > &capacity) |
| void | AddWeightedSumOfAssignedDimension (const std::vector< int64_t > &weights, IntVar *cost_var) |
| void | AddCountUsedBinDimension (IntVar *count_var) |
| void | AddCountAssignedItemsDimension (IntVar *count_var) |
| void | Post () override |
| void | ClearAll () |
| void | PropagateDelayed () |
| void | InitialPropagate () override |
| void | Propagate () |
| void | OneDomain (int var_index) |
| std::string | DebugString () const override |
| bool | IsUndecided (int var_index, int bin_index) const |
| void | SetImpossible (int var_index, int bin_index) |
| void | Assign (int var_index, int bin_index) |
| bool | IsAssignedStatusKnown (int var_index) const |
| bool | IsPossible (int var_index, int bin_index) const |
| IntVar * | AssignVar (int var_index, int bin_index) const |
| void | SetAssigned (int var_index) |
| void | SetUnassigned (int var_index) |
| void | RemoveAllPossibleFromBin (int bin_index) |
| void | AssignAllPossibleToBin (int bin_index) |
| void | AssignFirstPossibleToBin (int bin_index) |
| void | AssignAllRemainingItems () |
| void | UnassignAllRemainingItems () |
| void | Accept (ModelVisitor *visitor) const override |
| | Accepts the given visitor.
|
| Public Member Functions inherited from operations_research::Constraint |
| | Constraint (Solver *const solver) |
| | Constraint (const Constraint &)=delete |
| Constraint & | operator= (const Constraint &)=delete |
| | ~Constraint () override |
| void | PostAndPropagate () |
| bool | IsCastConstraint () const |
| | Is the constraint created by a cast from expression to integer variable?
|
| virtual IntVar * | Var () |
| Public Member Functions inherited from operations_research::PropagationBaseObject |
| | PropagationBaseObject (Solver *const s) |
| | PropagationBaseObject (const PropagationBaseObject &)=delete |
| PropagationBaseObject & | operator= (const PropagationBaseObject &)=delete |
| | ~PropagationBaseObject () override |
| std::string | DebugString () const override |
| Solver * | solver () const |
| void | FreezeQueue () |
| void | UnfreezeQueue () |
| void | EnqueueDelayedDemon (Demon *const d) |
| void | EnqueueVar (Demon *const d) |
| void | ExecuteAll (const SimpleRevFIFO< Demon * > &demons) |
| void | EnqueueAll (const SimpleRevFIFO< Demon * > &demons) |
| void | set_action_on_fail (Solver::Action a) |
| void | reset_action_on_fail () |
| | This method clears the failure callback.
|
| void | set_variable_to_clean_on_fail (IntVar *v) |
| | Shortcut for variable cleaner.
|
| virtual std::string | name () const |
| | Object naming.
|
| void | set_name (absl::string_view name) |
| bool | HasName () const |
| | Returns whether the object has been named or not.
|
| virtual std::string | BaseName () const |
| | Returns a base name for automatic naming.
|
| Public Member Functions inherited from operations_research::BaseObject |
| | BaseObject () |
| | BaseObject (const BaseObject &)=delete |
| BaseObject & | operator= (const BaseObject &)=delete |
| virtual | ~BaseObject ()=default |
| operations_research::Pack::Pack |
( |
Solver * | s, |
|
|
const std::vector< IntVar * > & | vars, |
|
|
int | number_of_bins ) |
◆ ~Pack()
| operations_research::Pack::~Pack |
( |
| ) |
|
|
override |
◆ Accept()
| void operations_research::Pack::Accept |
( |
ModelVisitor * | visitor | ) |
const |
|
overridevirtual |
◆ AddCountAssignedItemsDimension()
| void operations_research::Pack::AddCountAssignedItemsDimension |
( |
IntVar * | count_var | ) |
|
This dimension links 'count_var' to the actual number of items assigned to a bin in the pack.
Definition at line 1606 of file pack.cc.
◆ AddCountUsedBinDimension()
| void operations_research::Pack::AddCountUsedBinDimension |
( |
IntVar * | count_var | ) |
|
This dimension links 'count_var' to the actual number of bins used in the pack.
Definition at line 1599 of file pack.cc.
◆ AddSumVariableWeightsLessOrEqualConstantDimension()
| void operations_research::Pack::AddSumVariableWeightsLessOrEqualConstantDimension |
( |
const std::vector< IntVar * > & | usage, |
|
|
const std::vector< int64_t > & | 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 1589 of file pack.cc.
◆ AddWeightedSumEqualVarDimension() [1/2]
| void operations_research::Pack::AddWeightedSumEqualVarDimension |
( |
const std::vector< int64_t > & | weights, |
|
|
const std::vector< IntVar * > & | loads ) |
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].
Definition at line 1560 of file pack.cc.
◆ AddWeightedSumEqualVarDimension() [2/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 1570 of file pack.cc.
◆ AddWeightedSumLessOrEqualConstantDimension() [1/3]
| void operations_research::Pack::AddWeightedSumLessOrEqualConstantDimension |
( |
const std::vector< int64_t > & | weights, |
|
|
const std::vector< int64_t > & | bounds ) |
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]'.
Definition at line 1530 of file pack.cc.
◆ AddWeightedSumLessOrEqualConstantDimension() [2/3]
| void operations_research::Pack::AddWeightedSumLessOrEqualConstantDimension |
( |
Solver::IndexEvaluator1 | weights, |
|
|
const std::vector< int64_t > & | bounds ) |
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.
Definition at line 1540 of file pack.cc.
◆ AddWeightedSumLessOrEqualConstantDimension() [3/3]
| void operations_research::Pack::AddWeightedSumLessOrEqualConstantDimension |
( |
Solver::IndexEvaluator2 | weights, |
|
|
const std::vector< int64_t > & | bounds ) |
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 1550 of file pack.cc.
◆ AddWeightedSumOfAssignedDimension()
| void operations_research::Pack::AddWeightedSumOfAssignedDimension |
( |
const std::vector< int64_t > & | weights, |
|
|
IntVar * | cost_var ) |
This dimension enforces that cost_var == sum of weights[i] for all objects 'i' assigned to a bin.
Definition at line 1580 of file pack.cc.
◆ Assign()
| void operations_research::Pack::Assign |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ AssignAllPossibleToBin()
| void operations_research::Pack::AssignAllPossibleToBin |
( |
int | bin_index | ) |
|
◆ AssignAllRemainingItems()
| void operations_research::Pack::AssignAllRemainingItems |
( |
| ) |
|
◆ AssignFirstPossibleToBin()
| void operations_research::Pack::AssignFirstPossibleToBin |
( |
int | bin_index | ) |
|
◆ AssignVar()
| IntVar * operations_research::Pack::AssignVar |
( |
int | var_index, |
|
|
int | bin_index ) const |
◆ ClearAll()
| void operations_research::Pack::ClearAll |
( |
| ) |
|
◆ DebugString()
| std::string operations_research::Pack::DebugString |
( |
| ) |
const |
|
overridevirtual |
◆ InitialPropagate()
| void operations_research::Pack::InitialPropagate |
( |
| ) |
|
|
overridevirtual |
◆ IsAssignedStatusKnown()
| bool operations_research::Pack::IsAssignedStatusKnown |
( |
int | var_index | ) |
const |
◆ IsPossible()
| bool operations_research::Pack::IsPossible |
( |
int | var_index, |
|
|
int | bin_index ) const |
◆ IsUndecided()
| bool operations_research::Pack::IsUndecided |
( |
int | var_index, |
|
|
int | bin_index ) const |
◆ OneDomain()
| void operations_research::Pack::OneDomain |
( |
int | var_index | ) |
|
◆ Post()
| void operations_research::Pack::Post |
( |
| ) |
|
|
overridevirtual |
◆ Propagate()
| void operations_research::Pack::Propagate |
( |
| ) |
|
◆ PropagateDelayed()
| void operations_research::Pack::PropagateDelayed |
( |
| ) |
|
◆ RemoveAllPossibleFromBin()
| void operations_research::Pack::RemoveAllPossibleFromBin |
( |
int | bin_index | ) |
|
◆ SetAssigned()
| void operations_research::Pack::SetAssigned |
( |
int | var_index | ) |
|
◆ SetImpossible()
| void operations_research::Pack::SetImpossible |
( |
int | var_index, |
|
|
int | bin_index ) |
◆ SetUnassigned()
| void operations_research::Pack::SetUnassigned |
( |
int | var_index | ) |
|
◆ UnassignAllRemainingItems()
| void operations_research::Pack::UnassignAllRemainingItems |
( |
| ) |
|
The documentation for this class was generated from the following files: