SteelMill Class Reference
Example scripts (models)

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)

## Detailed Description

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.

## Member Enumeration Documentation

## anonymous enum

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.

## Constructor & Destructor Documentation

## SteelMill() [1/2]

SteelMill::SteelMill | ( | const SteelMillOptions & | opt | ) |

inline

Actual model.

Definition at line 191 of file steel-mill.cpp.

## SteelMill() [2/2]

SteelMill::SteelMill | ( | SteelMill & | s | ) |

inline

Constructor for cloning s.

Definition at line 321 of file steel-mill.cpp.

## Member Function Documentation

## print()

virtual void SteelMill::print | ( | std::ostream & | os | ) | const

inline virtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< IntMinimizeSpace > >.

Definition at line 297 of file steel-mill.cpp.

## copy()

virtual Space * SteelMill::copy | ( | void |  | ) |

inline virtual

Copy during cloning.

Definition at line 334 of file steel-mill.cpp.

## cost()

virtual IntVar SteelMill::cost | ( | void |  | ) | const

inline virtual

Return solution cost.

Definition at line 338 of file steel-mill.cpp.

## Friends And Related Symbol Documentation

## main()

int main | ( | int | argc,
|  | char * | argv[] )

related

Main-function.

Definition at line 469 of file steel-mill.cpp.

## Member Data Documentation

## capacities

int* SteelMill::capacities

protected

Capacities.

Definition at line 163 of file steel-mill.cpp.

## ncapacities

int SteelMill::ncapacities

protected

Number of capacities.

Definition at line 164 of file steel-mill.cpp.

## maxcapacity

int SteelMill::maxcapacity

protected

Maximum capacity.

Definition at line 165 of file steel-mill.cpp.

## loss

int* SteelMill::loss

protected

Loss for all sizes.

Definition at line 166 of file steel-mill.cpp.

## ncolors

int SteelMill::ncolors

protected

Number of colors.

Definition at line 167 of file steel-mill.cpp.

## orders

order_t SteelMill::orders

protected

Orders.

Definition at line 168 of file steel-mill.cpp.

## norders

unsigned int SteelMill::norders

protected

Number of orders.

Definition at line 169 of file steel-mill.cpp.

## nslabs

unsigned int SteelMill::nslabs

protected

Number of slabs.

Definition at line 170 of file steel-mill.cpp.

## slab

IntVarArray SteelMill::slab

protected

Slab assigned to order i.

Definition at line 176 of file steel-mill.cpp.

## slabload

IntVarArray SteelMill::slabload

protected

Load of slab j.

Definition at line 177 of file steel-mill.cpp.

## slabcost

IntVarArray SteelMill::slabcost

protected

Cost of slab j.

Definition at line 178 of file steel-mill.cpp.

## total_cost

IntVar SteelMill::total_cost

protected

Total cost.

Definition at line 179 of file steel-mill.cpp.

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

- examples/steel-mill.cpp