Example: Steel-mill slab design problem More...
Classes | |
class | SteelMillBranch |
Custom brancher for steel mill slab design. More... |
Related Symbols | |
(Note that these are not member symbols.) | |
int | main (int argc, char *argv[]) |
Main-function. |
Problem variables | |
enum | { SYMMETRY_NONE , SYMMETRY_BRANCHING , SYMMETRY_LDSB } |
Branching variants. More... | |
IntVarArray | slab |
Slab assigned to order i. | |
IntVarArray | slabload |
Load of slab j. | |
IntVarArray | slabcost |
Cost of slab j. | |
IntVar | total_cost |
Total cost. | |
SteelMill (const SteelMillOptions &opt) | |
Actual model. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
SteelMill (SteelMill &s) | |
Constructor for cloning s. | |
virtual Space * | copy (void) |
Copy during cloning. | |
virtual IntVar | cost (void) const |
Return solution cost. |
Instance specification | |
int * | capacities |
Capacities. | |
int | ncapacities |
Number of capacities. | |
int | maxcapacity |
Maximum capacity. | |
int * | loss |
Loss for all sizes. | |
int | ncolors |
Number of colors. | |
order_t | orders |
Orders. | |
unsigned int | norders |
Number of orders. | |
unsigned int | nslabs |
Number of slabs. |
Additional Inherited Members | |
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > > | |
ScriptBase (const Options &opt) | |
Constructor. | |
ScriptBase (ScriptBase &e) | |
Constructor used for cloning. | |
virtual void | compare (const Space &home, std::ostream &os) const |
Compare with s. | |
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace > | |
IgnoreStepOption (const Options &) | |
Constructor. | |
IgnoreStepOption (BaseSpace &e) | |
Constructor used for cloning. | |
Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > > | |
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs) |
Choose output stream according to sn. | |
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 158 of file steel-mill.cpp.
anonymous enum |
Branching variants.
Enumerator | |
---|---|
SYMMETRY_NONE | Simple symmetry. |
SYMMETRY_BRANCHING | Breaking symmetries with symmetry. |
SYMMETRY_LDSB | Use LDSB for symmetry breaking. |
Definition at line 184 of file steel-mill.cpp.
|
inline |
Actual model.
Definition at line 191 of file steel-mill.cpp.
|
inline |
Constructor for cloning s.
Definition at line 321 of file steel-mill.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > >.
Definition at line 297 of file steel-mill.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 334 of file steel-mill.cpp.
|
inlinevirtual |
Return solution cost.
Definition at line 338 of file steel-mill.cpp.
|
Main-function.
Definition at line 469 of file steel-mill.cpp.
|
protected |
Capacities.
Definition at line 163 of file steel-mill.cpp.
|
protected |
Number of capacities.
Definition at line 164 of file steel-mill.cpp.
|
protected |
Maximum capacity.
Definition at line 165 of file steel-mill.cpp.
|
protected |
Loss for all sizes.
Definition at line 166 of file steel-mill.cpp.
|
protected |
Number of colors.
Definition at line 167 of file steel-mill.cpp.
|
protected |
Orders.
Definition at line 168 of file steel-mill.cpp.
|
protected |
Number of orders.
Definition at line 169 of file steel-mill.cpp.
|
protected |
Number of slabs.
Definition at line 170 of file steel-mill.cpp.
|
protected |
Slab assigned to order i.
Definition at line 176 of file steel-mill.cpp.
|
protected |
Load of slab j.
Definition at line 177 of file steel-mill.cpp.
|
protected |
Cost of slab j.
Definition at line 178 of file steel-mill.cpp.
|
protected |
Total cost.
Definition at line 179 of file steel-mill.cpp.