Generated on Mon May 10 06:46:53 2010 for Gecode by doxygen 1.6.3

Warehouses Class Reference
[Scripts for problems]

Example: Locating warehouses More...

List of all members.

Public Member Functions

 Warehouses (const Options &)
 Actual model.
virtual IntVar cost (void) const
 Return solution cost.
 Warehouses (bool share, Warehouses &s)
 Constructor for cloning s.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (std::ostream &os) const
 Print solution.

Protected Attributes

IntVarArray supplier
 Map store to the supplier.
BoolVarArray open
 Is a supplier open (warehouse needed).
IntVarArray store
 Cost of a store.
IntVar total
 Total cost.

Detailed Description

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

Definition at line 96 of file warehouses.cpp.


Constructor & Destructor Documentation

Warehouses::Warehouses ( const Options  )  [inline]

Actual model.

Definition at line 108 of file warehouses.cpp.

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

Constructor for cloning s.

Definition at line 142 of file warehouses.cpp.


Member Function Documentation

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

Return solution cost.

Definition at line 138 of file warehouses.cpp.

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

Copy during cloning.

Definition at line 151 of file warehouses.cpp.

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

Print solution.

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

Definition at line 156 of file warehouses.cpp.


Member Data Documentation

Map store to the supplier.

Definition at line 99 of file warehouses.cpp.

Is a supplier open (warehouse needed).

Definition at line 101 of file warehouses.cpp.

Cost of a store.

Definition at line 103 of file warehouses.cpp.

Total cost.

Definition at line 105 of file warehouses.cpp.


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