Professional Documents
Culture Documents
GAMS
GAMS
GAMS
A GAMS TUTORIAL
WHAT IS GAMS ?
zA toy problem!…
z 2 supply plants, 3 markets, and
1 commodity.
z Given: unit costs of shipping.
z How much to ship to minimize
total transportation cost
A GAMS TUTORIAL
A GAMS Example
TRANSPORTATION EXAMPLE
iles
New
2.5 kM 325 York
i l es
San 2.5
kM
600
Diego 1.4 kMiles
il e s 275 Topeka
1.8 kM
1.8
Seattle 350 kM
i l es
1.7 kM
i le s
300 Chicago
Minimize: Transportation cost
Subject to: Demand satisfaction and supply constraints
A GAMS TUTORIAL
A GAMS Example
TRANSPORTATION EXAMPLE
Distances
Markets
Plants New York Chicago Topeka Supply
Seattle 2.5 1.7 1.8 350
San Diego 2.5 1.8 1.4 600
Demand 325 300 275
Decision Variables:
xij = amount to ship from plant i to market j (cases),
where xij≥ 0, for all i, j
Constraints:
Observe supply limit at plant i: ∑j xij ≤ ai , for all i (cases)
Satisfy demand at market j: ∑i xij ≥ bj , for all j (cases)
Objective Function:
Minimize ∑i ∑j c xij ($K)
A GAMS TUTORIAL
Transportation Example:
ALGEBRAIC REPRESENTATION
OUTPUT FILE:
A GAMS TUTORIAL
Transportation Example:
THE GAMS MODEL (Dollar Condition)