Levels and Rates The Bath tub Example
Dennis T. Beng Hui, De La Salle University-Manila
Stock Flow Diagram (Flow Diagrams) Stock and flow diagrams are ways of representing the structure of a system with more information than a simple causal loop diagram. Stocks (levels) are fundamental to generating behavior in a system.
Dennis T. Beng Hui, De La Salle UniversityManila
Stock Flow Diagram (Flow Diagrams) Flows (rates) causes stocks to change. Stock and flow diagram is a common step toward building a simulation model because they help define the types of variables that are important in causing behavior.
Dennis T. Beng Hui, De La Salle UniversityManila
Stock Flow Diagram Stocks or levels Flows or Rates
Auxiliary Table Function Constant Exogenous Variable Variable not defined in diagram Information Link Material Link Source or Sink of material
Dennis T. Beng Hui, De La Salle UniversityManila
Population Stock Flow Diagram
Birth
% Birth Women Giving Birth
Population Death
% of Population dying
Dennis T. Beng Hui, De La Salle UniversityManila
Aids Stock Flow Model
HIV Infection Rate
AIDS Incubation Rate
Dennis T. Beng Hui, De La Salle UniversityManila
Death Rate
Stock Flow of Ordering system
Delivery
Amount to replenish
Amount of Invty
Orders
Demand Rate
Dennis T. Beng Hui, De La Salle UniversityManila
Stock Flow of Ordering system (Alternative) Order
Net of Orders and Delivery
Demand
Amount of Inventory
Deliver Dennis T. Beng Hui, De La Salle UniversityManila
Coffee Temperature Stock Flow Diagram Coffee Temperature Change in Temp
Heat Loss
Room Temp
Dennis T. Beng Hui, De La Salle UniversityManila
Stock Flow of Household Expenditure
Income
Available Money
Allowance
Utilities Amount of Overtime Dennis T. Beng Hui, De La Salle UniversityManila
Problem and Addiction Stock Flow diagram Change in level
New Problems
Addicition Level
Amount of Problem
Solved Problems
Dennis T. Beng Hui, De La Salle UniversityManila
Classes of Equations Level equations Rate equations Auxiliary equations Supplementary equations Initial-value equations
Dennis T. Beng Hui, De La Salle UniversityManila
Level equations Level equations have varying contents of reservoirs of the system. They would exist even if the system is in rest and no flows existed. Examples are stocks, inventories and others. New values of levels are calculated at each of the closely spaced solution intervals.
Dennis T. Beng Hui, De La Salle UniversityManila
Level equations Levels are assumed to change at a constant rate between solution times, but no values are calculated between those times. Levels determine rates Example:
L
INVTY.K=INVTY.J+DT(MAKES.JK- SALES.JK)
Dennis T. Beng Hui, De La Salle UniversityManila
Rate equations Rate equations are decision functions. Defines the rates of flow between the levels of the system. A rate equation is evaluated from presently existing values of levels in the system, very often, including the level from which the rate comes and the one into which it goes.
Dennis T. Beng Hui, De La Salle UniversityManila
Rate equations The rate in turn cause the changes in the levels. Rates determine levels. Example: R BIRTH.KL = POPN.K*0.20
Dennis T. Beng Hui, De La Salle UniversityManila
Auxiliary equations Auxiliary Equations are components of a rate equation. These are equations that assist but are incidental. Helps in keeping the model in close correspondence to the actual system.
Dennis T. Beng Hui, De La Salle UniversityManila
Auxiliary equations These equations can be substituted forward into one another and hence into rate equations. Unlike rate equations, auxiliary equations must be evaluated in proper order.
Dennis T. Beng Hui, De La Salle UniversityManila
Auxiliary equations
A R L
Example: DRUGS.K = POPN.K * 0.1 USERS.KL = DRUGS.K * 0.2 AIDS.K = AIDS.J + DT(BIRTH.JK + USERS.JK)
Dennis T. Beng Hui, De La Salle UniversityManila
Supplementary equations Supplementary Equations are used to define variables which are not actually part of the model structure but arise in printing and plotting values of interest about the model. These equations are denoted y “S”.
Dennis T. Beng Hui, De La Salle UniversityManila
Initial-value equations
Initial-Value Equations are used to define initial values of all levels and some rates that must be given before the first cycle of model equation computation can begin. These also be values of some constants from other constants. Example: N INVTY = 100 Dennis T. Beng Hui, De La Salle UniversityManila
Computational Interval (Solution Interval) DT represents “Delta Time” It is the model time elapsing between computations in the simulation model.
Dennis T. Beng Hui, De La Salle UniversityManila
Computational Interval (Solution Interval)
The solution interval must be short enough so that its value does not seriously affect the computed results. It should also be long enough as permissible to avoid unnecessary digitalcomputer time DT should be between one-half to one-tenth of the smallest time constant in the model.Common values are 0.50, 0.25, and 0.125) Dennis T. Beng Hui, De La Salle UniversityManila
Coffee Cooling Model using Dynamo *Coffee Cooling Temperature NOTE COFTEMP.K = Coffee Temperature in Celsius L COFTEMP.K=COFTEMP.J+DT*(COOL.JK) N COFTEMP=100 NOTE COOL.KL = Cooling Rate of Coffee R COOL.KL=K(ROOM-COFTEMP.K) C ROOM=25 NOTE K is a constant C K=.01 SPEC DT=.25/SAVPER=.25/LENGTH=5 NOTE Time is in minutes SAVE COFTEMP,COOL,ROOM Dennis T. Beng Hui, De La Salle UniversityManila