Generated on Sat Feb 7 2015 02:01:38 for Gecode by doxygen 1.8.9.1
SteelMill Class Reference

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

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. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
 SteelMill (bool share, SteelMill &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. More...
 
virtual IntVar cost (void) const
 Return solution cost. More...
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (void)
 Default constructor. More...
 
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning. More...
 
virtual void compare (const Space &, std::ostream &os) const
 Compare with s. More...
 

Related Functions

(Note that these are not member functions.)

int main (int argc, char *argv[])
 Main-function. More...
 

Instance specification

int * capacities
 Capacities. More...
 
int ncapacities
 Number of capacities. More...
 
int maxcapacity
 Maximum capacity. More...
 
int * loss
 Loss for all sizes. More...
 
int ncolors
 Number of colors. More...
 
order_t orders
 Orders. More...
 
unsigned int norders
 Number of orders. More...
 
unsigned int nslabs
 Number of slabs. More...
 

Problem variables

IntVarArray slab
 Slab assigned to order i. More...
 
IntVarArray slabload
 Load of slab j. More...
 
IntVarArray slabcost
 Cost of slab j. More...
 
IntVar total_cost
 Total cost. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
static std::ostream & select_ostream (const char *name, std::ofstream &ofs)
 Choose output stream according to name. More...
 
template<class Script , template< class > class Engine, class Options >
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 162 of file steel-mill.cpp.

Constructor & Destructor Documentation

SteelMill::SteelMill ( const SteelMillOptions opt)
inline

Actual model.

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

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

Constructor for cloning s.

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

Member Function Documentation

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

Print solution.

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

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

virtual Space* SteelMill::copy ( bool  share)
inlinevirtual

Copy during cloning.

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

virtual IntVar SteelMill::cost ( void  ) const
inlinevirtual

Return solution cost.

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

Friends And Related Function Documentation

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

Main-function.

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

Member Data Documentation

int* SteelMill::capacities
protected

Capacities.

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

int SteelMill::ncapacities
protected

Number of capacities.

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

int SteelMill::maxcapacity
protected

Maximum capacity.

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

int* SteelMill::loss
protected

Loss for all sizes.

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

int SteelMill::ncolors
protected

Number of colors.

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

order_t SteelMill::orders
protected

Orders.

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

unsigned int SteelMill::norders
protected

Number of orders.

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

unsigned int SteelMill::nslabs
protected

Number of slabs.

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

IntVarArray SteelMill::slab
protected

Slab assigned to order i.

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

IntVarArray SteelMill::slabload
protected

Load of slab j.

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

IntVarArray SteelMill::slabcost
protected

Cost of slab j.

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

IntVar SteelMill::total_cost
protected

Total cost.

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


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