You are on page 1of 33

Lecture 4 –

Stock and Flow Diagrams (SFDs)


IE2141 Systems Thinking and Dynamics

Dr. LI Haobin, Senior Lecturer


Department of Industrial Systems Engineering and Management (ISEM)
College of Design and Engineering
National University of Singapore

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 1
Let's protect the environment
Lecture notes are subject to change before
the class for further improvement
(Ver. 3 September 2023)

Acknowledgement
The preparation of this module has been made possible by the support from IE2141
teaching team, and the past teaching materials developed by A/Prof. Aaron Chia.

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 2
4.1 Introduction to SFDs

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 3
the impact of expected rater on waterl diff worftfom
-

-vel-re sign to qualitatively I · water flow on .

express influence
recen water herel diff by lowering expected Water/ , butcan ve

can

Why SFD?
between them
causal relationship ↓ R ·

by lovering waterflow?
~bet 2variables
.
But cannot describe
Poste influences
Qualitative - How disting wish bet : 2

drawback influences are


now these

,
description presented specifically
& A
▪ Although a CLD expresses how one variable is related to another, it
does not provide enough detail to calculate the value of one variable
given the values of the others.
▪ In contrast, an SFD is a calculable representation of the system.
▪ For this to be possible, each variable must be defined and assigned
the correct units, and often new variables must be added as well.

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 4
that
Stock -> basic var
also desabesystem Structure
,

behaviour
aesenbesystem
M introducing symbols flow -> factors causing stocz changes

3 granate
by
extension --

What is SFD?
v

for stock &flow Precise f


&rate atwhich stock valve changes
OfC ~ allow math expressions
- ↳ beamotated on
a
Easterstructures
each
system verable

▪ Stock and flow diagrams (SFDs) are ways of representing the structure of
a system with more detailed information, i.e., quantitative values and
equations, than is shown in a causal loop diagram (CLDs).
▪ Stocks are fundamental to generating behavior in a system;
▪ Flows cause stocks to change.

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 5
Mathematic in SFD
▪ System dynamics (SD)
simulation can be built according
to SFD for understanding and
experimenting the nonlinear
behaviors of complex systems
over time using stocks, flows,
internal feedback loops, table
functions and time delays.
&any moment t unet value of stock equalto
wheofdisbet. forfant e
, e 𝑡

integralo
the

Stock 𝑡 = න Inflow 𝑠 − Outflow 𝑠 𝑑𝑠 + Stock 𝑡0


value of stock at to 𝑡0

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 6
cause
Mathematic in SFD
Flow -> rateof change of stock any
at moment

ofhet How" resulting


from
Stock ->
accumulation
outflow"
subtracting ,

↓ from "inflow"
effect

Stock 𝑡 = න Inflow 𝑠 − Outflow 𝑠 𝑑𝑠 + Stock 𝑡0


𝑡0

𝑋 𝑡−𝛿 𝑌 𝑡
SYSTEM output
sen E Inflow(𝑡
to
− 𝛿) /
Outflow(𝑡 − 𝛿)
Stock(t)

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 7
dynamic & consal system -> output of system depends ants past input

SFD as a Set of Equations

Stock 𝑡 = න −Outflow 𝑠 𝑑𝑠 + Stock 𝑡0


𝑡0 𝑡

Stock 𝑡 = න Inflow 𝑠 𝑑𝑠 + Stock 𝑡0


𝑡0

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 8
C
SFD dunaid Ifol
,
conespondence a causal relationships -
-

↳ abstract,
serving as simplified
SFD vs. CLD
a

aggregated description of
causal relationships in SFD

addlondier ausal relationships


