Professional Documents
Culture Documents
W Wor Orks Ksho Hop 08 P08 Iintrod Ntroductio Uction To Proce N To Process Ss O Opt Ptim Imiza Izati Tion On Iin NG Gams Ams® ®
W Wor Orks Ksho Hop 08 P08 Iintrod Ntroductio Uction To Proce N To Process Ss O Opt Ptim Imiza Izati Tion On Iin NG Gams Ams® ®
W Wor Orks Ksho Hop 08 P08 Iintrod Ntroductio Uction To Proce N To Process Ss O Opt Ptim Imiza Izati Tion On Iin NG Gams Ams® ®
or ksho
hopp 08 – Introductio
ntrod uction
n to Process
Process
Optim
pt imiza
izati
tion
on In GAMS®
AMS®
• http://www.gams.com
GAMS®
GAMS® Structure
Compilation and
Input GAMS file Output GAMS file
expansion in
(NAME.gms) (NAME.lst)
Solver
• Problem formulation:
min
, (,)
s.t. ℎ , = 0
, ≤ 0
ℝ, ℤ
• Sorts of problems: Solvers
LP: CPLEX, XPRESS, CBC.
MIP: CPLEX, XPRESS, CBC.
NLP: CONOPT, IPOPT, KNITRO, MINOS.
MINLP: DICOPT, BONMIN,SCIP.
• Focus:
It takes advantage of the power of the existing solvers.
Less emphasis in the building of algorithms.
More emphasis in the formulation of the model and its refinement.
GAMS®
GAMS® Structure
-------------------------------------------------------------
Problem formulation The objective function and the constraints are
formulated here;
-------------------------------------------------------------
• Truck A requires one driver per day and produces 2.100 ton-miles per
day
• Truck B requires two drives per day and produces 3.600 ton-miles per
day
• Truck C requires two drives per day and produces 3.780 ton-miles per
day
• There is a limit of 30 trucks and 145 drives.
Sets:
= ,, Let be the set containing the types of truck. Index
Scalars
_: Maximum resources, [$]
_: Maximum of trucks, [-]
_: Maximum of drivers, [-]
Parameters
_ : Purchase cost by truck type, ∈ [$]
_ : Drivers required for each type of truck, ∈ [-]
_ : Production by truck type, ∈ [ton-miles per day]
Variables:
∈ ℤ+ : Number of trucks by truck type, ∈ [-]
: Total production per day, [ton-miles/day]
GAMS®
Trucks Problem – Problem Formulation
Constraints:
_: Maximum drivers; [-]
_ ∗ ≤ _
∈
_: Maximum of trucks; [-]
≤ _
∈
_: Maximum cost; [$]
_ ∗ ≤ _
∈
Objective function:
_: Total Maximum production, [ton-miles per day]
max = _ ∗
∈
GAMS®
Trucks Problem – Solution
Sets:
= ,, Let be the set containing the types of truck.
Scalars
_: Maximum resources, [$]
_: Maximum of trucks, [-]
_: Maximum of drivers, [-]
GAMS®
Trucks Problem – Solution
Parameters
_ : ∈
Purchase cost by truck type, [$]
_ : Drivers required for each type of truck,∈ [-]
_ : Production by truck type, ∈ [ton-miles per day]
GAMS®
Trucks Problem – Solution
Variables:
∈ ℤ+ : Number of trucks by truck type, ∈ [-]
Variables:
: Total production per day, [ton-miles/day]
GAMS®
Trucks Problem – Solution
Constraints:
_: ∈ _ ∗ ≤ _
_: ∈ ≤ _
_ : ∈ _ ∗ ≤ _
GAMS®
Trucks Problem – Solution
Objective function:
_: Total Maximum production, [ton-miles per day]
max = _ ∗
∈
GAMS®
Trucks Problem – Solution
GAMS®
Trucks Problem – Solution
GAMS®
Trucks Problem – Solution
GAMS®
Trucks Problem – Solution
GAMS®
Trucks Problem – Solution
GAMS®
Trucks Problem – Solution
GAMS
Bonus 8
lager, ale and premium. Each kind of beer uses different amounts of
the four main components of beer: water, malt, hops and yeast. Each
kind of beer has a different utility in dollars.
Maximize the revenue of the Optibeer brewery based on the fact
“ ”
The Fresh Milk cooperative supplies milk in gallon jugs from its two
warehouses located in Buffalo (New York) and Williamsport
(Pennsylvania). It has a capacity of 2000 gallons per day at Buffalo and
1600 gallons per day at Williamsport. It delivers 800 gallons/day to
Rochester (New York). Syracuse (New York) requires 1440 gallons/day and
the remainder (1360 gallons) are trucked to New York City. The cost to
ship the milk to each of the destinations is different and is given in the
following table. Establish the shipping strategy for minimum cost.
GAMS®
References