SETS
I / SEATTLE, SAN-DIEGO /
J / NEW-YORK, CHICAGO, TOPEKA / ;
PARAMETERS
A(I)
/ SEATTLE 350
SAN-DIEGO 600 /
B(J)
/ NEW-YORK 325
CHICAGO 300
TOPEKA 275 / ;
TABLE D(I,J)
NEW-YORK CHICAGO TOPEKA
SEATTLE 2.5 1.7 1.8
SAN-DIEGO 2.5 1.8 1.4 ;
SCALAR F /90/ ;
PARAMETER C(I,J) ;
C(I,J) = F * D(I,J) / 1000 ;
VARIABLES
X(I,J)
Z ;
POSITIVE VARIABLE X ;
EQUATIONS
COST
SUPPLY(I)
DEMAND(J) ;
COST .. Z =E= SUM((I,J), C(I,J)*X(I,J)) ;
SUPPLY(I) .. SUM(J, X(I,J)) =L= A(I) ;
DEMAND(J) .. SUM(I, X(I,J)) =G= B(J) ;
MODEL TRANSPORT /ALL/ ;
SOLVE TRANSPORT USING LP MINIMIZING Z ;