Lecture 10 Comparative analysis

Slides:



Advertisements
Similar presentations
C Language.
Advertisements

More on Algorithms and Problem Solving
1 Chapter Five Selection and Repetition. 2 Objectives How to make decisions using the if statement How to make decisions using the if-else statement How.
Advanced GAMS 1. Good Modeling Practices 2. Fixing Misbehaving Models 3. Linking GAMS 4. Advanced GAMS Syntax.
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.
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.
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.
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.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic PHP.
Chapter 8 Introduction to Arrays Part II Dr. Ali Can Takinacı İstanbul Technical University Faculty of Naval Architecture and Ocean Engineering İstanbul.
Water Resources Development and Management Optimization (Linear Programming) CVEN 5393 Feb 25, 2013.
Chapter 1 Algorithm Analysis
IE 212: Computational Methods for Industrial Engineering
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
Introduction to Computational Linguistics Programming I.
1 Functions 1 Parameter, 1 Return-Value 1. The problem 2. Recall the layout 3. Create the definition 4. "Flow" of data 5. Testing 6. Projects 1 and 2.
Introduction. 2COMPSCI Computer Science Fundamentals.
1 My Experiences as Faculty Member and Researcher Dr. Kalim Qureshi.
Chapter 4: Decision Making with Control Structures and Statements JavaScript - Introductory.
Programming Fundamentals. Today’s lecture Decisions If else …… Switch Conditional Operators Logical Operators.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
CS130 Visual Basic Project 4 Lecture Fall New topics in project 4 Database, file (table), records, fields. Application that contains menus, submenus,
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Basics Prudence Wong
Chapter 11 - JavaScript: Arrays
Canvas and Arrays in Apps
Chapter 9 Repetition.
Programming what is C++
3.1 Fundamentals of algorithms
User-Written Functions
Lecture 5 Good modeling Chengcheng Fei 2017 Fall
CSc 020: Programming Concepts and Methodology II
COMP108 Algorithmic Foundations Basics
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Lecture 7 GAMS Check Chengcheng Fei 2017 Fall
Microlabs in Computer Science
Multiplication table. x
Lecture 4 Power of GAMS Chengcheng Fei 2017 Fall
Introduction to C++ Introduced by Bjarne Stroustrup of AT&T’s Bell Laboratories in mid-1980’s Based on C C++ extended C to support object-oriented programming.
IOS110 Final Review.
Lecture 9 Report writing
UNIT - V STORED PROCEDURE.
JavaScript Syntax and Semantics
CS150 Introduction to Computer Science 1
Scripts & Functions Scripts and functions are contained in .m-files
Programming Fundamentals
While Loops BIS1523 – Lecture 12.
Computer Programming.
Chapter 5 Repetition.
Functions BIS1523 – Lecture 17.
Chapter 9 Control Structures.
The Instruction Set Architecture Level
Lecture 8 Exam model flaws
Lecture 6 Conditionals, Subsets and Tuples in GAMS
During the last lecture we had a discussion on Data Types, Variables & Operators
3.1 Iteration Loops For … To … Next 18/01/2019.
Lecture 9 Review: Constrained loops Additional mesh analysis examples
Lecture 9 Review: Constrained loops Additional mesh analysis examples
if-else Structures Principles of Engineering
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Lecture 7 Algorithm Design & Implementation. All problems can be solved by employing any one of the following building blocks or their combinations 1.
Flow of Control.
CSC1401 Manipulating Pictures 2
Lecture 2 General Problem
Introduction to Verilog – Part-2 Procedural Statements
Types of loops definite loop: A loop that executes a known number of times. Examples: Repeat these statements 10 times. Repeat these statements k times.
Arrays Introduction to Arrays Reading for this Lecture:
JavaScript 101 Lesson 8: Loops.
Programming Fundamental
Presentation transcript:

Lecture 10 Comparative analysis Chengcheng Fei 2018 Fall Based on material written by Gillig and McCarl; Improved upon by many previous lab instructors; Special thanks to Zidong Mark Wang.

Introduction Often we would like to exam the results under different scenarios. Two ways to conduct comparative analysis Use multiple GAMS submissions or multiple solves generating report writing output and then manually comparing the analysis results Use the GAMS LOOP procedure and set up a comparative scenario analysis system that creates cross scenario comparison tables

The example – Lexicography Example

GAMS code Lexico_example_multisub.gms

Lexico_example_multisub.gms

1. Multiple GAMS Submissions Lexico_example_multisub.gms

Lexico_example_multisub.gms

Steps of Multiple GAMS Submission …data section… …model structure… GOAL2("PROFIT1")=yes; Set up sets and parameters WEIGHTS(GOAL2)=1 SOLVE RESALLOC USING LP MINIMIZING GOALOBJ; solve the model WEIGHTS(GOAL2)=0.00001; Turn off the sets and reset parameters to original value GOAL2("PROFIT1")=NO; GOAL2(“lathetime")=yes; Change sets and parameters GOAL2(“lathetime")=NO;

Scenario Comparative Report

2. Loops LOOP procedure causes GAMS to repeat execution of statement enclosed in the parentheses for each value of the defining set. Within the Loop the index is treated as If it referenced only the single set element that the Loop index takes on during each pass. For example Lexico_Example.gms

Loop Steps Step1: Define scenario set Step2:Define parameters that will be altered by scenario Step3:Define parameters used in the loop (i.e. output) Lexico_Example.gms

Set weight of looped scenario to 1 Reset weight of looped scenario to original value, after the solve statement Lexico_Example.gms

Alternative Way Step1: Define scenario set Step2:Define parameters that will be altered by scenario Step3:Define parameters used in the loop (i.e. output) Lexico_Example_alter.gms

Loop: Structural Modification Many comparative studies involve model structure modification. One can introduce context sensitive structure by making constraints or terms conditionals.

Loop: Structural Modification Lec10_structural_modification.gms

Loop: Structural Modification Base Scenario Scenario1 Comparative Result

What if Lec10_structural_modification2.gms

Base: Comparative Result Scenario 1: