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

Warehouses< Script > Class Template Reference
[Example scripts (models)]

Example: Locating warehouses More...

List of all members.

Public Member Functions

 Warehouses (const Options &opt)
 Actual model.
 Warehouses (Warehouses &s)
 Constructor for cloning s.

Protected Attributes

IntVarArray supplier
 Which warehouse supplies a store.
BoolVarArray open
 Is a warehouse open (warehouse needed).
IntVarArray c_store
 Cost of a store.

Detailed Description

template<class Script>
class Warehouses< Script >

Example: Locating warehouses

A company needs to construct warehouses to supply stores with goods. Each warehouse possibly to be constructed has a certain capacity defining how many stores it can supply. Constructing a warehouse incurs a fixed cost. Costs for transportation from warehouses to stores depend on the locations of warehouses and stores.

Determine which warehouses should be constructed and which warehouse should supply which store such that overall cost (transportation cost plus construction cost) is smallest.

Taken from: Pascal Van Hentenryck, The OPL Optmization Programming Language, The MIT Press, 1999.

See also problem 34 at http://www.csplib.org/.

Note that "Modeling and Programming with Gecode" uses this example as a case study.

Definition at line 100 of file warehouses.cpp.


Constructor & Destructor Documentation

template<class Script>
Warehouses< Script >::Warehouses ( const Options opt  )  [inline]

Actual model.

Definition at line 110 of file warehouses.cpp.

template<class Script>
Warehouses< Script >::Warehouses ( Warehouses< Script > &  s  )  [inline]

Constructor for cloning s.

Definition at line 140 of file warehouses.cpp.


Member Data Documentation

template<class Script>
IntVarArray Warehouses< Script >::supplier [protected]

Which warehouse supplies a store.

Definition at line 103 of file warehouses.cpp.

template<class Script>
BoolVarArray Warehouses< Script >::open [protected]

Is a warehouse open (warehouse needed).

Definition at line 105 of file warehouses.cpp.

template<class Script>
IntVarArray Warehouses< Script >::c_store [protected]

Cost of a store.

Definition at line 107 of file warehouses.cpp.


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