Difference between revisions of "Stock and flow diagram"

From Simulace.info
Jump to: navigation, search
m
Line 1: Line 1:
 
***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)
 
***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)
 
=Definition=
 
=Definition=
A Stock & Flow Diagram (SFD) is similar to a [[Causal Loops Diagram]] (CLD) though provides a more rigourous representation. By explicitly identifying Stocks, reservoirs which change over time, and Flows, which are responsible for changes in Stocks, the resultant insight explicitly depicts the manner in which things change.
+
A '''Stock & Flow Diagram''' (SFD) is similar to a [[Causal Loops Diagram]] (CLD) though provides a more rigourous representation. Both diagrams belong to the chapter [[System Dynamics]]. System dynamics is 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 using system dynamics different from other approaches to studying complex systems is the use of feedback loops and '''stocks and flows'''. It depicts the structural understanding of a system - the causal structures that produces the observed behavior. It reveals information about the rates of change of system elements and the measures of the variables of the system.[z]
 +
 
 +
 
 +
By explicitly identifying Stocks - reservoirs which change over time, and Flows, which are responsible for changes in Stocks, the resultant insight explicitly depicts the manner in which things change.  
 +
 
  
 
'''Captures'''  
 
'''Captures'''  
Line 22: Line 26:
 
* In a stock & flow diagram are shown as rectangles  
 
* In a stock & flow diagram are shown as rectangles  
 
* Stocks (also known as Levels) represent '''accumulations'''  
 
* Stocks (also known as Levels) represent '''accumulations'''  
– These capture the “state of the system”  
+
-– These capture the “state of the system”  
– Mathematically it can be called as “state variables”
+
 
 +
-– Mathematically it can be called as “state variables”
 
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money)  
 
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money)  
 
* Stocks can be measured at one instant in time  
 
* Stocks can be measured at one instant in time  
 
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' & '''out of them'''  
 
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' & '''out of them'''  
– There are no inputs that immediately change stocks  
+
- There are no inputs that immediately change stocks  
 
* Stocks are the source of delay in a system  
 
* Stocks are the source of delay in a system  
  
Line 33: Line 38:
 
'''The Critical Role of Stocks in System Dynamics:'''  
 
'''The Critical Role of Stocks in System Dynamics:'''  
 
* Stocks determine current state of system  
 
* Stocks determine current state of system  
– Stocks often provide the basis for making choices  
+
- Stocks often provide the basis for making choices  
 
* Stocks central to most disequilibria phenomena (buildup, decay)  
 
* Stocks central to most disequilibria phenomena (buildup, decay)  
 
* Lead to inertia  
 
* Lead to inertia  
Line 73: Line 78:
 
* Always expressed per some unit time: If these flow into/out of a stock that keeps track of things of type X (e.g. persons), the rates are measured in X/(Time Unit) (e.g. persons/year, $/month, gallons/second)  
 
* Always expressed per some unit time: If these flow into/out of a stock that keeps track of things of type X (e.g. persons), the rates are measured in X/(Time Unit) (e.g. persons/year, $/month, gallons/second)  
 
* Typically measure over certain period of time (by considering accumulated quantity over a period of time)  
 
* Typically measure over certain period of time (by considering accumulated quantity over a period of time)  
– e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute  
+
- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute  
– Can be estimated for any point in time  
+
 
 +
- Can be estimated for any point in time  
  
  
Line 96: Line 102:
 
* Vaccine sales  
 
* Vaccine sales  
 
* Shipping rate of goods
 
* Shipping rate of goods
 
  
  
Line 102: Line 107:
 
[[File:Stock and flow.JPG]]
 
[[File:Stock and flow.JPG]]
  
<center>
+
 
 
{| border="1"
 
{| border="1"
 
|align="center"|'''Stock'''
 
|align="center"|'''Stock'''
Line 128: Line 133:
 
|align="center"|fuel consumption
 
|align="center"|fuel consumption
 
|}
 
|}
</center>
 
  
  
Line 160: Line 164:
  
 
=Software tools=
 
=Software tools=
 +
There are a lot of software designed for modeling System Dynamics. An extensive list of programs can be found to be on [http://en.wikipedia.org/wiki/List_of_system_dynamics_software this Wiki page]. But the most used software are these:
 
* [http://www.vensim.com Vensim]  
 
* [http://www.vensim.com Vensim]  
 
* [http://www.powersim.com Powersim]
 
* [http://www.powersim.com Powersim]
Line 179: Line 184:
  
 
References
 
References
 +
[z]
 
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf
 
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf
 
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html
 
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html

Revision as of 12:28, 25 January 2014

      • IN CONSTRUCTION --Tomyk007 21:12, 22 January 2014 (CET)

Definition

A Stock & Flow Diagram (SFD) is similar to a Causal Loops Diagram (CLD) though provides a more rigourous representation. Both diagrams belong to the chapter System Dynamics. System dynamics is 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 using system dynamics different from other approaches to studying complex systems is the use of feedback loops and stocks and flows. It depicts the structural understanding of a system - the causal structures that produces the observed behavior. It reveals information about the rates of change of system elements and the measures of the variables of the system.[z]


By explicitly identifying Stocks - reservoirs which change over time, and Flows, which are responsible for changes in Stocks, the resultant insight explicitly depicts the manner in which things change.


Captures

  • Stock
  • Flows
  • Quatified feedback loops

Rules

  • Stocks are always changed by flows
  • In general, the formulas for the flows will depend on things that are changing (state)

Symbols

Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:

Stocks

Stock.JPG

  • In a stock & flow diagram are shown as rectangles
  • Stocks (also known as Levels) represent accumulations

-– These capture the “state of the system”

-– Mathematically it can be called as “state variables”

  • Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money)
  • Stocks can be measured at one instant in time
  • Stocks start with some initial value and are thereafter changed only by flows into & out of them

–- There are no inputs that immediately change stocks

  • Stocks are the source of delay in a system


The Critical Role of Stocks in System Dynamics:

  • Stocks determine current state of system

–- Stocks often provide the basis for making choices

  • Stocks central to most disequilibria phenomena (buildup, decay)
  • Lead to inertia
  • Give rise to delays


Examples of Stocks

There is a list of common examples of Stocks [x]:

  • Water in a tub or reservoir
  • People of different types
    • {Susceptible, infective,immune} people
    • Pregnant women
    • Women between the age of x and y
    • High-risk individuals
  • Healthcare workers
  • Medicine in stocks
  • Money in bank account
  • CO2 in atmosphere
  • Blood sugar
  • Stored Energy
  • Degree of belief in X
  • Stockpiled vaccines
  • Goods in a warehouse
  • Beds in an emergency room
  • Owned vehicles


Flows

Flow Material flow2.JPG

Flow rate Material flow.JPG

All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.

  • Drawn with an arrow with a valve (denoting the flow rate) in the middle of it
  • Always expressed per some unit time: If these flow into/out of a stock that keeps track of things of type X (e.g. persons), the rates are measured in X/(Time Unit) (e.g. persons/year, $/month, gallons/second)
  • Typically measure over certain period of time (by considering accumulated quantity over a period of time)

–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute

–- Can be estimated for any point in time


Examples of Flows

There is a list of common examples of Flows [x]:

  • Inflow or outflow of a bathtub (litres/minute)
  • Rate of incident cases (e.g. people/month)
  • Rate of recovery
  • Rate of mortality (e.g. people/year)
  • Rate of births (e.g. babies/year)
  • Rate of treatment (people/day)
  • Rate of caloric consumption (kcal/day)
  • Rate of pregnancies (pregnancies/month)
  • Reactivation Rate (# of TB cases reactivating per unit time)
  • Revenue ($/month)
  • Spending rate ($/month)
  • Power (Watts)
  • Rate of energy expenditure
  • Vehicle sales
  • Vaccine sales
  • Shipping rate of goods


Examples of Stock and flows

Stock and flow.JPG


Stock Inflows Outflows
bank balance deposits interest withdrawals
housing stock housing investment housing depreciation
CO2 in atmosphere tons emitted tons sequestered
population births, immigration deaths, emigration
fuel tank refueling fuel consumption


Cloud

Source.JPG

Cloud represents either:

  • Source of the flow - when the flow is originated from outside the model
  • Sink of the flow - when the flow sinks

Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows. Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.

Auxiliaries

Variable.JPG

Auxiliaries are used to define some intermediate concepts. Auxiliary can change instantaneously according to the specified formula.

Parameters

Parameters are commonly used to define numeric constants.

Links

Information flow.JPG

Link is used to define a dependency between elements of a stock and flow diagram.

If some element A is mentioned in the equation or initial value of element B, you should first connect these elements with a link going from A to B and only then type the expression in the properties of B.


Software tools

There are a lot of software designed for modeling System Dynamics. An extensive list of programs can be found to be on this Wiki page. But the most used software are these:


Examples

A manufacturing firm

A manufacturing firm maintains an inventory of finished goods from which it ships to customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, Production, Order Backlog, Order Rate.



References [z] [x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf [y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html