REGCGE Selected technical topics Wolfgang Britz Institute for Food and Resource Economics, University Bonn.

Slides:



Advertisements
Similar presentations
CAPRI 3 rd CAP-STRAT Workshop, 24./ , Bologna Farm Type Models For CAPRI - Wolfgang Britz, IAP, Bonn - CAPRI Common Agricultural Policy Regional.
Advertisements

Open Sentences.
1.3 Solving Equations 1.5 Solving Inequalities
Branch and Bound See Beale paper. Example: Maximize z=x1+x2 x2 x1.
What is GAMS?. While they are not NLP solvers, per se, attention should be given to modeling languages like: GAMS- AIMMS-
Process Synchronization. Module 6: Process Synchronization Background The Critical-Section Problem Peterson’s Solution Synchronization Hardware Semaphores.
4.1 Slack Variables and the Simplex Method Maximizing Objective Functions Maximize the objective function subject to: What would this look like?
Advanced GAMS 1. Good Modeling Practices 2. Fixing Misbehaving Models 3. Linking GAMS 4. Advanced GAMS Syntax.
Solving Equations = 4x – 5(6x – 10) -132 = 4x – 30x = -26x = -26x 7 = x.
Modelling Pillar II in CAPRI Wolfgang Britz Institute for Food and Resource Economics, University Bonn.
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.
1 Lecture 11 Resource Allocation Part1 (involving Continuous Variables- Linear Programming) 1.040/1.401/ESD.018 Project Management Samuel Labi and Fred.
Technical Question Technical Question
CAPCGE The regional CGEs of CAPRI Wolfgang Britz with material from Hasan Dudu Institute for Food and Resource Economics, University Bonn.
Ch. 9: Direction Generation Method Based on Linearization Generalized Reduced Gradient Method Mohammad Farhan Habib NetLab, CS, UC Davis July 30, 2010.
Chapter 3 An Introduction to Linear Programming
3.2 Solving Systems Algebraically 2. Solving Systems by Elimination.
Graphical Solutions Plot all constraints including nonnegativity ones
3.7 Absolute Value Equations and Inequalities I can solve equations and inequalities involving absolute value.
7.1 SOLVING SYSTEMS BY GRAPHING The students will be able to: Identify solutions of linear equations in two variables. Solve systems of linear equations.
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS ST. EDWARD’S UNIVERSITY.
3.5 – Solving Systems of Equations in Three Variables.
1 1 Slide Linear Programming (LP) Problem n A mathematical programming problem is one that seeks to maximize an objective function subject to constraints.
Linking CAPMOD and REGCGE Wolfgang Britz Institute for Food and Resource Economics, University Bonn.
28/10/1999POS-A1 The Synchronization Problem Synchronization problems occur because –multiple processes or threads want to share data; –the executions.
Open Sentences.
Factoring Special Products
CAPRI EC4MACS Kick Off meeting, Laxenburg, Peter Witzke, EuroCARE The role of EuroCARE and Bonn University in EC4MACS The role of EuroCARE.
1 1 Slide © 2001 South-Western College Publishing/Thomson Learning Anderson Sweeney Williams Anderson Sweeney Williams Slides Prepared by JOHN LOUCKS QUANTITATIVE.
Systems of Equations: Elimination, Part II Unit 7, Lesson 5b.
Chapter 2 Introduction to Linear Programming n Linear Programming Problem n Problem Formulation n A Maximization Problem n Graphical Solution Procedure.
3.6 Solving Absolute Value Equations and Inequalities
1.3 Open Sentences A mathematical statement with one or more variables is called an open sentence. An open sentence is neither true nor false until the.
Notes – 2/13 Addition Method of solving a System of Equations Also called the Elimination Method.
Section 4.1 Systems of Linear Equations in Two Variables.
1-5 Open Sentences Objective: To solve open sentences by performing arithmetic operations.
1 CAPRI CAPRI training session 2005, Bonn Tuesday, Session 3 CAPRI-Training Session 2005 Exogenous projections (the reference run) Wolfgang Britz, University.
1. 2 We studying these special cases to: 1- Present a theoretical explanation of these situations. 2- Provide a practical interpretation of what these.
Chapter 8 Systems of Linear Equations in Two Variables Section 8.3.
Warm-up. Systems of Equations: Substitution Solving by Substitution 1)Solve one of the equations for a variable. 2)Substitute the expression from step.
Notes 3.4 – SOLVING MULTI-STEP INEQUALITIES
* Collect the like terms 1. 2a = 2a x -2x + 9 = 6x z – – 5z = 2z - 6.
Notes Over 1.6 Solving an Inequality with a Variable on One Side Solve the inequality. Then graph your solution. l l l
1 1 Slide Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an.
Equations and Inequalities. Unit 8 – Solving Inequalities.
An Introduction to Linear Programming
Decision Support Systems
Chapter 2 An Introduction to Linear Programming
3.3 – Solving Systems of Inequalities by Graphing
Chapter 7 – Systems of Linear Equations and Inequalities
Arnim Kuhn & Wolfgang Britz
A user-friendly front-end for Eviews- based macro-structural models
3-2: Solving Systems of Equations using Substitution
Chapter 5: Systems of Linear Equations
6-3 Solving Systems Using Elimination
Solving Equations with variables on each side
3-2: Solving Systems of Equations using Substitution
Solving Systems of Equations using Substitution
Working on coherence and consistency of an output database
3-2: Solving Systems of Equations using Substitution
Graphing systems of linear equations and inequalities
Open Sentences.
3-2: Solving Systems of Equations using Substitution
Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an equation.
3-2: Solving Systems of Equations using Substitution
3-2: Solving Systems of Equations using Substitution
Give the solution to each inequality.
3-2: Solving Systems of Equations using Substitution
3-2: Solving Systems of Equations using Substitution
Presentation transcript:

