System Dynamics Modelling using Vensim 3 December 2015 Prof Mikhail Prokopenko
System: structure
http://imgbuddy.com/fish-swarms.asp System: behaviour
System: interconnectivity http://pivotpoint.io/en-us/article/the-interconnectivity-of-social-business#.vzta9uywcyw
System Dynamics Definition An approach to understanding the behaviour of complex systems over time. It deals with internal feedback loops and time delays that affect the behaviour of the entire system. What makes system dynamics different from other approaches to studying complex systems is the use of feedback loops and stocks and flows.
Stock and Flow Diagram http://journalofia.org/volume3/issue2/01-morville/ http://fixingtheeconomists.wordpress.com/
http://pespmc1.vub.ac.be/feedback.html Black box diagram
Feedback loops
Positive Feedback - Exponential growth More begets more Less begets less - The vicious cycle - Snowball rolling down a hill - Bank account interest - Unlimited population growth
Negative Feedback - Goal seeking behaviour - Pouring water into a glass - Initial growth leads to an undersupply of resources http://pespmc1.vub.ac.be/feedback.html
Dynamics of real systems - Systems often combine feedbacks - Growth and limitation - Populations
Questions?
Modelling: sensitivity to initial conditions http://demonstrations.wolfram.com/sensitivitytoinitialconditionsinchaos/
Butterfly effect: sensitivity to initial conditions http://demonstrations.wolfram.com/sensitivitytoinitialconditionsinchaos/ http://pixshark.com/chaos-theory-butterfly-effect.htm
Core Concepts Simple processes can generate complicated behaviour System dynamics provides unified approach for understanding problems Assists with your own mental models by making dynamic problems explicit Accumulations (Stocks), Change (Flows), Feedback (interactions between the two)
How assets build and decay - Accumulation itself changes according to inflow and outflow - inflow > outflow: level rises - outflow > inflow: level sinks - outflow = inflow: no change image: http://fixingtheeconomists.wordpress.com/
Identifying Stocks and Flows - How can you tell which concepts are stocks and which are flows? - Stocks are quantities of material or other accumulations. They are the states of the system. - The flows are the rates at which these system states change. Imagine a river flowing into a reservoir. The quantity of water in the reservoir is a stock. - If you drew an imaginary line across the point where the river enters the reservoir, the flow is the rate at which water passes the line.
Identifying Stocks and Flows - In epidemiology, prevalence measures the number or stock of people who have a particular condition at any given time, while incidence is the rate at which people come down with the disease or condition. - In December 1998 the prevalence of HIV/AIDS worldwide was estimated by the United Nations AIDS program to be 33.4 million and the incidence of HIV infection was estimated to be 5.8 million/year. That is, a total of 33.4 million people were estimated to be HIV-positive or to have AIDS; the rate of addition to this stock was 5.8 million people per year (16,000 new infections per day). - - The net change in the population of HIV-positive individuals was estimated to be 3.3 million people per year due to the death rate from AIDS, estimated to be 2.5 million people per year in 1998.
The Snapshot Test - Stocks characterise the state of the system. To identify key stocks in a system, imagine freezing the scene with a snapshot. Stocks would be those things you could count or measure in the picture, including psychological states and other intangible variables. - stock of water in a reservoir from a set of satellite images and topographic data, but cannot determine whether the water level is rising or falling. - bank statement tells you how much money is in your account but not the rate at which you are spending it now. - If time stopped, it would be possible to determine how much inventory a company has or the price of materials but not the net rate of change in inventory or the rate of inflation in materials prices.
Units - Units of measure can help distinguish stocks from flows. Stocks are usually a quantity such as widgets of inventory, people employed, or Yen in an account. - The associated flows must be measured in the same units per time period e.g., the rate at which widgets are added per week to inventory, the hiring rate in people per month, or the rate of expenditure from an account in $/hour. - You are free to select any measurement system you like as long as you remain consistent. You can measure the flow of production into inventory as widgets per week, widgets per day, or widgets per hour.
Stocks Change Only Through Their Rates - Stocks change only through their rates of flow, no causal link directly into a stock. - A model for customer service: Customers arrive at some rate and accumulate in a queue of Customers Awaiting Service (e.g., a restaurant) - When service is completed customers depart from the queue, decreasing the stock of customers waiting for service. - Rate at which customers can be processed depends on the number of service personnel, their productivity (in customers processed per hour per person), and the number of hours they work (the workweek). - If the number of people waiting for service increases, employees increase their workweek as they stay an extra shift, skip lunch, or cut down on breaks.
The only way a stock can change is via its inflows and outflows. In turn, the stocks determine the flows.
Stock change only through rates
Stock change only through rates
Auxiliary Variables - It is often helpful to define intermediate or auxiliary variables. - Auxiliaries consist of functions of stocks (and constants or exogenous inputs). - For example, a population model might represent the net birth rate as depending on population and the fractional birth rate; fractional birth rate in turn can be modelled as a function of food per capita. - Ideally, each equation in your models should represent one main idea. Don t try to economise on the number of equations by writing long ones that embed multiple concepts, they will be hard to understand. - Equations with multiple components and ideas are hard to change if your client disagrees with one of the ideas.
System Dynamics (Vensim): vensim.com/download
System Dynamics (Vensim): vensim.com/download
Break?
Vensim first steps - Vensim PLE Quick Reference and Tutorial http://ocw.mit.edu/courses/sloan-school-of- management/15-988-system-dynamics-self-study- fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
Developing Stock, Flow and Feedback Structure
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
Questions?
Equations
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
Using model analysis tools
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
Simulating the model
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
http://ocw.mit.edu/courses/sloan-school-of-management/15-988-system-dynamics-self-study-fall-1998-spring-1999/readings/formulating.pdf
Break?
Predator prey model http://mathnathan.com/2010/12/predator-prey-model/
Predator prey model http://complexnt.blogspot.com.au/2012/03/study-of-two-species-interactions-using.html
Predator prey model http://www.mathscareers.org.uk/article/hunter-hunted/
Predator prey model rabbit births = Rabbits * birth rate c
Predator prey model rabbit birth rate c? rabbit births = Rabbits * birth rate c
Predator prey model rabbit birth rate c d Foxes rabbit births = Rabbits * birth rate c rabbit deaths = Rabbits * Foxes * catching rate d
Predator prey model rabbit birth rate c d Foxes rabbit births = Rabbits * birth rate c rabbit deaths = Rabbits * Foxes * catching rate d change in Rabbits = rabbit births - rabbit deaths R = c R d R F
Predator prey model fox birth rate fox death rate fox births Fox population fox deaths
Predator prey model fox birth? rate fox death rate b fox growth Fox population fox deaths
Predator prey model a Rabbits fox birth rate fox death rate b fox growth Fox population fox deaths fox growth = Foxes * Rabbits * growth rate a
Predator prey model a Rabbits fox fox birth birth rate rate fox death rate b fox growth Fox population fox deaths fox growth = Foxes * Rabbits * growth rate a fox deaths = Foxes * death rate b
Predator prey model a Rabbits fox fox birth birth rate rate fox death rate b fox growth Fox population fox deaths fox growth = Foxes * Rabbits * growth rate a fox deaths = Foxes * death rate b change in Foxes = fox growth fox deaths F = a F R b F
Predator prey model c d a b
Predator prey model R = c R d R F c d F = a F R b F a b
Predator prey model: Lotka-Volterra model R = c R d R F F = a F R b F the simplest model of predator-prey interactions one of the earliest models in mathematical ecology
Predator prey model: Equilibrium R = c R d R F F = a F R b F
Predator prey model: Equilibrium 0 = R = c R d R F 0 = F = a F R b F
Predator prey model: Equilibrium 0 = R = c R d R F 0 = F = a F R b F c R = d R F a F R = b F
Predator prey model: Equilibrium c R = d R F a F R = b F F = c / d R = b / a
Predator prey model R = b / a c d F = c / d a b
Model parameters
Questions?
Equilibrium population sizes
Building the model c d a b
Equilibrium population 300 Population 225 150 75 0 0 100 200 300 400 500 600 700 800 900 1000 Time (seasons) Foxes : Current "eq-foxes" : Current
Equilibrium population 1500 Population 1125 750 375 0 0 100 200 300 400 500 600 700 800 900 1000 Time (seasons) Rabbits : Current "eq-rabbits" : Current
Equilibrium population 300 2000 Selected Variables 150 1000 0 0 0 100 200 300 400 500 600 700 800 900 1000 Time (seasons) Foxes : Current Rabbits : Current
Equilibrium population 1500 Population 1125 750 375 0 0 100 200 300 400 500 600 700 800 900 1000 Time (seasons) Rabbits : Current Foxes : Current "eq-rabbits" : Current "eq-foxes" : Current
Equilibrium population Oscillations are observed in both population sizes Oscillations occur around the equilibrium population values Dynamic equilibrium (not static) Oscillatory behaviour is similar to many natural, sociotechnological, and socio-economic systems (Pure) competition between the species, when one species (predator) grows at the expense of the other (prey) Dynamics and equilibria of each population are affected by dynamics of the others
Equilibrium population: phase diagrams 300 Phases 225 150 75 0 250 360 470 580 690 800 910 1020 1130 1240 1350 Rabbits Foxes : Current
Equilibrium population: phase diagrams
Equilibrium population: phase diagrams 300 Phases 225 150 75 0 250 360 470 580 690 800 910 1020 1130 1240 1350 Rabbits Foxes : Current
Equilibrium population: phase diagrams 300 Phases 225 150 75 0 250 360 470 580 690 800 910 1020 1130 1240 1350 Rabbits Foxes : Current
The End?
Thank you! Prof. Mikhail Prokopenko Faculty of Engineering and IT: Complex Systems Research Cluster Starting in 2017: Master of Complex Systems (MCXS) University of Sydney 117
Two PhD Scholarships One Post-doc ARC Discovery Project: Large-scale computational modelling of epidemics in Australia University of Sydney & Monash University 118