System Dynamics Modeling

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

25/01/2019

SYSTEM DYNAMICS. MODELING AND


SIMULATION IN ENGINEERING.
TOPIC 2. THE MODELLING PROCESS
• Problem articulation
• Formulation of hypotheses,
• Basic tools for modeling with SD: Influence Diagrams.
Feedbacks.
• Variables of State. Stocks and flows. Sources and
Sinks. Forrester diagrams.

THE MODELING PROCESS

The art of model building is knowing what to cut out,


and the purpose of the model acts as the logical
knife. It provides the criteria to decide what can be
ignored so that only the essential features necessary
to fulfill the purpose are left.
Business dynamis, J.D. Sterman

Always model a problem. Never model a system.


Business dynamis, J.D. Sterman

1
25/01/2019

THE MODELING PROCESS


problem

•1.Problem Articulation
(Boundary Selection)

•2. Formulation of hypothesis

•3. Formulation of the


dynamic model

•4. Testing

•5. Policy design and evaluation

results

1. PROBLEM ARTICULATION
• Boundary Theme selection: What is the problem? Why is it a
problem?

• Key variables: What are the key variables and concepts we must
consider?

• Time horizon: How far in the future should we consider? How far
back in the past lie the roots of the problem?

• Dynamic problem definition (reference modes): What is the


historical behavior of the key concepts and variables? What might
their behavior be in the future?

2
25/01/2019

EXERCISE: THE PLAGUE OF FIELD MICE IN


CASTILLA Y LEÓN

• How far in the future should we consider? How far back in the past lie the roots of
the problem? What is the historical behavior of the key concepts and variables?
What might their behavior be in the future?

EXERCISE: THE PLAGUE OF FIELD MICE IN


CASTILLA Y LEÓN

• Problem? Key variables and actor? How far in the future should we consider?
How far back in the past lie the roots of the problem? What is the historical
behavior of the key concepts and variables? What might their behavior be in the
future?

3
25/01/2019

ABOUT THE CLIENT…


• To be effective the modeling process must be focused on the clients’
needs. Modeling is done to help the client, not for the benefit of the
modeler.

• The client is not the person who brings you in to an organization, nor even
the person who pays for the modeling study.

• Your clients are those people whose behavior must change to solve the
problem. Your client can be a CEO or a machine operator on the factory.
Clients can be individuals. The client for a modeling study can be your
academic colleagues, the public at large, or even yourself.

Sterman, J. D. Business Dynamics (2000). Pag. 84-85

KEY VARIABLES

• Endogenous variables: variables produced or calculated within the


organism, system or model.

• Exogenous variables: variables caused by factors from outside the


organism or system.

• Excluded: variables not relevant for the problema studied.

4
25/01/2019

EXERCISE: THE PLAGUE OF FIELD MICE IN


CASTILLA Y LEÓN

• problem?
• key variables?
• Actors?

Microtus arvalis

MODEL BOUNDARIES DIAGRAMS


• Represent the main variables involved in the problem and separate
endogenous from exogenous and from excluded.

temperatures Economic losses


Mice population

crops
Biodiversity
predators population
% watered crops
Promotion of biodiversity
Pesticide in environment

Use of fertilizers
Pesticide release
% Biological production

5
25/01/2019

MODEL BOUNDARIES DIAGRAMS


• Represent the main variables involved in the problem and separate
endogenous from exogenous and from excluded.

temperatures Economic losses


Mice population
EXOGENOUS
crops ENDOGENOUS

predators population
Biodiversity
% watered crops
Promotion of biodiversity
Pesticide in environment

Use of fertilizers
Pesticide release
% Biological production
EXCLUDED

EXERCISE: THE PLAGUE OF FIELD MICE IN


CASTILLA Y LEÓN

• Our theories to explain the plague?


• Dynamic hypothesis that explain the behavior has a
consecuence of endogenous variables?

6
25/01/2019

2. FORMULATION OF DYNAMIC
HYPOTHESIS

• Hypothesis generation: What are current theories of the problematic


behavior?

• Endogenous focus: Formulate a dynamic hypothesis that explains the


dynamics as endogenous consequences of the feedback structure.

• Mapping: Develop maps of causal structure based on initial hypotheses,


key variables, reference modes, and other available data, using tools such as

• Model boundary diagrams,


• Causal loop diagrams,
• Stocks and flows: Forrester diagrams

CAUSAL LOOP DIAGRAMS (influence


diagrams)
• Represent the cause-efect relationships of a system.
• They help quickly capturing your hypotheses
• Help communicating the important feedbacks you believe are
responsible for a problem.

7
25/01/2019

CAUSAL LOOP DIAGRAMS


• Positive link:
• if the cause increases, the effect increases (all else equal)
• if the cause decreases, the effect decreases

CAUSAL LOOP DIAGRAMS


• Negative link:
• if the cause increases, the effect decreases (all else equal)
• if the cause decreases, the effect increases

-
deaths population

sales stock
-

8
25/01/2019

CAUSAL LOOP DIAGRAMS


Correlation is not causality: Causal diagrams must include only (what
you believe to be) genuine causal relationships.