But causal relationship in UD
=of
can't befound in SFD, it is wrong
atyfing causal retationships bet
system vorables , might discover (not detarted
enteradd login
↑ ▪ SFD allows non-dynamic causal relationships between system orifcausal Minship into SE

Sometimes redundant/wrong
revesed variables to be annotated on the diagram through mathematical gobackD ,

&
remove it

formulas.
explore which
dynamic ▪ SFD depicts the dynamic causal relationships between system
causal relationships
need variables through the standard forms of "stock" and "flow", with
attention
&

↓drauist uptelpstaquickly conceptualise


implicit integral equations.
I
USD darty overall structure ofsystem
↳ describe
SD debrsinto detents nerty numerical relationships bet cause effect , pulp for constructing
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore systems dynamic simulation models in future 9
4.2 SFD Notations

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 10
SFD Notations

▪ Overview of a Stock- Connectors

Flow Diagram. Converters

Stock
Source Sink

In-Flow Out-Flow

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 11
SFD Notations

▪ Sources and Sinks represent everything outside the system


-
stock defined
into
exist along side flowNot
arrow
Hecamsalsystem when flow arrow Clos by us,
aiput of ,
within stopl of our analysis/outable
& outgoing stock is not

we call the stock where flow flowsout


↑ system boundary ,
Source as the source

How anow flows autof stock he


e

mass red
stock outside system boundary
and
a
autodesystem
I Sink
not output of cansal system

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 12
Stocks & flows ar system variables

SFD Notations weed to consect head of flow


indicating flow" is inflow of
symbol to
rectangle representing
conesponding "stode"
stocke ,

is out flow
If fail
connected to stock rectangle , indicates flow

▪ Stocks are quantities that can accumulate or decrease in


numbers.
▪ Flows show the movement and captures rate that quantities are
when value reduced
transferred. internalspace of flow pipelines - for outflow stock ,
same
value

shldbezen immediately added to inflow stock

Stock Flow
Water tank"
"Waterpipe"
empty value
↳regulating
I
-
wring to sill water
to flow from one end
↓ to another value of flow can directly
passive confiner
I vehe means
only change when connected stack
,

control, not dependent on


to inttowor out flow petit

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 13
causal loop

peter
only comsters
Blow has all functions of converter · Itneedcamadd more constant compared to wrong

MSEDS
variables in CLD state system-output of water affected m are statemore
when describing set
of math

SFD Notations of part system


SFDS -only consters, no stock &flow model unqualified
,
Guz paret system composed of only state subsystems can only be
stati
mont

,
only carstruct
set of eas

thre N variables & Negus


of solus
either find faxed set
stati subsystemsubdivided
of system dy nannies analysis
not target
remaining unchanged
↳peofsptemvarrable
over

trot can't befulter defining causal relationship bet system variables the inte setof equs or

-
.

& more
likely no feasible sols

▪ Converters hold information about the system. Both dunft into scope of
systems dynamic
anatyers

▪ They store equations or constants, and affect rate of flows or


-

L
another converters (Variables/Parameters). Can be read by offer converters as
inputt orflors as references for
variables that he -> He
dynamic causal relationships rest= anveter
regulatin speed of flow
Other
than
In fact How can be provided I
input variables
Converters formula
-output calculated the
of flow
used as current speed
Cambe interconnected based -
Symbolfo
on cansal relationships arstinguish fr system
verrates in SRD
func -> takeall input values
connected to converter , const tant outputs -
thin formulas
,

currentvalue ofthatwonverter 14
serving
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore
as
Diff C crow
-

math formula
variables , used to
-

Noparity azinsFDree explicit


↳undoftsystem toquantitativlydescribe causal relationship
betwer

SFD Notations introvalues of system variables into


converter/ flow , regarded
as input for
another
formula
mighteren
Input & outpu
hor diffcarsal dire trons in diff

Connector dols n have time delay symbol


, domains

berealized the stodaf flow


-

SED time delay can only


relationship so causal relationship connected by connecter
stati by default (nothe delay relationship bet Hem)
.

▪ Connectors move information from one element to another e.g.


polarity & tredelaysymbols
in cases

connects population to births. dat Sampat Mathformula showscer singl


func.
polarity

Influence via 2)math form got delay


z te
to L ametersf ,

aut purposes
style meaning

for formula Hors


E Connectors A
prade imput stock
almost consistent detredinometer ,
dunallow us to Stocks Stocks
wanowMUDS dette our a
-
formula Flows Flows
di
Converters Converters
Connector InSFD , Stodzorly
can accept
direct
Stock can only be influenced by
connection framflow , Flows via inflows and/or outflows.
&not anyother inputs
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore introduced by connector 15
Consistency
connected
in Units
Allstacks by intermediate flows stid husameunit unit
default fire
flowsconnecting tem unit unitofstodedivide
dosen in system
▪ In a SD simulation model represented
by the SFD, units for Stocks, Flows, and (unitless)
Converters shall be consistent, while (Fish) (unitless)
the equations at each Converters are
taken into consideration.Inputrables unts introduced
famithervorables after

calculating thenformulat
values
unts ofresulting
chld be consistent with
wits defined
I

forcument (Fish/Month) (Fish/Month)


converter/fow
(Fish)

(Per Month) (Month)


* left untconversionfact .

cannot all the the


use

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 16
be reflected
Every installationship
in u con the subsequent
SFDexion of CD
I

