Generated on Thu Mar 22 10:39:52 2012 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 }
 

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 Spacecopy (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 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 147 of file steel-mill.cpp.


Member Enumeration Documentation

anonymous enum

Branching variants.

Enumerator:
SYMMETRY_NONE 

Simple symmetry.

SYMMETRY_BRANCHING 

Breaking symmetries with symmetry.

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


Constructor & Destructor Documentation

SteelMill::SteelMill ( const SteelMillOptions opt  )  [inline]

Actual model.

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

SteelMill::SteelMill ( bool  share,
SteelMill s 
) [inline]

Constructor for cloning s.

Definition at line 289 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 265 of file steel-mill.cpp.

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

Copy during cloning.

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

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

Return solution cost.

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


Member Data Documentation

int* SteelMill::capacities [protected]

Capacities.

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

int SteelMill::ncapacities [protected]

Number of capacities.

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

int SteelMill::maxcapacity [protected]

Maximum capacity.

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

int* SteelMill::loss [protected]

Loss for all sizes.

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

int SteelMill::ncolors [protected]

Number of colors.

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

Orders.

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

unsigned int SteelMill::norders [protected]

Number of orders.

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

unsigned int SteelMill::nslabs [protected]

Number of slabs.

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

Slab assigned to order i.

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

Load of slab j.

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

Cost of slab j.

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

Total cost.

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


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