GAMSCHK and GAMS Documentation AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl; Improved upon by many previous.

Slides:



Advertisements
Similar presentations
Lab 2 Data Evaluation & Validation Excel Scenarios & Functions Simon Chapter 2 & 3 URBPL 5/6010: Urban Research University of Utah Pam Perlich – BUC 103.
Advertisements

What is GAMS?. While they are not NLP solvers, per se, attention should be given to modeling languages like: GAMS- AIMMS-
1 of : Multi-Currency Payments / DA0813 Last updated: Project Walkthrough: Multi-Currency Payments Multi-Currency Payments.
Tutorial 8: Developing an Excel Application
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Advanced GAMS 1. Good Modeling Practices 2. Fixing Misbehaving Models 3. Linking GAMS 4. Advanced GAMS Syntax.
1 of : Multi-Currency Receipts / DA0814 Last updated: Project Walkthrough: Multi-Currency Receipts Multi-Currency Receipts.
© 2007 Pearson Education Chapter 14: Solving and Analyzing Optimization Models.
Good modeling practices AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl. Improved upon by many previous lab.
Conditionals, Subsets and Tuples in GAMS AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by McCarl and Elbakidze; Improved upon.
Comparative Analysis Multiple Submissions vs. Loops AGEC 641 Lab, Fall 2010 Mario Andres Fernandez Based on material written by Gillig and McCarl; Improved.
GAMS/GAMSIDE AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl and improved upon by previous lab instructors.
Formulation of a General Problem AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl; Improved upon by many previous.
Examining a model for Flaws AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl. Improved upon by many previous.
Power of GAMS AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl. Improved upon by many previous lab instructors.
Functions.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Formula Auditing, Data Validation, and Complex Problem Solving
Chapter 3 Planning Your Solution
Solver & Optimization Problems n An optimization problem is a problem in which we wish to determine the best values for decision variables that will maximize.
3 Components for a Spreadsheet Linear Programming Problem There is one cell which can be identified as the Target or Set Cell, the single objective of.
Graphical Solutions Plot all constraints including nonnegativity ones
What is GAMS?.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Visual Basic Chapter 1 Mr. Wangler.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
1 Documenting Your Project. 2 Documenting your Project Insert Banner Comments in your code Comment - coding statement used by humans not the compiler.
1 Tips for solving Project 1 Reactor SO 3 SO 2 +O 2.
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Linear Programming: Basic Concepts
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
OCC Network Drives  H:\  P:\ 
Computers and Scientific Thinking David Reed, Creighton University Functions and Libraries 1.
QMB 4701 MANAGERIAL OPERATIONS ANALYSIS
Chapter 19: The Solver Re-Visited Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
Use the Distributive Property to: 1) simplify expressions 2) Solve equations.
SAM Payroll Processing Understanding and Using Payroll Features in SAM.
3-2 Day 2 Solving Systems Algebraically: Elimination Method Objective: I can solve a system of equations using the elimination method.
AS Level ICT Data entry: Creating validation checks.
Linear Programming Optimal Solutions and Models Without Unique Optimal Solutions.
1 Lecture 4 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Dayu Zhang 9/10/2014 Lab03. Outline Brief Review of the 4 Steps in Hello.cpp Example Understand endl and \n Understand Comment Programming Exercise -
An Overview of the Energy Reduction Calculator.  Calculates reduction in emissions for a facility Emissions computed are Carbon Dioxide, Sulfur Dioxide,
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Reference Documents4.6fi_12.1 Chapter 12 Reference Documents During the normal course of business, repetitive periodic accounting transactions must be.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Getting started with Simulink An introductory tutorial.
Visual Basic.NET Windows Programming
Lecture 5 Good modeling Chengcheng Fei 2017 Fall
Testing Tutorial 7.
Lecture 7 GAMS Check Chengcheng Fei 2017 Fall
Solver & Optimization Problems
Lecture 4 Power of GAMS Chengcheng Fei 2017 Fall
C++ Basic Syntax – Homework Exercises
Lecture 9 Report writing
Lecture 8 Exam model flaws
Lecture 6 Conditionals, Subsets and Tuples in GAMS
Using WinQSB to solve Linear Programming Models
Lecture 10 Comparative analysis
Policy evaluation options
Solving Systems of Equations by Elimination Part 2
Lecture 2 General Problem
Section 4.2 Solving a System of Equations in Two Variables by the Substitution Method.
Presentation transcript:

GAMSCHK and GAMS Documentation AGEC 641 Lab, Fall 2011 Mario Andres Fernandez Based on material written by Gillig and McCarl; Improved upon by many previous lab instructors. Special thanks to Yuquan “Wolfgang” Zhang

GAMSCHK Alternative way of displaying models System for verifying model structure and solutions to see if all is correct. It is designed to aid in PRE and POST solution model analysis and help fix improperly working models

PRE solution: To verify the model structure before worrying too much about the answer. GAMSCHK automatically checks a model for errors and portrays information about its structure in several ways before solving POST solution: To enlist the solvers help in an exercise to find the causes of unrealistic solutions, or unbounded or infeasible problems

PRE Solution PRE- solution procedures can be used to List selected equations and/or variables (DISPLAYCR) Generate schematics on equations/variables blocks (BLOCKPIC) List characteristics of equations/variables blocks (BLOCKLIST) Find obvious specification errors (ANALYSIS) Generate schematics on location of coefficients by sign and magnitude on individual equation/variable basis (PICTURE) List characteristics of equations/variables (MATCHIT)

Post Solution POST- solution procedures are used to fix misbehaving models by. – Reconstructing reduced cost and equation activity (POSTOPT) – Helping resolve problems with unbounded or infeasible models (NONOPT) On a post solution basis, POSTOPT is used to check for Non-Sensical solutions by observing a faulty attribute of the solution in terms of – Allocation (variable and equation levels, e.g. Variable.L, Equation.L) – Valuation (variable and equation marginals e.g. Variable.M, Equation.M)

Steps to run GAMSCHK Step 1: Insert a command line OPTION LP = GAMSCHK OPTION NLP = GAMSCHK OPTION MIP = GAMSCHK – Right before the solve

Step 2: Create a new file with extension *.gck that has the same corresponding name as the program file. exgamschk.gms  exgamschk.gck

To create a new file, go to the FILE menu and use the NEW option. You will then get a file called untitled with an empty screen then save your program as exgamschk.gck

Selecting Procedures and Providing Inputs If the *.GCK file cannot be found, then it is assumed that the BLOCKPIC procedure is selected. Procedure Name Item Selection input

Variables and equations to display: If a particular equation is not specified, then display all equations Input rules – If a variable or equation name is entered without any following parentheses, then all cases for that variable or equation are selected.

If all elements from sets are selected, wild cards can be used If a wild card is used to select items (e.g. Tr*), GAMS will select anything starting Tr

DISPLAYCR

BLOCKPIC To find coding errors in overall structure. Whole summary of the model

BLOCKPIC

PICTURE Look at interrelationships between items how coefficients for a variable appear across equations? What variables appear in an equation? How some variables balance against other variables in equations? How signs are distributed?

PICTURE (cont) Look at magnitude, sign and location of coefficients Avoid immense output from using LIMROW/LIMCOL or DISPLAYCR

PICTURE (cont)

Documentation