262. Stocks Flows
The foundation of system dynamics modeling. Two element types:
- Stocks (or levels) — accumulations: inventory, population, money
- Flows (or rates) — rates of change: orders, births, spending
Stocks change only through flows. Flows change instantaneously based on system state.
262.1. Mathematical foundation
For a stock with inflow rate and outflow rate :
In integral form:
Each stock obeys this conservation law: change in stock = net flow.
262.2. Units
Dimensional consistency is mandatory:
- Inventory in units; production rate in units / day; integration over time recovers units.
- Money in dollars; spending in dollars / month.
- Population in people; birth rate in people / year.
A model with mismatched units is wrong; checking units catches half of all SD modeling errors.
262.3. Three classes of stock-flow systems
First-order linear:
Equivalently: stock decays toward with time constant . Examples: exponential decay (radioactive substance), goal-seeking (workforce hiring toward target).
Second-order linear: two stocks, coupled
Eigenvalues determine behavior: stable / unstable spirals, exponential growth/decay, oscillation. Predator-prey, mass-spring, etc.
Nonlinear: with nonlinear — limit cycles, chaos, bifurcations. Most real-world systems.
262.4. Bathtub metaphor
A common teaching tool: a bathtub with a tap (inflow) and drain (outflow). Water level = stock. Tap and drain rates = flows.
Even simple bathtubs are non-intuitive: most people overestimate how fast filling a bathtub increases water level, because they fail to integrate the flow over time.
262.5. Stocks have memory; flows don’t
If you turn off the tap (set inflow to zero), the bathtub doesn’t suddenly empty — water remains. Same with inventory after halting production, or accumulated CO2 after stopping emissions. Stocks persist.
Conversely, a flow can change instantaneously: stop the inflow → inflow rate is zero immediately.
This distinction is fundamental: policy interventions on flows have delayed effects on stocks.
262.6. Connection to differential equations
Stocks and flows = the language of ordinary differential equations (ODEs). SD diagrams are just an alternative notation for systems of ODEs. The visual language helps:
- Identify state variables (= stocks)
- Track causal pathways (= flow equations)
- Communicate model structure to non-modelers
262.7. See also
- Causal Loop Diagrams — qualitative version
- Feedback Loops
- Numerical Integration — for simulation
- Differential Equations