Warehouses Class Reference
[Example scripts (models)]
Example: Locating warehouses More...
Public Member Functions
|Warehouses (const Options &opt)|
|Actual model. |
|virtual IntVar||cost (void) const|
|Return solution cost. |
|Warehouses (bool share, Warehouses &s)|
|Constructor for cloning s. |
|virtual Space *||copy (bool share)|
|Copy during cloning. |
|virtual void||print (std::ostream &os) const|
|Print solution. |
|Which warehouse supplies a store. |
|Is a warehouse open (warehouse needed). |
|Cost of a store. |
|Total cost. |
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.
Constructor & Destructor Documentation
|Warehouses::Warehouses||(||const Options &||opt||)||
Member Function Documentation
|virtual IntVar Warehouses::cost||(||void||)|| const
|virtual Space* Warehouses::copy||(||bool||share||)||
|virtual void Warehouses::print||(||std::ostream &||os||)|| const
Member Data Documentation
The documentation for this class was generated from the following file:
- examples/warehouses.cpp (Revision: 14672)