Vous êtes sur la page 1sur 10

Modelamiento en GAMS

Prof. Nicolás Clavijo Buriticá MSc.


Modelamiento en GAMS
1-Sets

2-Parameters

3-Variables
GENERAL 4-Equations
ALGEBRAIC
MODELING
SYSTEM 5-Model

6-Solve

7-Display
Modelamiento en GAMS
Basic tools:
• File
• Edit
• Search
Run the Model. • Windows
Use also F9 • Utilities
Quick open or save. • Help (Here you can
Gams generally saves find the User guide)
automatically your work. Gams
create an untitled file.
Work-space:
Here you write the code which represents
your algebraic model.
Modelamiento en GAMS 1. Sets

Set name.

Elements

Description of sets

Close with ;
.

Note:
Use slash to open/close the set of elements
Modelamiento en GAMS 2. Parameters (1 sub-index)

Parameter name.

Elements
Note:
Use slash to open/close
the set of elements

Description of sets

Close with ;
.
Modelamiento en GAMS 2. Parameters (>1 sub-index)

Parameter name.

Elements
Note:
Use slash to open/close
the set of elements
Description of Parameter

Close with ; .

Parameters of more than one


sub-index are inserted as tables

Note: Do Not Use slash to


open/close the set of
elements
Modelamiento en GAMS 2. Parameters W/O Sub-index

Scalar name. Scalar value

Description of scalar

Note:
Use slash to open/close the set of elements
Close with ;
.
Modelamiento en GAMS 3. Variables

Variable name.

Description of variables…

Each variable must be classified.


Close with ;
.
𝑚 𝑛

Modelamiento en GAMS 4. Equations


𝑀𝑖𝑛 𝐶𝑇 =
𝑖=1 𝑗=1
𝑋𝑖𝑗 𝐶𝑖𝑗

ST:
𝑛

𝑋𝑖𝑗 ≤ 𝐶𝑜𝑓𝑖 ∀𝑖
𝑗=1
𝑚

𝑋𝑖𝑗 = 𝐷𝑒𝑚𝑗 ∀𝑗
𝑖=1
Equation name + ∀
Description of
Equations…

Close with ; .

Each Equation must be Developed.

Note: Use “..” in order to


“call” each equation listed
Modelamiento en GAMS 5. Model; 6. Solve; 7. Display

Model name + /all/;


Close with ;
.

Minimizing or maximizing variable of


Obj. Function. Type of programming

Note: Optional

Vous aimerez peut-être aussi