Minimum Cost Transhipment
{ Exmpl15.1-3_MinCostTranship.mpl }
{ AMPL A Modeling Language for Mathematical Programming, 2nd Edition }
{ Chapter 15.1, Minimum Cost Transhipment, Size: 8x9, Page 326 }
TITLE
MinCost_Transhipment3;
INDEX
city := (pitt,ne,se,bos,ewr,bwi,atl,mco);
city2 := city;
d_city[city] := (ne,se);
w_city[city] := (bos,ewr,bwi,atl,mco);
dwlink[city,city2] := (ne.bos,ne.ewr,ne.bwi,se.ewr,se.bwi,se.atl,se.mco)
DATA
P_Supply := 450;
W_Demand[city] := [bos, 90,
ewr,120,
bwi,120,
atl, 70,
mco, 50];
Pd_Cost[city] := [ne, 2.5,
se, 3.5];
Pd_Cap[city] := [ne, 250,
se, 250];
Dw_Cost[city,city2] := [ne,bos, 1.7,
ne,ewr, 0.7,
ne,bwi, 1.3,
se,ewr, 1.3,
se,bwi, 0.8,
se,atl, 0.2,
se,mco, 2.1];
Dw_Capacity[city,city2] := [ne,bos, 100,
ne,ewr, 100,
ne,bwi, 100,
se,ewr, 100,
se,bwi, 100,
se,atl, 100,
se,mco, 100];
VARIABLE
Pd_Ship[city IN d_city];
Dw_Ship[city,city2 IN dwlink];
MODEL
MIN TotalCost = SUM(city IN d_city: Pd_Cost * Pd_Ship) +
SUM(city,city2 IN dwlink: Dw_Cost * Dw_Ship);
SUBJECT TO
PBalance -> PBAL:
SUM(city IN d_city: Pd_Ship) = P_Supply;
DBalance[city] -> DBAL:
SUM(city2 IN dwlink: Dw_Ship) = Pd_Ship;
WBalance[city2] -> WBAL:
SUM(city IN dwlink: Dw_Ship) = W_Demand[city:=city2];
BOUNDS
Pd_Ship <= Pd_Cap;
Dw_Ship <= Dw_Capacity;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page