Generated on Sat Aug 25 2012 03:33:01 for Gecode by doxygen 1.8.1.2
CDBF Class Reference

Custom brancher implementing CDBF. More...

Classes

class  Choice
 Choice More...

Public Member Functions

 CDBF (Home home, ViewArray< Int::IntView > &l, ViewArray< Int::IntView > &b, IntSharedArray &s)
 Construct brancher.
 CDBF (Space &home, bool share, CDBF &cdbf)
 Copy constructor.
virtual Actorcopy (Space &home, bool share)
 Copy brancher.
virtual size_t dispose (Space &home)
 Delete brancher and return its size.
virtual bool status (const Space &) const
 Check status of brancher, return true if alternatives left.
virtual Gecode::Choicechoice (Space &home)
 Return choice.
virtual const Gecode::Choicechoice (const Space &home, Archive &e)
 Return choice.
virtual ExecStatus commit (Space &home, const Gecode::Choice &_c, unsigned int a)
 Perform commit for choice _c and alternative a.
- Public Member Functions inherited from Gecode::Brancher
unsigned int id (void) const
 Return unsigned brancher id.

Static Public Member Functions

static void post (Home home, ViewArray< Int::IntView > &l, ViewArray< Int::IntView > &b, IntSharedArray &s)
 Brancher post function.

Protected Attributes

ViewArray< Int::IntViewload
 Views for the loads.
ViewArray< Int::IntViewbin
 Views for the bins.
IntSharedArray size
 Array of sizes (shared)
int item
 Next view to branch on.

Additional Inherited Members

- Protected Member Functions inherited from Gecode::Brancher
 Brancher (Home home)
 Constructor for creation.
 Brancher (Space &home, bool share, Brancher &b)
 Constructor for cloning b.

Detailed Description

Custom brancher implementing CDBF.

This class implements complete decreasing best fit branching (CDBF) from: Ian Gent and Toby Walsh. From approximate to optimal solutions: Constructing pruning and propagation rules. IJCAI 1997.

Additional domination rules are taken from: Paul Shaw. A Constraint for Bin Packing. CP 2004

Definition at line 189 of file bin-packing.cpp.

Constructor & Destructor Documentation

CDBF::CDBF ( Home  home,
ViewArray< Int::IntView > &  l,
ViewArray< Int::IntView > &  b,
IntSharedArray s 
)
inline

Construct brancher.

Definition at line 236 of file bin-packing.cpp.

CDBF::CDBF ( Space home,
bool  share,
CDBF cdbf 
)
inline

Copy constructor.

Definition at line 248 of file bin-packing.cpp.

Member Function Documentation

static void CDBF::post ( Home  home,
ViewArray< Int::IntView > &  l,
ViewArray< Int::IntView > &  b,
IntSharedArray s 
)
inlinestatic

Brancher post function.

Definition at line 242 of file bin-packing.cpp.

virtual Actor* CDBF::copy ( Space home,
bool  share 
)
inlinevirtual

Copy brancher.

Implements Gecode::Actor.

Definition at line 255 of file bin-packing.cpp.

virtual size_t CDBF::dispose ( Space home)
inlinevirtual

Delete brancher and return its size.

Reimplemented from Gecode::Actor.

Definition at line 259 of file bin-packing.cpp.

virtual bool CDBF::status ( const Space ) const
inlinevirtual

Check status of brancher, return true if alternatives left.

Implements Gecode::Brancher.

Definition at line 265 of file bin-packing.cpp.

virtual Gecode::Choice* CDBF::choice ( Space home)
inlinevirtual

Return choice.

Implements Gecode::Brancher.

Definition at line 273 of file bin-packing.cpp.

virtual const Gecode::Choice* CDBF::choice ( const Space home,
Archive e 
)
inlinevirtual

Return choice.

Implements Gecode::Brancher.

Definition at line 326 of file bin-packing.cpp.

virtual ExecStatus CDBF::commit ( Space home,
const Gecode::Choice _c,
unsigned int  a 
)
inlinevirtual

Perform commit for choice _c and alternative a.

Implements Gecode::Brancher.

Definition at line 335 of file bin-packing.cpp.

Member Data Documentation

ViewArray<Int::IntView> CDBF::load
protected

Views for the loads.

Definition at line 192 of file bin-packing.cpp.

ViewArray<Int::IntView> CDBF::bin
protected

Views for the bins.

Definition at line 194 of file bin-packing.cpp.

IntSharedArray CDBF::size
protected

Array of sizes (shared)

Definition at line 196 of file bin-packing.cpp.

int CDBF::item
mutableprotected

Next view to branch on.

Definition at line 198 of file bin-packing.cpp.


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