Bin-packing propagator.
More...
#include <gecode/int/bin-packing.hh>
|
| 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 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.
|
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.
◆ Pack() [1/2]
◆ Pack() [2/2]
| Gecode::Int::BinPacking::Pack::Pack |
( |
Space & | home, |
|
|
Pack & | p ) |
|
inlineprotected |
◆ post()
Post propagator for loads l and items bs.
◆ nosum() [1/2]
| bool Gecode::Int::BinPacking::Pack::nosum |
( |
const SizeSet & | s, |
|
|
int | a, |
|
|
int | b, |
|
|
int & | ap, |
|
|
int & | bp ) |
|
inline |
Detect non-existence of sums in a .. b.
Definition at line 181 of file propagate.hpp.
◆ nosum() [2/2]
| bool Gecode::Int::BinPacking::Pack::nosum |
( |
const SizeSet & | s, |
|
|
int | a, |
|
|
int | b ) |
|
inline |
Detect non-existence of sums in a .. b.
Definition at line 212 of file propagate.hpp.
◆ propagate()
◆ cost()
◆ reschedule()
| virtual void Gecode::Int::BinPacking::Pack::reschedule |
( |
Space & | home | ) |
|
|
virtual |
◆ copy()
| virtual Actor * Gecode::Int::BinPacking::Pack::copy |
( |
Space & | home | ) |
|
|
virtual |
◆ dispose()
| size_t Gecode::Int::BinPacking::Pack::dispose |
( |
Space & | home | ) |
|
|
inlinevirtual |
◆ calc_reductions()
| void Gecode::Int::BinPacking::Pack::calc_reductions |
( |
const ViewArray< Item > & | bs, |
|
|
const ViewArray< OffsetView > & | l, |
|
|
int * | weights_base_reduction, |
|
|
int & | capacity_base_reduction, |
|
|
int * | delta_reductions ) |
|
static |
◆ f_ccm1()
| int Gecode::Int::BinPacking::Pack::f_ccm1 |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_mt()
| int Gecode::Int::BinPacking::Pack::f_mt |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_bj1()
| int Gecode::Int::BinPacking::Pack::f_bj1 |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_vb2_base()
| int Gecode::Int::BinPacking::Pack::f_vb2_base |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_vb2()
| int Gecode::Int::BinPacking::Pack::f_vb2 |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_fs1()
| int Gecode::Int::BinPacking::Pack::f_fs1 |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_rad2_base()
| int Gecode::Int::BinPacking::Pack::f_rad2_base |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ f_rad2()
| int Gecode::Int::BinPacking::Pack::f_rad2 |
( |
int | w, |
|
|
int | l, |
|
|
int | c ) |
|
inlinestatic |
◆ l_ccm1()
| LambdaRange Gecode::Int::BinPacking::Pack::l_ccm1 |
( |
int | c | ) |
|
|
inlinestatic |
◆ l_mt()
| LambdaRange Gecode::Int::BinPacking::Pack::l_mt |
( |
int | c | ) |
|
|
inlinestatic |
◆ l_bj1()
| LambdaRange Gecode::Int::BinPacking::Pack::l_bj1 |
( |
int | c | ) |
|
|
inlinestatic |
◆ l_vb2()
| LambdaRange Gecode::Int::BinPacking::Pack::l_vb2 |
( |
int | c | ) |
|
|
inlinestatic |
◆ l_fs1()
| LambdaRange Gecode::Int::BinPacking::Pack::l_fs1 |
( |
int | c | ) |
|
|
inlinestatic |
◆ l_rad2()
| LambdaRange Gecode::Int::BinPacking::Pack::l_rad2 |
( |
int | c | ) |
|
|
inlinestatic |
◆ sanitize_lambda_range()
| LambdaRange Gecode::Int::BinPacking::Pack::sanitize_lambda_range |
( |
LambdaRange | lambda, |
|
|
int | n_weights, |
|
|
int | max_weight ) |
|
inlinestatic |
◆ calc_dff_lower_bound_single_lambda()
template<int f>
| int Gecode::Int::BinPacking::Pack::calc_dff_lower_bound_single_lambda |
( |
const int * | weights, |
|
|
int | n_weights, |
|
|
int | capacity, |
|
|
int | lambda ) |
|
inlinestatic |
◆ calc_dff_lower_bound()
| int Gecode::Int::BinPacking::Pack::calc_dff_lower_bound |
( |
const int * | weights, |
|
|
int | n_weights, |
|
|
int | capacity, |
|
|
int | n_not_zero_weights, |
|
|
int | max_weight, |
|
|
bool | sanitize = false ) |
|
inlinestatic |
◆ bs
◆ ipl
| int Gecode::Int::BinPacking::Pack::t |
|
protected |
◆ n_reductions
| int const Gecode::Int::BinPacking::Pack::n_reductions = 3 |
|
static |
◆ n_lambda_samples
| int const Gecode::Int::BinPacking::Pack::n_lambda_samples = 256 |
|
static |
The documentation for this class was generated from the following files: