help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] WLP Mathprog


From: Andrew Makhorin
Subject: Re: [Help-glpk] WLP Mathprog
Date: Tue, 20 Nov 2007 02:53:03 +0300

> I was looking for  Mathprog implementations of a WLP (Warehouse
> Location Problem) in its many variations. Do you know where i can find
> one??

I've got one (see below).

************************************************************************

#  WAREHOUSE LOCATION PROBLEM

#  This problem minimizes cost subject to tradeoffs between
#  transportation costs and location costs
#
#  References:
#  The model is taken from [Magnanti et al, p.369].

set I;            # warehouses

set J;            # customers

param f{i in I};  # fixed operating cost for warehouse i if opened

param d{j in J};  # demand for each customer j

param c{i in I, j in J};
                  # per unit operating cost at warehouse i plus
                  # transportation cost

var x{i in I, j in J}, >= 0;
                  # amount to be sent from warehouse i to customer j

var y{i in I}, binary;
                  # 0 or 1 indicating if warehouse i is opened

minimize cost: sum{i in I} (sum{j in J} c[i,j] * x[i,j] + f[i] * y[i]);
                  # minimize total costs

s.t. demands{j in J}: sum{i in I} x[i,j] = d[j];
                  # the demands of each customer must be met from the
                  # warehouse

s.t. logical{i in I}: sum{j in J} x[i,j] <= y[i] * sum{j in J} d[j];
                  # goods can be shipped only if warehouse is opened

data;

set I := W1 W2 W3 W4 W5 W6;

set J := CT1 CT2 CT3 CT4 CT5 CT6 CT7 CT8 CT9 CT10;

param f := W1 99, W2 99, W3 45, W4 96, W5 29, W6 98;

param d := CT1 12, CT2 45, CT3 72, CT4 34, CT5 53, CT6 98, CT7 34,
           CT8 74, CT9 98, CT10 21;

param c : CT1 CT2 CT3 CT4 CT5 CT6 CT7 CT8 CT9 CT10 :=
      W1   23  34  45  23  12  23  12  23  28  17
      W2   16  47  33  22  28  63  42  27  53  31
      W3   52  41  41  41  41  52  36  47  58  61
      W4   35  62  62  51  53  14  24  54  16  53
      W5   54  13  14  22  34  63  42  52  52  34
      W6   53  14  23  41  51  52  34  12  14  14;

end;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]