Engineering Mathematics Exam  >  Engineering Mathematics Notes  >  GAMS - A User's Guide by Anthony Brooke

GAMS - A User's Guide by Anthony Brooke - Engineering Mathematics PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


GAMS
A USER'S GUIDE
by:
Anthony Brooke
David Kendrick
Alexander Meeraus
Ramesh Raman
Tutorial
by:
Richard E. Rosenthal
December 1998
© GAMS Development Corporation, 1998
GAMS Development Corporation
1217 Potomac Street, N.W.
Washington, DC 20007, USA
Tel: +1 202 342-0180
Fax: +1 202 342-0181
E-mail:sales@gams.com
Http://www.gams.com/
GAMS
GAMS Software GmbH
Eupener Str. 135-137
50933 Cologne, Germany
Tel: +49 221-949-9170
Fax: +49 221-949-9171
E-mail:info@gams.de
Http://www.gams.de/
Page 2


GAMS
A USER'S GUIDE
by:
Anthony Brooke
David Kendrick
Alexander Meeraus
Ramesh Raman
Tutorial
by:
Richard E. Rosenthal
December 1998
© GAMS Development Corporation, 1998
GAMS Development Corporation
1217 Potomac Street, N.W.
Washington, DC 20007, USA
Tel: +1 202 342-0180
Fax: +1 202 342-0181
E-mail:sales@gams.com
Http://www.gams.com/
GAMS
GAMS Software GmbH
Eupener Str. 135-137
50933 Cologne, Germany
Tel: +49 221-949-9170
Fax: +49 221-949-9171
E-mail:info@gams.de
Http://www.gams.de/
Page 3


GAMS
A USER'S GUIDE
by:
Anthony Brooke
David Kendrick
Alexander Meeraus
Ramesh Raman
Tutorial
by:
Richard E. Rosenthal
December 1998
© GAMS Development Corporation, 1998
GAMS Development Corporation
1217 Potomac Street, N.W.
Washington, DC 20007, USA
Tel: +1 202 342-0180
Fax: +1 202 342-0181
E-mail:sales@gams.com
Http://www.gams.com/
GAMS
GAMS Software GmbH
Eupener Str. 135-137
50933 Cologne, Germany
Tel: +49 221-949-9170
Fax: +49 221-949-9171
E-mail:info@gams.de
Http://www.gams.de/
Table of Contents
1
Introduction                                                                                                                                     1
1.1 MOTIVATION 1
1.2 BASIC FEATURES OF GAMS 1
1.2.1 GENERAL PRINCIPLES 1
1.2.2 DOCUMENTATION 2
1.2.3 PORTABILITY 2
1.2.4 USER INTERFACE 2
1.2.5 MODEL LIBRARY 2
1.3 ORGANIZATION OF THE BOOK 3
A Gams Tutorial                                                                                                                              5
2.1 INTRODUCTION 5
2.2 STRUCTURE OF A GAMS MODEL 7
2.3 SETS 9
2.4 DATA 10
2.4.1 DATA ENTRY BY LISTS 10
2.4.2 DATA ENTRY BY TABLES 11
2.4.3 DATA ENTRY BY DIRECT ASSIGNMENT 11
2.5 VARIABLES 12
2.6 EQUATIONS 13
2.6.1 EQUATION DECLARATION 13
2.6.2 GAMS SUMMATION (AND PRODUCT) NOTATION 14
2.6.3 EQUATION DEFINITION 14
2.7 OBJECTIVE FUNCTION 16
2.8 MODEL AND SOLVE STATEMENTS 16
2.9 DISPLAY STATEMENTS 17
2.10 THE '.LO, .L, .UP, .M' DATABASE 17
2.10.1 ASSIGNMENT OF VARIABLE BOUNDS AND/OR INITIAL VALUES 17
2.10.2 TRANSFORMATION AND DISPLAY OF OPTIMAL VALUES 18
2.11 GAMS OUTPUT 19
2.11.1 ECHO PRINTS 19
2.11.2 ERROR MESSAGES 21
2.11.3 REFERENCE MAPS 23
2.11.4 EQUATION LISTINGS 24
2.11.5 MODEL STATISTICS 25
2.11.6 STATUS REPORTS 25
2.11.7 SOLUTION REPORTS 26
2.12 SUMMARY 27
                                                     
