l4-sd stock flow

Upload: ubed-al-idist

Post on 14-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 L4-SD Stock Flow

    1/46

    Stocks & Flows

    Diagrams: BASICBased on : Budi HARTONO

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    2/46

    Agenda

    Intro of SFD

    Case 1 the Savings

    Case 2 the Flu

    Case 3 population dynamics

    General Modelling Approach

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    3/46

    Introduction

    Box Variables represent quantities. These are

    the main "nouns" in a system and are

    sometimes refered to as Level Variables.

    Rates represent changes over time. These are

    the main "verbs" in a system and are

    sometimes refered to as Flows.

    Auxiliary Variables represent constants and

    other parameters. These loosely corespond to

    "adjectives" and "adverbs" in a system.

    Connectors indicate dependencies between

    objects. In other words, I need to know this to

    calculate that

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    4/46

    Steps

    1. Building the Model

    2. Specifying the Input

    3. Running the Model

    4. Examining the Output

    5. Analysis & Insights

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    5/46

    Case 1 Interest Rate

    Source: Vensim PLE Quick Reference and Tutorial, b: Craig W. Kirkwood,2002

    CLD?STOCK?

    FLOW?

    EXOGENOUS

    ENDOGENEOUS?

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    6/46

    1. Setting

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    7/46

    Units & syntax checks

    Run Simulations

    Graphs

    Customized Graphs

    Synthesim

    Working with lookup functions

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    8/46

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    9/46

    Tips: Using Time as a variable

    Current

    Variable Demand

    100

    50

    0

    -50

    -100Time

    100

    75

    50

    25

    00 50 100

    Time (Month)

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    10/46

    Case 2 The Flu

    On a Monday, 100 students return toschool, one of whom has the flu. As time

    passes, the sick student unwittinglyinfects his classmates, who in turn go onto infect others. This could be generalizedas follows:

    Over time, susceptible people get sickand become infected people

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    11/46

    Building the Model - Two main _____sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    12/46

    Building the Model - Adding a__________

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    13/46

    Building the Model - Adding a______

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    14/46

    Building the Model - AddingConnectors

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    15/46

    Specifying the Input - DATAWhat data?sugeng purwoko

    pec y ng e npu ep o

  • 7/27/2019 L4-SD Stock Flow

    16/46

    pec y ng e npu - ep oxVariables Recall that our hypothetical school has 100 kids.

    Set the initial number of susceptible people to 99and set the number of infected people to 1.

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    17/46

    Specifying the Input - Step 2 RateEquation

    Assume that every susceptible personinteracts with every infected person once

    per day. Not every interaction results in an

    infection. Infection fraction.

    Susceptible People * Infected People *Infection Fraction

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    18/46

    Specifying the Input - Step 3 TheInfection Fraction

    Assuming that in two days there will bethree new sick students, the infection

    fraction can be estimated as 0.0151

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    19/46

    Running the Model

    But, before that ...

    a. Model Settings

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    20/46

    St 1 Q i k G h d

  • 7/27/2019 L4-SD Stock Flow

    21/46

    Step 1 Quick Graphs andTables

    Causes Strip - This brings up a strip graph for the

    selected variable and any variables affecting it in

    a causal loop.

    Graph - This brings up a graph of the selectedvariable over time.

    Table - Displays values for the selected variable

    horizontally.

    Table Time Down - Displays values for the

    selected variable over time vertically

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    22/46

    Examining the OutputStep 2 Custom Graphs and Tables

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    23/46

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    24/46

    Examining the OutputStep 3 SyntheSim

    This button activates SyntheSim mode (A model must

    be ready to run before you can enter SyntheSim).

    This button exits SyntheSim mode.

    This button resets the selected slider to the value it had

    when SyntheSim was started.

    This button resets all of the sliders in the model.

    This button saves the current model settings and run

    datasugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    25/46

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    26/46

    Analysis

    Graphs?

    Peaks of diseases?

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    27/46

    Case 3 Population Dynamics

    average lifetime = 8

    Units: Year

    birth rate = 0.125

    Units: fraction/Year

    births = Population * birth rate

    Units: rabbit/Year

    deaths = Population / average lifetime

    Units: rabbit/Year

    Population = INTEG(

    births deaths, 1000)

    Units: rabbit

    Model Equations

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    28/46

    Running Simulation

    Double click on the Runname editingbox on the Toolbar and type equilib

    for the first run name. Click on the Simulate button

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    29/46

    Model Analysis

    Causes Strip

    Graph

    Table

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    30/46

    Comparing Scenarios

    Equilibrium vs. Exponential growth

    1. Set Up a Simulation

    2. .

    3. Replace equilib with growth

    4. Click on the variable birth rate (appearingblue/yellow in the sketch) and in the editing boxtype the value 0.2

    5. Simulate

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    31/46

    Analysis

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    32/46

    Runs Compare

    Runs Compare

    Population grew in the growth run because the birth rate was set to a higher

    value than the equilibrium value.

    This made the positive feedback loop through births stronger than the negative

    feedback loop through deaths, resulting in Population growth over time

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    33/46

    Comparing Scenarios

    Exponential Decay

    decay to replace the growth

    average lifetime = 4

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    34/46

    General Modelling Approach

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    35/46

    The Elements

    General Modelling

    Approach

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    36/46

    stocks, flows, and informationa general way of graphically representing

    anybusiness process

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    37/46

    CHANGE !!

    A primary interest of business managers ischanges in variables like Actual Customers overtime.

    If nothing changes, then anybody can manage.just do what has always been done.

    Some of the greatest management challengescome from change.

    If sales start to decline, or even increase, you

    should investigate why this change has occurredand how to address it. One of the key differences between managers

    who are successful and those who are not istheir ability to address changes before it istoo late.

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    38/46

    Types of Stocks and Flows Most business activities include one or more of

    the following five types of stocks

    1. Materials. This includes all stocks and flows of physical goods which are

    part of a production and distribution process, whether raw materials, in-process

    inventories, or finished products.

    2. Personnel. This generally refers to actual people, as opposed, for example,

    to hours of labor.3. Capital equipment. This includes such things as factory space, tools, and

    other equipment necessary for the production of goods and provision of

    services.

    4. Orders. This includes such things as orders for goods, requisitions for new

    employees, and contracts for new space or capital equipment. Orders aretypically the result of some management decision which has been made, but

    not yet converted into the desired result.

    5. Money. This is used in the cash sense. That is, a flow of money is the actual

    transmittal of payments between different stocks of money.

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    39/46

    Information

    Stocks, flows, information

    The information links in a business process canbe difficult to adequately model because of the

    abstract nature of these links.Materials, personnel, capital equipment, orders,and money usually have a physicalrepresentation. Furthermore, these quantities are

    conserved, and thus they can only flow to oneplace at a time.Information, on the other hand, cansimultaneously flow to many places, and,

    particularly in computer-intensive environments,it can do this ra idl and with considerable

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    40/46

    Fundamental Structures and Behaviors

    General Modelling

    Approach

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    41/46

    Fundamental Structure &Behaviours

    1. Growth

    2. Decay

    3. S-shape4. Osccilation

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    42/46

    1. Exponential Growth

    Savings (sudah dibahas)

    a first order positive feedback loop

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    43/46

    2. Exponential Decay

    worker

    Suppose that you have 100 people working for you and you

    decide never to hire anyone again. Your average worker

    hangs around for 10 years.

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    44/46

    3. S-shape

    mice

    sugeng purwoko

    EQUATIONS:

  • 7/27/2019 L4-SD Stock Flow

    45/46

    (01) effect of density on survival=

    effect of density on survivalfunction(Mice/normal carrying

    capacity)Units: Dmnl

    (02) effect of density on survivalfunction(

    [(0,0)-(4,3)],(0,3),

    (1,1),(2,0.25),(4,0))Units: Dmnl

    (03) FINAL TIME = 60

    Units: Month

    The final time for the simulation.

    (04) INITIAL TIME = 0

    Units: Month

    The initial time for the simulation.

    (05) max net new mice rate=

    0.25

    (06) Mice= INTEG (

    net new mice,

    2)

    Units: Mice

    (07) net new mice=

    max net new mice rate * Mice *

    effect of density on survival

    Units: Mice/Month

    (08) normal carrying capacity=

    200Units: Mice

    (09) SAVEPER =

    TIME STEP

    Units: Month

    The frequency with which output is stored.

    (10) TIME STEP = 0.25Units: Month

    The time step for the simulation.

    sugeng purwoko

  • 7/27/2019 L4-SD Stock Flow

    46/46

    4. Oscillation

    Range-kutta

    In a complex system, thereare likely to be a number of

    minor negative loops and

    these, in general, will be

    damping

    sugeng purwoko