Generated on Thu Apr 11 13:59:40 2019 for Gecode by doxygen 1.6.3

SteelMill Class Reference
[Example scripts (models)]

Example: Steel-mill slab design problem More...

List of all members.

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.
virtual void print (std::ostream &os) const
 Print solution.
 SteelMill (SteelMill &s)
 Constructor for cloning s.
virtual Spacecopy (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.

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 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

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::SteelMill ( const SteelMillOptions opt  )  [inline]

Actual model.

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

SteelMill::SteelMill ( SteelMill s  )  [inline]

Constructor for cloning s.

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


Member Function Documentation

virtual void SteelMill::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

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

virtual Space* SteelMill::copy ( void   )  [inline, virtual]

Copy during cloning.

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

virtual IntVar SteelMill::cost ( void   )  const [inline, virtual]

Return solution cost.

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


Member Data Documentation

int* SteelMill::capacities [protected]

Capacities.

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

int SteelMill::ncapacities [protected]

Number of capacities.

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

int SteelMill::maxcapacity [protected]

Maximum capacity.

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

int* SteelMill::loss [protected]

Loss for all sizes.

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

int SteelMill::ncolors [protected]

Number of colors.

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

Orders.

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

unsigned int SteelMill::norders [protected]

Number of orders.

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

unsigned int SteelMill::nslabs [protected]

Number of slabs.

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

Slab assigned to order i.

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

Load of slab j.

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

Cost of slab j.

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

Total cost.

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


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