1
 This is version: ug254j
Page 4


GAMS
A USER'S GUIDE
by:
Anthony Brooke
David Kendrick
Alexander Meeraus
Ramesh Raman
Tutorial
by:
Richard E. Rosenthal
December 1998
© GAMS Development Corporation, 1998
GAMS Development Corporation
1217 Potomac Street, N.W.
Washington, DC 20007, USA
Tel: +1 202 342-0180
Fax: +1 202 342-0181
E-mail:sales@gams.com
Http://www.gams.com/
GAMS
GAMS Software GmbH
Eupener Str. 135-137
50933 Cologne, Germany
Tel: +49 221-949-9170
Fax: +49 221-949-9171
E-mail:info@gams.de
Http://www.gams.de/
Table of Contents
1
Introduction                                                                                                                                     1
1.1 MOTIVATION 1
1.2 BASIC FEATURES OF GAMS 1
1.2.1 GENERAL PRINCIPLES 1
1.2.2 DOCUMENTATION 2
1.2.3 PORTABILITY 2
1.2.4 USER INTERFACE 2
1.2.5 MODEL LIBRARY 2
1.3 ORGANIZATION OF THE BOOK 3
A Gams Tutorial                                                                                                                              5
2.1 INTRODUCTION 5
2.2 STRUCTURE OF A GAMS MODEL 7
2.3 SETS 9
2.4 DATA 10
2.4.1 DATA ENTRY BY LISTS 10
2.4.2 DATA ENTRY BY TABLES 11
2.4.3 DATA ENTRY BY DIRECT ASSIGNMENT 11
2.5 VARIABLES 12
2.6 EQUATIONS 13
2.6.1 EQUATION DECLARATION 13
2.6.2 GAMS SUMMATION (AND PRODUCT) NOTATION 14
2.6.3 EQUATION DEFINITION 14
2.7 OBJECTIVE FUNCTION 16
2.8 MODEL AND SOLVE STATEMENTS 16
2.9 DISPLAY STATEMENTS 17
2.10 THE '.LO, .L, .UP, .M' DATABASE 17
2.10.1 ASSIGNMENT OF VARIABLE BOUNDS AND/OR INITIAL VALUES 17
2.10.2 TRANSFORMATION AND DISPLAY OF OPTIMAL VALUES 18
2.11 GAMS OUTPUT 19
2.11.1 ECHO PRINTS 19
2.11.2 ERROR MESSAGES 21
2.11.3 REFERENCE MAPS 23
2.11.4 EQUATION LISTINGS 24
2.11.5 MODEL STATISTICS 25
2.11.6 STATUS REPORTS 25
2.11.7 SOLUTION REPORTS 26
2.12 SUMMARY 27
                                                     
1
 This is version: ug254j
