Generated on Fri Oct 19 11:26:06 2018 for Gecode by doxygen 1.6.3

Gecode::Int::BinPacking::Pack Class Reference
[Integer propagators]

Bin-packing propagator. More...

#include <bin-packing.hh>

List of all members.

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 Actorcopy (Space &home)
 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, Pack &p)
 Constructor for cloning p.

Protected Attributes

ViewArray< OffsetViewl
 Views for load of bins.
ViewArray< Itembs
 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

Definition at line 141 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 151 of file propagate.hpp.

Gecode::Int::BinPacking::Pack::Pack ( Space home,
Pack p 
) [inline, protected]

Constructor for cloning p.

Definition at line 160 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 360 of file propagate.cpp.

template<class SizeSet >
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 176 of file propagate.hpp.

template<class SizeSet >
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 207 of file propagate.hpp.

ExecStatus Gecode::Int::BinPacking::Pack::propagate ( Space home,
const ModEventDelta med 
) [virtual]

Perform propagation.

Implements Gecode::Propagator.

Definition at line 113 of file propagate.cpp.

PropCost Gecode::Int::BinPacking::Pack::cost ( const Space home,
const ModEventDelta med 
) const [virtual]

Cost function.

Implements Gecode::Propagator.

Definition at line 44 of file propagate.cpp.

void Gecode::Int::BinPacking::Pack::reschedule ( Space home  )  [virtual]

Schedule function.

Implements Gecode::Propagator.

Definition at line 49 of file propagate.cpp.

Actor * Gecode::Int::BinPacking::Pack::copy ( Space home  )  [virtual]

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 55 of file propagate.cpp.

size_t Gecode::Int::BinPacking::Pack::dispose ( Space home  )  [inline, virtual]

Destructor.

Reimplemented from Gecode::Actor.

Definition at line 167 of file propagate.hpp.


Member Data Documentation

Views for load of bins.

Definition at line 144 of file bin-packing.hh.

Items with bin and size.

Definition at line 146 of file bin-packing.hh.

Total size of all items.

Definition at line 148 of file bin-packing.hh.


The documentation for this class was generated from the following files: