Generated on Thu Mar 22 10:39:51 2012 for Gecode by doxygen 1.6.3

BinPacking Class Reference
[Example scripts (models)]

Example: Bin packing More...

List of all members.

Public Types

enum  { MODEL_NAIVE, MODEL_PACKING }
 

Model variants.

More...
enum  { BRANCH_NAIVE, BRANCH_CDBF }
 

Branching to use for model.

More...

Public Member Functions

 BinPacking (const InstanceOptions &opt)
 Actual model.
virtual IntVar cost (void) const
 Return cost.
 BinPacking (bool share, BinPacking &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (std::ostream &os) const
 Print solution.

Protected Attributes

const Spec spec
 Specification.
IntVarArray load
 Load for each bin.
IntVarArray bin
 Bin for each item.
IntVar bins
 Number of bins.

Detailed Description

Example: Bin packing

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


Member Enumeration Documentation

anonymous enum

Model variants.

Enumerator:
MODEL_NAIVE 

Use naive model.

MODEL_PACKING 

Use bin packing constraint.

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

anonymous enum

Branching to use for model.

Enumerator:
BRANCH_NAIVE 

Use naive branching.

BRANCH_CDBF 

Use CDBF.

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


Constructor & Destructor Documentation

BinPacking::BinPacking ( const InstanceOptions opt  )  [inline]

Actual model.

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

BinPacking::BinPacking ( bool  share,
BinPacking s 
) [inline]

Constructor for cloning s.

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


Member Function Documentation

virtual IntVar BinPacking::cost ( void   )  const [inline, virtual]

Return cost.

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

virtual Space* BinPacking::copy ( bool  share  )  [inline, virtual]

Copy during cloning.

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

virtual void BinPacking::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

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


Member Data Documentation

const Spec BinPacking::spec [protected]

Specification.

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

Load for each bin.

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

Bin for each item.

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

IntVar BinPacking::bins [protected]

Number of bins.

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


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