Example: Steel-mill slab design problem More...
Classes | |
class | SteelMillBranch |
Custom brancher for steel mill slab design. More... | |
Public Types | |
enum | { SYMMETRY_NONE, SYMMETRY_BRANCHING, SYMMETRY_LDSB } |
Branching variants. More... | |
Public Member Functions | |
SteelMill (const SteelMillOptions &opt) | |
Actual model. More... | |
virtual void | print (std::ostream &os) const |
Print solution. More... | |
SteelMill (bool share, SteelMill &s) | |
Constructor for cloning s. More... | |
virtual Space * | copy (bool share) |
Copy during cloning. More... | |
virtual IntVar | cost (void) const |
Return solution cost. More... | |
![]() | |
ScriptBase (void) | |
Default constructor. More... | |
ScriptBase (bool share, ScriptBase &e) | |
Constructor used for cloning. More... | |
virtual void | compare (const Space &, std::ostream &os) const |
Compare with s. More... | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. More... | |
Instance specification | |
int * | capacities |
Capacities. More... | |
int | ncapacities |
Number of capacities. More... | |
int | maxcapacity |
Maximum capacity. More... | |
int * | loss |
Loss for all sizes. More... | |
int | ncolors |
Number of colors. More... | |
order_t | orders |
Orders. More... | |
unsigned int | norders |
Number of orders. More... | |
unsigned int | nslabs |
Number of slabs. More... | |
Problem variables | |
IntVarArray | slab |
Slab assigned to order i. More... | |
IntVarArray | slabload |
Load of slab j. More... | |
IntVarArray | slabcost |
Cost of slab j. More... | |
IntVar | total_cost |
Total cost. More... | |
Additional Inherited Members | |
![]() | |
static std::ostream & | select_ostream (const char *name, std::ofstream &ofs) |
Choose output stream according to name. More... | |
template<class Script , template< class > class Engine, class Options > | |
static void | run (const Options &opt, Script *s=NULL) |
Example: Steel-mill slab design problem
This model solves the Steel Mill Slab Design Problem (Problem 38 in CSPLib). The model is from Gargani and Refalo, "An efficient model and strategy for the steel mill slab design problem.", CP 2007, except that a decomposition of the packing constraint is used. The symmetry-breaking search is from Van Hentenryck and Michel, "The Steel Mill Slab Design Problem Revisited", CPAIOR 2008.
The program accepts an optional argument for a data-file containing an instance of the problem. The format for the data-file is the following:
"number of slab capacities" "sequence of capacities in increasing order" "number of colors" "number of orders" "size order 1" "color of order 1" "size order 2" "color of order 2" ...
Hard instances are available from http://becool.info.ucl.ac.be/steelmillslab.
Definition at line 162 of file steel-mill.cpp.
|
inline |
Actual model.
Definition at line 195 of file steel-mill.cpp.
|
inline |
Constructor for cloning s.
Definition at line 324 of file steel-mill.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
Definition at line 300 of file steel-mill.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 337 of file steel-mill.cpp.
|
inlinevirtual |
Return solution cost.
Definition at line 341 of file steel-mill.cpp.
|
related |
Main-function.
Definition at line 476 of file steel-mill.cpp.
|
protected |
Capacities.
Definition at line 167 of file steel-mill.cpp.
|
protected |
Number of capacities.
Definition at line 168 of file steel-mill.cpp.
|
protected |
Maximum capacity.
Definition at line 169 of file steel-mill.cpp.
|
protected |
Loss for all sizes.
Definition at line 170 of file steel-mill.cpp.
|
protected |
Number of colors.
Definition at line 171 of file steel-mill.cpp.
|
protected |
Orders.
Definition at line 172 of file steel-mill.cpp.
|
protected |
Number of orders.
Definition at line 173 of file steel-mill.cpp.
|
protected |
Number of slabs.
Definition at line 174 of file steel-mill.cpp.
|
protected |
Slab assigned to order i.
Definition at line 180 of file steel-mill.cpp.
|
protected |
Load of slab j.
Definition at line 180 of file steel-mill.cpp.
|
protected |
Cost of slab j.
Definition at line 180 of file steel-mill.cpp.
|
protected |
Total cost.
Definition at line 183 of file steel-mill.cpp.