Generated on Fri Oct 19 11:25:22 2018 for Gecode by doxygen 1.6.3

warehouses.cpp File Reference

#include <gecode/driver.hh>
#include <gecode/int.hh>
#include <gecode/minimodel.hh>

Go to the source code of this file.

Classes

class  Warehouses< Script >
 Example: Locating warehouses More...
class  SumCostWarehouses
 Model with cost defined as sum. More...
class  LexCostWarehouses
 Model with cost defined lexicographically. More...

Enumerations

enum  { MODEL_SUMCOST, MODEL_LEXCOST }
 

Model variants.

More...

Variables

const int n_warehouses = 5
 Number of warehouses.
const int n_stores = 10
 Number of stores.
const int c_fixed = 30
 Fixed cost for one warehouse.
const int capacity [n_warehouses]
 Capacity of a single warehouse.
const int c_supply [n_stores][n_warehouses]
 Cost for supply a store by a warehouse.

Enumeration Type Documentation

anonymous enum

Model variants.

Enumerator:
MODEL_SUMCOST 

Use sum as total cost.

MODEL_LEXCOST 

Use lexicographic cost.

Definition at line 68 of file warehouses.cpp.


Variable Documentation

const int n_warehouses = 5

Number of warehouses.

Definition at line 41 of file warehouses.cpp.

const int n_stores = 10

Number of stores.

Definition at line 43 of file warehouses.cpp.

const int c_fixed = 30

Fixed cost for one warehouse.

Definition at line 46 of file warehouses.cpp.

const int capacity[n_warehouses]
Initial value:
 {
  1, 4, 2, 1, 3
}

Capacity of a single warehouse.

Definition at line 49 of file warehouses.cpp.

Initial value:
 {
  {20, 24, 11, 25, 30},
  {28, 27, 82, 83, 74},
  {74, 97, 71, 96, 70},
  { 2, 55, 73, 69, 61},
  {46, 96, 59, 83,  4},
  {42, 22, 29, 67, 59},
  { 1,  5, 73, 59, 56},
  {10, 73, 13, 43, 96},
  {93, 35, 63, 85, 46},
  {47, 65, 55, 71, 95}
}

Cost for supply a store by a warehouse.

Definition at line 54 of file warehouses.cpp.