Académique Documents
Professionnel Documents
Culture Documents
24/05/2016
Broad User Community and Network
24/05/2016
Broad Range of Application Areas
24/05/2016
How to get the software?
www.gams.com
24/05/2016
GAMS Basics
oIt consists of a language compiler and a stable of integrated high-performance solvers
oGAMS is tailored for complex, large scale modeling applications, and allows you to build large
maintainable models that can be adapted quickly to new situations
24/05/2016
Features
database
management
system (DBMS)
24/05/2016
GAMS code components
Set : used to indicate the name of indices
24/05/2016
GAMS Environment
24/05/2016
Create New GAMS Code File
oSelect: File New
oYou should see the new file “Untitled_1.gms”
24/05/2016
Enter GAMS Code
oThe Model
oThe code
24/05/2016
Run the Model
oSelect: File Run, or Press the red arrow button
24/05/2016
GAMS Model Results
24/05/2016
TRANSPORTATION EXAMPLE
24/05/2016
TRANSPORTATION EXAMPLE
275 Topeka
350
Seattle
300 Chicago
Minimize: Transportation cost Shipping costs are assumed to be $90 per case per kMile.
24/05/2016
Transportation Example:
ALGEBRAIC REPRESENTATION
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)
24/05/2016
Transportation Example:
THE GAMS MODEL
24/05/2016
Transportation Example:
ALGEBRAIC REPRESENTATION
FREE, POSITIVE, NEGATIVE, BINARY, or
INTEGER.
MAXIMIZING
24/05/2016
Solve Messages
MODEL STATISTICS
S O L V E S U M M A R Y
MODEL TRANSPORT OBJECTIVE Z
TYPE LP DIRECTION MINIMIZE
SOLVER BDMLP FROM LINE 47
**** SOLVER STATUS 1 NORMAL COMPLETION
**** MODEL STATUS 1 OPTIMAL
**** OBJECTIVE VALUE 153.6750
RESOURCE USAGE, LIMIT 0.184 1000.000
ITERATION COUNT, LIMIT 4 1000
24/05/2016
Output
Display x.l, x.m ;
chicago topeka
seattle 0.036
san-diego 0.009
24/05/2016
Diet Problem Example
oEnergy requirement : 2000 kcal
oProtein requirement : 55 g
oCalcium requirement : 800 mg
Oatmeal 110 4 2 3
Chicken 205 32 12 24
Eggs 160 13 54 13
Milk 160 8 285 9
Pie 420 4 22 24
Pork 260 14 80 13
24/05/2016
Example of LP : Diet Problem
24/05/2016
Some GAMS References
1 . w w w. g a m s.c o m
2 . h t t p s://w w w. y o u t u b e.c o m /w a tc h ? v = 9 8 w J K I u R L P I
3 . GA M S o n M a c h t t p ://w w w. g a m s.c o m /d o c s/ m a c - i n s ta l l . h t m l
4 . H o w t o I n s t a l l t h e N a t i v e GA M S Ve r s i o n o n a M a c
h t t p s://w w w. y o u t u b e.c o m /w a tc h ? v = O L t v j c OZ k T M
5 . I n s t a l l t h e Wi n d o w s Ve r s i o n o f GA M S o n a M a c b y U s i n g Wi n e
h t t p s://w w w. y o u t u b e.c o m /w a tc h ? v = N _ Z 0 u S 1 p - U U
6 . H o w t o I n s ta l l t h e N a t i v e G A M S Ve r s i o n o n L i n u x
h t t p s://w w w. y o u t u b e.c o m /w a tc h ? v = M x _ t Y I 3 w y P 4
24/05/2016