
Example: Bin packing More...
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 Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| ScriptBase (void) | |
| Default constructor. | |
| ScriptBase (bool share, ScriptBase &e) | |
| Constructor used for cloning. | |
| virtual void | compare (const Space &, std::ostream &os) const |
| Compare with s. | |
Protected Attributes | |
| const Spec | spec |
| Specification. | |
| IntVarArray | load |
| Load for each bin. | |
| IntVarArray | bin |
| Bin for each item. | |
| IntVar | bins |
| Number of bins. | |
Related Functions | |
(Note that these are not member functions.) | |
| int | main (int argc, char *argv[]) |
| Main-function. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace > | |
| template<class Script , template< class > class Engine, class Options > | |
| static void | run (const Options &opt) |
Example: Bin packing
Definition at line 375 of file bin-packing.cpp.
| anonymous enum |
Model variants.
Definition at line 387 of file bin-packing.cpp.
| anonymous enum |
Branching to use for model.
| BRANCH_NAIVE |
Use naive branching. |
| BRANCH_CDBF |
Use CDBF. |
Definition at line 392 of file bin-packing.cpp.
|
inline |
Actual model.
Definition at line 397 of file bin-packing.cpp.
|
inline |
Constructor for cloning s.
Definition at line 475 of file bin-packing.cpp.
|
inlinevirtual |
Return cost.
Definition at line 471 of file bin-packing.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 483 of file bin-packing.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 488 of file bin-packing.cpp.
|
related |
Main-function.
Definition at line 520 of file bin-packing.cpp.
|
protected |
Specification.
Definition at line 378 of file bin-packing.cpp.
|
protected |
Load for each bin.
Definition at line 380 of file bin-packing.cpp.
|
protected |
Bin for each item.
Definition at line 382 of file bin-packing.cpp.
|
protected |
Number of bins.
Definition at line 384 of file bin-packing.cpp.