Gecode::Int::BinPacking::Pack Class Reference
[Integer propagators]
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. | |
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, bool share) |
Copy propagator during cloning. | |
virtual size_t | dispose (Space &home) |
Destructor. | |
Static Public Member Functions | |
static ExecStatus | post (Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs) |
Post propagator for loads l and items bs. | |
Protected Member Functions | |
Pack (Home home, ViewArray< OffsetView > &l, ViewArray< Item > &bs) | |
Constructor for posting. | |
Pack (Space &home, bool share, Pack &p) | |
Constructor for cloning p. | |
Protected Attributes | |
ViewArray< OffsetView > | l |
Views for load of bins. | |
ViewArray< Item > | bs |
Items with bin and size. | |
int | t |
Total size of all items. |
Detailed Description
Bin-packing propagator.
The algorithm is taken from: Paul Shaw. A Constraint for Bin Packing. CP 2004.
Requires
#include <gecode/int/bin-packing.hh>
Definition at line 145 of file bin-packing.hh.
Constructor & Destructor Documentation
Gecode::Int::BinPacking::Pack::Pack | ( | Home | home, | |
ViewArray< OffsetView > & | l, | |||
ViewArray< Item > & | bs | |||
) | [inline, protected] |
Constructor for posting.
Definition at line 155 of file propagate.hpp.
Constructor for cloning p.
Definition at line 164 of file propagate.hpp.
Member Function Documentation
ExecStatus Gecode::Int::BinPacking::Pack::post | ( | Home | home, | |
ViewArray< OffsetView > & | l, | |||
ViewArray< Item > & | bs | |||
) | [static] |
Post propagator for loads l and items bs.
Definition at line 364 of file propagate.cpp.
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 180 of file propagate.hpp.
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 211 of file propagate.hpp.
ExecStatus Gecode::Int::BinPacking::Pack::propagate | ( | Space & | home, | |
const ModEventDelta & | med | |||
) | [virtual] |
PropCost Gecode::Int::BinPacking::Pack::cost | ( | const Space & | home, | |
const ModEventDelta & | med | |||
) | const [virtual] |
void Gecode::Int::BinPacking::Pack::reschedule | ( | Space & | home | ) | [virtual] |
Copy propagator during cloning.
Implements Gecode::Actor.
Definition at line 59 of file propagate.cpp.
size_t Gecode::Int::BinPacking::Pack::dispose | ( | Space & | home | ) | [inline, virtual] |
Member Data Documentation
ViewArray<OffsetView> Gecode::Int::BinPacking::Pack::l [protected] |
Views for load of bins.
Definition at line 148 of file bin-packing.hh.
ViewArray<Item> Gecode::Int::BinPacking::Pack::bs [protected] |
Items with bin and size.
Definition at line 150 of file bin-packing.hh.
int Gecode::Int::BinPacking::Pack::t [protected] |
Total size of all items.
Definition at line 152 of file bin-packing.hh.
The documentation for this class was generated from the following files:
- gecode/int/bin-packing.hh (Revision: 15160)
- gecode/int/bin-packing/propagate.cpp (Revision: 15137)
- gecode/int/bin-packing/propagate.hpp (Revision: 14967)