37
Master Économie et Affaires Internationales Cours “Modèles de Simulation” Paris Dauphine –Septembre – October 2010 Prof. Ramón Mahía Applied Economics Department www.uam.es/ramon.mahia SIMULATION MODELS: SOME BASICS

Master Économie et Affaires Internationales Cours “ Modèles de Simulation ”

Embed Size (px)

DESCRIPTION

SIMULATION MODELS: SOME BASICS. Master Économie et Affaires Internationales Cours “ Modèles de Simulation ” Paris Dauphine – Septembre – October 2010 Prof. Ramón Mahía Applied Economics Department www.uam.es/ramon.mahia. STRUCTURE OF THE PRESENTATION. WHAT DOES SIMULATION MEAN? - PowerPoint PPT Presentation

Citation preview

Master Économie et Affaires InternationalesCours “Modèles de Simulation”

Paris Dauphine –Septembre – October 2010

Prof. Ramón MahíaApplied Economics Department

www.uam.es/ramon.mahia

SIMULATION MODELS: SOME BASICS

SIMULATION MODELS:

SOME BASICS STRUCTURE OF THE PRESENTATION

WHAT DOES SIMULATION MEAN?

WHY DO WE NEED SIMULATION MODELS?

BRIEF EXAMPLES OF REAL SIMULATION

MODELS

BASIC ELEMENTS, STAGES AND ADVICES

FOR BULDING UP A SIMULATION MODEL

SIMULATION MODELS:

SOME BASICS WHAT DOES SIMULATION MEAN?

A simulation model is a kind of technical

tool that help us to understand and take

decisions in real complex systems.

SIMULATION MODELS:

SOME BASICS WHAT DOES SIMULATION MEAN?

Using a simulation tool, we can experiment in

real systems:

To Understand how the system works

To Evaluate alternative decisions

….or to find the best decision for achieving a

particular result / goal(optimization)….

SIMULATION MODELS:

SOME BASICS WHY DO WE NEED SIMULATION MODELS?

A real system use to be complex (not chaotic) : different

“agents” affecting lots of variables (elements) greatly

interrelated in a way that …

It seems difficult or impossible to anticipate the result

of a given decision relying on past, experience or

theoretical conceptions.

Thus, for understanding the system and/or evaluating

decision’s outputs, IDEALLY we would need to “try

out”, to experiment with reality.

SIMULATION MODELS:

SOME BASICS WHY DO WE NEED SIMULATION MODELS?

Obviously, most of the times we CAN’T make real tries

for evaluating alternative decisions because it is simply

impossible or very risky and/or expensive:

A Macro example: Which is the impact of different immigration scenarios in pension system in 2025 for Spain?

A Micro example: How will it change (most likely) our market competitors response, and thus, our market share for two different price and distribution strategies

SIMULATION MODELS:

SOME BASICS MORE ON SIMULATION DEFINITION

Simulations Vs. Optimization

There are not Simulation Vs Optimization models but different

ways of use.

Optimization systems concentrates mainly on reaching a well

predefined objective given a set of restrictions.

Simulation is an open strategy that use the links between inputs

and outputs without setting a priori what must be considered an

optimum solution.

That’s why we usually say that simulation models are “runned”

and optimization models are “solved”.

SIMULATION MODELS:

SOME BASICS MORE ON SIMULATION DEFINITION

Example: Simulations Vs. Optimization: Replace a

quota regime by a tariff only system

1.- OPTIMIZATION LIKE: Which are the tariff level

equivalent to an existing quota regime

2.- SIMULATION LIKE: Which are the effects of different

tariff levels on prices and trade flows.

….. Most of the times, simulation looks like a natural

previous stage for optimization….

SIMULATION MODELS:

SOME BASICS WHY DO WE NEED SIMULATION MODELS?

In social sciences, simulation models are extremely

useful for understanding systems because of:

The theoretical basis of the system are uncertain or inaccurate: the absence or, at the contrary, the multiplicity of theoretical models that “really” fit “real” systems.

The degree of complexity and uncertainty in the behavior of individuals (elements) and its inter-connections .

The importance of aggregation of phenomena: social phenomena “emerge” from individual action but it has its own dynamics (in part, because the complex interrelations influence individual decisions)

The importance of dynamics of phenomena (playing with time): passing of time affects to the evolution of a system: there are short , medium and long term different effects.

SIMULATION MODELS:

SOME BASICS 3 REAL EXAMPLES

Forecasting the impact of migration on pension

system by 2025 (CES Project 2007-08) : Very complex and simultaneous interrelations between migration,

native demographical trends, economic conditions, ..politics Once again,… impossible to try out and impossible to risk a single

forecast output . Lack of a single theoretical framework to be applied Individuals (or families) experience and take migration decisions in

a different way Very rich migration time dynamics Different qualitative issues (politics) to be considered: migration

