
Bin-packing propagator. More...
#include <gecode/int/bin-packing.hh>
Public Member Functions | |
| template<class SizeSet> | |
| bool | nosum (const SizeSet &s, int a, int b, int &ap, int &bp) |
| Detect non-existence of sums in a .. b. | |
| template<class SizeSet> | |
| bool | nosum (const SizeSet &s, int a, int b) |
| Detect non-existence of sums in a .. b. | |
| virtual ExecStatus | propagate (Space &home, const ModEventDelta &med) |
| Perform propagation. | |
| virtual PropCost | cost (const Space &home, const ModEventDelta &med) const |
| Cost function. | |
| virtual void | reschedule (Space &home) |
| Schedule function. | |
| virtual Actor * | copy (Space &home) |
| Copy propagator during cloning. | |
| virtual size_t | dispose (Space &home) |
| Destructor. | |
| ModEventDelta | modeventdelta (void) const |
| Return the modification event delta. | |
| virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d) |
| Advise function. | |
| virtual void | advise (Space &home, Advisor &a) |
| Run advisor a to be run on failure in failed space. | |
| double | afc (void) const |
| Return the accumulated failure count. | |
| unsigned int | id (void) const |
| Return propagator id. | |
| PropagatorGroup | group (void) const |
| Return group propagator belongs to. | |
| void | group (PropagatorGroup g) |
| Add propagator to group g. | |
| bool | disabled (void) const |
| Whether propagator is currently disabled. | |
| virtual | ~Actor (void) |
| To avoid warnings. | |
Static Public Member Functions | |
| static ExecStatus | post (Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs, IntPropLevel ipl=IPL_DEF) |
| Post propagator for loads l and items bs. | |
| static void | calc_reductions (const ViewArray< Item > &bs, const ViewArray< OffsetView > &l, int *weights_base_reduction, int &capacity_base_reduction, int *delta_reductions) |
| static int | f_ccm1 (int w, int l, int c) |
| Dual Feasible Functions. | |
| static int | f_mt (int w, int l, int c) |
| static int | f_bj1 (int w, int l, int c) |
| static int | f_vb2_base (int w, int l, int c) |
| static int | f_vb2 (int w, int l, int c) |
| static int | f_fs1 (int w, int l, int c) |
| static int | f_rad2_base (int w, int l, int c) |
| static int | f_rad2 (int w, int l, int c) |
| static LambdaRange | l_ccm1 (int c) |
| static LambdaRange | l_mt (int c) |
| static LambdaRange | l_bj1 (int c) |
| static LambdaRange | l_vb2 (int c) |
| static LambdaRange | l_fs1 (int c) |
| static LambdaRange | l_rad2 (int c) |
| static LambdaRange | sanitize_lambda_range (LambdaRange lambda, int n_weights, int max_weight) |
| template<int f> | |
| static int | calc_dff_lower_bound_single_lambda (const int *weights, int n_weights, int capacity, int lambda) |
| Lower bound. | |
| template<int f, LambdaRange l> | |
| static int | calc_dff_lower_bound (const int *weights, int n_weights, int capacity, int n_not_zero_weights, int max_weight, bool sanitize=false) |
| static void * | operator new (size_t s, Space &home) |
| Allocate memory from space. | |
| static void | operator delete (void *p, Space &home) |
| No-op for exceptions. | |
| static void * | operator new (size_t s) |
| Not used. | |
| static void | operator delete (void *p) |
| Not used. | |
Static Public Attributes | |
| static int const | n_reductions = 3 |
| Reductions. | |
| static int const | n_lambda_samples = 256 |
Protected Member Functions | |
| Pack (Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs, IntPropLevel ipl) | |
| Constructor for posting. | |
| Pack (Space &home, Pack &p) | |
| Constructor for cloning p. | |
| Protected Member Functions inherited from Gecode::Propagator | |
| Propagator (Home home) | |
| Constructor for posting. | |
| Propagator (Space &home, Propagator &p) | |
| Constructor for cloning p. | |
| Propagator * | fwd (void) const |
| Return forwarding pointer during copying. | |
| Kernel::GPI::Info & | gpi (void) |
| Provide access to global propagator information. | |
Protected Attributes | |
| ViewArray< OffsetView > | l |
| Views for load of bins. | |
| ViewArray< Item > | bs |
| Items with bin and size. | |
| IntPropLevel | ipl |
| Propagation level. | |
| int | t |
| Total size of all items. | |
Bin-packing propagator.
Basic and knapsack propagation are based on: Paul Shaw. A Constraint for Bin Packing. CP 2004.
The lower-bound phase uses dual-feasible functions described in: Tardivo et al. CP for Bin Packing with Multi-Core and GPUs. CP 2024.
Requires
Definition at line 151 of file bin-packing.hh.
|
inlineprotected |
Constructor for posting.
Definition at line 154 of file propagate.hpp.
|
inlineprotected |
Constructor for cloning p.
Definition at line 165 of file propagate.hpp.
|
static |
Post propagator for loads l and items bs.
Definition at line 381 of file propagate.cpp.
|
inline |
Detect non-existence of sums in a .. b.
Definition at line 181 of file propagate.hpp.
|
inline |
Detect non-existence of sums in a .. b.
Definition at line 212 of file propagate.hpp.
|
virtual |
|
virtual |
|
virtual |
Copy propagator during cloning.
Implements Gecode::Actor.
Definition at line 59 of file propagate.cpp.
|
inlinevirtual |
|
static |
Definition at line 420 of file propagate.cpp.
|
inlinestatic |
Dual Feasible Functions.
Definition at line 218 of file propagate.hpp.
|
inlinestatic |
Definition at line 233 of file propagate.hpp.
|
inlinestatic |
Definition at line 248 of file propagate.hpp.
|
inlinestatic |
Definition at line 264 of file propagate.hpp.
|
inlinestatic |
Definition at line 270 of file propagate.hpp.
|
inlinestatic |
Definition at line 287 of file propagate.hpp.
|
inlinestatic |
Definition at line 300 of file propagate.hpp.
|
inlinestatic |
Definition at line 315 of file propagate.hpp.
|
inlinestatic |
Definition at line 328 of file propagate.hpp.
|
inlinestatic |
Definition at line 333 of file propagate.hpp.
|
inlinestatic |
Definition at line 338 of file propagate.hpp.
|
inlinestatic |
Definition at line 343 of file propagate.hpp.
|
inlinestatic |
Definition at line 348 of file propagate.hpp.
|
inlinestatic |
Definition at line 353 of file propagate.hpp.
|
inlinestatic |
Definition at line 358 of file propagate.hpp.
|
inlinestatic |
Lower bound.
Definition at line 374 of file propagate.hpp.
|
inlinestatic |
Definition at line 392 of file propagate.hpp.
|
protected |
Views for load of bins.
Definition at line 154 of file bin-packing.hh.
Items with bin and size.
Definition at line 156 of file bin-packing.hh.
|
protected |
Propagation level.
Definition at line 158 of file bin-packing.hh.
|
protected |
Total size of all items.
Definition at line 160 of file bin-packing.hh.
|
static |
Reductions.
Definition at line 193 of file bin-packing.hh.
|
static |
Definition at line 208 of file bin-packing.hh.