Stocks and Flows
In system dynamics modeling, dynamic behavior is thought to arise due to the Principle of Accumulation. More precisely, this principle states that all dynamic behavior in the world occurs when flows accumulate in stocks.
Figure 1: Example of a simple stock and flow structure
In terms of a metaphor, a stock can be thought of as a bathtub and a flow can be thought of as a faucet and pipe assembly that fills or drains the stock as shown in Figure 1. The stock-flow structure is the simplest dynamical system in the world. According to the principle of accumulation, dynamic behavior arises when something flows through the pipe and faucet assembly and collects or accumulates in the stock. In system dynamics modeling,both informational and noninformational entities can move through flows and accumulate in stocks.
Figure 2 is an example of a system dynamics stock and flow structure that has two flows -- an inflow and an outflow. In this case, the dynamic behavior of the system arises due to the flows into, and out of, the stock (the inflow minus the outflow). Clearly, if the inflow exceeds the outflow the number of entities in the stock will increase. If the outflow exceeds the inflow, on the other hand, the number of entities in the stock will decrease. Finally, if the outflow equals the inflow, the number of entities in the stock will remain the same. This last possibility describes a state of dynamic equilibrium in a system dynamics model.
Figure 2: Example stock and flow structure with an inflow and outflow
In principle, a stock can have any number of inflows and outflows. In practice, however, a system dynamics model usually contains stocks with no more than four-to-six inflows and/or outflows. The principle of accumulation holds regardless of the number of inflows and outflows that work to change the number of entities accumulating in a stock.
Identifying Stocks and Flows
One of the fundamental skills a system dynamics modeler must learn is how to identify the stocks and flows in the system experiencing the problem that he or she is trying to model. This is a nontrivial task and one that people often find difficult. For example, it is not at all unusual for people, not trained in system dynamics modeling, to confuse stocks and flows. They'll say "deficit" (a flow) when they mean "debt" (a stock), or they'll say that "inflation (a flow into a stock) is lower so therefore the general level of prices (a stock) is falling" In fact, decreasing inflation to a lower value means that prices are rising but at a slower rate.
In order to identify stocks and flows, a system dynamics modeler must determine which variables in the system experiencing the problem define its state (its stocks), and which variables define the changes in its state (its flows). That said, the following guidelines can be used to help identify stocks and flows:
Four Characteristics of Stocks
Stocks possess four characteristics that are crucial in determining the dynamic behavior of systems. More specifically, stocks:
Each of these characteristics will be discussed in turn.
Stocks have memory
The first key characteristic of stocks is that they have memory (i.e., persistence or inertia). An easy way to see this is to recall the simple stock-flow structure presented in Figure 1. If the inflow to the stock is shut-off, the number of entities in the stock will not decrease, but rather stay at the level it is at when the inflow stops. An outflow in excess of the inflow is required to decrease the number of entities in the stock. The importance of this characteristic should not be underestimated. This is because people often believe that shutting-off an inflow to a stock will cure a problem being created by the number of entities in the stock. Regrettably, nothing could be further from the truth.
Figure 3: US federal budget deficit, 1930 - 1993.
Consider the problem that the United States is currently having with its federal deficit and debt. Figure 3 presents a time series graph of the U.S. federal deficit and Figure 4 presents a time series graph of the U.S. federal debt. The deficit is the yearly amount that the U.S. federal government spends in excess of its revenues, while the debt is the accumulation of all the previous deficits (less the debt that has been retired). From an inspection of these figures, it is clear that both the U.S. federal deficit and the U.S. federal debt are growing exponentially.
Figure 4: US Federal Debt from 1930 - 1993.
In terms of a simple system dynamics model, the deficit is a flow and the debt is a stock, as shown in Figure 5. Therefore, if the U.S. federal government were to balance its budget (i.e., make the deficit inflow zero), the debt would not decrease at all. This fact is surprising to many people!
Figure 5: Structure of US Debt/Deficit problem.
A similar case involves the depletion of the earth's ozone layer. In 1990 the nations of the world agreed to a ban on the production (and hence on the eventual release into the atmosphere) of ozone-killing chlorofluorocarbons (CFC's).
Figure 6: System dynamics structure of CFC accumulation in atmosphere.
From a system dynamics point of view, this agreement caused the flow of chlorofluorocarbons into the atmosphere to stop, but did nothing to remove any of the chlorofluorocarbons already in the atmosphere and destroying ozone (a stock -- see Figure 6). The removal of these pollutants can only be accomplished via the earth's natural cleansing processes.
Stocks Change the Time Shape of Flows
A second important characteristic of stocks is that they (i.e., the accumulation process) usually change the time shape of flows. This can be seen by simulating the simple stock-flow structure shown in Figure 1, with different time shapes for the flow. Figure 7 for example, presents the time shape of the stock when the flow is at a constant level of 5 units/time. An examination of the figure reveals that the accumulation process changes the horizontal time shape of the flow into a linear growth shape for the stock.
In a similar way, Figure 8 through Figure 13 show the time shape of the stock for different time shapes exhibited by the flow.
In Figure 8, we see that if the inflow valve is "opened" or increases in a linear fashion, (i.e., a linear growth shape that is at all times positive), the "level" of the stock variable will grow at an increasing rate.
Figure 9 shows that a linear decline shape for the inflow, which is at all times positive, causes the stock to grow at a decreasing rate. Recall the example above in which a decrease in inflation reduced the rate of increase in price. In this case, price would be analogous to the stock variable and rate of inflation would be the analogous to the inflow variable.
In figure 10, we see a case in which the inflow (valve) is at all time negative. This is equivalent to saying that the inflow valve is "drawing down the level" (i.e., it's a drain). In this case, the time path for the inflow valve is at all times negative and is declining linearly. This causes the stock to decline at an increasing rate..
The case shown in Figure 11 is similar to that of Figure 10 in that the inflow valve is always negative, indicating that the stock is being drawn down. However, in this case the flow valve is closing, i.e., becoming less negative. As show in the figure, a linear growth shape for the flow, which is at all times negative, causes the stock to decrease at a decreasing rate.
Figure 12 illustrates case in which "shape" of the inflow time path is not changed by the accumulation process. In this case, an inflow that increases exponentially causes the stock (the accumulation ) to increase in a similar fashion. In terms of real-world stock and flow data, the National deficit and debt data shown in Figure 3 and Figure 4 illustrate this case.
In Figure 13, we see the result of having the inflow oscillating in a sinusoidal manner between a value of 1 and -1, i.e., the stock is being filled and drained repeatedly. As one would expect, the stock mimics the inflow's time path character (as in Figure 12). It is important to note, however, that maximum value of the stock is reached after the inflow's maximum.
Stocks decouple flows
A third important characteristic of stocks is that they "decouple" or interrupt flows. A stock thus makes it possible for an inflow to be different from an outflow and hence for disequilibrium behavior to occur. In addition, the decoupling of flows by stocks makes it possible for inflows to be controlled by sources of information that differ from those controlling outflows. Figure 14 shows a number of examples in which flows are decoupled by stocks.
Figure 14: Examples where flows are decoupled by stocks
Stocks create delays
A fourth important characteristic of stocks is that they create delays. This can be seen by re-examining Figure 13 -- the response of a stock to a sinusoidal inflow. In this example, it is clear that the stock reaches each of its peaks and troughs after the flow reaches each of its corresponding peaks and troughs, during each repetition of the cycle. Henri Bergson once remarked that "time is a device that prevents everything from happening at once". Bergson's point of course is that, despite human impatience, events in the world do not occur instantaneously. Instead, there is often a significant lag between cause and effect. In system dynamics modeling, identifying delays is an important step in the modeling process because they often alter a system's behavior in significant ways. The longer the delay between cause and effect, the more likely it is that a decision maker will not perceive a connection between the two. Figure 15 presents some examples of stock-flow structures specifying significant system delays.
Figure 15: Examples of Stock-Flow Structures Specifying Significant System Delays