policy design and application, future welfare state design …..

SIMULATION MODELS:

SOME BASICS 3 REAL EXAMPLES

Removal of trade barriers in an EU import market

(implications on world trade prices and trade yields for

different countries):

Lack of a reliable and realistic theoretical framework (imperfect competition, market power, …)

Different strategies in different countries could be taken in new scenarios (lots of agents involved on decisions)

Importance of dynamics

SIMULATION MODELS:

SOME BASICS 3 REAL EXAMPLES

Forecasting natural gas demand (national and

regional distribution) for the next 24 months: Impossible to give a single forecast (different scenarios

have to be considered) because… Lots of elements / interrelations (different scenarios) in

different time dimensions: • Short term: seasonal elements such as weather conditions

(hardly foreseeable) that affects Energy MIX and intensity of consumption.

• Medium term (economic conditions)• Long term: Policy related issues (Regulatory elements, “Kyoto

Protocol” strategies to be adopted, new future competitors , new rules…..)

…crossed with specific regional dynamics

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(i) Real system “draft”

(ii) Operative system “representation” (design)

(iii) Different type of variables (parts)

(iv) Simulation flow structure (links)

(v) Technical Structure (computation)

(vi) Interface (platform of use)

(vii) Results (use of the model)

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(i) Real (whole) system to be analyzed: The

collection of elements and interactions to be analysed

by means of the simulation.

In a very first stage, start drawing a broad definition, a

framework of the whole system: different parts (sub-

systems) should be recognized, every element should be

identified and every relevant connection should be

properly acknowledged even if your fundamental

interest is focused in just a single part. (see next)

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(i) Real (whole) system to be analyzed (cont):

The largest part of the technical decisions regarding

the estimation, calibration, design of scenarios and

interface design rely on and are conditioned by a

good comprehension of the elements and

interrelations of the whole system to be analysed.

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(ii) System “representation”: Simplified and

limited version of the real system

Then, in a second stage, start to identify the “reduced”

representation of the system that best fit YOUR

simulation aims: leave out some complete parts, reduce

elements of interest and drop useless relationships

(never forget, of course, those rejected variables and

links, in case you need them later on, and bear them

always in mind for a broad and wide range

comprehension of the final results).

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(iii) Type of variables:

Inputs: (***) Stimulus Inputs (decision or critical): main variables to be

changed for simulation

Exogenous Inputs (out of model, usually fixed or very limited,

frequently qualitative, ideally not critical,..)

Outputs : Intermediate outputs (state and auxiliary variables, or estimated

parameters)

(***) Final outputs

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(iv) Simulation flow structure: Structured

scheme that illustrate the connection between

different variables: cause – effect chains Simplify the flow along the cause – effect chains (reduce

dimensionality, look for a semi - linear design)

Rationalize chain flows: prioritize inputs and outputs, give them

hierarchical order, and then…

Divide the system in homogeneous parts for planning the work

across areas. Locate the links between the different areas and order

the stages, identifying the priorities and crucial points.

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

SIMULATION MODELS:

SOME BASICSBASIC ELEMENTS & STAGES FOR BIUILDING UP A SIMULATION MODEL

(iv) Simulation flow structure: (cont.)..

Identify the sequences of work, bottle – necks, critical

crossing points,…

Plan a preliminary time work modeling schedule

according to:

“In model” factors: the previous identification of lines,

crossing points and bottlenecks

“Out of model” factors: existing organization of areas,

the resources available, the difficulty of different tasks

SIMULATION MODELS:

SOME BASICS

BASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

t t+1 t+2 t+3 t+4 t+5 t+6 t+7 t+8

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

(v) Technical Structure: Quantitative definition of

elements (variables) and links between them

(equations)

1.- Collection of data for every variable (element)

2.- Mathematical (for deterministic links) and/or

statistical models (for randomness)

3.- Mathematical and/or statistical algorithms to describe

and validate convergence and/or equilibrium of simulation

or optimization solutions.

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

NATIONAL PRODUCERS YIELDS

TARIFFS

IMPORT PRICES

IMPORT DEMANDDOMESTIC

GROWTH

ECONOMETRIC MODEL

DOMESTICDEMAND

SUBSIDIES

DOMESTICPRICES

ECONOMETRIC MODEL

IDENTITY

REST OF THE MODEL

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

(v) Technical Structure: (Cont.) (Example of an

optimization algorithm for an international trade model)

J

j

I

iijij

J

j

I

iijij

I

ijiii

J

jjjjj

j

XXTTXTdZWZu

dQYQhAD

MAX

1 11 11

