Transportation
{ Exmpl6.2-1_Transport.mpl }
{ AMPL A Modeling Language for Mathematical Programming, 2nd Edition }
{ Chapter 6.2, Transportation, Size: 10x14 Page 95 }
TITLE
Transport;
INDEX
origin := (gary,clev,pitt);
dest := (fra,det,lan,win,stl,fre,laf)
link[origin,dest] := (gary.det,gary.lan,gary.stl,gary.laf,
clev.fra,clev.det,clev.lan,clev.win,clev.stl,clev.laf,
pitt.fra,pitt.win,pitt.stl,pitt.fre);
DATA
Supply[origin] := (1400,2600,2900);
Demand[dest] := ( 900,1200, 600, 400,1700,1100,1000)
Cost[origin,dest] := ( 0,14,11, 0,16, 0, 8,
27, 9,12, 9, 26,0,17,
24, 0, 0,13,28,99, 0);
VARIABLE
Trans[origin,dest IN link];
MODEL
MIN TotalCost = SUM(origin,dest IN link: Cost * Trans);
SUBJECT TO
Supplying[origin] -> SUP:
SUM(dest IN link: Trans) = Supply;
Meetdemand[dest] -> DEM:
SUM(origin IN link: Trans) = Demand;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page