1.04k likes | 2.3k Views
Stock & Flow Diagrams. James R. Burns Fall 2010. What are stocks and flows??. A way to characterize systems as stocks and flows between stocks Stocks are variables that accumulate the affects of other variables Rates are variables the control the flows of material into and out of stocks
E N D
Stock & Flow Diagrams James R. Burns Fall 2010
What are stocks and flows?? • A way to characterize systems as stocks and flows between stocks • Stocks are variables that accumulate the affects of other variables • Rates are variables the control the flows of material into and out of stocks • Auxiliaries are variables that modify information as it is passed from stocks to rates
Stock and Flow Notation--Quantities • STOCK • RATE • Auxiliary
Stock and Flow Notation--Quantities • Input/Parameter/Lookup • Have no edges directed toward them • Output • Have no edges directed away from them
Inputs and Outputs • Inputs • Parameters • Lookups • Inputs are controllable quantities • Parameters are environmentally defined quantities over which the identified manager cannot exercise any control • Lookups are TABLES used to modify information as it is passed along • Outputs • Have no edges directed away from them
Stock and Flow Notation--edges • Information • Flow
Some rules • There are two types of causal links in causal models • Information • Flow • Information proceeds from stocks and parameters/inputs toward rates where it is used to control flows • Flow edges proceed from rates to states (stocks) in the causal diagram always
Robust Loops • In any loop involving a pair of quantities/edges, • one quantity must be a rate • the other a state or stock, • one edge must be a flow edge • the other an information edge
CONSISTENCY • All of the edges directed toward a quantity are of the same type • All of the edges directed away from a quantity are of the same type
STEP 1: Identify parameters • Parameters have no edges directed toward them
STEP 2: Identify the edges directed from parameters • These are information edges always
STEP 3: By consistency identify as many other edge types as you can
STEP 4: Look for loops involving a pair of quantities only • Use the rules for robust loops identified above
Distinguishing Stocks & Flows by Name NAME UNITS Stock or flow Revenue Liabilities Employees Depreciation Construction starts Hiring material standard of living
System Dynamics Software • STELLA and I think • High Performance Systems, Inc. • best fit for K-12 education • Vensim • Ventana systems, Inc. • Free from downloading off their web site: www.vensim.com • Robust--including parametric data fitting and optimization • best fit for higher education • Powersim • What Arthur Andersen is using
The VENSIM User Interface • The Time bounds Dialog box
A single-sector Exponential growth Model • Consider a simple population with infinite resources--food, water, air, etc. Given, mortality information in terms of birth and death rates, what is this population likely to grow to by a certain time? • Over a period of 200 years, the population is impacted by both births and deaths. These are, in turn functions of birth rate norm and death rate norm as well as population. • A population of 1.6 billion with a birth rate norm of .04 and a death rate norm of .028
Let’s Begin by Listing Quantities • Population • Births • Deaths • Birth rate norm • Death rate norm
Equations • Birth rate = Birth rate norm * Population • Death rate = Death rate norm * Population • Population(t + dt) = Population(t) + dt*(Birth rate – Death rate) • t = t + dt • Population must have an initial defining value, like 1.6E9
Units Dissection • Birth rate = Birth rate Norm * Population [capita/yr] = [capita/capita*yr] * [capita]
A single-sector Exponential goal-seeking Model • Sonya Magnova is a resources planner for a school district. Sonya wishes to a maintain a desired level of resources for the district. Sonya’s new resource provision policy is quite simple--adjust actual resources AR toward desired resources DR so as to force these to conform as closely as possible. The time required to add additional resources is AT. Actual resources are adjusted with a resource adjustment rate
What are the quantities?? • Actual resources • Desired resources • Resource adjustment rate • Adjustment time
Equations • Adjustment time = constant • Desired resources = variable or constant • Resource adjustment rate = (Desired resources – Actual resources)/Adjustment time • Actual resources(t + dt) = Actual resources(t) + dt*Resource adjustment rate • Initial defining value for Actual resources
Equation dissection • Resource adjustment rate = (Desired resources – Actual resources)/Adjustment time • An actual condition—Actual resources • A desired condition—Desired resources • A GAP—(Desired resources – Actual resources) • A way to express action based on the GAP: (Desired resources – Actual resources)/Adjustment time
Units check Resource adjustment rate = (Desired resources – Actual resources)/Adjustment time [widgets/yr] = ([widgets] – [widgets])/[yr] CHECKS Notice that rates ALWAYS HAVE THE UNITS OF THE ASSOCIATED STOCK DIVIDED BY THE UNITS OF TIME, ALWAYS
(1) Actual Resources= INTEG (Resource adjustment rate, 10) Units: **undefined** (2) Adjustment time= 10 Units: **undefined** (3) Desired Resources= 1000 Units: **undefined** (4) FINAL TIME = 100 Units: Month The final time for the simulation.
(5) INITIAL TIME = 0 Units: Month The initial time for the simulation. (6) Resource adjustment rate= (Desired Resources - Actual Resources)/Adjustment time Units: **undefined** (7) SAVEPER = TIME STEP Units: Month [0,?] The frequency with which output is stored. (8) TIME STEP = 1 Units: Month [0,?] The time step for the simulation.
Shifting loop Dominance • Rabbit populations grow rapidly with a reproduction fraction of .125 per month • When the population reaches the carrying capacity of 1000, the net growth rate falls back to zero, and the population stabilizes • Starting with two rabbits, run for 100 months with a time step of 1 month • (This model has two loops, an exponential growth loop (also called a reinforcing loop) and a balancing loop)
Shifting loop Dominance • Assumes the following relation for Effect of Resources • Effect of Resources = (carrying capacity - Rabbits)/carrying capacity • This is a multiplier • Multipliers are always dimless (dimensionless) • When rabbits are near zero, this is near 1 • When rabbits are near carrying capacity, this is near zero • This will shut down the net rabbit birth rate
Dimensionality Considerations • VENSIM will check for dimensional consistency if you enter dimensions • Rigorously, all models must be dimensionally consistent • What ever units you use for stocks, the associated rates must have those units divided by TIME • An example follows
Cascaded rate-state (stock) combinations • In the oil exploration industry, unproven reserves (measured in barrels) become proven reserves when they are discovered. The extraction rate transforms proven reserves into inventories of crude. The refining rate transforms inventories of crude into refined petroleum products. The consumption rate transforms refined products into pollution (air, heat, etc.)
Another cascaded rate-stock combination • Population cohorts. Suppose population is broken down into age cohorts of 0-15, 16-30, 31-45, 46-60, 61-75, 76-90 • Here each cohort has a “lifetime” of 15 years • Again, each rate has the units of the associated stocks divided by time
The Sector Approach to the Determination of Structure • What is meant by “sector?” • What are the steps… • to determination of structure within sectors? • to determination of structure between sectors?
Definition of sector • All the structure associated with a single flow • Note that there could be several stocks associated with a single flow • The uranium sector in the energy model has eight stocks in it