iv
Gams Programms                                                                                                                          29
3.1 INTRODUCTION 29
3.2 THE STRUCTURE OF GAMS PROGRAMS 29
3.2.1 FORMAT OF GAMS INPUT 29
3.2.2 CLASSIFICATION OF GAMS STATEMENTS 30
3.2.3 ORGANIZATION OF GAMS PROGRAMS 30
3.3 DATA TYPES AND DEFINITIONS 31
3.4 LANGUAGE ITEMS 32
3.4.1 CHARACTERS 32
3.4.2 RESERVED WORDS 33
3.4.3 IDENTIFIERS 33
3.4.4 LABELS 34
3.4.5 TEXT 34
3.4.6 NUMBERS 35
3.4.7 DELIMITERS 35
3.4.8 COMMENTS 36
3.5 SUMMARY 36
Set Definitions                                                                                                                                37
4.1 INTRODUCTION 37
4.2 SIMPLE SETS 37
4.2.1 THE SYNTAX 37
4.2.2 SET NAMES 37
4.2.3 SET ELEMENTS 38
4.2.4 ASSOCIATED TEXT 38
4.2.5 SEQUENCES AS SET ELEMENTS 39
4.2.6 DECLARATIONS FOR MULTIPLE SETS 40
4.3 THE ALIAS STATEMENT: MULTIPLE NAMES FOR A SET 40
4.4 SUBSETS AND DOMAIN CHECKING 41
4.5 MULTI-DIMENSIONAL SETS 41
4.5.1 ONE-TO-ONE MAPPING 41
4.5.2 MANY-TO-MANY MAPPING 42
4.6 SUMMARY 43
Data Entry: Parameters, Scalars & Tables                                                                                45
5.1 INTRODUCTION 45
5.2 SCALARS 45
5.2.1 THE SYNTAX 45
5.2.2 AN ILLUSTRATIVE EXAMPLE 45
5.3 PARAMETERS 46
5.3.1 THE SYNTAX 46
5.3.2 AN ILLUSTRATIVE EXAMPLES 46
5.3.3 PARAMETER DATA FOR HIGHER DIMENSIONS 47
5.4 TABLES 48
5.4.1 THE SYNTAX 48
5.4.2 AN ILLUSTRATIVE EXAMPLE 48
5.4.3 CONTINUED TABLES 49
Page 5


GAMS
A USER'S GUIDE
by:
Anthony Brooke
David Kendrick
Alexander Meeraus
Ramesh Raman
Tutorial
by:
Richard E. Rosenthal
December 1998
© GAMS Development Corporation, 1998
GAMS Development Corporation
1217 Potomac Street, N.W.
Washington, DC 20007, USA
Tel: +1 202 342-0180
Fax: +1 202 342-0181
E-mail:sales@gams.com
Http://www.gams.com/
GAMS
GAMS Software GmbH
Eupener Str. 135-137
50933 Cologne, Germany
Tel: +49 221-949-9170
Fax: +49 221-949-9171
E-mail:info@gams.de
Http://www.gams.de/
Table of Contents
1
Introduction                                                                                                                                     1
1.1 MOTIVATION 1
1.2 BASIC FEATURES OF GAMS 1
1.2.1 GENERAL PRINCIPLES 1
1.2.2 DOCUMENTATION 2
1.2.3 PORTABILITY 2
1.2.4 USER INTERFACE 2
1.2.5 MODEL LIBRARY 2
1.3 ORGANIZATION OF THE BOOK 3
A Gams Tutorial                                                                                                                              5
2.1 INTRODUCTION 5
2.2 STRUCTURE OF A GAMS MODEL 7
2.3 SETS 9
2.4 DATA 10
2.4.1 DATA ENTRY BY LISTS 10
2.4.2 DATA ENTRY BY TABLES 11
2.4.3 DATA ENTRY BY DIRECT ASSIGNMENT 11
2.5 VARIABLES 12
2.6 EQUATIONS 13
2.6.1 EQUATION DECLARATION 13
2.6.2 GAMS SUMMATION (AND PRODUCT) NOTATION 14
2.6.3 EQUATION DEFINITION 14
2.7 OBJECTIVE FUNCTION 16
2.8 MODEL AND SOLVE STATEMENTS 16
2.9 DISPLAY STATEMENTS 17
2.10 THE '.LO, .L, .UP, .M' DATABASE 17
2.10.1 ASSIGNMENT OF VARIABLE BOUNDS AND/OR INITIAL VALUES 17
2.10.2 TRANSFORMATION AND DISPLAY OF OPTIMAL VALUES 18
2.11 GAMS OUTPUT 19
2.11.1 ECHO PRINTS 19
2.11.2 ERROR MESSAGES 21
2.11.3 REFERENCE MAPS 23
2.11.4 EQUATION LISTINGS 24
2.11.5 MODEL STATISTICS 25
2.11.6 STATUS REPORTS 25
2.11.7 SOLUTION REPORTS 26
2.12 SUMMARY 27
                                                     