CAUSAL LOOP DIAGRAMS


• All relations must have a sign and it cannot be
ambiguous.
• If the sign is not crear something must be missing.

PRICE BENEFITS

9
25/01/2019

CAUSAL LOOP DIAGRAMS


• All relations must have a sign and it cannot be
ambiguous.
• If the sign is not crear something must be missing.

PRICE BENEFITS

SALES

CAUSAL LOOP DIAGRAMS


Feedback: causal relationships often create close chains of
relationships called feedback loops.

trees rain
+

10
25/01/2019

CAUSAL LOOP DIAGRAMS


Reinforcing loop (positive loop). If the number of negative links is
even, the loop is positive or reinforcing: the feedback effect
reinforces the original change,

+
births R population

CAUSAL LOOP DIAGRAMS


Reinforcing loops tend to lead to “explosive” behaviors

Number of
trees

+
trees R rain
+
-

11
25/01/2019

CAUSAL LOOP DIAGRAMS


Reinforcing loops tend to lead to “explosive” behaviors

Number of trees

+
trees R rain
+
-

CAUSAL LOOP DIAGRAMS


Balancing loop (negative loop). If the number of negative links is odd,
the loop is negative of stabilizing: the feedback effect attenuates
the original change,

-
population B food

12
25/01/2019

CAUSAL LOOP DIAGRAMS


Not every “cycle” is a feedback loop, some are just parallel
effects. Look at the direction of the arrows!!!

CAUSAL LOOP DIAGRAMS


Balancin loop: the effect of two negative links is equivalent to a
positive link.

_
workforce Workload per worker
+
_
+ Workers motivation
hirig of new
workers R +
Cuality of
+ products

Profits of
company Cometitivness of +
+ company

13
25/01/2019

u1

CAUSAL LOOP DIAGRAMS


Balancin loop: the effect of two negative links is equivalent to a
positive link.

+
+

B
_

+
+
+
_

CAUSAL LOOP DIAGRAMS


Balancing loops tend to equilibrate the system and often
include a desired state or set point

desired level
+
- discrepancy
Discrepancy
(+)
+
water level B open tap

14
Diapositiva 27

u1 corregirmenos
usuario; 19/02/2018
25/01/2019

29

Fedback loops in control engineering

Desired level
level
+ _ PERSON TAP GLASS

EYE

30

Feedback loops in control engineering

15
25/01/2019

CAUSAL LOOP DIAGRAMS


Loops combination

EXERCISE: LOOP POLARITY

+ _
+ +
S R
+ _ - +

- + +
-
S R
_
+

16
25/01/2019

CAUSAL LOOP DIAGRAMS


Choose positive names for variables, it makes the work a
lot easier

bad grades
+, -?

+, -?
low effort low confidence
+, -?

CAUSAL LOOP DIAGRAMS


Choose positive names for variables, it makes the work a
lot easier

good grades
+

+
effort confidence
+
-

17
25/01/2019

M1

EXAMPLE: ROAD BUILDING


B1- more roads decrease travel time

• from “Business Dynamics” J. D. Sterman

CAUSAL LOOP DIAGRAMS


B2- less travel time
increases trips

B3- less travel time increases


trips length
+
R4- less travel time for cars
makes public transport less
atractive

-
• Figura tomada de “Business Dynamics” J. D. Sterman

18
Diapositiva 35

M1 Margarita; 13/02/2017
25/01/2019

EXAMPLE: CLIMATE CHANGE 3- cloud reflection cools down


1- plant absortion
moderates CO2
+ 3- cloud captures heat
_ and cools down
2- algae absortion
moderates CO2

• Figure taken from “Modeling the Enviroment” by David Ford.

EXAMPLE: CLIMATE CHANGE


4- permafrost melting
+ increases methane and
_ increases heating

5- permafrost melting
decreases ice surface
and increases heating

• Figure from “Modeling the Enviroment” by David Ford.

19
25/01/2019

EXERCISE no 1.1:
THE PLAGUE OF FIELD MICE IN CASTILLA Y
LEÓN
• Create the causal loop diagram and define the
main feedback loops of the problem

EXERCISE: THE PLAGUE OF FIELD MICE IN


CASTILLA Y LEÓN
• Create the causal loop diagram and define the main feedbacks of the
following problems:

1. Basic population growth (mice, predators) with no mutual interaction


and no food restriction.
2. Mice population growth with food constrain. There are no predators
but the growth of the population is restricted by the availability of food.
3. Prey-predator dynamics. The growth of predators is determined by the
availability of prey (if the prey is abundant the fertility of predators rises)
and the population of prey is controlled by predators (if the number of
predators is high the deaths of prey rises).
4. The problem of the habitat. The number of predators is limited, not only
by the availability of prey, but also by the number of suitable places to
build nests.
5. The effect of poison. The use of poison to kill mice affects the predators
as well.

20
25/01/2019