1

),(

),(1

1

Ad-Quantum Tariff Matrix

Ad-Valorem Tariff Matrix

Import Inverse

Function

Export Inverse

Function

Existing Quota

Regimes

I

ijiii

J

jjjjj dZWZudQYQh

11

),(),(

• Equilibrium is reached making equal the inverse functions

of imports and exports revenues

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

(v) Technical Structure: (Cont.) There exists different technical solutions for different objectives

(forecasting, evaluating, optimizing, …….)

…. and restrictions given (uncertainty, data available, time, skills,

theoretical requirements)…

So choosing the technique wont be easy ....

If different alternatives can be technically chosen, let simplicity lead

your decision (simplicity of construction, of updating, of use…)…

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

(v) Technical Structure: (Cont.) Concentrate on data ("Measure twice, and cut once“).

Carefully supervise your “raw material”: use homogeneous data, ensure

the future availability of them, choose the samples carefully, be

extremely scrupulous in the handling of data (check robustness).

Use the data provided by the end user, agree with them if data responds

truthfully to “their” reality perception him.

There would exists different technical solutions for the different

objectives (forecasting, evaluating, optimizing, …….) …. and

restrictions given (uncertainty, data available, time, skills, theoretical

requirements)…

…thus choosing the technique wont be easy .... (see next)

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

(v) Technical Structure: (Cont.) For choosing the technique:

Explore the analytical - mathematical – statistical procedures

that best adapt to the system and your aims.

Try to adapt the analytical technique to the problem and not

the other way round (models MUST be useful and suit the

problem, not technically attractive or handsome)

If different alternatives can be technically chosen, let simplicity

lead your decision. Do not complicate the technical models if

it does not lead to clear benefits from the user perspective

(“If your intention is to discover the truth, do it with simplicity and

lave the elegance for the tailors“)

SIMULATION MODELS:

SOME BASICSBASIC STAGES FOR BIUILDING A SIMULATION MODEL: ELEMENTS AND DECISIONS

(v) Technical Structure: (Cont.) What if we need some stochastic (econometric) models?:

If you can, try to avoid critical dependency on stochastic

estimations: if inferential statistics are used, not only final, BUT

INTERMEDIATE outcomes would vary in a confidence interval

so you should carefully check the “sensitivity” of the WHOLE

system to EVERY coefficient change

... Think “seriously” if estimations will be static or an automatic

re-estimations will be addressed in the model.

Limit or warn (in the interface) the use of the model with “within –

sample data” scenarios.

Try (never easy) to offer results in an confidence interval – way

(providing values and probabilities).

SIMULATION MODELS:

SOME BASICS BASIC ELEMENTS OF A SIMULATION MODEL

(vi) Interface: Platform for using the model

Sometimes is not necessary (self use)

Call for software professionals (if you have lots of money)

Let simplicity guide the design of the interface: The

interface is wished for using the model, not for understanding

the model: The “model” COULD be COMPLEX, but the

interface MUST be FRIENDLY:

Prioritise the wishes of users in all the stages and take

their advices

Set different levels of use: Decision makers, medium level

technicians, high skilled technical experts, etc... “There is no

inept user, only badly designed systems”.

SIMULATION MODELS:

SOME BASICS BASIC ELEMENTS OF A SIMULATION MODEL

(vi) Interface: Platform for using the model

SIMULATION MODELS:

SOME BASICS BASIC ELEMENTS OF A SIMULATION MODEL

(vi) Interface: Platform for using the model

SIMULATION MODELS:

SOME BASICS BASIC ELEMENTS OF A SIMULATION MODEL

(vi) Using the model: (**) Scenario: a set of inputs and parameters considered for

a simulation exercise

When several inputs are taken, lots of potential variant

scenarios arises

For reducing dimensionality:

Try to identify tree-structures (if possible) identifying

hierarchical connections of different inputs

Pode the tree: Drop impossible, hardly probable, not

interesting and not different scenarios.

Order the final list

SIMULATION MODELS:

SOME BASICS BASIC ELEMENTS OF A SIMULATION MODEL

(vi) Using the model:

INPUTS VALUESHost country demographics High fertility variant

Medium fertility variant

Low fertility variantHost country economic growth High growth Medium growth Poor growth CrisisImmigration restrictions None Medium HighTime Short term Medium term Long termTOTAL SCENARIOS 108

Time Demographics Economic growth Restrictions ScenarioShort term Medium Medium None 1 Poor Medium 2Medium Term Medium Medium None 3 Poor Medium 4 Crisis Medium 5 High 6Long Term High High None 7 Medium Medium None 8 Low Poor Medium 9 Crisis Medium 10 High 11

SIMULATION MODELS:

SOME BASICS BASIC ELEMENTS OF A SIMULATION MODEL

(vi) Using the model: Give probabilities to different scenarios (use conditional

probabilities if a tree scheme is used)

Evaluate the output:

Offer a kind of result that jointly evaluates the probability of

the outcome and the magnitude of it

Once you get results for each given scenario, clearly

identify the sensitivity of results to changes in every inputs.

Identify (and don’t underestimate) qualitative issues (or

simply out of model facts) that could affect results.