Sets
i plants / LOTTE, HAITAI /
j markets / Seoul, Daejoen, Busan / ;
Parameters
capa(i) capacity of plant i in cases
/ LOTTE 350
HAITAI 600 /
deman(j) demand at market j in cases
/ Seoul 325
Daejoen 300
Busan 275 / ;
Table distance(i,j) distance kilo meter
Seoul Daejoen Busan
LOTTE 250 170 180
HAITAI 250 180 140 ;
Scalar unitcost transport cost per kilo meter /1000/ ;
Parameter transcost(i,j) transport cost per kilo meter per case ;
transcost(i,j) = unitcost * distance(i,j) ;
Variables
x(i,j) shipment quantities in cases
z total transportation costs of won ;
Positive Variable x ;
Equations
cost define objective function
supply(i) observe supply limit at plant i
demand(j) satisfy demand at market j ;
cost .. z =e= sum((i,j), transcost(i,j)*x(i,j)) ;
supply(i) .. sum(j, x(i,j)) =l= capa(i) ;
demand(j) .. sum(i, x(i,j)) =g= deman(j) ;
Model transport /all/ ;
Solve transport using lp minimizing z ;
Display x.l, x.m, z.l ;