SteelMill Class Reference
[Scripts for problems]
Example: Steel-mill slab design problem
More...
Classes | |
| class | SteelMillBranch |
| Custom branching for steel mill slab design. More... | |
Public Types | |
| enum | { BRANCHING_NAIVE, BRANCHING_SYMMETRY } |
| Branching variants. More... | |
Public Member Functions | |
| SteelMill (const SteelMillOptions &opt) | |
| Actual model. | |
| virtual void | print (std::ostream &os) const |
| Print solution. | |
| SteelMill (bool share, SteelMill &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| 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. | |
Problem variables | |
| IntVarArray | slab |
| Slab assigned to order i. | |
| IntVarArray | slabload |
| Load of slab j. | |
| IntVarArray | slabcost |
| Cost of slab j. | |
| IntVar | total_cost |
| Total cost. | |
Detailed Description
Example: Steel-mill slab design problemThis 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 147 of file steel-mill.cpp.
Member Enumeration Documentation
| anonymous enum |
Branching variants.
- Enumerator:
-
BRANCHING_NAIVE Simple branching. BRANCHING_SYMMETRY Breaking symmetries with branching.
Definition at line 173 of file steel-mill.cpp.
Constructor & Destructor Documentation
| SteelMill::SteelMill | ( | const SteelMillOptions & | opt | ) | [inline] |
| SteelMill::SteelMill | ( | bool | share, | |
| SteelMill & | s | |||
| ) | [inline] |
Member Function Documentation
| virtual void SteelMill::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< MinimizeSpace >.
Definition at line 265 of file steel-mill.cpp.
| virtual Space* SteelMill::copy | ( | bool | share | ) | [inline, virtual] |
| virtual IntVar SteelMill::cost | ( | void | ) | const [inline, virtual] |
Return solution cost.
Implements Gecode::MiniModel::OptimizeSpace< IRT_LE >.
Definition at line 306 of file steel-mill.cpp.
Member Data Documentation
int* SteelMill::capacities [protected] |
int SteelMill::ncapacities [protected] |
int SteelMill::maxcapacity [protected] |
int* SteelMill::loss [protected] |
int SteelMill::ncolors [protected] |
order_t SteelMill::orders [protected] |
unsigned int SteelMill::norders [protected] |
unsigned int SteelMill::nslabs [protected] |
IntVarArray SteelMill::slab [protected] |
IntVarArray SteelMill::slabload [protected] |
IntVarArray SteelMill::slabcost [protected] |
IntVar SteelMill::total_cost [protected] |
The documentation for this class was generated from the following file:
- examples/steel-mill.cpp (Revision: 9118)
