DYNAMIC
MODELING
Stocks and Flows
Dr.Khurram Iqbal Ahmad Khan
Assistant Professor,
CEM, NUST
CLASS
OUTLINE
Stocks and Flows – operational language
• Stock definition and examples
• Flow definition and examples
• Stocks and flows together
STOCK
S
• Bathtub (or any other container)
• Accumulations
• Nouns, i.e., things and states of being
• Current state of system
• Exist at a point in time
• The only things that still have a value when
all activity freezes
PHYSICAL (AKA
TANGIBLE) STOCKS
Staff Bank Balance Inventory
Carbon Land Tasks
Pollution Population Zebras
Cars Houses Jobs
 Note names have first-letter capitalization
INTANGIBLE
STOCKS
Anger
Knowledge
Frustration
Satisfaction Happiness
Reputation
Quality Hunger Self Esteem
Commitment Trust Love
NOT A
STOCK
• Verbs: run, drive, jump, fall, swim
• Adjectives: red, fast, sporty, pretty, scary
• Adverbs: slowly, recently, very, carefully,
today
FLO
WS
• Faucet and drain
• Rates of change
• Verbs
• How a system is changing
• Exist over [a period of] time
• Disappear when all activity freezes
Fill or drain stocks
(only way to change a stock)
Create dynamics in system
buying building creating
hiring saving producing
PHYSICAL
FLOWS
 Note names are all lowercase
burning
fossil fuel
filling
wetlands
assigning
polluting being born capturing
INTANGIBLE
FLOWS
building up dissipating growing
losing
learning increasing
improving eating earning
NOT A
FLOW
• Nouns: car, house, tree
• Adjectives: red, fast, sporty, pretty, scary
• Adverbs: slowly, recently, very, carefully,
today
STOCK OR
FLOW?
• profit
• cumulative profit
• yesterday
• zebras born
• births
• Other flows: unit sales, revenue, expense,
deaths
COMBINING STOCKS AND
FLOWS (SENTENCES)
• inflows
hiring
Staff
saving
Bank Balance
burning
fossil fuel
Carbon
learning
Knowledge
completing
• outflows
Tasks
dying
Population
dissipating
Anger
eating
Hunger
eating
Hunger
UNIT
S
• outflows
hiring
Staff
saving
Bank Balance
Carbon
learning
Knowledge
completing
Tasks
dying
dissipating
Anger
tasks
tasks/time
$
$/time
GT
GT/time
k-units
burning
fossil fuel
k-units/time
worker
s
• inflows
workers/time
people
Population
people/time
a-units
a-units/time
kcals
kcals/time
UNITS CORRECT?
Velocity
acceleration
Distance
velocity
m
m/s
m/s
m/s2
RULE 1:
RESPECT UNITS
Salary
Levels
Employee
Motivation
contributing
$ m-units
???/time
Staff
placing ads
workers
ads/month
using birth
control
people
Population
uses/person/month
 Salaries must go down to improve motivation
RULE 2: RESPECT
CONSERVATION
assumes deaths absorbed by envir.
learning does not take away someone else’s
knowledge
saving dying
• Material can neither be created nor destroyed
• Except at clouds: infinite sources and sinks at the
model boundary
Bank Balance Population
learning
assumes not limited by money supply
• Except intangibles
Knowledge
NEVER CONSERVE NON-
PHYSICAL QUANTITIES
Customer
Dissatisfaction
Employee
Dissatisfaction
leading to
d-units d-units
d-units/week
 Units check
 But does customer lose dissatisfaction
as employee’s increases?
INFLOW
BEHAVIOR
• Constant zero
• Constant (non-zero)
INFLOW
BEHAVIOR
• Linearly increasing
• Linearly decreasing
INFLOW
BEHAVIOR
• Step up then down
EXAMPLE
In this smoggy city, the air pollution continues to
increase without limit, making it hard for the
health-conscious citizens to do anything without
coughing.
OUTFLOW
BEHAVIOUR
• Constant zero
• Constant (non-zero)
OUTFLOW
BEHAVIOUR
• Linearly increasing
• Linearly decreasing
EXAMPLE
There is a limit to the fossil fuels available to us
on this earth. With more and more people and
greater demand for energy per person, we will
run out very soon.
INFLOW AND
OUTFLOW
BEHAVIOUR
• inflow = outflow (steady-state or equilibrium)
• inflow > outflow (constant)
• inflow < outflow (constant)
EXAMPLE
A firm’s customer base is growing quite well, gaining a
constant number of customers each year. Despite this,
at a certain point, the size of the customer base starts to
fall. How can this be?
A CLOSER
LOOK
Page 1
0.00 3.75 11.25 15.00
7.50
Months
1:
2:
3:
1:
2:
3:
1:
2:
3:
10
0
25
4
1: Customers
40
8
2: gaining 3: losing
1
1
1
1
2 2 2 2
3
3
3
3
SUMMA
RY
• Stocks and flows provide an operational view
• Stocks are nouns, accumulations
• Flows are verbs, rates of change
• Combine them to make sentences
• Be careful of units and conservation
QUESTIO
NS?

complex system and dynamics basic dynamic systems models