
Bin-packing propagator. More...
#include <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. More... | |
| template<class SizeSet > | |
| bool | nosum (const SizeSet &s, int a, int b) |
| Detect non-existence of sums in a .. b. More... | |
| virtual ExecStatus | propagate (Space &home, const ModEventDelta &med) |
| Perform propagation. More... | |
| virtual PropCost | cost (const Space &home, const ModEventDelta &med) const |
| Cost function. More... | |
| virtual Actor * | copy (Space &home, bool share) |
| Copy propagator during cloning. More... | |
| virtual size_t | dispose (Space &home) |
| Destructor. More... | |
Public Member Functions inherited from Gecode::Propagator | |
| ModEventDelta | modeventdelta (void) const |
| Return the modification event delta. More... | |
| virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d) |
| Advise function. More... | |
| double | afc (const Space &home) const |
| Return the accumlated failure count. More... | |
Public Member Functions inherited from Gecode::Actor | |
Static Public Member Functions | |
| static ExecStatus | post (Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs) |
| Post propagator for loads l and items bs. More... | |
Static Public Member Functions inherited from Gecode::Actor | |
| static void * | operator new (size_t s, Space &home) |
| Allocate memory from space. More... | |
| static void | operator delete (void *p, Space &home) |
| No-op for exceptions. More... | |
Protected Member Functions | |
| Pack (Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs) | |
| Constructor for posting. More... | |
| Pack (Space &home, bool share, Pack &p) | |
| Constructor for cloning p. More... | |
Protected Member Functions inherited from Gecode::Propagator | |
| Propagator (Home home) | |
| Constructor for posting. More... | |
| Propagator (Space &home, bool share, Propagator &p) | |
| Constructor for cloning p. More... | |
| Propagator * | fwd (void) const |
| Return forwarding pointer during copying. More... | |
Protected Attributes | |
| ViewArray< OffsetView > | l |
| Views for load of bins. More... | |
| ViewArray< Item > | bs |
| Items with bin and size. More... | |
| int | t |
| Total size of all items. More... | |
Bin-packing propagator.
The algorithm is taken from: Paul Shaw. A Constraint for Bin Packing. CP 2004.
Requires
Definition at line 145 of file bin-packing.hh.
|
inlineprotected |
Constructor for posting.
Definition at line 155 of file propagate.hpp.
Constructor for cloning p.
Definition at line 164 of file propagate.hpp.
|
static |
Post propagator for loads l and items bs.
Definition at line 358 of file propagate.cpp.
|
inline |
Detect non-existence of sums in a .. b.
Definition at line 180 of file propagate.hpp.
|
inline |
Detect non-existence of sums in a .. b.
Definition at line 211 of file propagate.hpp.
|
virtual |
|
virtual |
Copy propagator during cloning.
Implements Gecode::Actor.
Definition at line 53 of file propagate.cpp.
|
inlinevirtual |
|
protected |
Views for load of bins.
Definition at line 148 of file bin-packing.hh.
Items with bin and size.
Definition at line 150 of file bin-packing.hh.
|
protected |
Total size of all items.
Definition at line 152 of file bin-packing.hh.