1
 This is version: ug254j
iv
Gams Programms                                                                                                                          29
3.1 INTRODUCTION 29
3.2 THE STRUCTURE OF GAMS PROGRAMS 29
3.2.1 FORMAT OF GAMS INPUT 29
3.2.2 CLASSIFICATION OF GAMS STATEMENTS 30
3.2.3 ORGANIZATION OF GAMS PROGRAMS 30
3.3 DATA TYPES AND DEFINITIONS 31
3.4 LANGUAGE ITEMS 32
3.4.1 CHARACTERS 32
3.4.2 RESERVED WORDS 33
3.4.3 IDENTIFIERS 33
3.4.4 LABELS 34
3.4.5 TEXT 34
3.4.6 NUMBERS 35
3.4.7 DELIMITERS 35
3.4.8 COMMENTS 36
3.5 SUMMARY 36
Set Definitions                                                                                                                                37
4.1 INTRODUCTION 37
4.2 SIMPLE SETS 37
4.2.1 THE SYNTAX 37
4.2.2 SET NAMES 37
4.2.3 SET ELEMENTS 38
4.2.4 ASSOCIATED TEXT 38
4.2.5 SEQUENCES AS SET ELEMENTS 39
4.2.6 DECLARATIONS FOR MULTIPLE SETS 40
4.3 THE ALIAS STATEMENT: MULTIPLE NAMES FOR A SET 40
4.4 SUBSETS AND DOMAIN CHECKING 41
4.5 MULTI-DIMENSIONAL SETS 41
4.5.1 ONE-TO-ONE MAPPING 41
4.5.2 MANY-TO-MANY MAPPING 42
4.6 SUMMARY 43
Data Entry: Parameters, Scalars & Tables                                                                                45
5.1 INTRODUCTION 45
5.2 SCALARS 45
5.2.1 THE SYNTAX 45
5.2.2 AN ILLUSTRATIVE EXAMPLE 45
5.3 PARAMETERS 46
5.3.1 THE SYNTAX 46
5.3.2 AN ILLUSTRATIVE EXAMPLES 46
5.3.3 PARAMETER DATA FOR HIGHER DIMENSIONS 47
5.4 TABLES 48
5.4.1 THE SYNTAX 48
5.4.2 AN ILLUSTRATIVE EXAMPLE 48
5.4.3 CONTINUED TABLES 49
v
5.4.4 TABLES WITH MORE THAN TWO DIMENSIONS 49
5.4.5 CONDENSING TABLES 50
5.4.6 HANDLING LONG ROW LABELS 50
5.5 ACRONYMS 51
5.5.1 THE SYNTAX 51
5.5.2 ILLUSTRATIVE EXAMPLE 51
5.6 SUMMARY 51
Data Manipulations With Parameters                                                                                        53
6.1 INTRODUCTION 53
6.2 THE ASSIGNMENT STATEMENT 53
6.2.1 SCALAR ASSIGNMENTS 53
6.2.2 INDEXED ASSIGNMENTS 53
6.2.3 USING LABELS EXPLICITLY IN ASSIGNMENTS 54
6.2.4 ASSIGNMENTS OVER SUBSETS 54
6.2.5 ISSUES WITH CONTROLLING INDICES 54
6.2.6 EXTENDED RANGE IDENTIFIERS IN ASSIGNMENTS 55
6.2.7 ACRONYMS IN ASSIGNMENTS 55
6.3 EXPRESSIONS 55
6.3.1 STANDARD ARITHMETIC OPERATIONS 56
6.3.2 INDEXED OPERATIONS 56
6.3.3 FUNCTIONS 58
6.3.4 EXTENDED RANGE ARITHMETIC AND ERROR HANDLING 58
6.4 SUMMARY 60
Variables                                                                                                                                         61
7.1 INTRODUCTION 61
7.2 VARIABLE DECLARATIONS 61
7.2.1 THE SYNTAX 61
7.2.2 VARIABLE TYPES 62
7.2.3 STYLES FOR VARIABLE DECLARATION 62
7.3 VARIABLE ATTRIBUTES 63
7.3.1 BOUNDS ON VARIABLES 64
7.3.2 FIXING VARIABLES 64
7.3.3 ACTIVITY LEVELS OF VARIABLES 64
7.4 VARIABLES IN DISPLAY AND ASSIGNMENT STATEMENTS 64
7.4.1 ASSIGNING VALUES TO VARIABLE ATTRIBUTES 64
7.4.2 VARIABLE ATTRIBUTES IN ASSIGNMENTS 65
7.4.3 DISPLAYING VARIABLE ATTRIBUTES 65
7.5 SUMMARY 66
Equations                                                                                                                                        67
8.1 INTRODUCTION 67
8.2 EQUATION DECLARATIONS 67
8.2.1 THE SYNTAX 67
8.2.2 AN ILLUSTRATIVE EXAMPLE 67
8.3 EQUATION DEFINITIONS 68
Read More