REGCGE Selected technical topics Wolfgang Britz Institute for Food and Resource Economics, University Bonn

Content  File structure simulation stand alone  Parallel threads  Solving the model  Reporting part Britz: CAP post 2013 – Quantitative Analysis with CAPRI

File structure – stand alone sim Britz: CAP post 2013 – Quantitative Analysis with CAPRI REGCGE GUI GDX From baseline (GDX) Regcge_settings.gms Regcge_decl.gms Regcge_templ.gms Scenario file.gms Regcge_runSim.gms Set_Start_Point.gms Regcge_set_bounds. gms Solve_model.gms Regcge_rep.gms closure.gms

Parallel threads (1)  Used either: If linked to CAPMOD: capmod starts the threads and collects the results A special mode of REGCGE  Each threads solves one Member State %myMS% passed by the “mother thread” and stores its result in a GDX  The mother threads starts these threads (start_sim_threads) and collects the solution (collect_solution.gms)  Parallel threads use several processors Britz: CAP post 2013 – Quantitative Analysis with CAPRI

Parallel threads (2) Britz: CAP post 2013 – Quantitative Analysis with CAPRI Mother (wait until all flags are deleted) MS1.flagMSn.flag Regcge for MS1 Regcge for MSn MS1.gdxMSn.gdx MS1.flagMSn.flag

Parallel threads (3): Prepare for threads Britz: CAP post 2013 – Quantitative Analysis with CAPRI First part: (1)Generate a scratch dir for each country (for temp. file from GAMS, (2)Generate the flag file start_sim_threads.gms

Parallel threads (4): start threads Britz: CAP post 2013 – Quantitative Analysis with CAPRI Second part: start the GAMS threads with the thread specific settings start_sim_threads.gms

Parallel threads (5): collection Britz: CAP post 2013 – Quantitative Analysis with CAPRI collect_solutions.gms

Solving the model  Model is defined both as a NLP (= with a dummy objective function, ) and as a MCP (where also inequalities are allowed)  Model might yield infeasibilities: Variables bounce at their bounds Solver might get stuck (not progress with solution) Britz: CAP post 2013 – Quantitative Analysis with CAPRI solve_model.gms

Solving the model  Infeasibilities: First tactic: widen offending bounds Britz: CAP post 2013 – Quantitative Analysis with CAPRI solve_model.gms Second tactic: add slacks (= allowed infeasibilities) to selected equations and minimize them via the objective function

Solving the model  Slacks in equations Britz: CAP post 2013 – Quantitative Analysis with CAPRI solve_model.gms Second tactic: add slacks (= allowed infeasibilities) to selected equations and minimize them via the objective function  Slacks in objective function:

Solving the model  Slacks in equations Britz: CAP post 2013 – Quantitative Analysis with CAPRI solve_model.gms Second tactic: add slacks (= allowed infeasibilities) to selected equations and minimize them via the objective function  Slacks in objective function:

Solving the model  Reporting: The slacks count towards the infeasibilities Britz: CAP post 2013 – Quantitative Analysis with CAPRI Can hence be interpreted in Euro terms … good indication if the results can be used despite the infeasibilities Results are reported under “CGE, Meta, Model solution overview”

Reporting part  Define what symbol is used and how the dimension are mapped in the “caprinew_default.xml”: Britz: CAP post 2013 – Quantitative Analysis with CAPRI  Same basic tactic as for CAPMOD: Map variables to multi-dimensional cube

Reporting part  The elements used on these dimensions are stored in “tables.xml”, e.g. Britz: CAP post 2013 – Quantitative Analysis with CAPRI  Are used to define the views

Storing and viewing of the results  Under directory regcge (in stand-alone mode) Britz: CAP post 2013 – Quantitative Analysis with CAPRI p_CgeRes GUI Tables.xml views