what is gams?. download gams you can download the current gams distribution by going to then 1. fill...

37
What is GAMS?

Upload: logan-thompson

Post on 25-Dec-2015

246 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

What is GAMS?

Page 2: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

Download GAMS

You can download the current GAMS distribution by going to

Then1. Fill out the form

Page 3: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

Download GAMS

2. After that user id and thepassword will automaticallybe e-mailed to you within afew minutes.

3. Then, follow the instruction! Netscape CommunicatorUsers! Internet Explorer Users! FTP Users

Page 4: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

Download GAMS

Example for FTP Users: Connect to GAMS ftp server ftp.gams.com.with any ftp client. If you are asked for a password enter: insep34

Page 5: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

Download GAMS

Example for FTP Users:Then download setup.exe or all splitted files in the subdirectorysplit if you have a slow or unstable connection. Detailed

Page 6: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

Using GAMS IDE to Run GAMS

7. Navigate around outputs

Steps to using GAMS IDE

1. Install GAMS and IDE

2. Start the IDE

3. Create and open files

4. House keeping

5. Run GAMS

Page 7: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Install from CD

1. Install GAMS and the IDE on your computer

The IDE is automatically installed when GAMS isinstalled. To install do the following steps

a. load the GAMS CD into your machine

b. start the installation using theWindows Explorer and go into thesystems subdirectory called winthen double click on setup.exe

Page 8: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Install from GAMS download

1. Install GAMS and the IDE on your computer

The IDE is automatically installed when GAMS isinstalled. To install do the following steps

a. go to the directory where you save your setup.exe

b. start the installation by doubleclick on setup.exe

Page 9: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE – Installation Process

Page 10: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE – Installation Process

c. supply the location for alicense (on your floppy or inyour directory)

Page 11: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE – Installation Process

Page 12: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Create an icon

d. right click on gamside.exe in the GAMS system directory,choose “create shortcut” and drag the shortcut to your desktop

Page 13: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Start IDE

2. Start the IDE using it’s icon

a. open your explorer and create a newsub-directory where you want to saveall your works

b. double click the IDE icon on your desktop

c. create a directory for your work by opening the Filemenu and select Project and New project

Page 14: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Start IDE

d. define project name by typing a name for the project inthe “File name” area. All files (programs and output files)associated with this project will be saved here.

Page 15: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Start IDE

The IDE uses a “Project” file for two purposes.: to determine where all saved files are placed and where GAMSlooks for files when executing: to save file names and program options

Page 16: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Open files

3. Open existing filesa. from the model library

Note library is sortable by name, area, type, contributor, and description by clicking on the heading.

Page 17: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Open your files

b. from your directory

Page 18: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Create a file

4. Create new filesa. open existing files and with save as dialogue change it’s name

Page 19: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Create a file

b. open the FILE menu and use the NEW option.

You will then get a file called untitled with an emptyscreen that you can create (type) your own program.

When finished, save your program using the file SAVE or SAVEAS dialogue

Page 20: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Improving the display

5. Do a little housekeeping: The IDE windows are not set up initially as well as they could be.: To fix this use options dialog under File to alter their characteristics

Page 21: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Improving the display

The Output tab is used to set the output page width and length, dateand time format. Set page length to 99999 or 0 and the page widthrange between 72-255.

Page 22: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Improving the display

The Editor tab is used to set font type and size, tabs, and pagemargin. Change font size if desired.

Page 23: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Improving the display

The Color tab is used to control color on a program. Alter it if you wish.

Page 24: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Improving the display

The Execute tab is used to locate the GAMS executable file and setup the log process window. Check Update Process Window.

Page 25: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Selecting solvers

Solver tab is used to select a solver to solve a problem.

X = currentselection. = availableselection- = not availableNLP using MINOSLP using CPLEXMCP using PATH

Page 26: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Run GAMS

6. Run GAMSIDE: clicking the run button or pressing F9

As GAMS is running, the processwindow giving a log of steps will appear.

Page 27: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Run GAMS

Note: to get this window, use

Then drag the process window to the far right

Page 28: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - GAMS log

6. Run GAMSIDE (con’t)

check if your file is ok(36) indicate line it is onexecute your fileset up the problem=> size of the problem(23) indicate line SOLVE is on

=> start solver and gives aname for which solver isUsed

GAMS restarts

=> GAMS stops without errors

Page 29: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Navigation with IDE

6. Run GAMSIDE (con’t)! double click on lines in the process window to access output! positioning of your access is determined by the color of the line• blue lines => open *.LST file and jump to line in *.LST file• black lines => open *.LST file and jump to a location of previousblue line• red lines => jump to *.gms file (program) where error occurs

Page 30: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Navigation with IDE

Double clicking on red lines => cursor will jump to *.gms file(program) where error occurs

Note: always concentrate on fixing the first error and ignore the others since the next errors may be a result of the previous error.

Double clicking on black lines => cursor will jump to *.lst file (output) where error occurs

Page 31: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS IDE - Equation list

7. Navigate around output

: look for first ---- to find equation listing in *.LST file

: look for the word ‘solution’ or ---- to find solution

Page 32: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS Documentation

" GAMS documentations are accessible through the HELP menu

Page 33: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS Documentation

Page 34: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS Documentation

" GAMS documentations are accessible through the HELP menu

Page 35: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

GAMS Documentation

" GAMS documentations are accessible through the HELP menu

Page 36: What is GAMS?. Download GAMS You can download the current GAMS distribution by going to Then 1. Fill out the form

Hands On

(handson1.gms, handson2.gms )Learning Objectives:1. Acquire basic ability to use IDE2. Learn how to find and fix errors3. Learn how to find and interpret GAMS solutionsSuggest things to do1. Create a project in your directory and called “handson”2. Do your housekeeping by setting up your options as you like3. Open and run handson2.gms and navigate through *.LST file4. Please find and fix those errors5. Open handson1.gms (your program)6. Run handson1.gms, then navigate through *.LST file, and findoptimal solutions, shadow prices, and reduced costs alongwith their interpretations.