EXERCISE no 1.2:
ADAM SMITH’S INVISIBLE HAND AND THE
FEEDBACK STRUCTURE OF MARKETS
• Smith then noted how prices respond to the balance between
demand and supply:
• “The market price of every particular commodity is regulated by the
proportion between the quantity which is actually brought to market,
and the demand of those who are willing to pay the natural price of
the commodity . When the quantity of any commodity which is
brought to market falls short of the effectual demand, all those who
are willing to pay the whole value cannot be supplied with the
quantity which they want. Rather than want it altogether, some of
them will be willing to give more. A competition will immediately
begin among them, and the market price will rise more or less above
the natural price.”

from “Business Dynamics” J. D. Sterman

EXERCISE: ADAM SMITH’S INVISIBLE HAND


AND THE FEEDBACK STRUCTURE OF
MARKETS
• Similarly, when supply exceeds demand, “[the market price will sink
more or less below the natural price.”

• “ But supply in turn responds to the market price: If. . . the quantity
brought to market should at any time fall short of the effectual
demand, some of the component parts of its price must rise above
their natural rate. If it is rent, the interest of all other landlords will
naturally prompt them to prepare more land for the raising of this
commodity; if it is wages or profit, the interest of all other labourers
and dealers will soon prompt them to employ more labour and stock
in preparing and bringing it to market. The quantity brought thither
will soon be sufficient to supply the effectual demand. All the different
parts of its price will soon sink to their natural rate, and the whole
price to its natural price.”

21
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

• Stocks are accumulations. They characterize the state of the


system and generate the information upon which decisions and
actions are based. Stocks give systems inertia and provide them
with memory. Are represented by rectangles.

• Flow variables are the derivatives of the stocks (its inflow ad/or
autoflows). Stocks are the integral of the difference between the its
inflow and its outflow. Represented by a valve sign.

• Clouds represent the sources and sinks of the flows.

• Auxiliary variables are used to represent other variables of


interest related via algebraic expressions to stock and flows.

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

• Stocks are accumulations. They characterize the state of the


system and generate the information upon which decisions and
actions are based.

In flow

STOCK Out flow

22
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

(Forrester diagram)

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
• Examples of stock variables

population
births deaths

Industrial
capital

CO2 in
athmosphere

experience

23
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
• Stocks and integrals

population
births deaths

0
population(t )  population(0)   (births  deaths)dt
0

dpopulation
 births (t )  deaths(t )
dt

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

• Are they stock variables?

births CO2 in atmosphere


population

deaths Pesticide in environment

Air temperature

• A variable can be considered stock or flow (or auxiliary)


depending on the time scale and hypothesis.

24
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

• Stock variable o just auxiliar variable?

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
• FLOW VARIABLES: are the ones that cause the variation of the flow
• They can increase the stock or decrease it
• Exceptionally they can be bidirectional, but it’s not recomended

CO2 in
athmosphere
CO2 emissions CO2 absorption

Industrial
capital
Investment Devaluation

25
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
• IMPORTANT: whatch the units to validate flows

• births(t) = Population(t) x birth rate

• Units:

• Population [individuals]
• Births [individuals/yr]
• Birth rate [ 1/ yr]

STOCKS AND FLOWS. FORRESTER


diagrams.
• Flows may depend on its own the stock variable causing a simple
feedback loop:

• Population= f1(births,…)
• births = f2(Population,….)
POPULATION
BIRTHS
BIRTHS
POPULATION

births = BR * population
d population/ dt = births

26
25/01/2019

Auxiliar variables

• The rest of the variables in a model that are neither flows nor
stocks are considered auxiliar variables.

• They relate to each other and with stocks and flow via
arithmetical functions (linear or non linear)

• The number of auxiliar variables is normally larger tan the


nimber of stocks and flows, they help understand the models.

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

• Forrester diagrams. Complete the information of the causal loop


diagrams by distinguishing between stock and flow variables. This
way any differential equation can be represented by a Forrester
diagram.

27
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
• Forrester diagrams and differential equations. Differential
equations describe the math of dynamic systems. Forrester
Diagrams describe differential equations.

dH
 Area (Qi (t )  Qo (t ))
dt
Qo (t )  Cv H (t ) x(t )
x(t) valve opening

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
• Forrester diagrams and differential equations. Differential
equations describe the math of dynamic systems. Forrester
Diagrams describe differential equations.

dH
 Area (Qi (t )  Qo (t ))
dt
Qo (t )  Cv H (t ) x(t )

28
25/01/2019

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.
K
Flujo1
Flow1

Nivel
Stock 11
Flujo2
Flow2

Flow3
Flujo3
Nivel
Stock 22

Stock 1 Stock 2
Flow1 Flow2 Flow3

STOCKS AND FLOWS. FORRESTER


DIAGRAMS.

• Figura tomada de la librería de modelos de T. Fiddaman

29
25/01/2019

STOCKS AND FLOWS. EXERCISES.

• Find the stocks and flows of the population models of the mice plague.

• Find the stocks and flows of the following process:

The manufacturing of a bicycle in a factory requires several operations: welding


and painting of the frame, preparation of the gear system, mounting of the gear,
brakes and wheels in the frame, and finishing operations. Welding-painting and
preparation of the gear system can be done in parallel, but only when those
things are done the mounting and finishing operations can be done. Find the
stocks and flows needed to describe this manufacturing process and control the
flow of parts in the factory.

30

You might also like