Chapter 2. Introduction to Stock and Flow Models A new type of thinking is essential if mankind is to survive and move toward higher levels.1 - Albert Einstein This chapter introduces systems thinking and an important systems tool, the stock and flow model, a graphical modeling technique that will serve as the underlying structure for all of the models we will present throughout this book. Stock and flow structures describe the movement of “stuff” through a system. This chapter will introduce three elements of stock and flow diagrams: stocks, flows, and system boundaries. It will also introduce Vensim®, a free software package that can be used to construct these models. Using Systems Thinking The basic formulation of systems thinking was founded in 1958 at MIT by Professor Jay Forrester2. Systems thinking allows people to make their understanding of systems explicit and improve them in the same way that people use engineering principles to improve their understanding of mechanical system. We use systems thinking for a number of different purpose, such as: • Examine how we create our own problems • See the big picture of an issue • Understand how the structure (interaction of elements) influences performance of the system Traditionally, when we try to solve a problem, we look at each individual element or component of the system and try to figure out how that is behaving. We dig smaller and smaller to find the root of the problem. In fact, the root of the word “analysis” means “to break into constituent parts”. Systems thinking is a method of looking at the bigger picture. Instead of breaking the problem into the elements and studying each one individually, the goal is to look at the interactions of the elements and see how they affect each other. We look at a bigger scope than the problem suggests. Systems thinking has been applied many times and has been demonstrated to be an effective tool. The types of problems that systems thinking are particularly good at addressing include: • Complex situations that involve many people with different goals and motives. Using systems thinking we can see the “big picture,” not just an individual’s role. 1 “The Real Problem is in the Hearts of Man”, M Amrine, New York Times Magazine, 23 June, 1946 2 "Industrial Dynamics--A Major Breakthrough for Decision Makers.", J. Forrester, Harvard Business Review, Vol. 36, No. 4, pp. 37–66. 1 • Problems that seem to get worse every time someone tries to fix them. • Situations where decisions and actions made have an effect on the environment (natural or business), and the environment has an effect on the actions. • And, in particular, problems where the solution is not obvious So what is a system? According to Donella Meadows, “a system is an interconnected set of elements that is coherently organized in a way that achieves something”3. We need to have all three elements of this in order to have a system. So we can identify three corresponding questions to ask - if the answer is “yes” to all three, then it is a system. When we are describing systems, there is a certain language we use for consistency. There are 3 critical elements of every system that describes how things move through our system: Stocks, Flows and System Boundaries. Stocks are the elements of the system you can feel, count, or measure at any given time. This could be the number of apples, the temperature of the water, the amount of money in your bank account. Stocks are generally described by nouns or noun phrases. Flows are the actions that cause a change in stocks. This might be eating apples, heating the water, earning money. Flows are generally described by verbs or verb phrases. System Boundaries are the limits of the system that will we consider (and also indicates what will we ignore). When we establish the system boundaries we are deciding the limits of what we Is it a system? (Meadows, 2008) • Can you identify parts? • Do the parts affect each other? • Do the parts together produce an effect that is different than the effect of each part on its own? • (perhaps) Does the effect persist over time in a variety of circumstances? will consider. Perhaps we will consider money starting with our paycheck, but not actually considering how the company got the money that they gave to us. We put a system boundary at the paycheck, so we are ignoring anything before that. We usually put system boundaries on our system analysis just to keep the problem tractable. << VIDEO MODULE 2.1.1 What is a System? >> 3 Meadows, D. H. (2008). Thinking in systems: A primer. Chelsea Green Publishing. 2 Systems Diagrams It is often useful to make diagrams that describe our systems - these are called, naturally enough, “systems diagrams.” There are many different ways to communicate systems diagrams - some are quite flowery and decorative, some are rather stark and purely informational. In this book, we will generally be taking a very traditional approach to creating systems diagrams to ensure that we are using a standard graphical language. Once you have mastered this language, feel free to embellish or illuminate your drawings. We will show some non-standard systems diagrams in this text to make this point. In this section we introduce the basic, standard graphic language of systems diagrams. As discussed above, there are three key elements to every system: Stocks, Flows and System boundaries. Stocks are represented as blocks/rectangles with the name of the stock in the rectangle. Flows are represented as arrows or pipes with valves to indicate this is a flow. The name of the flow is attached to the valve. Some people just put a large X on the pipe to indicate the valve. System boundaries are represented by clouds at the ends of (start or finish) the flow. Here is a very simple representation of a system. It has a single stock (called “stock”) and has one flow that increases the level of the stock, called “in-flow”, and one flow that decreases the level of the stock, called “out-flow”. How do I know “in-flow” increases the level of the stock? That is because the arrow points towards the stock - that means it increases the level. The “out-flow” flow points away from the stock, so it must decrease the level of the stock. Note the clouds on the left and right - these are the system boundaries. I don’t care about where the resource comes from the increases my stock, and I don’t care where it goes after it decreases the stock - all I care about in this drawing is how much the stock is changing. in- Stock out-flow There are many different kinds of systems diagrams. Consider something like a platinum mine. For all practical purposes, the amount of platinum in my mine is fixed. Nothing is going to increase that amount, so I would never have any flows coming into the stock of platinum in the mine. However, I can decrease the amount of platinum in my mine - that’s through the process of mining. If I don’t care what happens to the platinum after I dig it up for the purposes of my analysis, I get a drawing that looks like the following: The only thing that happens in this system is that when I dig up ore through mining, I reduce the amount of coal I have left. Note that in this particular system I don’t care what happens to the coal after I mine it, so I have a system boundary (represented by the cloud) at the end of my mining flow arrow. 3 Systems can have many more things changing than this. Let’s consider a somewhat more complicated system - the water in a reservoir. For this system, the amount of water in the reservoir can increase when it rains, and when we let the river fill up the reservoir. These would bother be flows that increase the amount of water. We lose water through evaporation, and through discharge. So our systems diagram would have 1 stock (water in reservoir) and four flows - two of them increasing the water level, two of them decreasing the water level, as shown below. Note that we indicate the systems boundary by the clouds, meaning I don’t care how the water got into the clouds prior to raining, nor where the water in the river came from, etc. rai n evaporation Water in Reservoir river inflow discharge Of course systems can have more that one stock. This happens when we make the system boundaries a bit farther apart. Let’s consider a system associated with a lumber yard, but in this case our lumber yard is associated with a local forest. The stock we care about will be wood, and this wood shows up in two distinct places - wood in the forest as living trees, and wood in the lumber yard, cut processed, and ready to use for building. So we have two stocks as shown below. Tree growth is how we get more wood in the forest. Then the amount of wood in the forest is decreased by either logging or by death of trees. The trees that are logged turn into lumber in the yard, so the flow of “logging” is both a way to reduce the wood in the living and trees and a way to increase the wood in the lumber yard. The amount of wood in the lumber yard is reduced by selling the lumber. Note the system boundaries (clouds) that show us the limits of the system we are considering. 4 loggin g tree growth wood in lumber wood in living trees tree deaths lumber sales <<VIDEO MODULE 2.2.1 Stock and Flow Diagrams >> 2.4 Tracking changes in systems Now that we know something about describing and drawing a system, the next step is to make use of the drawing. Let’s consider a simple model where we are tracking the stock of water in a bathtub. This is the classic model introduced by Donella Meadows in her excellent textbook Thinking in Systems: A Primer.4 In our bathtub, the water increases when we turn on the faucet, and the water decreases when we open the drain. We don’t care where the water came from or where it went, so we get the following system diagram (below). Water in tub flow from faucet flow to drain 4 Donella H. Meadows, Thinking in Systems: A Primer, Chelsea Green Publishing, White River Junction, Vermont, 2008. 5 One of the things we might want to know about our system is what happens to the water level over time. Let’s consider a basic example. Our tub starts out with 50 gallons of water in it. Then we open the drain while keeping the faucet turned off. Clearly the water level will decrease. Let’s be specific, and say that the drain is removing 5 gallons of water per minute. Then we can calculate how much water is in the tub as a function of time. We would expect the water level to be as described in the following graph - it will start at 50 gallons and after 10 minutes it will be empty because we are losing 5 gallons per minute. The water level in the tub as a function of time can be drawn in a chart. The water level in such a graph will follow a straight line, as shown in Figure 1. Amount of Water in the Tub (gallons) 60 50 40 30 20 10 0 0 2 4 6 Time (minutes) 8 10 12 Figure 1. Simulation of Water Draining from Tub Based on System Diagram. In class, you will be using a piece of software called Vensim (vensim.com). Sometimes in this book we will show you some details on using Vensim to help you out. Most of the systems diagrams we will see in the subsequent chapters are drawn by the authors using Vensim. This section shows some details on working with Vensim. If you are not using Vensim, you can ignore the equations and pictures of the software interface. We will simulate this in a systems dynamic modeling package such as Vensim5 by making the same drawing as before, setting the flow from faucet to zero gallons per minute and the flow to drain to be 5 gallons per minute, then Simulate. When you do this in Vensim, you have to make sure about some settings. 5 http://www.vensim.com 6 Under model settings, let’s make sure we have “minutes” as our Units for Time, and let’s put 0 for initial time and 10 for final time. Our drawing should look just like the previous illustration - but in Vensim it will look like this: We need to set our equations. Nothing fancy here - we want the water in tub to start at 50 gallons, the flow from faucet to be 0 and the flow to drain to be 10. Also make sure you have the correct units on everything! 7 8 When we simulate this, we will get our expected graph if we chart the “Water in tub” stock, as shown in Figure 2. Figure 2. Vensim Simulation of Water Draining from Tub Based on System Diagram. That might seem like a great deal of work to get an answer that we already know, but it is just to demonstrate that we can perform calculations with our system diagrams. We can make the calculations more complicated and our model is happy to respond. Suppose we start again with 50 gallons of water in the tub, and we pull the drain. But, this time, we turn on the faucet after 4 minutes. The faucet will flow at 5 gallons per minute. To do this in Vensim, we are going to need to make the Flow from Faucet equation a bit more complicated. We want it to be zero if the time is less than 4 minutes, but 5 gallons/minute when the time is greater than 4 minutes. This requires two things from us - first we have to make sure that the flow knows about the current time, and second we need to make the equation have a decision with respect to that time. So first let’s include the current time in the model. Vensim keeps track of time, in a variable called “Time” (note the capitalization). Vensim already has time in the system, so we don’t want to create a new variable called “Time” - instead we want to add a “Shadow Variable” to the drawing. Just click on the shadow variable button and then click near your Flow from Faucet flow. You will see a list of variables that you can use here - they are all variables that already exist in your model. 9 We are going to add “Time” to the drawing. When we click OK, it will add “Time” in a grey font (to indicate it already exists). Then we just need to make an arrow that connects Time to the Flow from Faucet. This allows us to use Time in our equations. Once we’ve done this, we can go back and edit the equation for Flow from Faucet. We want to tell the faucet to do nothing for the first 4 minutes, and then turn on after that. This is easily done with an “IF THEN ELSE” statement. The statement checks some condition. If it is true, then we do one thing, else, if it is false we do the other thing. What we are going to model is a situation where we open the drain right away (time = 0), but after 5 minutes have gone by, we turn on the faucet, running at 5 gallons per minute. So we can make our condition be “IF less than 5 minutes have gone by,” then we don’t do anything. In other words, the flow should be 0 gallons per minute (off) if the time elapsed is less than 5. Then, after 5 or more minutes have gone by we want to turn the faucet on and dump 5 gallons per minute of water into the tub. Our equation is going to look like: IF THEN ELSE(Time < 5, 0 , 5 ). The first part of this (Time < 5) is our condition. If the time is less than 5 minutes, do the first thing, otherwise do the second thing. The first thing is 0. That means keep the flow at 0 gallons/minute. If the time is not less than 5 minutes, do the second thing - that would be turn the flow up to 5 gallons per minute. Now we can simulate. The resulting graph shows us what we’d expect - the water drops for the first 5 minutes, but then stabilizes at 25 gallons. This is shown in Figure 3. 10 Figure 3. Vensim Simulation of Water Draining from Tub Based with a Variable Faucet Setting. Still, this is not too complicated to figure out in our heads. We had 5 minutes of draining, so 5x5 = 25 gallons of water left. Then we turned on the faucet so that the drain was as fast as the input. So the water level stabilizes. Seems like we are using a complicated piece of software to solve an easy problem! Well, with our relatively simple model we can answer more complicated, and more realistic situations. For example, the amount of water going down the drain will depend on how much water is in the tub - the fuller the tub, the more pressure is pushing the water down the drain. So we could add something on the flow to the drain to account for the water level. If we do this, then we start to see some complicated behavior. In this model, the flow to the drain depends on the water level. We pull the plug and then turn on the faucet 5 minutes later. Figure 4 shows the result of this slightly more realistic situation. We can see a couple of distinctive features in the graph of Figure 4. First, the initial drop in water level doesn’t follow a straight line - it starts dropping quickly, and then reduces the slope a bit. 11 Figure 4. Vensim Simulation of Water Draining from Tub with a Variable Drainage and Faucet. Second, we notice that at 5 minutes the water level starts to rise - this must be because the drainage rate was less than 5 gallons per minute at this point. Then we see the most interesting part - after about 15 minutes, the water level is moving up and down when the water level gets high enough, the drainage rate is greater than the input because the water level is high. Then when it loses some water to the drain, the drain is slower than the faucet so the water level goes back up again. We are seeing an oscillation of water level, not just a constant value. This kind of fluctuation is the type of behavior that real systems experience, but are hard to quantify. But a simple systems model lets us see the behavior easily. 12
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )