<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.simulace.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tomyk007</id>
	<title>Simulace.info - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.simulace.info/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tomyk007"/>
	<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php/Special:Contributions/Tomyk007"/>
	<updated>2026-07-27T16:31:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6314</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6314"/>
		<updated>2014-01-26T14:40:14Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example.JPG]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Shipments'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Graphical representation=&lt;br /&gt;
&lt;br /&gt;
==Graphs==&lt;br /&gt;
Each progress of simulation can be displayed into several charts that show the change in variables for example change in time. Once the simulation run is completed, you can look at the results of your simulation. The most basic and often most useful is the strip graph - See the following figure. &lt;br /&gt;
&lt;br /&gt;
[[File:Graf.JPG]]&lt;br /&gt;
&amp;lt;ref&amp;gt;[http://www.vensim.com/documentation/index.html?ref_graph_tool.htm Vensim Help: Graph. VENTANA SYSTEMS, Inc. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The time axis for the graph follows the global Start time and End time, but is rounded to even numbers. The Graph tool displays single or multiple variables on a single graph.  It is useful for getting the big picture of a number of variables, and for printing presentation.&lt;br /&gt;
&lt;br /&gt;
Each software tool for modeling the system dynamics allows you to set different settings for charts as a:&lt;br /&gt;
&lt;br /&gt;
'''Graph Type''' (Normal, Cumulative, Stack) determines how data will be represented.&lt;br /&gt;
* '''Normal''' displays the values of the variables over time.&lt;br /&gt;
* '''Cumulative''' integrates the values of the variables.  For positive variables, Cumulative yields an upward-sloping graph over time.  The cumulation for a variable begins at the first time that values for the variable are available, regardless of the global Start time.  This ensures that if you shorten the time range, the values will be the same as those in a graph of the full time range.  Cumulative graphs allow you to view accumulations without adding additional model variables.&lt;br /&gt;
* '''Stack''' displays the values of the first variable normally, the second as the sum of the first and second variables, the third as the sum of the first three, and so on.  All variables are stacked, including different subscript elements in a run and the same variable for different runs.  For positive variables, this means that each successive variable is higher than its predecessors and that the final variable is the sum of all variables.  An error occurs if the variables are from datasets with different sampling points (for example, different values of SAVEPER).   Stack graphs are a convenient way of breaking down the components of a variable. It make the most sense to use stack graphs with one variable from multiple runs, or multiple subscripts from one run but rarely both.&lt;br /&gt;
&lt;br /&gt;
==The Table tool==&lt;br /&gt;
The Table tool is very good tool, which is included for example in VenSim&amp;lt;ref&amp;gt;[http://www.vensim.com/documentation/index.html?ref_graph_tool.htm Vensim Help: Table. VENTANA SYSTEMS, Inc. online]&amp;lt;/ref&amp;gt;. It can generate a read-only table that you can scroll to review values. The resulting table displays numerical values for variables and their causes or uses.  The Table tool's most common use is for detailed analysis of a narrow time range, but it is also good for displaying a lot of values on the screen and also for displaying arrays of data at a given time.&lt;br /&gt;
&lt;br /&gt;
[[File:Table.JPG]]&lt;br /&gt;
&lt;br /&gt;
==Stats==&lt;br /&gt;
The Stats tool is also included in VenSim&amp;lt;ref&amp;gt;[http://www.vensim.com/documentation/index.html?ref_graph_tool.htm Vensim Help: Stats. VENTANA SYSTEMS, Inc. online]&amp;lt;/ref&amp;gt; and it provides summary statistics on the Workbench Variable and its causes or uses.  This tool provides a quick statistical overview of the values for a variable. The following figure shows the population statistics.&lt;br /&gt;
&lt;br /&gt;
[[File:Stats.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Stats.JPG&amp;diff=6313</id>
		<title>File:Stats.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Stats.JPG&amp;diff=6313"/>
		<updated>2014-01-26T14:34:46Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Table.JPG&amp;diff=6312</id>
		<title>File:Table.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Table.JPG&amp;diff=6312"/>
		<updated>2014-01-26T14:34:11Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Graf.JPG&amp;diff=6311</id>
		<title>File:Graf.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Graf.JPG&amp;diff=6311"/>
		<updated>2014-01-26T14:16:08Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6273</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6273"/>
		<updated>2014-01-25T14:36:33Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example.JPG]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Shipments'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6272</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6272"/>
		<updated>2014-01-25T14:35:18Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Shipping delay */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example.JPG]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Shipments'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6271</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6271"/>
		<updated>2014-01-25T14:35:06Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Interests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example.JPG]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Shipments'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
&lt;br /&gt;
Create working simulation based on following proposal of Stock and Flow Diagram and equations.&lt;br /&gt;
&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6270</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6270"/>
		<updated>2014-01-25T14:25:55Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example.JPG]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Shipments'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6269</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6269"/>
		<updated>2014-01-25T14:25:36Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
&lt;br /&gt;
[[File:Sf example.JPG]] &lt;br /&gt;
&lt;br /&gt;
'''Shipments'''&lt;br /&gt;
[[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6268</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6268"/>
		<updated>2014-01-25T14:23:07Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
'''Example of Stock and Flow Diagram - Child-adult population model'''&lt;br /&gt;
[[File:Sf example.JPG]] [[File:Sf example2.JPG]]&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Behaviour of model= &lt;br /&gt;
'''System structure is defined by:''' &lt;br /&gt;
* Stocks &lt;br /&gt;
* Flows &lt;br /&gt;
* Connections between them &lt;br /&gt;
&lt;br /&gt;
'''Nonlinearity:''' The behaviour of the whole is more than the sum of the behaviour of the parts&lt;br /&gt;
* Stock and flow structure (including feedbacks) of a system determines the qualitative behaviour modes that the system can take on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Sf_example2.JPG&amp;diff=6267</id>
		<title>File:Sf example2.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Sf_example2.JPG&amp;diff=6267"/>
		<updated>2014-01-25T14:22:58Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Sf_example.JPG&amp;diff=6261</id>
		<title>File:Sf example.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Sf_example.JPG&amp;diff=6261"/>
		<updated>2014-01-25T13:43:58Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6260</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6260"/>
		<updated>2014-01-25T13:35:56Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
'''Stock &amp;amp; Flow Diagram i based on Causal Loops Diagram and captures:''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6259</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6259"/>
		<updated>2014-01-25T13:30:07Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Auxiliaries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Auxiliary variables are convenience names we give to concepts that can be defined in terms of expressions involving stocks/flows at current time&lt;br /&gt;
 &lt;br /&gt;
– Adding or eliminating an auxiliary variable does not change the mathematical structure of the system &lt;br /&gt;
&lt;br /&gt;
* Critical for model transparency&lt;br /&gt;
 &lt;br /&gt;
– Can be reused at many places &lt;br /&gt;
&lt;br /&gt;
– References to auxiliary variables prevents need for modeler to think about all of details of definition &lt;br /&gt;
&lt;br /&gt;
* Enhanced modifiability: Single place to define &lt;br /&gt;
* Convenient for reporting (graphing, tables) &amp;amp; analyzing model dynamics&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6258</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6258"/>
		<updated>2014-01-25T13:26:12Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Tutorial in VenSim */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6257</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6257"/>
		<updated>2014-01-25T13:24:04Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* A manufacturing firm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment Vensim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
Create Casual Loop diagram, then convert it to Stock and Flow diagram:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6256</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6256"/>
		<updated>2014-01-25T13:23:02Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Examples for practise */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment Vensim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
===Pocket money===&lt;br /&gt;
Try to convert following Casual Loop Diagram to Stock and Flow Diagram&lt;br /&gt;
&lt;br /&gt;
[[File:Cl example.JPG]]&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Cl_example.JPG&amp;diff=6255</id>
		<title>File:Cl example.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Cl_example.JPG&amp;diff=6255"/>
		<updated>2014-01-25T13:20:53Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6253</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6253"/>
		<updated>2014-01-25T13:09:29Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== Tutorial in VenSim ==&lt;br /&gt;
'''Task'''&lt;br /&gt;
&lt;br /&gt;
Convert the following model in the simulation environment Vensim.&lt;br /&gt;
&lt;br /&gt;
[[File:CL.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# Deficit = Expenditures-Revenues&lt;br /&gt;
# Revenues= 300000 * RevenueGrowth&lt;br /&gt;
# Public Debt = INTEG(Deficit), initial value= 10&lt;br /&gt;
# InterestRate= RANDOM NORMAL(0.01, 0.1 , 0.05, 0.05,124)&lt;br /&gt;
# Interests= Public Debt* InterestRate&lt;br /&gt;
# RevenueGrowth= 0.02&lt;br /&gt;
# ExpenditureGrowth= 0.03&lt;br /&gt;
# OtherExpenditures= 200000&lt;br /&gt;
# Expenditures= Interests+OtherExpenditures* ExpenditureGrowth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Solution''':&lt;br /&gt;
&lt;br /&gt;
* Convert the '''Causal Loop Diagram''' (Figure 1) to the '''Stack Flow Diagram''' (Figure 2).&lt;br /&gt;
&lt;br /&gt;
[[File:SF.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Run Vensim. Click to create a new model. A window with the basic setup of the model appears - leave the default settings and press OK button.&lt;br /&gt;
&lt;br /&gt;
# Click on '''Auxiliary variable''', click on the screen and enter the variable name as ''&amp;quot;Revenues&amp;quot;''. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
# Click on '''Box variable''', click on the screen and enter the name of the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Rate''', click on the screen and to variable ''&amp;quot;Public Debt&amp;quot;'' and name as ''&amp;quot;flow deficit&amp;quot;'' - thereby create material flow, which of infinite resources (cloud) outside the modeled system increases the variable ''&amp;quot;Public Debt&amp;quot;''&lt;br /&gt;
# Click on '''Arrow''', click on the source auxiliary variable and then to the target. This creates a flow of information. The same way create any additional auxiliary variables depending on the model&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following figure shows the final model:&lt;br /&gt;
&lt;br /&gt;
[[File:E1.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on '''Equations''' button. This displays a mode for entering equations into individual variables. A variable which is not yet defined by the equation, is shown in black&lt;br /&gt;
&lt;br /&gt;
[[File:E2.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Public Debt&amp;quot;'' and specify the initial state 10 (Equation 3). The formula for this variable is automatically supplemented by inflows to INTEG (Deficit)&lt;br /&gt;
&lt;br /&gt;
[[File:E3.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on the variable ''&amp;quot;Revenue Growth&amp;quot;'' and enter the constant ''0.02'' (Equation 6). In the same way, enter the variable Expenditure Growth and Other Expanditures&lt;br /&gt;
&lt;br /&gt;
[[File:E4.JPG]]&lt;br /&gt;
&lt;br /&gt;
* A specific case is a variable ''&amp;quot;Interest Rate&amp;quot;'' that is not constant, but is randomly generated from a normal distribution (Equation 4). This function is used ''RANDOM NORMAL'' found on the Functions tab, along with other features that are available&lt;br /&gt;
&lt;br /&gt;
[[File:E5.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on ''&amp;quot;Deficit&amp;quot;'' variable and enter the formula-Revenues Expenditures (Equation 1)&lt;br /&gt;
&lt;br /&gt;
[[File:E6.JPG]]&lt;br /&gt;
&lt;br /&gt;
* Click on variable ''&amp;quot;Expenditures&amp;quot;'' and enter the formula ''&amp;quot;Interests + Other Expenditures * Expenditure Growth&amp;quot;'' (Equation 9). In the same way enter variables Revenues and Interests&lt;br /&gt;
&lt;br /&gt;
[[File:E7.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation is started with the &amp;quot;Run a Simulation&amp;quot; button. The text box to the left of this button allows you to name the individual simulation runs.&lt;br /&gt;
* We name the first run simulations as &amp;quot;First&amp;quot; and run a simulation. Then you can change the value of the variable ''&amp;quot;Expenditure Growth&amp;quot;'' to ''0.03001'', name running the simulation as a &amp;quot;Second&amp;quot; and again run the simulation&lt;br /&gt;
* The results of the simulation run can be displayed by clicking on the variable of &amp;quot;Interest&amp;quot;, and then clicking to buttons '''Graph''', or '''Causes Strip''' or '''Table to display''' the individual values. Each named running simulation is shown separately&lt;br /&gt;
&lt;br /&gt;
[[File:E8.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[File:E9.JPG]]&lt;br /&gt;
&lt;br /&gt;
* The simulation can be run in interactive mode.&lt;br /&gt;
* There is '''Automatical simulate on change''' button just next to the button '''Run a Simulation'''. This button starts interactive work with simulation, which allows you to interactively change the values ​​of the input variables and immediately see the results of the change&lt;br /&gt;
&lt;br /&gt;
[[File:E10.JPG]]&lt;br /&gt;
&lt;br /&gt;
== Examples for practise ==&lt;br /&gt;
&lt;br /&gt;
=== A manufacturing firm ===&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Interests===&lt;br /&gt;
[[File:Interrests.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# FINAL TIME = 40&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# interest = INTEREST RATE*Savings&lt;br /&gt;
# INTEREST RATE = 0.05&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# Savings = INTEG(interest,100)&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shipping delay===&lt;br /&gt;
[[File:Shipping delay.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Equations'''&lt;br /&gt;
# DESIRED INVENTORY = 200&lt;br /&gt;
# factory production = retailer orders&lt;br /&gt;
# FINAL TIME = 50&lt;br /&gt;
# In Transit = INTEG(factory production-orders received, 300)&lt;br /&gt;
# INITIAL TIME = 0&lt;br /&gt;
# product received = DELAY FIXED(factory production,SHIPPING DELAY, factory production)&lt;br /&gt;
# Retail Inventory = INTEG(product received-retail sales, 200)&lt;br /&gt;
# RETail sales = 100 + STEP(20, 5)&lt;br /&gt;
# retailer orders = retail sales+ (DESIRED INVENTORY- Retail Inventory) / TIME TO ADJUST INVENTORY&lt;br /&gt;
# SAVEPER = TIME STEP&lt;br /&gt;
# SHIPPING DELAY = 3&lt;br /&gt;
# TIME STEP = 0.0625&lt;br /&gt;
# TIME TO ADJUST INVENTORY = 2&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Interrests.JPG&amp;diff=6251</id>
		<title>File:Interrests.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Interrests.JPG&amp;diff=6251"/>
		<updated>2014-01-25T13:06:40Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E10.JPG&amp;diff=6250</id>
		<title>File:E10.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E10.JPG&amp;diff=6250"/>
		<updated>2014-01-25T13:00:46Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E9.JPG&amp;diff=6249</id>
		<title>File:E9.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E9.JPG&amp;diff=6249"/>
		<updated>2014-01-25T12:58:15Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E8.JPG&amp;diff=6248</id>
		<title>File:E8.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E8.JPG&amp;diff=6248"/>
		<updated>2014-01-25T12:57:35Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E7.JPG&amp;diff=6247</id>
		<title>File:E7.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E7.JPG&amp;diff=6247"/>
		<updated>2014-01-25T12:44:48Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E6.JPG&amp;diff=6246</id>
		<title>File:E6.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E6.JPG&amp;diff=6246"/>
		<updated>2014-01-25T12:43:23Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E5.JPG&amp;diff=6245</id>
		<title>File:E5.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E5.JPG&amp;diff=6245"/>
		<updated>2014-01-25T12:42:18Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E4.JPG&amp;diff=6244</id>
		<title>File:E4.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E4.JPG&amp;diff=6244"/>
		<updated>2014-01-25T12:39:23Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E3.JPG&amp;diff=6243</id>
		<title>File:E3.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E3.JPG&amp;diff=6243"/>
		<updated>2014-01-25T12:37:41Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E2.JPG&amp;diff=6242</id>
		<title>File:E2.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E2.JPG&amp;diff=6242"/>
		<updated>2014-01-25T12:36:29Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:E1.JPG&amp;diff=6241</id>
		<title>File:E1.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:E1.JPG&amp;diff=6241"/>
		<updated>2014-01-25T12:33:35Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:SF.JPG&amp;diff=6240</id>
		<title>File:SF.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:SF.JPG&amp;diff=6240"/>
		<updated>2014-01-25T12:27:22Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:CL.JPG&amp;diff=6239</id>
		<title>File:CL.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:CL.JPG&amp;diff=6239"/>
		<updated>2014-01-25T12:25:26Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=File:Shipping_delay.JPG&amp;diff=6237</id>
		<title>File:Shipping delay.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=File:Shipping_delay.JPG&amp;diff=6237"/>
		<updated>2014-01-25T12:12:50Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6232</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6232"/>
		<updated>2014-01-25T11:59:44Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Examples of Stocks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** Susceptible, infective,immune people &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6231</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6231"/>
		<updated>2014-01-25T11:58:51Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Extarnal links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Extarnal links=&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6230</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6230"/>
		<updated>2014-01-25T11:58:14Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Extarnal links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extarnal links==&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;br /&gt;
# [http://www.vensim.com VenSim] &lt;br /&gt;
# [http://www.powersim.com Powersim]&lt;br /&gt;
# [http://www.iseesystems.com IThink/Stella]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6228</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6228"/>
		<updated>2014-01-25T11:57:20Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Symbols */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. PDF]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extarnal links==&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6226</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6226"/>
		<updated>2014-01-25T11:55:26Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Extarnal links==&lt;br /&gt;
# [http://en.wikipedia.org/wiki/List_of_system_dynamics_software List of system dynamics software]&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6225</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6225"/>
		<updated>2014-01-25T11:52:53Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Symbols */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Stock and Flow Diagrams: Stock and Flow diagramming notation. ANYLOGIC COM. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6224</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6224"/>
		<updated>2014-01-25T11:52:11Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt;: [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6223</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6223"/>
		<updated>2014-01-25T11:49:22Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Examples of Stocks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt;: [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6222</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6222"/>
		<updated>2014-01-25T11:48:25Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Examples of Stocks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt;: [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6221</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6221"/>
		<updated>2014-01-25T11:47:54Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Symbols */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. &amp;lt;ref&amp;gt;[http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf Introduction to Stocks &amp;amp; Flows. OSGOOD, Nathaniel. INSTITUTE FOR SYSTEM SCIENCE &amp;amp; HEALTH. online]&amp;lt;/ref&amp;gt;: [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6220</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6220"/>
		<updated>2014-01-25T11:43:38Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. online]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6219</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6219"/>
		<updated>2014-01-25T11:43:03Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. [online]]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6218</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6218"/>
		<updated>2014-01-25T11:42:18Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* A manufacturing firm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. [online]. [cit. 2014-01-25]]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6217</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6217"/>
		<updated>2014-01-25T11:40:59Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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.&amp;lt;ref name=&amp;quot;props&amp;quot;&amp;gt;[http://www.createadvantage.com/glossary/stocks-and-flows-diagram Stocks and flows diagram: Definition. CREATEADVANTAGE.COM. [online]. [cit. 2014-01-25]]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops&lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
[z]&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6216</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6216"/>
		<updated>2014-01-25T11:33:35Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Software tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops &lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com VenSim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
[z]&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6215</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6215"/>
		<updated>2014-01-25T11:32:40Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: /* Examples of Stock and flows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops &lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
&lt;br /&gt;
The following illustration shows the graphical implementation of symbols for one inflow to one Stock in software VenSim.&lt;br /&gt;
&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following table provides examples of Stocks and their inflows and outflows&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, &lt;br /&gt;
&lt;br /&gt;
immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  &lt;br /&gt;
&lt;br /&gt;
emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com Vensim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
[z]&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6214</id>
		<title>Stock and flow diagram</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=Stock_and_flow_diagram&amp;diff=6214"/>
		<updated>2014-01-25T11:28:14Z</updated>

		<summary type="html">&lt;p&gt;Tomyk007: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;***IN CONSTRUCTION --[[User:Tomyk007|Tomyk007]] 21:12, 22 January 2014 (CET)&lt;br /&gt;
=Definition=&lt;br /&gt;
A '''Stock &amp;amp; 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]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Captures''' &lt;br /&gt;
* Stock &lt;br /&gt;
* Flows &lt;br /&gt;
* Quatified feedback loops &lt;br /&gt;
&lt;br /&gt;
=Rules=&lt;br /&gt;
&lt;br /&gt;
* Stocks are always changed by flows &lt;br /&gt;
* In general, the formulas for the flows will depend on things that are changing (state) &lt;br /&gt;
&lt;br /&gt;
=Symbols=&lt;br /&gt;
&lt;br /&gt;
Each graphical tool for modeling System Dynamics has its own form of symbols, but basics are same in the following points. [x] [y]:&lt;br /&gt;
&lt;br /&gt;
== Stocks ==&lt;br /&gt;
[[File:Stock.JPG]]&lt;br /&gt;
&lt;br /&gt;
* In a stock &amp;amp; flow diagram are shown as rectangles &lt;br /&gt;
* Stocks (also known as Levels) represent '''accumulations''' &lt;br /&gt;
-– These capture the “state of the system” &lt;br /&gt;
&lt;br /&gt;
-– Mathematically it can be called as “state variables”&lt;br /&gt;
* Are used to represent the real-world processes (e.g. stocks of material, knowledge, people, money) &lt;br /&gt;
* Stocks can be measured at one instant in time &lt;br /&gt;
* Stocks start with some '''initial value''' and are thereafter changed only by '''flows into''' &amp;amp; '''out of them''' &lt;br /&gt;
–- There are no inputs that immediately change stocks &lt;br /&gt;
* Stocks are the source of delay in a system &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Critical Role of Stocks in System Dynamics:''' &lt;br /&gt;
* Stocks determine current state of system &lt;br /&gt;
–- Stocks often provide the basis for making choices &lt;br /&gt;
* Stocks central to most disequilibria phenomena (buildup, decay) &lt;br /&gt;
* Lead to inertia &lt;br /&gt;
* Give rise to delays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Stocks===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Stocks [x]:&lt;br /&gt;
&lt;br /&gt;
* Water in a tub or reservoir &lt;br /&gt;
* People of different types &lt;br /&gt;
** {Susceptible, infective,immune} people &lt;br /&gt;
** Pregnant women &lt;br /&gt;
** Women between the age of x and y &lt;br /&gt;
** High-risk individuals &lt;br /&gt;
* Healthcare workers &lt;br /&gt;
* Medicine in stocks &lt;br /&gt;
* Money in bank account &lt;br /&gt;
* CO2 in atmosphere &lt;br /&gt;
* Blood sugar &lt;br /&gt;
* Stored Energy &lt;br /&gt;
* Degree of belief in X &lt;br /&gt;
* Stockpiled vaccines &lt;br /&gt;
* Goods in a warehouse &lt;br /&gt;
* Beds in an emergency room &lt;br /&gt;
* Owned vehicles &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flows ==&lt;br /&gt;
'''Flow'''&lt;br /&gt;
[[File:Material flow2.JPG]]&lt;br /&gt;
&lt;br /&gt;
'''Flow rate'''&lt;br /&gt;
[[File:Material flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
All changes to stocks occur via flows. In turn, stocks in a system determine the values of flows.&lt;br /&gt;
* Drawn with an arrow with a valve (denoting the flow rate) in the middle of it&lt;br /&gt;
* 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) &lt;br /&gt;
* Typically measure over certain period of time (by considering accumulated quantity over a period of time) &lt;br /&gt;
–- e.g. Incidence Rates is calculated by accumulating people over a year, revenue is $/Time, water flow is litres/minute &lt;br /&gt;
&lt;br /&gt;
–- Can be estimated for any point in time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples of Flows===&lt;br /&gt;
&lt;br /&gt;
There is a list of common examples of Flows [x]: &lt;br /&gt;
* Inflow or outflow of a bathtub (litres/minute) &lt;br /&gt;
* Rate of incident cases (e.g. people/month) &lt;br /&gt;
* Rate of recovery &lt;br /&gt;
* Rate of mortality (e.g. people/year) &lt;br /&gt;
* Rate of births (e.g. babies/year) &lt;br /&gt;
* Rate of treatment (people/day) &lt;br /&gt;
* Rate of caloric consumption (kcal/day) &lt;br /&gt;
* Rate of pregnancies (pregnancies/month) &lt;br /&gt;
* Reactivation Rate (# of TB cases reactivating per unit time) &lt;br /&gt;
* Revenue ($/month) &lt;br /&gt;
* Spending rate ($/month) &lt;br /&gt;
* Power (Watts) &lt;br /&gt;
* Rate of energy expenditure &lt;br /&gt;
* Vehicle sales &lt;br /&gt;
* Vaccine sales &lt;br /&gt;
* Shipping rate of goods&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of Stock and flows==&lt;br /&gt;
[[File:Stock and flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Stock'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Inflows'''&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|'''Outflows'''&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|bank balance     &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deposits interest &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|withdrawals &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing stock&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing investment&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|housing depreciation&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|CO2 in atmosphere &lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons emitted&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|tons sequestered  &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|population&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|births, immigration&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|deaths,  emigration&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel tank&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|refueling&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|fuel consumption&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cloud ==&lt;br /&gt;
[[File:Source.JPG]]&lt;br /&gt;
&lt;br /&gt;
Cloud represents either:&lt;br /&gt;
&lt;br /&gt;
* '''Source of the flow''' - when the flow is originated from outside the model&lt;br /&gt;
* '''Sink of the flow''' - when the flow sinks&lt;br /&gt;
&lt;br /&gt;
Both sources and sinks are assumed to have infinite capacity and do not impose any limitations on the flows.&lt;br /&gt;
Clouds are drawn as the part of the flow element, in case the flow does not flows in/out of some stock.&lt;br /&gt;
&lt;br /&gt;
== Auxiliaries ==&lt;br /&gt;
[[File:Variable.JPG]]&lt;br /&gt;
&lt;br /&gt;
Auxiliaries are used to '''define some intermediate concepts'''. Auxiliary can change '''instantaneously''' according to the specified formula.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
Parameters are commonly used to '''define numeric constants'''.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
[[File:Information flow.JPG]]&lt;br /&gt;
&lt;br /&gt;
Link is used to '''define a dependency between elements of a stock and flow diagram'''. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Software tools=&lt;br /&gt;
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:&lt;br /&gt;
* [http://www.vensim.com Vensim] &lt;br /&gt;
* [http://www.powersim.com Powersim]&lt;br /&gt;
* [http://www.iseesystems.com IThink/Stella]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&lt;br /&gt;
== A manufacturing firm ==&lt;br /&gt;
&lt;br /&gt;
A manufacturing firm maintains an inventory of finished goods from which it ships to &lt;br /&gt;
customers. Customer orders are filled after a delay caused by order processing, credit checks, etc. &lt;br /&gt;
Map the stock and flow structure, drawing on the following variables: Inventory, Raw Materials, &lt;br /&gt;
Production, Order Backlog, Order Rate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
[z]&lt;br /&gt;
[x] http://www.cs.usask.ca/~osgood/Classes/CMPT858Spring2011/LectureSlides/Lecture%207%20--%20Stock%20and%20Flows.pdf&lt;br /&gt;
[y] http://www.anylogic.com/anylogic/help/index.jsp?topic=/com.xj.anylogic.help/html/sd/Stock%20and%20Flow%20Diagrams.html&lt;/div&gt;</summary>
		<author><name>Tomyk007</name></author>
		
	</entry>
</feed>