conversion abstraction
, a aggregation ofSAS
offer with indicate SFD overbook some catical causal r.ships draw LB
Got SFD feasible &
Between CLD and SFD UDLSED , needmore o info
-
diff into

diff SFD
/manybel

▪ CLD is usually an aggregated version of the model represented by SFD, addressing


important variables. Mapping between CLD and SFD are described as follows.
SFD-CLD system
var

⑧ Represent allsta ,Haus cometers Stock


Ithwinflow flowing into stock, draw
the comsal
as
system var . Variable Flow
Storin(LD
relationship from flow fo

Mus InSFD if have outflow flowing out from


Converter
comsal plationships stock , draw re causal relationship

② Draw all connectors


-

as
from flor stock i C

markpolaring Same arrow direction, and polarity (+/-)


arow of flow instDopposite
relationship incl
to arrow of causal

& Ri M Hearing
causal relationships Connector
based on the explicit equation conversion of Minship bet .
Stock &How explained
from integration formula
Causal
based on inflow cocff the 3 diff polarity
interr
I


Relationship Stock-Flow In general, Inflow has an +ve impact on the stock, =

R influence
outflow onchange
-

s .
=

whereas the outflow has an -ve impact on the stock


stack &How Relationship stock value
in

Stock 𝑡 = න Inflow 𝑠 − Outflow 𝑠 𝑑𝑠 + Stock 𝑡0


IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 𝑡0 (Implicit equation) 17
4.4 CLD and SFD
Interpretation on BOTGs

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 18
SFD for Generic Behaviours
▪ Steady State Behaviour
▪ Constant Behaviours
▪ Exponential Behaviours
▪ Oscillation Behaviours
▪ S-Shaped Growth
▪ S-Shaped Growth with Overshoot
▪ Overshoot with Collapse

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 19
for
usually input
~
system's goal
Steady State Behaviour
Time goby , value of
constant
systemvariable perary
▪ A Possible SFD:
Can hypothesise system variable that remains
-

not affectedby amgother


constantoretimeis
factors in Hesystem varable
e

if angtesystem

Performance
Sindrepresent
-

su'butcanhand format
pointto this I I cl porting
casal relationships
IDE SFD , treat
hos a

Weltranslating value (Doesn


const values
of

continuously provides
-

converter sett constant but


into output , intesystem)
other input variables flows
tr other
meters/
stableinput values

Time
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 20
which growthis continuously affected by variable steady state behaviour
System &V fer ,
a -

Constant Behaviour (Increasing)


has
Constantrate conforms to variable - steady state behander & the Restatevar we focusing on

(doendepend on inference
of any other very
▪ A Possible SFD: 1
Iway , express treat evere concerned abt as stock
-
va SRD
-
Greate in flow fut it
, allowing
show a
growingfrend one sime

rateot inflow solely -> Mathematically


constant
determined by - formulated as
Whenextending D &
draw SED state constantvalue ,

Performance
,
ratexhibiting steady
variables inflowformulated
can addsome add system behaviour
,

ae as alrequel t this

ButundnoteMealstransfer e
take constant rate

Lumaggregation
simplification

Time
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 21
sinart constant behaviour melting

Constant Behaviour (Decreasing)

▪ A Possible SFD:

↓ ↓
frenumber when expanded into SFD,
canalso vew state
variable as stock

Performance
↳solely relyon &is ways
a

Time
equal t constant rate
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 22
reteot increase of
expogrowth dop to current
display value

Exponential Behaviour (Growth)


-
▪ A Possible SFD:
Grouthrate
-Using D
, identify zmain ascometer

Genet a ene
t

systemvables ↑

variables

rely poportional to fre causal


curetvalue
-
Growth rate
war implies

Performance
ofstate var state
·

So
,

rat
relationship to growth
increase in
, glater
rate
faster growt ofthe
value maunt rate
relationship from growth
statever.
-read values
from
ere causal
& State vor. state var strik it
after magnify
byalesahreportin
ee
inflow
↓ inflow that
construct value merlast Time
makes Stock
↳ stock
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 23
decline rate of expo
decay evely prop , to current performance value

Exponential Behaviour (Decay)

▪ A Possible SFD:
State vor-stak
Ispically decrement rate functions through outflow
connected to stock
making value of stockdecease

Performance
,
continuously
value of state ver input into decrement
rute which acts as a constater
,

Afterscaling up or down by a certain affor


the
proportion , It is
tren
outputfo

Time

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 24
decierate ofexpo collapse trely to cumulated decrement value from start to present sine decinet value
prop.
largerthe 11

variable
,

lower the state ,


re causal relationsup
forming
-

Exponential Behaviour (Collapse) ↑


need disting wish
from refocuson

▪ A Possible SFD: b

Performance
dear Valetter
.

converted bo - re

whethe
value saledup down in the
proportion by decrement rate actsas stock
I
S .

Vacting
of decrementvalue a conte
infining growth
tur inflow, farming
reinforcing lo

to defaul Time
startingvale
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 25
wise rate dop to duff betw current stateof goal above
ten &

outs as another

Goal Seeking (Increasing) ① system var determinedby


·

intever of system State 2



gal

absolutegalbet
see

▪ A Possible SFD:

usedtobring system --
state doser to upper
goal Marscrepancy bet System State &
.

goal, me impose a prop influence


,

back on system state

Performance

State
system

Time
discrepancy x fixed
the

coefficient
-goal-system State
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 26
decline rate trely prop to
abs diff ·
.
bet .

system State &goal

goal alw below sptem state ,

Goal Seeking (Decreasing) higher state of system


disepang
, glater

↳rectraction higher the gool ,

▪ A Possible SFD: pulls system


State closer to
smaller here are
value
goal(pull
az system
down)
bigger discpanty
state decasing
A
need take more
↳retraction EgusEs

Performance
Time

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 27
oscilltaused by excessive conditions delays -> Not tresame as up & down caused by seasonal factors
on hot time I
All 3 a berpitted
-> Structure smart goalseeking -> Enclosing goal seeking as example , only mak the delays
true
toobter using same system structure
behanbur

Oscillation Behaviours

Performance
Cannot distinguish wrchotbasesfunct Infedbaloop ,
te delays
al relationships
can occur
in
any cams
Butsp can not at fasters influencing Astong tote

debug largent,
Canobserve emergenceof
▪ A Possible SFD:
stock
-sell behavior
Time
InfantHow undto alternately melase/delase
-
of

system State
the delay grad.increase,

Performance
1stthing observed damped
:

ofamp
· sell
, shinking
stors down
Astimen
,
striking
of amp
stows down , begin to sel
constant sall Eventually
.

when time delay damnag ,


observe
expanding os all :

Time

Performance
thedelay
infeedback
d
↳ angduration bet i output
of conletive action
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore Time 28
behandour presented as a frend that accelerates i fie I the decelerates
,
, gradually comerging
io
target above · noistentwexpogritt combi of
reinfaring leap of
,

early stage- growth rate of system state almost proportional to its value expogrowth &balancing loop


,

of goal
later
stages - ·
prop to diff bet .

System State & gool seeking behaviour

S-Shaped Growth highlight intention to


zo

seeknightsystem porta,
change
gralt

F
insulating goal seeking
↳ imbr of expo growth & in difftime
stages ,

consistent
merlacing
▪ A Possible SFD: goal-seeking
combined effect of -

-
E
state
-
-
M
anent system
cause
-
-

Lactionalvalie
↑ Greetie
maguls
pang
I

hycap

Performance
stateot system

pdofs eputs

Time
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 29
sshape growth
add thedelay
to

S-Shaped Growth with Overshoot addltine


expocaly stage osele sen as effect of good selling Schwin undertime delay

I
At-inflow
delay
-
ve->outflow
▪ A Possible SFD: bi-directional flow ->

infoutflow using single stor symbol


0

O

Performance
Time
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 30
addon from
Sgrowth/sshape
vovershoot

Overshoot and Collapse I

resources unrecoverably depleted consumed t expocollapse

I
sonten system state exceed carrying op, resources

▪ A Possible SFD:
Reinfaringlop bet anyingcap & ,

errnot carrying cap , Cuddathe higher system State value,


delay inbalancing lop of source greaterying
cap .

adequacy system so state


cause
anging cap
C
detexed carrying up ↓ decrease
trachte during reinforcing bop
Moraurate method

Performance
-
erosion
emphasises
I
of carrying
cap only
occurs when system state exceeds
carrying p

Time
IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 31
System Structures behind BOTGs

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 32
Let's protect the environment
Lecture notes are subject to change before
the class for further improvement

THANK YOU
The preparation of this module has been made possible by
the support from IE2141 teaching team, and the past
teaching materials developed by A/Prof. Aaron Chia.

IE2141 Systems Thinking and Dynamics – ISEM Department, National University of Singapore 33

You might also like