FAQs on GAMS - A User's Guide by Anthony Brooke - Engineering Mathematics

1. What is GAMS and how does it relate to engineering mathematics?
Ans. GAMS stands for General Algebraic Modeling System. It is a high-level modeling language specifically designed for mathematical programming and optimization problems. GAMS is widely used in engineering mathematics to formulate and solve complex mathematical models, such as linear programming, nonlinear programming, and mixed-integer programming, to aid in decision-making processes.
2. How can GAMS help in solving engineering mathematics problems?
Ans. GAMS provides a user-friendly interface and a powerful optimization solver that allows engineers to mathematically model complex engineering problems and find optimal solutions. It enables engineers to formulate mathematical equations, constraints, and objectives in a concise and intuitive way. GAMS then utilizes various optimization algorithms to efficiently solve these models and provide optimal solutions for decision-making.
3. Can GAMS handle both linear and nonlinear optimization problems?
Ans. Yes, GAMS can handle both linear and nonlinear optimization problems. For linear optimization problems, GAMS provides efficient algorithms such as the Simplex method and interior-point methods. For nonlinear optimization problems, GAMS offers various algorithms like Newton's method and Quasi-Newton methods. This flexibility makes GAMS a versatile tool for solving a wide range of engineering mathematics problems.
4. Is GAMS suitable for large-scale optimization problems?
Ans. Yes, GAMS is suitable for large-scale optimization problems. It is designed to handle problems with thousands or even millions of variables and constraints. GAMS utilizes advanced techniques like sparse matrix storage and efficient solvers to efficiently solve large-scale optimization problems. Additionally, GAMS offers parallel computing capabilities, allowing users to distribute the computational workload across multiple processors or computer clusters for faster solutions.
5. Can GAMS be integrated with other software or programming languages?
Ans. Yes, GAMS can be easily integrated with other software or programming languages. GAMS provides interfaces to popular programming languages like C/C++, Java, and Python, allowing users to incorporate GAMS models into their existing software systems or workflows. This seamless integration enables engineers to leverage the power of GAMS while utilizing other tools and technologies for data processing, visualization, and further analysis.
Download as PDF
Explore Courses for Engineering Mathematics exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

shortcuts and tricks

,

GAMS - A User's Guide by Anthony Brooke - Engineering Mathematics

,

GAMS - A User's Guide by Anthony Brooke - Engineering Mathematics

,

practice quizzes

,

Semester Notes

,

ppt

,

Previous Year Questions with Solutions

,

video lectures

,

past year papers

,

Important questions

,

MCQs

,

mock tests for examination

,

Viva Questions

,

Objective type Questions

,

Sample Paper

,

Free

,

study material

,

GAMS - A User's Guide by Anthony Brooke - Engineering Mathematics

,

pdf

,

Exam

,

Extra Questions

,

Summary

;