Tiny GAMS Guide

Note: this Tiny GAMS Guide refers to GAMS Release 2.50.

Step 1 Double click on GAMS icon GAMS IDE icon to start up the program.

Step 2 After the first install, you might be asked to create a new GAMS project. You can create a new project by going to File, then Project, and then New Project:

GAMS new project

 

Step 3 Specify where you want to locate in your computer the GAMS project and create a folder for the GAMS project:

create new folder

 

Step 4 Inside the GAMS project folder, type the name of the project, in the File name, and then click Open:

GAMS project name

It is not necessary that the name of the project folder be the same as the name of project. In fact, one project folder can be a host of two or more GAMS projects.

 

Step 5 To enter your GAMS model, create a new file, called gms file, by going to File and then New:

create new GAMS file

 

Step 6 A blank file opens up:

blanck GAMS file

 

Step 7 Enter your GAMS code:

GAMS file

 

Step 8 Save your file by going to File and then Save as.

Step 9 Before you can run your GAMS code, it is a good idea always to choose the solver you want to use. To do that, go to File and choose Options:

GAMS options

 

Step 10 Click on Solvers tab:

GAMS solvers tab

 

Step 11 Under NLP, choose the applicable GAMS solver by clicking on the small square in front of the solver to change it to a cross:

GAMS solver selection

 

Step 12 Click OK.

Step 13 To run the code, press F9 or click on the shortcut button GAMS run icon.

Step 14 In the right portion of the GAMS window, the LOG file is going to appear. The LOG file tells you of any errors in your code, and if there are no errors, it tells you that the solution is found, which is indicated by the statement ‘Status: Normal completion’:

GAMS log file

 

Step 15 Open the GAMS LST file and go all the way to the bottom of the file to see the solution:

GAMS list file

 

Tiny GAMS Guide by Dr Muhammad Al-Salamah, Industrial Engineering, KFUPM, Dhahran, Saudi Arabia

الدكتور محمد بن فهد السلامة، هندسة صناعية، جامعة الملك فهد، الظهران، السعودية