System Dynamics

Embed Size (px)

DESCRIPTION

System Dynamics

Citation preview

  • 7/14/2019 System Dynamics

    1/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    System DynamicsAims, tools and concepts

    (Reference: Sterman, Chapter 1)

    1

  • 7/14/2019 System Dynamics

    2/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    A brief philosophical motivation

    Heraclitus said that you never bathe twice in the sameriver (panta rei)

    If the world changes, we also have to change

    Even when we do change, we often encounter anunexpected policy resistance

    2

  • 7/14/2019 System Dynamics

    3/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    A new way of thinking?

    Systems thinking: the world is a complex entity

    you can do just one thing

    everything is connected

    Thanks to Systems Dynamics we can improve ourunderstanding of complex systems

    3

  • 7/14/2019 System Dynamics

    4/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Interdisciplinarity

    Systems Dynamics theory is based on non-linear dynamicsand on control theory (mathematics, physics, engineering)

    Applications require specialistic knowledge of engineering,economics, sociology, ecology and so on

    4

  • 7/14/2019 System Dynamics

    5/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    What we need

    To learn and understand in and about dynamicsystems we need:

    tools: to represent our mental models

    formal models and simulations: to verify ourmodels

    methods: to refine our scientific intuitions, andovercome our immune system

    5

  • 7/14/2019 System Dynamics

    6/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Policy resistance

    Often, willing to solve a problem, we make decisions thatworsen the state of things

    6

  • 7/14/2019 System Dynamics

    7/268Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    10

    20

    30

    40

    1966 1967 1968 1969 1970 1971

    Crude

    BirthRate

    (Births/year/1000p

    eople)

    1 9 7 1 1 9 9 4

    Birth rate in Romania

    7

  • 7/14/2019 System Dynamics

    8/268Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    What happened?

    Illegal imports of contraceptives

    Illegal abortions: three times the previous death rate

    Very poor families could not afford children

    Children ended up in orphanages

    8

  • 7/14/2019 System Dynamics

    9/268Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Other examples

    Limiting the choice of pharmaceuticals increases healthcosts (LA Times, 20/3/96)

    Subsidies to farmers to limit exploitation of erosion-proneareas induces the opposite effect (U. Minn)

    Low tar cigarettes are more dangerous

    ABS may induce a more aggressive driving style

    9

  • 7/14/2019 System Dynamics

    10/268Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    More examples

    More roads = more traffic

    More household appliances reduce the free time

    Computers increase the usage of paper

    Civil engineering works to mitigate floods might worsenthe impact of floods in other locations

    10

  • 7/14/2019 System Dynamics

    11/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    and even more examples

    The widespread usage of pesticides favoured thedevelopment of resistant pest species

    Uncontrolled usage of antibiotics enabled tuberculosis tomutate and there are now antbiotic-resistant strains

    11

  • 7/14/2019 System Dynamics

    12/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Event oriented view of the world

    12

    Situation

    Goals

    Problem Decision Results

  • 7/14/2019 System Dynamics

    13/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Goals ofOther

    Agents Actions ofOthers

    Side

    EffectsGoals

    Decisions

    Environment

    but also triggering side effects, delayed reactions, changes

    in goals and interventions by others. These feedbacks maylead to unanticipated results and ineffective policies.

    Our decisions alter our environment, leading to new decisions,

    Goals

    Decisions

    Environment

    13

  • 7/14/2019 System Dynamics

    14/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Feedback

    The world is governed by feedbacks positive (reinforcing)

    negative (correcting)

    14

  • 7/14/2019 System Dynamics

    15/268

    Andrea Rizzoli, DTI

    Positive and negative feedback loops

    Figure 1-5a

    R ChickensEggs

    +

    +

    A system!s feedback structure

    generates its dynamics

    Time

    Eggs

    Chickens

    15

  • 7/14/2019 System Dynamics

    16/268

    Andrea Rizzoli, DTI

    Positive and negative feedback loops (cont.)

    Figure 1-5b

    BChickensRoad

    Crossings

    +

    -

    Structure:

    Behavior:

    Time

    RoadCrossings

    Chickens

    16

  • 7/14/2019 System Dynamics

    17/268

    Andrea Rizzoli, DTI

    Dynamics of Multiple-Loop Systems

    Figure 1-6 Dynamics arise from the interaction of multiple loops

    BR ChickensEggs Road

    Crossings

    +

    +

    +

    -

    17

  • 7/14/2019 System Dynamics

    18/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Learning is a feedback process

    18

    Real

    World

    Decisions InformationFeedback

  • 7/14/2019 System Dynamics

    19/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    The role of information

    19

    RealWorld

    Strategy, Structure,Decision Rules

    Mental Modelsof Real World

    DecisionsInformationFeedback

  • 7/14/2019 System Dynamics

    20/268

    Andrea Rizzoli, DTI

    Figure 1-10 Mental model revealed by a diagram of a company!s supply chain

    Current supply chain cycle time: 182 days

    Goal: 50% reduction

    Manufacturing

    Lead Time

    Order Fulfillment

    Lead Time

    Customer

    Acceptance

    Lead Time

    75Days

    85Days

    22Days

    182

    Days

    20

  • 7/14/2019 System Dynamics

    21/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation21

    Saul

    Steinberg,1976

  • 7/14/2019 System Dynamics

    22/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    RealWorld

    Strategy, Structure,Decision Rules

    Mental Modelsof Real World

    Decisions

    Information

    Feedback

    22

  • 7/14/2019 System Dynamics

    23/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Real World

    Decisions

    Implementation failure Game playing Inconsistency Performance is goal

    Unknown structure Dynamic complexity Time delays Inability to conduct controlled experiments

    Strategy, Structure,Decision Rules

    Inability to infer dynamics from mental models

    Mental Models

    Misperceptions of feedback Unscientific reasoning Judgmental biases Defensive routines

    Selective perception Missing feedback Delay Bias, distortion, error Ambiguity

    Information Feedback

    23

  • 7/14/2019 System Dynamics

    24/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Dynamic complexity

    It does not depend on how many components there are,but on howthey interact

    It is notcombinatorial complexity!

    Long time delays create problems for learning

    An evolving system is difficult to learn

    24

  • 7/14/2019 System Dynamics

    25/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Systems are

    dynamic, tightly interconnected, and ruled by feedbacks

    nonlinear, affected by hysteresis (path-dependant) self-organising, adaptive

    policy resistant, counterintuitive

    thus, they are dynamically complex

    25

  • 7/14/2019 System Dynamics

    26/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Limited information

    All measures areobservations, they arefiltered

    We see what we want /expectto see

    26

  • 7/14/2019 System Dynamics

    27/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Before 1600 scurvy was the foremost reason for deathamong sailors (even more than shipwrecks, battles, firesaltogether!)

    1601: Lancaster performs a controlled experiment ontwo ships belonging to the West Indies Company

    Three tbsp of lemon per diem to a crew, nothing to theother ship

    On arrival, on one ship 110 deaths on 278, on the othernone

    27

    Fighting Scurvy

  • 7/14/2019 System Dynamics

    28/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    1747: Dr Lind performs an experiment on some patientswith scurvy. Only patients receiving a lemon based potionrecover in few days.

    1795: British navy starts delivering lemon to her sailors

    1865: the Bristish mercantile navy imposes the use oflemon and scurvy is finally won

    28

  • 7/14/2019 System Dynamics

    29/268

    Andrea Rizzoli, DTI

    Time spent in learning:264 years

    29

  • 7/14/2019 System Dynamics

    30/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Ambiguity

    We often receive ambiguous information since theeffects of our decisions are mixed with the effectsof external actions

    30

  • 7/14/2019 System Dynamics

    31/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Limited rationality

    Given that the world is too complex, we often makedecisions based on:

    rules of thumb

    rules of habit

    extremely simplified models

    We never take into account feedbacks

    31

  • 7/14/2019 System Dynamics

    32/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    In the beer distribution game users generate costlyoscillations, on average being 10 fold away from the

    optimal solution

    In simulated auctions, participants bid too high,creating bubbles, which eventually burst

    In role plays for medical doctors more tests thannecessary are prescribed

    32

  • 7/14/2019 System Dynamics

    33/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Problems in the cognitive maps

    A cognitive map is a representation of our estimation ofcause-effect relations

    In a study of Axelrod (1976) the author could not findfeedbacks in the cognitive maps of political leaders (alsoconfirmed by Hall (1976) and Drner (1996))

    33

  • 7/14/2019 System Dynamics

    34/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Wrong inferences on the system dynamics

    Even if the cognitive map is OK, the structure of thesystem can be too complex to be caught by our brain

    Mental simulation quickly becomes impossible

    34

  • 7/14/2019 System Dynamics

    35/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Partiality in our judgements

    E K 7 4

    How many cards shall I turn to prove that the rule if vowelthen even is true?

    35

  • 7/14/2019 System Dynamics

    36/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Inability to interact

    We need to be prepared to challenge our mental models Under scrutiny, we tend to assume a defensive behaviour

    This is counterproductive in the long run

    36

  • 7/14/2019 System Dynamics

    37/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Inability to implement

    Even when we have a good policy, we can fail toimplement it

    We need our decisions to be shared, so that they areaccepted and implemented

    37

  • 7/14/2019 System Dynamics

    38/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    The role of virtual worlds

    Virtual worlds are formal models, simulations where thedecision makers can make experiments

    They are labs for learning

    impossible configurations and alternatives can be tested

    Yet, the quality of simulations can be very high (or at leastwe can measure it)

    38

  • 7/14/2019 System Dynamics

    39/268

    Andrea Rizzoli, DTI

    Figure 1-14 Idealized learning process

    Virtual World

    Known structure Variable level of complexity Controlled experiments

    Strategy, Structure,Decision Rules

    Simulation used to infer dynamics of mental models correctly

    Real World Unknown structure Dynamic complexity Time delays Inability to conduct controlled experiments

    Mental Models Mapping of feedback structure Disciplined application of scientific reasoning Discussability of group process, defensive behavior

    Virtual World Perfect Implementation Consistent incentives Consistent application of decision rules Learning can be goal

    Real WorldDecisions

    Real World Selective perception Missing feedback Delay Bias, distortion, error Ambiguity

    Information Feedback

    Implementation failure Game playing Inconsistency Performance is goal

    Complete, accurate, immediate feedback

    Virtual World

    39

  • 7/14/2019 System Dynamics

    40/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Modelling 101Problem definition, models: scope and applications(Reference: Sterman, Chapter 3)

    1

  • 7/14/2019 System Dynamics

    41/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    What is a system?

    There are several different definitions, different level forformality

    For a start: it is an object or a collection of objects whoseproperties we want to study (Ljung and Glad)

    Examples: how long does it take for my bathtub to fill?How much energy do I need to heat my house?

    2

  • 7/14/2019 System Dynamics

    42/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    What is a model

    Experimenting on the real-world can be expensive (orimpossible, or dangerous)

    A model of a system is a tool we use to answerquestions about the system without having to do anexperiment (Ljung and Glad)

    mental models

    verbal models

    physical models

    mathematical models

    3

  • 7/14/2019 System Dynamics

    43/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    How to build a model

    Physical modelling

    from physical laws and experience (domain knowledge)

    Identification

    learn the model from data

    map to known structure (parametric approach)

    learn the structure (non-parametric approach)

    4

  • 7/14/2019 System Dynamics

    44/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    System

    F=ma

    u=RI

    Physical

    ModellingIdentification

    Model

    5

  • 7/14/2019 System Dynamics

    45/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Types of mathematical models

    Deterministic - Stochastic

    Dynamic - Static Continuous time - Discrete time

    Lumped - Distributed

    Change oriented - Discrete Event driven

    6

  • 7/14/2019 System Dynamics

    46/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Modelling phases

    1. Problem formulation

    2. Design of model structure3. Implementation of a simulation

    4. Testing and validation

    5. Policy design and evaluation

    7

  • 7/14/2019 System Dynamics

    47/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Problem formulation

    What is the problem, and why it is a problem

    What are the key variables of our problem? Are theyvariables or parameters?

    Which is our temporal horizon

    What is the past behaviour of our system. What could itbe the future one?

    8

  • 7/14/2019 System Dynamics

    48/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Model structure design (i)

    What hypotheses and assumptions are there?

    The dynamic structure of the model must explainendogenously its behaviour

    We draw some causal loop diagrams (using software tools

    including data mining ones)

    9

  • 7/14/2019 System Dynamics

    49/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Model structure design (ii)

    Which tools can we use:

    modular decomposition of the system

    causal loop diagrams

    stocks and flows

    10

  • 7/14/2019 System Dynamics

    50/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Implementation

    We translate the conceptual model in a simulation model:

    specification of the structure and the decisional rules inthe control flow

    we need to estimate the simulation model parametersand choose initial (boundary) conditions

    we need to assess the models consistency with its aimand limitations

    11

  • 7/14/2019 System Dynamics

    51/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Verification

    Our tests must

    compare the model and the observed (real world)behaviour

    measure the robustness of the model under stress

    measure its sensitivity to small changes in itsparameters and structure

    12

  • 7/14/2019 System Dynamics

    52/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    It is an iterative process

    1. Problem Articulation(Boundary Selection)

    3. Formulation4. Testing

    5. PolicyFormulation& Evaluation

    2. DynamicHypothesis

    13

  • 7/14/2019 System Dynamics

    53/268

    Andrea Rizzoli, DTI

    An overview of themodelling process

    14

  • 7/14/2019 System Dynamics

    54/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    The importance of the model aim

    The aim must be clear!

    If we try to model too many things at once, we might loseourselves

    A model as complex as the real world does not help

    The model is the ockhams razor

    15

  • 7/14/2019 System Dynamics

    55/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Reference modes

    set of plots and graphs describing the behaviour of themodel over time

    they define

    the variables of interest

    help setting the time horizon

    16

  • 7/14/2019 System Dynamics

    56/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Variables and parameters

    Everything changes, so everything is a variable

    Yet, some variables change so slowly that they are seen asconstants: parameters

    This is an artificial distinction, but often it is quite useful

    17

  • 7/14/2019 System Dynamics

    57/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Time horizon

    Very often we underestimate the length of the timehorizon

    Often we think of an immediate relationship betweencause and effect

    The choice of the temporal horizon affects our perceptionof the system

    18

    18

    Consumption

  • 7/14/2019 System Dynamics

    58/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    0

    6

    12

    1986 1988 1990 1992 1994 1996

    MillionBarrels/Day

    Alaska

    Production,Lower 48 States

    Imports

    0

    5

    10

    15

    20

    25

    30

    1986 1988 1990 1992 1994 1996

    1990

    $/bbl

    US oil production, consumption, imports, and price over a 10-year time horizonSource: EIA (US Energy Information Agency) Annual Energy Review.

    19

    18

  • 7/14/2019 System Dynamics

    59/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    0

    6

    12

    1870 1890 1910 1930 1950 1970 1990

    Millio

    nBarrels/Day

    Alaska

    Production,Lower 48 States

    Consumption

    Imports

    0

    10

    20

    30

    40

    50

    1870 1890 1910 1930 1950 1970 1990

    1990

    $/bbl

    US oil production, consumption, imports, and price over a 130-year time horizonSource: Production & consumption: 1870-1949, Davidsen (1988); 1950-1966, EIA Annual Energy Review.1880-1968, Davidsen (1988); 1968-1996, EIA Annual Energy Review, Refiners Acquisition Cost.

    20

    The fossil fuel era shown with a time horizon of 15 000 years

  • 7/14/2019 System Dynamics

    60/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    The fossil fuel era shown with a time horizon of 15,000 years

    Figure 3-5Source: Adapted from Hubbert (1962).

    -10000 -5000 0 5000

    FossilEner

    gy

    Production

    Year

    IronAge First Oil

    ShockIndustrial

    Revolution

    21

    S i h bl

  • 7/14/2019 System Dynamics

    61/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Structuring the problem

    We must formulate a theory explaining the behaviour ofthe system (the dynamic hypothesis)

    We need to provide an endogenousexplanation

    We need to map this explanation to the system structure

    22

    M d l b d h

  • 7/14/2019 System Dynamics

    62/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Model boundary chart

    extremely rare

    extremely useful: it allows to instantaneously visualise keymodel assumptions

    modellers fear these charts

    23

  • 7/14/2019 System Dynamics

    63/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Endogenous Exogenous Excluded

    GDP Population Inventories

    Consumption Tech change International tradeInvestment Tax rates Environ. constraints

    Savings Energy policies Nonenergy resourc.

    Prices Interfuel subst.

    Salaries

    Inflation rate

    Employment

    Interest rate

    Debt

    Energy production

    Energy demand

    Energy imports

    24

    S b d i i

  • 7/14/2019 System Dynamics

    64/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Subsystem decomposition

    25

    Company Market

    Mkt. Response to Quality

    Mkt. Response to Suitability

    Mkt. Response to Delivery Delay

    Mkt. Response to Price

    Orders

    Payment

    Delivery of Product

    Price

    Quality

    Delivery Delay

    Product Suitability

    Sales Effort

    M k t Competing

  • 7/14/2019 System Dynamics

    65/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Market

    Market Share

    Potential Market

    Process

    Improvement Quality Improvement

    Process Improvement

    Workforce Commitment

    Management Support

    ProductCosts

    New Product Development

    Breakthrough Products

    Line Extensions

    R&D Staff

    Development Projects

    NewProducts

    CompetitorPrice

    On TimeDelivery,Defects

    Orders

    ShipmentsPrice

    The irm

    Market Valueof the Firm

    Yield,Cycle Time

    Costs

    Hiring/Firing

    Investment

    Utilization

    ManagementAccounting

    Cost of Goods Sold

    Budget Variances

    Unit Costs

    FinancialStress

    Operating Income

    Labor Variances

    Takeover Threat

    Income Statement

    Balance Sheet

    Flow of Funds

    Financial

    AccountingR&D Spending

    Forecasted Revenue

    Desired Fraction to R&D

    Share Price

    Market Capitalization

    Financial Markets

    CompetingProducts

    Competitor

    Pricing

    Manufacturing

    Capital

    Labor

    Inventory

    26

    C l l

  • 7/14/2019 System Dynamics

    66/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Causal loops

    They describe the cause-effect relationships among systemvariables

    They allow to represent the structure of feedback insystems

    27

    St k d fl

  • 7/14/2019 System Dynamics

    67/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Stocks and flows

    They focus on the structural characteristics of a system.They highlight exchanges: mass, energy, information,money, ..

    Examples of stocks: inventories, populations, debt, ... wemake decisions on stocks

    Stocks represent the stateof a system

    Flows are the change rates of stocks

    28

    Fr m m del t sim lati n

  • 7/14/2019 System Dynamics

    68/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    From model to simulation

    Formalising the knowledge sheds light on what we reallyunderstand

    A computer does not work on hot air

    Ambiguities must be removed

    29

    Verification

  • 7/14/2019 System Dynamics

    69/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Verification

    The simulated behaviour is compared to the observed one

    Each variable must correspond to a real-world concept Each equation must be dimensionally correct

    The sensitivity of the model is tested, both with respect tothe parameters values and to the structure of the model

    30

    Verification

  • 7/14/2019 System Dynamics

    70/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Verification

    Models must be verified under extreme conditions:

    what happens to GNP if I set energy production to 0?

    what happens to my sales if I increase the price by1000%. And what if I set orders to zero?

    31

    Policy design

  • 7/14/2019 System Dynamics

    71/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Policy design

    Only models that pass the verification stage can be usedto design a policy or a control law

    The design of a policy might then require to change thestructure of the system, not only decisions

    The model will also be used to test the robustnessof thepolicy itself

    32

  • 7/14/2019 System Dynamics

    72/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Causal loopsA tool for systems thinking(Reference: Sterman, Chapter 5)

    1

    Causal loop diagrams

  • 7/14/2019 System Dynamics

    73/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Causal loop diagrams

    capture the hypotheses on the causes of the dynamicbehaviour of a system

    elicit our mental models

    communicate the feedback structure in our models

    2

    Causal loop diagram notation

  • 7/14/2019 System Dynamics

    74/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    BR

    Fractional

    Birth Rate

    Average

    Lifetime

    Death Rate

    -+ ++

    -

    Birth Rate Population

    +

    Key

    Example

    Birth Rate Population

    +

    Variable Variable

    Causal Link

    Link Polarity

    Loop Identifier: Positive (Reinforcing) Loop

    Loop Identifier: Negative (Balancing) Loop

    or

    or

    R

    B

    +

    -

    3

  • 7/14/2019 System Dynamics

    75/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Symbol Interpreta t ion Mathematics Examples

    X Y+

    All else equal, if X increases(decreases), then Y increases

    (decreases) above what it would havebeen.

    In the case of accumulations, X adds

    to Y.

    !Y/!X > 0

    In the case ofaccumulations,

    Y = (X + ... )ds + Yt0

    t0

    t

    Product

    Quality

    +Sales

    Effort

    +

    Results

    Births+Population

    X Y-

    All else equal, if X increases(decreases), then Y decreases

    (increases) below what it would havebeen.

    In the case of accumulations, X

    subtracts from Y.

    !Y/!X < 0

    In the case ofaccumulations,

    Y = (-X + ... )ds + Yt0t0

    t

    Product

    Price

    -Sales

    Frustration

    -

    Results

    Deaths

    -

    Population

    Link polarity: definitions and examples

    4

    Stocks

  • 7/14/2019 System Dynamics

    76/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Stocks

    They are not represented by causal loops

    There is no distinction between change rate andaccumulation

    For instance, a CLD cannot tell us if a population isincreasing or decreasing (see the figure in the CLD

    notation)

    5

  • 7/14/2019 System Dynamics

    77/268

    Andrea Rizzoli, DTI

    CLD howto

    6

    Caused /= Correlated

  • 7/14/2019 System Dynamics

    78/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Caused /= Correlated

    Correlations do not represent the structure of the system

    Correlations depend on the structure!

    7

  • 7/14/2019 System Dynamics

    79/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Average

    Temperature

    Murder

    RateIce Cream

    Sales

    + +MurderRate

    Ice CreamSales

    +

    CorrectIncorrect

    8

    Label link polarities

  • 7/14/2019 System Dynamics

    80/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Label link polarities

    R B

    Customer

    Loss Rate

    Customer

    Base

    Sales from

    Word of

    Mouth

    Customer

    Loss Rate

    Customer

    Base

    Sales from

    Word of

    Mouth

    -

    ++

    +

    Incorrect

    Correct

    9

    How to establish the polarity of a loop?

  • 7/14/2019 System Dynamics

    81/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    How to establish the polarity of a loop?

    How to discover whether a loop is balancing orreinforcing?

    Quick fix: count the number of negative links

    Right way: follow the effects of changes in a loop

    10

  • 7/14/2019 System Dynamics

    82/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Profits Number of

    Competitors

    Attractiveness

    of Market

    Price

    Cumulative

    Production

    Price

    Market

    Share

    Unit

    Costs

    Bank Cash

    Reserves

    Perceived

    Solvency of

    Bank

    Net

    Withdrawals

    Cleanup

    Effort

    Environmental

    Quality

    Pressure to Clean

    Up Environment

    Identify and label the polarity of the links and loops in the examples shown.

    11

    Calculating the open-loop gain of a loop

  • 7/14/2019 System Dynamics

    83/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Figure 5-6

    x4

    x3

    x2

    x1

    x4

    x3

    x2

    x1I x1

    OBreak the loop

    at any point

    and trace the effect

    of a change aroundthe loop.

    Polarity = SGN(!x1O/!x1I)

    !x1O/!x1

    I= (!x1O/!x4)(!x4/!x3)(!x3/!x2)(!x2/!x1

    I)

    12

  • 7/14/2019 System Dynamics

    84/268

    Andrea Rizzoli, DTI

    Causal links must have unambiguous polarity

    ? (+ or -)

    RevenuePrice

    CorrectIncorrect

    +

    RevenuePrice

    Sales+

    -

    13

    Labeling loops

  • 7/14/2019 System Dynamics

    85/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Labeling loops

    Labels are an effective communication medium

    They must bear a significance (simple numbers and digitswill not do)

    They must be easy to remember!

    14

    Name and number

    TimeRemaining

  • 7/14/2019 System Dynamics

    86/268

    Andrea Rizzoli, DTI

    your loops toincrease diagram

    clarity and providelabels.

    Haste MakesWaste

    R2

    CornerCutting

    B2

    Burnout

    R1

    MidnightOil

    B1

    Error Rate

    Time perTask

    SchedulePressure

    Overtime

    Fatigue

    Productivity

    CompletionRate

    Work

    Remaining

    -- -

    -

    +

    -

    +

    -

    +

    +

    -

    +

    Delay

    Delay

    15

    The role of delays

  • 7/14/2019 System Dynamics

    87/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    The role of delays

    Delays introduce inertia and oscillations

    They are fundamental to understand short andlong term effects of our decisions

    16

    Price Supply

    +Delay

    Gasoline

    Price +

  • 7/14/2019 System Dynamics

    88/268

    Andrea Rizzoli, DTI

    Different time delaysin the response of

    gasoline demand andexpenditures to price

    Discretionary

    Trips

    Density of

    Settlement Patterns,Development of NewMass Transit Routes

    ExpectedShort-Term

    Price

    Efficiency ofCars on Road

    Efficiencyof Cars on

    Market

    GasolineExpenditures

    Demand forGasoline

    -

    +

    +

    -+

    +-

    +

    +

    -

    +

    +

    +Car Pooling andUse of ExistingMass Transit

    Gasoline Price

    Gasoline Consumption

    Expenditures on Gasoline

    Time

    Delay

    Delay

    Delay

    Delay

    Delay

    Delay

    ExpectedLong-Term

    Price

    Vehicle Milesper Year

    17

    Variable names should be nouns or nounh

  • 7/14/2019 System Dynamics

    89/268

    Andrea Rizzoli, DTI

    phrases

    Figure 5-12

    Costs Price

    ++

    CorrectIncorrect

    Costs Rise Price Rises

    18

    Variable names should have a clear sense of

  • 7/14/2019 System Dynamics

    90/268

    Andrea Rizzoli, DTI

    direction

    Figure 5-13

    MentalAttitude

    +Feedback

    from the

    Boss

    Praise fromthe Boss

    Morale

    +

    CorrectIncorrect

    19

    Choose variables whose normal sense of

  • 7/14/2019 System Dynamics

    91/268

    Andrea Rizzoli, DTI

    Figure 5-14

    Choose variables whose normal sense ofdirection is positive.

    Costs Profit

    -

    Costs Losses

    +

    Criticism Unhappiness

    +

    Criticism Happiness

    -

    CorrectIncorrect

    20

    If your audience was confused by

  • 7/14/2019 System Dynamics

    92/268

    Andrea Rizzoli, DTI

    Figure 5-15 Make intermediate links explicit to clarify a causal relationship.

    MarketShare

    UnitCosts

    -

    Market

    Share

    Unit

    Costs

    Production

    Volume -

    ++ Cumulative

    ProductionExperience

    If your audience was confused by

    you might make the intermediate concepts explicit as follows:

    21

    D i d

    CorrectIncorrect

  • 7/14/2019 System Dynamics

    93/268

    Andrea Rizzoli, DTI

    Figure 5-16 Make the goals of negative loops explicit.

    B

    QualityImprovement

    Programs

    ProductQuality

    -

    +

    B QualityShortfall

    +

    +

    +-

    DesiredProductQuality

    ProductQuality

    QualityImprovement

    Programs

    B

    Cooling Rate +

    CoffeeTemperature

    B Temperature

    Difference

    +

    -+

    CoffeeTemperature

    CoolingRate

    RoomTemperature-

    -

    22

    Distinguish between actual and perceivedconditions.

  • 7/14/2019 System Dynamics

    94/268

    Andrea Rizzoli, DTI

    Figure 5-17

    Bias inReporting

    System

    ManagementBias TowardHigh Quality

    ManagementPerception of

    Product Quality

    ReportedProductQuality

    B

    QualityImprovement

    Programs

    QualityShortfall

    DesiredProduct

    Quality

    ProductQuality

    +

    -

    ++

    +

    +

    +

    +

    Delay

    Delay

    Delay

    Delay

    23

  • 7/14/2019 System Dynamics

    95/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation24

    Jackson Pollock, Number 1 (1948)

    Too much information ...

  • 7/14/2019 System Dynamics

    96/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    ... is no information

    our short term memory contains 7 +/- 2 elements

    we are not Jackson Pollock

    use small and handy diagrams

    use a diagram for each fundamental loop

    25

  • 7/14/2019 System Dynamics

    97/268

    Andrea Rizzoli, DTI

    The ant and thegrasshopper

    26

    ek

  • 7/14/2019 System Dynamics

    98/268

    Business Dynamics

    Figure 5-19Reference mode forthe ant strategy

    Time (weeks of the semester)0 13

    Assignment Rate Work Completion Rate

    Tasksperwee

    EnergyLevel(0-100%

    )

    Time (weeks of the semester)0 13

    Workweek

    Energy Level

    Grades

    Workweek(hours/wee

    k)

    100

    0

    Grades(0-100)

    100

    0

    Time (weeks of the semester)0 13

    Assignment Backlog

    Task

    s

    Work Completion Rate

    ek

  • 7/14/2019 System Dynamics

    99/268

    Business Dynamics

    Figure 5-20Reference modefor the

    grasshopperstrategy

    .

    Time (weeks of the semester)0 13

    Assignment Rate

    Tasksperwee

    Time (weeks of the semester)0 13

    Assignment Backlog

    Tas

    ks

    Time (weeks of the semester)0 13

    Workweek

    Energy Level

    Grades

    100

    0

    Workweek(hours/we

    ek)

    100

    0

    EnergyLevel(0-100%)

    Grades(0-100)

  • 7/14/2019 System Dynamics

    100/268

    Business Dynamics

    Figure 5-21 Basic control loopsfor the assignment backlog

    AssignmentBacklog

    AssignmentRate

    WorkCompletion

    Rate

    Effort Devotedto Assignments

    TimeRemaining

    DueDate

    Workweek

    Productivity

    B2

    CornerCutting+

    -

    -+

    +

    +

    +

    -

    -

    -+

    CalendarTime

    WorkPressure

    B1

    MidnightOil

    Assignment Work-+

  • 7/14/2019 System Dynamics

    101/268

    Business Dynamics

    Figure 5-22 Theburnout loop

    Assignment

    Backlog

    g

    RateWork

    Completion

    Rate

    Effort Devoted

    to Assignments

    Time

    Remaining

    Due

    Date

    Workweek

    Productivity

    B2

    CornerCutting

    R1

    Burnout

    +

    -

    -+

    +

    -+

    +

    +

    -

    -

    Calendar

    Time

    Delay

    Work

    Pressure

    Energy

    Level

    B1

    MidnightOil

    AssignmentRate

    WorkC l i

    -+

  • 7/14/2019 System Dynamics

    102/268

    Business Dynamics

    Figure 5-23 The tootired to think loop

    AssignmentBacklog

    Rate CompletionRate

    Effort Devotedto Assignments

    TimeRemaining

    DueDate

    Workweek

    Productivity

    Quality ofWork

    Grades

    B2

    CornerCutting

    R1

    Burnout

    R2

    Too Tiredto Think

    B3

    QualityControl

    -

    +

    -

    -+

    ++

    +

    +

    -+

    +

    +

    -

    -

    CalendarTime

    Delay

    WorkPressure

    EnergyLevel

    B1

    MidnightOil

    AssignmentRate

    Work-+

  • 7/14/2019 System Dynamics

    103/268

    Business Dynamics

    Figure 5-24 My dog ate myhomeworkParkinson!s Law

    AssignmentBacklog

    Rate CompletionRate

    Effort Devotedto Assignments

    TimeRemaining

    DueDate

    Workweek

    Productivity

    Quality ofWork

    Grades

    B2

    CornerCutting

    B1

    MidnightOil

    R1

    Burnout

    R2

    Too Tiredto Think

    B3

    QualityControl

    -

    +

    -

    -+

    ++

    +

    +

    -+

    +

    +

    -

    -

    Requests forExtensions

    +

    +

    B4

    My Dog AteMy Homework

    CalendarTime

    Delay

    WorkPressure

    EnergyLevel

    Work Pressure

  • 7/14/2019 System Dynamics

    104/268

    Business Dynamics

    Figure 5-25 Making the goal of a loop explicit. Adding the desired GPA and itsdeterminants.

    Satisfactionwith Grades

    Energy Level

    DesiredGPA

    Pressure forAchievement

    Effort Devoted

    to Assignments

    Quality ofWork

    Grades

    ++

    --

    +

    - +

    +

    + Quality ControlGoal Erosion

    B B

    Traffic jams

  • 7/14/2019 System Dynamics

    105/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    In Ticino:

    129 cars every 100 families

    22% of families has a public transport yearly ticket (44%in Switzerland)

    34

  • 7/14/2019 System Dynamics

    106/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    [0,-+P\CR + X]O $%%!N+)(70'(510,+ ](44 R'(,6 X B

    35

    The solution?

  • 7/14/2019 System Dynamics

    107/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Build new roads!

    Congestionand delays

    Build new roads

    This is an open loop!What really happens when we build new roads?

    36

    Road

    ConstructionDelay

  • 7/14/2019 System Dynamics

    108/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    TravelTime

    Highway

    Capacity

    TrafficVolume

    +

    +

    -

    Delay

    37

    R d +

  • 7/14/2019 System Dynamics

    109/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    TravelTime

    Highway

    Capacity

    Traffic

    Volume

    RoadConstruction

    DesiredTravel Time

    Pressure to

    ReduceCongestion

    B1

    CapacityExpansion

    +

    -+

    +

    +

    -

    Delay

    38

    Road

    Construction

    +

    Delay

  • 7/14/2019 System Dynamics

    110/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    TravelTime

    HighwayCapacity

    Traffic

    Volume

    DesiredTravel Time

    Pressure to

    Reduce

    Congestion

    B1

    Capacity

    Expansion

    Cars in

    Region

    Trips per

    Day

    Average

    Trip Length

    Attractiveness

    of Driving

    Populationand Economic

    Activity ofRegion

    Cars per

    Person

    Adequacy ofPublic Transit

    Public

    TransitRidership

    Public

    TransitFare

    Extra Miles

    Take theBus?

    -+

    +

    +

    -

    +

    ++

    -

    +

    +

    ++

    -

    -

    +

    +-

    Delay

    Delay

    B2

    B3

    B4

    DiscretionaryTrips

    39

    RoadConstruction

    +

    Delay

  • 7/14/2019 System Dynamics

    111/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    TravelTime

    HighwayCapacity

    TrafficVolume

    DesiredTravel Time

    Pressure toReduce

    Congestion

    B1

    Capacity

    Expansion

    Cars inRegion

    Trips perDay

    AverageTrip Length

    Attractivenessof Driving

    Populationand Economic

    Activity ofRegion

    Cars perPerson

    Adequacy of

    Public Transit

    PublicTransit

    Ridership

    PublicTransit

    Fare

    Move tothe Burbs

    Extra Miles

    Take theBus?

    Open theHinterlands

    -+

    +

    +

    -

    +

    ++

    -

    +

    +

    ++

    +

    +

    -

    -

    +

    +- -

    Delay

    DelayDelay

    R1

    B3

    B5

    B4

    Size of RegionWithin Desired

    Travel Time

    Discretionary

    Trips

    B2

    40

  • 7/14/2019 System Dynamics

    112/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    TravelTime

    Highway

    Capacity

    TrafficVolume

    RoadConstruction

    DesiredTravel Time

    Pressure to

    ReduceCongestion

    B1

    CapacityExpansion

    Cars inRegion

    Trips perDay

    AverageTrip Length

    Attractivenessof Driving

    Populationand Economic

    Activity ofRegion

    Cars perPerson

    Adequacy of

    Public Transit

    Public

    TransitRidership Public

    TransitRevenue

    PublicTransit

    Fare

    PublicTransitCosts

    PublicTransitDeficit

    PublicTransit

    NetworkMove to

    the Burbs

    Extra Miles

    Take theBus?

    Open theHinterlands

    RouteExpansion

    FareIncrease

    CostCutting

    Choke offRidership

    +

    -+

    +

    +

    -

    +

    ++

    -

    +

    +

    ++

    +

    +

    -

    -+

    -+

    +

    +

    -+

    +

    +- -

    +

    Delay

    DelayDelay

    Delay

    R1

    B3

    B5

    B4

    R3

    R2

    B7

    B6

    Size of RegionWithin DesiredTravel Time

    DiscretionaryTrips

    MT CapacityExpansion

    B8

    -

    Delay

    B2

    41

    Road

    Construction

    +

    D l

  • 7/14/2019 System Dynamics

    113/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    TravelTime

    Highway

    Capacity

    Traffic

    Volume

    Construction

    Desired

    Travel Time

    Pressure to

    Reduce

    Congestion

    B1

    CapacityExpansion

    Cars in

    Region

    Trips perDay

    Average

    Trip Length

    Attractiveness

    of Driving

    Population

    and EconomicActivity of

    Region

    Cars per

    Person

    Adequacy of

    Public Transit

    Public

    Transit

    Ridership Public

    TransitRevenue

    Public

    Transit

    Fare

    Public

    Transit

    Costs

    PublicTransit

    Deficit

    PublicTransit

    NetworkMove tothe Burbs

    Extra Miles

    Take theBus?

    Open theHinterlands

    RouteExpansion

    FareIncrease

    CostCutting

    Choke offRidership

    Can't Get Thereon the Bus

    -+

    +

    +

    -

    +

    ++

    -

    +

    +

    ++

    +

    +

    -

    - + - +

    +

    +

    -+

    +

    +- -

    +

    -

    Delay

    DelayDelay

    Delay

    B2

    R1

    B3

    B5

    B4

    R3

    R2

    B7

    R4

    B6

    Size of Region

    Within Desired

    Travel Time

    DiscretionaryTrips

    MT CapacityExpansion

    B8

    -

    Delay

    42

  • 7/14/2019 System Dynamics

    114/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Stocks and FlowsEssentials of systems dynamics

    (Reference: Sterman, Chapter 6)

    1

    Causal diagrams vs stocks and flows

  • 7/14/2019 System Dynamics

    115/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation2

    CLD and dynamics

  • 7/14/2019 System Dynamics

    116/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    CLD are the right tool to represent processinterdependencies

    They allow to capture mental models at the projectinception

    They are good to communicate project outcomes

    Yet, they do not capture the dynamics of the system

    Why?

    3

    Stocks

  • 7/14/2019 System Dynamics

    117/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    CLD do not represent accumulation, Stocks do

    Stocks characterise the state of the system (and we makedecisions based on the state)

    E.G.: the inventory of a company, the # of employees, thebalance on your checking account

    4

    Flows

  • 7/14/2019 System Dynamics

    118/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Flows change stocks

    Inventory is changed by the shipping rate

    # of employees is changed by hiring, layoffs andretirements

    Very often there are problems is deciding what is a flowand what is a rate (what about inflation?)

    5

    Notation

  • 7/14/2019 System Dynamics

    119/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Valve (regulates the flow)

    Stock

    Flow

    Sink or source(external stocks)

    6

    Example

  • 7/14/2019 System Dynamics

    120/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    flow names

    7

    The hydraulic metaphor

  • 7/14/2019 System Dynamics

    121/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation8

    From pics to math

  • 7/14/2019 System Dynamics

    122/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Levels accumulate flows

    9

    [flow]=[stock/time]

    d stock

    dt = in(t) out(t)

    stock(t) =

    t0 [

    in(s

    ) out

    (s

    )]ds

    +stock

    (t0)

    Measurement units

  • 7/14/2019 System Dynamics

    123/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Must be consistent:

    [stock]

    [flow]=[stock/time]

    10

    Stocks are for ...

  • 7/14/2019 System Dynamics

    124/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    characterising the state of the system

    providing memory and inertia generating delays

    decoupling flows rates and creating unbalances

    11

    Examples of stocks and flows

  • 7/14/2019 System Dynamics

    125/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Domain Stocks Flows

    Math, Physics, Engineering Integrals, state variables Derivatives, rates, flows

    Chemistry Reactants, products of

    reactions

    Reaction rates

    Manufacturing Buffers, inventories Throughput

    Economics Levels Rates

    Accounting Stocks, balance sheet items Cash flows, income items

    Biology, physiology Compartments Diffusion rates, flows

    Medicine, epidemiology Prevalence, reservoirs Incidence, infection

    mordbidit and mortalit

    12

    The snapshot test

  • 7/14/2019 System Dynamics

    126/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Have we selected the right stocks and flows?

    Lets imagine we take a snapshot of our system in a snapshot we can count stocks

    flows are invisible

    13

  • 7/14/2019 System Dynamics

    127/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation14

  • 7/14/2019 System Dynamics

    128/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation15

    Information as a stock

  • 7/14/2019 System Dynamics

    129/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation16

    Feedback

  • 7/14/2019 System Dynamics

    130/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    dxdt

    =!"x

    17

    Auxiliary variables

  • 7/14/2019 System Dynamics

    131/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Stocks can be modified only by flows

    Flows can be expressed as a function of auxiliary variables

    Auxiliary variables are either function of stocks or ofother auxiliary variables

    18

  • 7/14/2019 System Dynamics

    132/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Pop(t) = INTEGRAL(Net birth

    rate, Pop(t0))

    Net birth rate = Pop *

    f(Food/Pop)

    Pop(t) = INTEGRAL Net birth

    rate, Pop(t0))

    Net birth rate = Pop *

    Relative birth rate

    Relative birth rate =

    f(Food per capita)

    Food per capita= Food /

    Pop

    19

    Only flows change stocks

  • 7/14/2019 System Dynamics

    133/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation20

  • 7/14/2019 System Dynamics

    134/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation21

  • 7/14/2019 System Dynamics

    135/268

    Andrea Rizzoli, IDSIA

    Feedback dynamicsPart I - First order systems

    (Reference: Sterman, Chapter 8)

  • 7/14/2019 System Dynamics

    136/268

    Positive feedback andexponential growth

    2

  • 7/14/2019 System Dynamics

    137/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    State of theSystem

    Goal

    Time

    State of theSystem

    Time

    CorrectiveAction

    BDiscrepancy

    +

    -

    +

    Goal(Desired

    State of System)

    State of theSystem

    +

    RNet

    IncreaseRate

    State of theSystem

    +

    +

    3

    Positive feedback

  • 7/14/2019 System Dynamics

    138/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    In a first order systemwe only have one stock (statevariable)

    The stock accumulates net inflow

    4

    Analytical solution

  • 7/14/2019 System Dynamics

    139/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    S(t) = S(0)egt

    dS

    S

    = gdt

    dS

    dt= gS

    separate variables

    integrate by parts

    raise both sides

    Z S(t)S(0)

    dS

    S=

    Z t0

    gdz

    ln(S(t)

    ln(S(0

    )) =gt

    5

    Examples

  • 7/14/2019 System Dynamics

    140/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation6

    .dS/dt = Net Inflow Rate = gS

  • 7/14/2019 System Dynamics

    141/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Net

    InflowRate

    (u

    nits/time)

    State of the System (units)

    1

    g

    0

    0

    UnstableEquilibrium

    7

  • 7/14/2019 System Dynamics

    142/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    2

    4

    6

    8

    10

    0 128 256 384 512 640 768 896 1024

    Structure

    NetInflow

    (units/time)

    State of System (units)

    t = 1000

    t = 900

    t = 800

    t = 700

    0

    128

    256

    384512

    640

    768

    896

    1024

    0

    1.28

    2.56

    3.845.12

    6.4

    7.68

    8.96

    10.24

    0 200 400 600 800 1000

    Behavior

    StateoftheS

    ystem

    (Units)

    NetInflow

    (units/time)

    State of the System(left scale)

    Net Inflow(right scale)

    Time

    8

    Grasping the power of exponential growth

  • 7/14/2019 System Dynamics

    143/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    A sheet of paper is approximately 0.1 mm thick

    What is the thickness of the sheet after we have folded itonto itself for 40 times?

    9

    The 70s rule

  • 7/14/2019 System Dynamics

    144/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    As the stock increases, also the net inflow increases

    Avalanche effect: the stock doubles in a fixedamount oftime

    Doubling time: 2S(0) =S(0)egtd

    td= ln(2)

    gtd=

    70

    100g

    10

    2

    Time Horizon = 0.1td

    )

    2

    Time Horizon = 1td

    )

  • 7/14/2019 System Dynamics

    145/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    1000

    0 200 400 600 800 1000

    Time Horizon = 10td

    State

    ofth

    e

    System

    (units)

    0

    0 2 4 6 8 10

    State

    oftheSystem

    (units)

    0

    0 20 40 60 80 100

    StateoftheSy

    stem

    (units)

    0

    1 1030

    0 2000 4000 6000 8000 10000

    Time Horizon = 100td

    Stateofth

    e

    System

    (units)

    11

  • 7/14/2019 System Dynamics

    146/268

    Negative feedback andexponential decay

    12

    Negative feedback

  • 7/14/2019 System Dynamics

    147/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Just one state variable....

    Net outflow reduces the stock

    Net outflow: -d*SS(t) = S(0)edt

    13

  • 7/14/2019 System Dynamics

    148/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation14

    Net Inflow Rate = - Net Outflow Rate = - dS

  • 7/14/2019 System Dynamics

    149/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    1

    -d

    State of the System (units)0

    Stable

    Equilibrium

    NetIn

    flowRate

    (units/time)

    15

  • 7/14/2019 System Dynamics

    150/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    -5

    0

    0 20 40 60 80 100

    Structure

    NetInflow

    (units/time)

    State of System (units)

    t = 0

    t = 10

    t = 20

    t = 3 0

    t = 40

    0

    50

    100

    0

    5

    10

    0 20 40 60 80 100

    Behavior

    NetInflow

    (units/time)

    State of the System(left scale)

    Net Inflow(right scale)

    Time

    d=5% / time unit

    S(0)=100 units

    16

    Explicit goal

  • 7/14/2019 System Dynamics

    151/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    [Discrepancy] = units [State] = units

    [Inflow rate] = units/time

    [Adj. time] = time

    Dimensional analysis

    17

    I i l k h h i i i f h

    Adjustment time

  • 7/14/2019 System Dynamics

    152/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    It is also known as the characteristic timeof the system

    When the correction action is just a difference:

    18

    net inflow rate =

    Characteristic time

  • 7/14/2019 System Dynamics

    153/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    It represents how quickly the system reacts to adiscrepancy

    E.g.: desired inventory level: 100 SKU, current inventory 60SKU, discrepancy 40

    Adjustment time 1 week. We will get 40 units per week

    19

    Net Inflow

    SState of

    the System

    S*Desired State of

    the System

    dS/dt

    General Structure

  • 7/14/2019 System Dynamics

    154/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    B

    Rate

    +

    -

    ATAdustment Time

    -

    Discrepancy(S* - S)

    B

    Net

    ProductionRate

    Inventory

    +

    +

    DesiredInventory

    -

    Inventory

    Shortfall

    B

    Net HiringRate

    Labor

    +

    Desired

    Labor Force

    -

    LaborShortfall

    dS/dt = Net Inflow RatedS/dt= Discrepancy/ATdS/dt= (S* - S)/AT

    Net Production Rate = Inventory Shortfall/AT = (Desired Inventory - Inventory)/AT

    Net Hiring Rate = Labor Shortfall/AT = (Desired Labor - Labor)/AT

    Examples

    +

    +

    ATAdustment Time

    -

    AT

    Adustment Time

    -

    20

    Net Inflow Rate = - Net Outflow Rate = (S* - S)/AT

  • 7/14/2019 System Dynamics

    155/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    1

    -1/AT

    NetInflowRate

    (units/time)

    0

    S*State of the System

    (units)

    Stable

    Equilibrium

    21

  • 7/14/2019 System Dynamics

    156/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    100

    200

    0 20 40 60 80 100

    State

    oftheS

    ystem

    (units)

    22

    Analytical solution

  • 7/14/2019 System Dynamics

    157/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    z= SS

    dz

    z=

    dt

    !

    ln(z) + ln(z0) = t t0

    !

    z0

    z= e

    t

    t0!

    dSdt

    =(S

    S)!

    S

    S= (S

    S(0))e tt0

    S

    (t

    ) =S

    (S S

    (0))e 0

    23

    Error is halved when:

    Ha!f life

    SS

    5

  • 7/14/2019 System Dynamics

    158/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Error is halved when:

    .. but then:

    solving it

    we get

    Its the Rule of 70! Half time occurs at 70% of the characteristic time

    S S

    SS(0)=0.5

    0.5= e

    tt0!

    ln(2) = t t0

    !

    t=ln(2)!= 0.70!

    24

    ..

    Rate equation for first order linear negative loop system:

    Net Inflow Rate = Net Outflow Rate = (S* S)/AT

    Analytic Solution:

  • 7/14/2019 System Dynamics

    159/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    S(t) = S* (S* S(0)) * exp(t/AT)

    State ofthe System

    {InitialGap

    {Fraction ofInitial GapRemaining

    {Gap Remaining

    DesiredState of

    the System*=

    State ofthe System

    DesiredState of

    the System

    =

    Time (multiples ofAT)

    1 exp(1/AT)

    exp(1/AT)

    exp(3/AT)0

    0.2

    0.4

    0.6

    0.8

    0 1 AT

    Fractionof

    InitialGapRemaining

    1 - exp(3/AT)

    exp(2/AT)

    1 exp(2/AT)

    2 AT 3 AT

    1.0

    25

  • 7/14/2019 System Dynamics

    160/268

    Multi loop systems

    26

    System with positive AND negative feedback

  • 7/14/2019 System Dynamics

    161/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Population is the integral of netinflow

    Net inflow equals births less deaths

    dP

    dt= bPdP

    PopolazioneTasso di nascita Tasso di mortalit

    + -++

    Tasso dinascita relativo Tasso di

    mortalit relativo

    27

    Mortalit ratePopulation

    Fractional mortalityrateFractional birthrate

    Birth rate

    0Death

    Rates

    Net Birth Rate

    Birth Rate1

    b

    1 b-dation

    Structure (phase plot) Behavior (time domain)

    b > d Exponential Growth

  • 7/14/2019 System Dynamics

    162/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    Population

    Birth

    and

    D

    0

    Death Rate1

    0Time0

    Popul

    0

    Population

    Birth

    and

    Death

    Rat

    es

    0

    Death Rate

    Net Birth Rate

    Birth Rate

    0Time0

    Population

    0

    Population

    Birth

    and

    De

    ath

    Rates

    0

    Death Rate

    Net Birth Rate

    Birth Rate

    0Time0

    Popula

    tion

    b < d

    b = d

    Exponential Decay

    Equilibrium

    -d

    28

    Superposition property

  • 7/14/2019 System Dynamics

    163/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    It holds for linearsystems of every order and complexity

    System behaviour is the sum (or superposition) of thebehaviour of each subsystem

    29

  • 7/14/2019 System Dynamics

    164/268

    Non linear systems: S-shaped growth

    30

    Limits to growth

  • 7/14/2019 System Dynamics

    165/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Even the steepest growth are limited:

    food availability for a population of bugs # of people infected by a virus

    purchases of a new product

    31

    The models and its equations

  • 7/14/2019 System Dynamics

    166/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    dP

    dt=b(

    P

    C)Pd(

    P

    C)P

    PopolazioneTasso di nascita Tasso di mortalit

    + -++

    Capacit portante

    Popolazione /capacit portante

    -

    +

    Tasso di

    nascita relativo Mortalit relativa-

    +

    32

    Mortalit ratePopulation

    Birth rate

    Fractional birth

    rate

    Fractional death

    ratePopulation /

    Carrying capacity

    Carrying capacity

    ates

  • 7/14/2019 System Dynamics

    167/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    FractionalBi

    rthandDeath

    Ra

    (1/time)

    Population/Carrying Capacity(dimensionless)

    FractionalBirth Rate Fractional

    Death Rate

    FractionalNet Birth Rate

    0 1

    33

    Loop dominance

  • 7/14/2019 System Dynamics

    168/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Positive feedback dominates if the increment of a stock

    with respect to itself is positive

    Respectively, negative feedback dominates when:

    !S

    !S> 0

    !S

    !S< 0

    34

    Positive FeedbackDominant

    Negative FeedbackDominant

  • 7/14/2019 System Dynamics

    169/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    BirthandD

    eathRates

    (individu

    als/time)

    Population/Carrying Capacity(dimensionless)

    Birth Rate

    Death Rate

    Net Birth Rate

    0 StableEquilibriumUnstable

    Equilibrium

    (P/C)inf 1

    35

  • 7/14/2019 System Dynamics

    170/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    1

    2

    0

    Population

    Net Birth Rate

    0 Time

    Population/Carryin

    g

    Capacity

    Ne

    tBirth

    Rate

    36

    First order systems cannot oscillate

  • 7/14/2019 System Dynamics

    171/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Look closely at the phase plot

    Population grows up to a stable equilibrium

    If population leaves this stable equilibrium, it is stillforced to return to it

    We need two state variables (or a discrete differentialequation)

    37

  • 7/14/2019 System Dynamics

    172/268

    Modelling logisticgrowth

    38

    Logistic growth

  • 7/14/2019 System Dynamics

    173/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Net growth rate becomesnegative for P> C

    There are infinite curvesshowing an S-behaviour

    Logistic growth wasdiscovered by Franois

    Verhulst (1838)

    0

    BirthandDeathRa

    tes

    (individuals/time

    )

    Population/Carrying Capacity(dimensionless)

    Birth Rate

    Death Rate

    Net Birth Rate

    0 StableEquilibriumUnstable

    Equilibrium

    Positive FeedbackDominant

    (P/C)

    inf 1

    Negative FeedbackDominant

    39

    Mathematical model

  • 7/14/2019 System Dynamics

    174/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Net growth rate is a function of population

    40

    Net growth rate = dPdt

    =g(P, C)P =g

    1 PC

    P

    Compliance to S-shaped growth

  • 7/14/2019 System Dynamics

    175/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    The relative growth raterequirements for S-shapedgrowth are

    >0 for PC-70

    -60

    -50

    -40

    -30

    -20

    -10

    0

    10

    20

    0 0.5 1 1.5 2 2.5

    P/C

    Tasso

    netto

    dicrescita

    41

    dP

    P =g

    1

    P

    C

    More features

    The differential equation can be rewritten as:

  • 7/14/2019 System Dynamics

    176/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    q

    Maximum growth rate? P=C/2

    dPdt= g Pg P

    2

    C

    42

    Analytical solution

  • 7/14/2019 System Dynamics

    177/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Z dP1

    PC

    P= Z

    gdt

    Z CdP

    (CP)P=

    Z1

    P+

    1

    CP

    dP=

    Z gdt

    ln(P) ln(CP) =gt+ c

    ln(P) ln(CP) =gt+ ln(P(0)) ln[CP(0)]

    PCP

    = P(0)egtCP(0)

    P(t) = C1+

    CP(0) 1

    egt

    43

    0

    alNetGrowth

    Rate

    0 1

    g*

  • 7/14/2019 System Dynamics

    178/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Fractiona

    Population/Carrying Capacity(dimensionless)

    0

    NetGrowth

    Rate

    Population/Carrying Capacity(dimensionless)

    StableEquilibriumUnstable

    Equilibrium

    PositiveFeedbackDominant

    (P/C)inf

    = 0.5

    NegativeFeedbackDominant

    0 1

    0.0

    0.5

    1.0

    -4 -2 0 2 4

    0

    0.25

    Population(Left Scale)

    Net Growth Rate(Right Scale)

    Time

    Population/CarryingCapacity

    (dimens

    ionless)

    NetBirthRate/CarryingCapacity

    (1/time)

    PC

    = 11+exp[-g*(t -h)]

    g*=1,h =0

    44

  • 7/14/2019 System Dynamics

    179/268

    Andrea Rizzoli, IDSIA

    Feedback dynamicsPart II - Higher order systems: Growth and Collapse

    (Reference: Sterman, Chapter 9)

  • 7/14/2019 System Dynamics

    180/268

    Dynamics of epidemics

    2

    The SI model

    Epidemics display an S-growth followed by a steep decline

  • 7/14/2019 System Dynamics

    181/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Epidemics display an S-growth, followed by a steep decline

    S: susceptibles I: infected

    0

    100

    200

    300

    1/22 1/24 1/26 1/28 1/30 2/1 2/3

    Patients

    confined

    to

    bed

    0

    250

    500

    750

    1000

    0 5 10 15 20 25 30

    Deaths

    (people/week)

    Weeks

    Influenza in UK Plague in India (1905-6)

    3

    Model hypotheses

  • 7/14/2019 System Dynamics

    182/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Births and deaths are unaccounted Migrations are unaccounted

    Population is supposed to be homogeneous

    Once sick, theres no healing Interactions in the community are not altered by the

    epidemics

    No quarantine

    4

    Model structure

  • 7/14/2019 System Dynamics

    183/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    SusceptiblePopulation S

    InfectiousPopulation I

    InfectionRate

    + +

    Infectivity iContactRate c

    ++

    B R

    TotalPopulation N

    -

    Depletion Contagion

    5

    Model equations

  • 7/14/2019 System Dynamics

    184/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    dS

    dt=(ciS)

    I

    N=IR

    S+I= N

    S: susceptible populationI: infected populationN: total

    i: infectivity - prob. of falling ill after a contactc: contact rate [contacted persons / person * time unit]

    Infection rate

    6

    Relationship to logistic growth

  • 7/14/2019 System Dynamics

    185/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    By substituting S = I - N:

    that is the equation for logistic growth

    while infected population grows logistically, infection rate(IR) grows and then collapses

    7

    dI

    dt

    = ci I1 I

    N

    Current

    Infection Rate40

    30

    20

  • 7/14/2019 System Dynamics

    186/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    10

    0Infectious Population I1,000

    750

    500

    250

    0Susceptible Population S

    1,000

    750

    500

    250

    00 30 60 90 120

    Time (Day)

    Contact Rate cCurrent: 2

    Infectivity i

    Current: 0.5

    Total Population N

    Current: 10,000

    8

    The SIR model

  • 7/14/2019 System Dynamics

    187/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Useful to model highly infective diseases

    S: susceptibles I: infected

    R: recovered

    9

    Model hypoteheses

  • 7/14/2019 System Dynamics

    188/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Developed by Kermack e McKendrik (1927)

    It relaxes the SI hypotheses that once ill no recovery ispossible

    Some epidemics stop because the recovery rate is higherthan the infection rate

    ... or because the death rate is higher than the infectionrate ... (e.g. Ebola)

    10

    Model structure

  • 7/14/2019 System Dynamics

    189/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    SusceptiblePopulation S

    InfectiousPopulation I

    InfectionRate

    + +

    Infectivity i

    Contact Rate c

    ++

    B R

    RecoveredPopulation R

    RecoveryRate

    +

    Average Duration

    of Illness d

    -

    B

    Total Population N

    -

    Depletion ContagionRecovery

    Initial InfectiousPopulation

    11

    Model equations

    dS= (ciS)

    ISusceptible population

  • 7/14/2019 System Dynamics

    190/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    dt=(ciS)

    N

    RR=I

    d

    dI

    dt = (ciS

    )

    I

    N

    I

    d

    dR

    dt=

    I

    d

    Susceptible population

    Recovery rated: average illness duration

    Infected population

    Recovered population

    S+I+R= N Total population

    12

    Model analysis

  • 7/14/2019 System Dynamics

    191/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    An epidemic is a disease that appears over a period in aproportion higher than expected

    When can we observe an epidemic in our model?

    It depends on the dominating loop In the positive loop the parameters are the contact rate

    (c) and infectivity (i)

    Also the illness duration has an impact: the longer, thehigher probability of an epidemic

    13

    The tipping point

    2500

    Rates

  • 7/14/2019 System Dynamics

    192/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Which is the point beyond wehave an epidemic?

    Which is the parametersetting that pushes oursystem away from stability(noepidemics) to instability(epidemic explosion)?

    14

    0

    500

    1000

    1500

    2000

    0 4 8 12 16 20 24

    Infection

    and

    Recovery

    R

    (people/day)

    Days

    InfectionRate

    RecoveryRate

    0

    2500

    5000

    7500

    10000

    0 4 8 12 16 20 24

    Suscep

    tible

    Population

    (people)

    Days

    Susceptible

    Infectious

    Recovered

    Computing the tipping point

  • 7/14/2019 System Dynamics

    193/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Tipping occurs when the infection rate is greaterthan the recovery rate

    IR > RR

    ciS(1/N) > I/d

    cid (S/N) > 1

    contact number

    reproduction rate

    15

    c < 2

  • 7/14/2019 System Dynamics

    194/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    2500

    5000

    7500

    10000

    0 10 20 30 40 50 60

    Susceptible

    Po

    pulation

    (people)

    Days

    c = 6

    c = 3

    c = 2.5c = 2

    16

    25

  • 7/14/2019 System Dynamics

    195/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    00 1

    Contac

    tNumber(cid)

    (dim

    ensionless)

    Susceptible Fraction of Population (S/N)(dimensionless)

    No Epidemic

    (Stable; negative loops dominant)

    Epidemic(Unstable; positive loop dominant)

    cid(S/N) = 1

    17

  • 7/14/2019 System Dynamics

    196/268

    Innovation as infection

    18

    How do ideas spread?

  • 7/14/2019 System Dynamics

    197/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Diffusion of new ideas and products often follow an S-shaped growth

    We can imagine they spread like epidemics

    But which is the structure of their dynamics? Whichfeedbacks are there?

    Can we use System Dynamics to our advantage toimprove our marketing skills?

    19

    100US Cable Television Subscribers

  • 7/14/2019 System Dynamics

    198/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    2 5

    5 0

    7 5

    100

    1950 1960 1970 1980 1990 2000

    % of Households with TVSubscribing to Cable

    Cable Subscribers(Million Households)

    20

    Lets adapt the SI model

  • 7/14/2019 System Dynamics

    199/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    PotentialAdopters P

    Adopters A

    Adoption

    Rate

    + +

    Adoption

    Fraction i

    ContactRate c

    +

    +

    B R

    TotalPopulation N

    -

    MarketSaturation

    Word ofMouth

    21

    The spread of VAX minicomputers

    3000

  • 7/14/2019 System Dynamics

    200/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    1000

    2000

    3000

    1981 1983 1984 1986 1988

    Sales Rate

    Units/Year

    0

    2000

    4000

    6000

    8000

    1981 1983 1984 1986 1988

    Cumulative Sales(! Installed Base)

    Units

    22

    Parameter estimation

  • 7/14/2019 System Dynamics

    201/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    C1989= 7600 Solution of the logistic growth model

    from which:

    but C=S+P, then C-P=S

    we can estimate g using the least squares algorithm

    P

    CP=

    P(0)egt

    CP(0)

    ln P

    C

    P=ln

    P(0)

    C

    P(0

    )+gt

    lnP

    S=ln

    P(0)

    S(0

    )+gt Logit transformation

    23

    0 1

    1

    10

    100

    1000

    s/PotentialAdopters

    mensionless)

    Data

    Estimated Ratio of A/P(Adopters/Potential Adopters):

    ln(A/P) = -5.45 + 1.52(t - 1981); R2= .99

  • 7/14/2019 System Dynamics

    202/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0.001

    0.01

    0.1

    1981 1983 1984 1986 1988

    Adop

    ters(di

    Regression

    0

    2000

    4000

    6000

    8000

    1981 1983 1984 1986 1988

    Cumulative Sales(!Installed Base)

    Units

    EstimatedInstalled Base

    0

    1000

    2000

    3000

    1981 1983 1984 1986 1988

    Sales Rate

    Unit

    s/Y

    ear

    Estimated

    Sales Rate

    24

    A word of wisdom ...

  • 7/14/2019 System Dynamics

    203/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    0.1

    0.2

    0.3

    0 10 20 30 40 50 60

    Frac

    tionalGrowth

    Rate(1/years)

    Cable Subscribers(million households)

    Data

    Best Linear Fit

    (g = 0.18 - 0.0024S; R2= .52)

    0

    25

    50

    75

    100

    1950 1960 1970 1980 1990 2000 2010

    Estimated Cable

    Subscribers

    Cable Subscribers

    Million

    Hous

    eholds

    25

    150

  • 7/14/2019 System Dynamics

    204/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    50

    100

    150

    1950 1960 1970 1980 1990 2000 2010 2020

    Estimated CableSubscribers,

    Gompertz Model

    Cable Subscribers

    Estimated CableSubscribers,

    Logistic ModelMillionH

    ouseholds

    26

    Bass diffusion model (1969)

    In all growth models zero is an equilibrium. How is itpossible that a new product starts spreading?

  • 7/14/2019 System Dynamics

    205/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    possible that a new product starts spreading?

    Bass introduced the effect of advertisement (direct andindirect)

    27

    PotentialAdopters P

    Adopters A

    Adoption

    Rate AR

    AdoptionFraction i

    ContactRate c

    B R

    TotalPopulation N

    AdvertisingEffectiveness

    a

    MarketSaturation

    Word ofMouth

    Adoptionfrom

    Advertising

    Adoptionfrom Word of

    Mouth

    +

    ++

    +

    +

    +

    +-

    +

    B

    MarketSaturation

    Model equations

  • 7/14/2019 System Dynamics

    206/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Adoption rate:

    AR = Ads + Word of Mouth

    Advertisement = aP Word of mouth (infection) = ciP(A/N)

    AR= aP + ciP(A/N)

    if A=0 (no early adopters), the only input is advertisement

    28

    4000

    6000

    8000

    Cumulative Sales(! Installed Base)

    Units

    Logistic Model

    Bass Model

  • 7/14/2019 System Dynamics

    207/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    2000

    1981 1983 1984 1986 1988

    0

    1000

    2000

    3000

    1981 1983 1984 1986 1988

    Sales Rate

    Units/Year

    Logistic Model

    Bass Model

    0

    1000

    2000

    3000

    1981 1983 1984 1986 1988

    Sales Rate

    Units/Year

    Sales fromWord of Mouth

    Sales from Advertising

    29

    If we use the Logistic growthmodel we need to initialisewith a value /= 0

    2000

    4000

    6000

    8000

    Cumulative Sales(! Installed Base)

    Units

    Logistic Model

    Bass Model

  • 7/14/2019 System Dynamics

    208/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Logistic growthunderestimates sales at thebeginning (no ads!) andoverestimates the sales peak

    Bass model has beensuccessfully applied to varioussectors

    30

    0

    2000

    1981 1983 1984 1986 1988

    0

    1000

    2000

    3000

    1981 1983 1984 1986 1988

    Sales Rate

    Units/Year

    Logistic Model

    Bass Model

    0

    1000

    2000

    3000

    1981 1983 1984 1986 1988

    Sales Rate

    Units/Yea

    r

    Sales fromWord of Mouth

    Sales from Advertising

    The Bass andlogistic diffusionmodels comparedto actual VAXsales

  • 7/14/2019 System Dynamics

    209/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Feedback DynamicsPart III - Higher order systems: delays and oscillations

    (Reference: Sterman, Chapters 11 and 17)

    1

  • 7/14/2019 System Dynamics

    210/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Modelling delaysFriends or foes?

    2

    Definition

  • 7/14/2019 System Dynamics

    211/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    A delayis a process the output of which is shifted in timewith respect to the input

    3

    DelayInput Output

    -5.00

    -3.75

    -2.50

    -1.25

    0

    1.25

    2.50

    3.75

    5.00

    time

    Examples

  • 7/14/2019 System Dynamics

    212/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    Materiale intransito

    Lettere intransito

    Tasso di afflusso Tasso di deflusso

    Tasso di spedizione Tasso di consegna

    General structure of a delay

    A post office as a delay

    4

    Material intransit

    Inflow rate Outflow rate

    Letters intransit

    Mailing rate Delivery rate

    Structure of delays

  • 7/14/2019 System Dynamics

    213/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Delays model/approximate a dynamic process The outflow might depend on available resources Sometimes it can be assumed that the delay is

    independentand therefore depends only on past inflows(pure delays)

    Modelling a delay requires to determine:1. the average delay length

    2. the distribution around the average?

    5

    Average delay length

  • 7/14/2019 System Dynamics

    214/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    It is the average residence time: how long does it take foran element to go through the system

    Examples:

    First class postage (Posta A): ~ 1 day EMails: few seconds

    Such data are obtained empirically

    6

    200

    Distribution of the output

  • 7/14/2019 System Dynamics

    215/268

    Andrea Rizzoli, DTI Modelling, Simulation, and Optimisation

    0

    50

    100

    150

    0 1 2 3

    %o

    fUnitPulse/TimePeriod

    Time (multiples of average delay time)

    Inflow

    B

    C

    D

    Outflow A

    This is actually computing the impulseresponse

    7

    Impulse response

  • 7/14/2019 System Dynamics

    216/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    An impulseis analogous to mailing 1000 letters at once orto pouring a mass of material in a pulp processing system

    and so on

    Mathematically, in continuous time, is a Diracdelta

    !(t,T) = limW0

    !(t,T,W) =

    0 per t T

    1/Wpert T+W0 per t T+W

    8

    Impulse response

    150

    200

    Period Inflow Outflow A

  • 7/14/2019 System Dynamics

    217/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    In all cases the residence mean time is the same. Yet weobserve different behaviours

    A. elements leave in the same order as they entered B, C, and D: various degrees of mixing

    9

    0

    50

    100

    150

    0 1 2 3

    %o

    fUnitPulse/Time

    P

    Time (multiples of average delay time)

    B

    C

    D

    Service discipline

  • 7/14/2019 System Dynamics

    218/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    It defines the way units are processed

    FIFO LIFO Intermediate disciplines (even random)

    10

    Pipeline delay

  • 7/14/2019 System Dynamics

    219/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    Also known as transport delay

    Constant delay time = D

    Materiale intransito

    Tasso di afflusso Tasso di deflusso

    Tempo mediodi ritardo

    11

    Material intransitInflow rate Outflow rate

    Average delaylength

    d(Material in transit)

    dt = inflow(t) outflow(t)

    outflow t = inflow t

    D

    First order delay

    Mixing and changes in processing times of individualelements

  • 7/14/2019 System Dynamics

    220/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    First order delays: perfect mixing

    12

    outflow = materia in transit

    D

    50

    75

    100Delay Inflow and Outflow

    se/TimePeriod

  • 7/14/2019 System Dynamics

    221/268

    Andrea Rizzoli, IDSIA Modelling, Simulation, and Optimisation

    0

    25

    50

    0 1 2 3

    %o

    fUnitPuls

    Time (multiples of average delay time)

    Inflow Outflow

    0

    25

    50

    75

    100

    0 1 2 3

    Stock of Material in Transit

    MaterialinTransit

    (%o

    fpulsequantity)