the exploratory modeling workbench - dmdu society · the workbench. the first idea which underpins...

35
The Exploratory Modeling Workbench An open source toolkit for exploratory modeling, scenario discovery, and (many objective) robust decision making Jan H. Kwakkel

Upload: others

Post on 26-Jan-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

  • The Exploratory Modeling WorkbenchAn open source toolkit for exploratory modeling,

    scenario discovery, and (many objective) robust

    decision making

    Jan H. Kwakkel

  • Online resources

    code: https://github.com/quaquel/EMAworkbench

    documentation: http://emaworkbench.rtfd.io/en/latest/?badge=latest

    demo: https://github.com/quaquel/lake_problem

    Many of my recent papers are open access and have online resources, so

    check the repositories of my github account (https://github.com/quaquel)

    Also check out https://waterprogramming.wordpress.com

    https://github.com/quaquel/EMAworkbenchhttp://emaworkbench.readthedocs.io/en/latest/?badge=latesthttps://github.com/quaquel/lake_problemhttps://github.com/quaquelhttps://waterprogramming.wordpress.com

  • XLRM framework

  • Running a model as a function

    X : uncertainties

    • Model structure uncertainties as well as exogenous forces

    • Continuous or categorical

    L : policies

    • Policies to be tested over the uncertainties

    M : outcomes

    • Outcomes of interest, scalar or time series

    J.H. Kwakkel / The Exploratory Modeling Workbench An open source toolkit for exploratory modeling, scenario discovery, and (multi-objective) robust decision making

    interesting differences in the approach taken to supporting exploratory modeling. The workbench is

    implemented in Python. It currently runs under Python 2.7, although an increasing part of the code is Python 3 compliant. The code is available under an open source license, and can be found online on

    Github. The remainder of this paper is structured accordingly. Section 2 introduces a theoretical framework that underpins the design of the exploratory modeling workbench. Section 3 discusses the design and

    key implementation details of the workbench, as well as a compare and contrast with some of other

    available open source tools for mode-based decision support under deep uncertainty. Section 4 demonstrates the use of the workbench for the Lake Problem (Lempert and Collins 2007, Hadka,

    Herman et al. 2015, Singh, Reed et al. 2015, Ward, Singh et al. 2015). Section 5 contains some concluding remarks and a discussion of future extensions.

    2 Framework A variety of analytic model-based approaches have been put forward in recent years to address the

    problem of deep uncertainty in model based decision support. These include, amongst others, Robust Decision Making, Multi-Objective Robust Decision Making, Dynamic Adaptive Policy Pathways, Info-Gap Decision Theory, Real Options Analysis, and Decision Scaling. An idea common to these various approaches is to use models to explore the consequences of the resolution of the various uncertain

    factors, rather than using models for predictive purposes. That is, these approaches built on the idea

    of exploratory modeling (Bankes 1993, Bankes, Walker et al. 2013, Weaver, Lempert et al. 2013).

    There are three key ideas that jointly underpin the design of the exploratory modeling workbench.

    These are the XLRM framework, running simulation models as if they are a function, and a taxonomy of robustness frameworks. We now elaborate these three ideas and how they influence the design of

    the workbench.

    The first idea which underpins the workbench is the system diagram (Walker 2000), or XLRM

    framework (Lempert, Popper et al. 2003). This diagram is shown in Figure 1, where X stands for the exogenous or external factors. These are factors that are outside the control of the decision-makers. L stands for policy levers. R stands for relationships inside the system, and M stands for performance

    metrics or outcomes of interest. In the workbench, this framework is used to structure the exploratory modeling. Exogenous factors are presented as uncertainties, policy levers are presented as policies,

    model structures represent relationships, and performance metrics are presented by outcomes.

    Figure 1. The XLRM framework

    The second key idea behind the design of the workbench is the idea of running a simulation model as

    if it where a subroutine. Adopting the XLRM notation, a simulation model is simply a function called

    with a set of parameters ! and ! . The return of the function is a set of outcomes of interest ! . So

    ! ! , ! = ! In the workbench, there is an interface between the actual simulation model and the workbench. This

    interface enables running the simulation model as if it where a function. This enables the workbench to interface with any modeling or simulation package that exposes some kind of API. For example,

  • Generation of Policies

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Pre-specifiedexpert opinion,

    standardized

    Iterativestress test and

    refine

    Generation of Scenarios

    Pre-specifiedexpert opinion,

    standardized

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Robustness Measures

    OutcomesDescriptive

    statics

    Regretcomparing

    alternatives

    Satisficingperformance

    thresholdRelationships within

    the system

    Vulnerability Analysis

    Sensitivity analysisFactor prioritization and factor

    fixing

    Subspace partitioning scenario discovery and

    adaptation tipping points

  • Generation of Scenarios

    Pre-specifiedexpert opinion,

    standardized

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization Relationships within the system

  • Generation of Policies

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Pre-specifiedexpert opinion,

    standardized

    Iterativestress test and

    refine

    Relationships within the system

  • Generation of Policies

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Pre-specifiedexpert opinion,

    standardized

    Iterativestress test and

    refine

    Generation of Scenarios

    Pre-specifiedexpert opinion,

    standardized

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Robustness Measures

    OutcomesDescriptive

    statics

    Regretcomparing

    alternatives

    Satisficingperformance

    thresholdRelationships within

    the system

  • Robustness

    Regret

    Comparison amongst policy

    options

    Satisficing

    Performance threshold on

    outcomes

    Descriptive statistics

    Moments of the distribution of

    outcomes over the scenarios

    McPhail et al (2018) 10.1002/2017EF000649

  • Generation of Policies

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Pre-specifiedexpert opinion,

    standardized

    Iterativestress test and

    refine

    Generation of Scenarios

    Pre-specifiedexpert opinion,

    standardized

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Robustness Measures

    OutcomesDescriptive

    statics

    Regretcomparing

    alternatives

    Satisficingperformance

    thresholdRelationships within

    the system

    Vulnerability Analysis

    Sensitivity analysisFactor prioritization and factor

    fixing

    Subspace partitioning scenario discovery and

    adaptation tipping points

  • Subspace Partitioning Scenario Discovery

    Greeven et al (2016) 10.18564/jasss.3134

  • ROBUSTNESS

    FRAMEWORKS

  • Multi-Objective Robust Decision Making

    (MORDM)

    Introduced by Kasprzyk (2013) as

    an extension of RDM

    Uses an MOEA to determine potentially

    robust policy alternatives

    Policy selection is based on performance

    in a single reference scenario

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with a single

    reference scenario

    3. Uncertainty Analysis

    4. Scenario Discovery

  • Multi-Objective Robust Decision Making

    (MORDM)

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with a single

    reference scenario

    3. Uncertainty Analysis

    4. Scenario Discovery

  • Multi-Objective Robust Decision Making

    (MORDM)

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with a single

    reference scenario

    3. Uncertainty Analysis

    4. Scenario Discovery

  • Multi-Objective Robust Decision Making

    (MORDM)

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with a single

    reference scenario

    3. Uncertainty Analysis

    4. Scenario Discovery

  • Multi-scenario MORDM

    Extension of MORDM

    (e.g. Watson & Kasprzyk, 2017)

    Updates the search phase to consider

    multiple reference scenarios

    Goal is to discover a more diverse set of

    potentially robust policy alternatives

    Reference scenario selection based on

    vulnerabilities found through MORDM

    4 scenarios that are maximally diverse

    (e.g. Eker & Kwakkel, 2018)

    Selected from sample of uncertainties in

    the vulnerable region

    2b. Reference Scenario Selection

    3. Computational Experimentation3. Computational Experimentation3. Uncertainty Analysis

    2b. Policy Alternative

    Determination

    2b. Policy Alternative

    Determinationç

    2c. Policy Alternative

    Determination

    1. Model Specification

    2a. MORDM to determine weaknesses in identified policies

    through Scenario Discovery

    3. Computational Experimentation3. Computational Experimentation4. Scenario Discovery

  • Multi-scenario MORDM

    Extension of MORDM

    (e.g. Watson & Kasprzyk, 2017)

    Updates the search phase to consider

    multiple reference scenarios

    Goal is to discover a more diverse set of

    potentially robust policy alternatives

    Reference scenario selection based on

    vulnerabilities found through MORDM

    4 scenarios that are maximally diverse

    (e.g. Eker & Kwakkel, 2018)

    Selected from sample of uncertainties in

    the vulnerable region

    2b. Reference Scenario Selection

    3. Computational Experimentation3. Computational Experimentation3. Uncertainty Analysis

    2b. Policy Alternative

    Determination

    2b. Policy Alternative

    Determinationç

    2c. Policy Alternative

    Determination

    1. Model Specification

    2a. MORDM to determine weaknesses in identified policies

    through Scenario Discovery

    3. Computational Experimentation3. Computational Experimentation4. Scenario Discovery

  • Multi-Objective Robust Optimization

    (MORO)

    The search phase now selects policy

    alternatives based on robust outcomes

    Robustness determined by testing each

    candidate policy on a static set of scenarios

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with robustness

    considerations and multiple scenarios

    3. Uncertainty Analysis

    4. Scenario Discovery

  • Multi-Objective Robust Optimization

    (MORO)

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with robustness

    considerations and multiple scenarios

    3. Uncertainty Analysis

    4. Scenario Discovery

  • 1. Model Specification

    2. Policy Alternative Determination, using an MOEA with robustness

    considerations and multiple scenarios

    3. Uncertainty Analysis

    4. Scenario Discovery

    2b. Reference Scenario Selection

    3. Computational Experimentation3. Computational Experimentation3. Uncertainty Analysis

    2b. Policy Alternative

    Determination

    2b. Policy Alternative

    Determinationç

    2c. Policy Alternative

    Determination

    1. Model Specification

    2a. MORDM to determine weaknesses in identified policies

    through Scenario Discovery

    3. Computational Experimentation3. Computational Experimentation4. Scenario Discovery

    1. Model Specification

    2. Policy Alternative Determination, using an MOEA with a single

    reference scenario

    3. Uncertainty Analysis

    4. Scenario Discovery

    MORDM MOROMulti-scenario MORDM

  • THE EMA WORKBENCH

  • The workbench

    Implemented in Python

    • Support Python 2 and Python 3, new developments are Python 3

    only.

    • Works with both 32 and 64 bit Python

    • Designed for use with Jupyter notebooks

    Packages

    • em_framework: the core classes and functions for defining an

    interface to a model, setup the experiments, and execute them.

    Support is available for parallelization on single machine as well

    as for clusters

    • analysis: visual analytics and vulnerability analysis techniques

    • util: saving, loading, logging

    • connectors: ready made connectors for Vensim, Netlogo, and

    Excel

  • Online resources

    code: https://github.com/quaquel/EMAworkbench

    documentation: http://emaworkbench.rtfd.io/en/latest/?badge=latest

    demo: https://github.com/quaquel/lake_problem

    Many of my recent papers are open access and have online resources, so

    check the repositories of my github account (https://github.com/quaquel)

    Also check out https://waterprogramming.wordpress.com

    https://github.com/quaquel/EMAworkbenchhttp://emaworkbench.readthedocs.io/en/latest/?badge=latesthttps://github.com/quaquel/lake_problemhttps://github.com/quaquelhttps://waterprogramming.wordpress.com

  • THE LAKE PROBLEM

  • Decision problem: what is a robust rule for determining the

    annual anthropogenic pollution?

    • Maximize utility

    • Maximize reliability

    • Maximize inertia

    • Minimize maximum pollution

    3.4 Problem and Policy Configuration

    As themodelspecific

    a

    tion,uncertaintyanalysis,andscenariodiscoveryprocessesareallconstant

    across thethreemethods,this researchwillbeexaminingtheimpactofconsideringrobustness in

    thepolicyalternativedeterminationstepofanRDM-basedmethodfordecisionsupport.

    3.4 Problem and Policy Configuration

    This sectionwillprovidebackgroundonthestylizedproblemusedinthis study.Itwillalsoexplore

    commonlyusedpolicyimplementationstructures,inanefforttoselectasubsetofimplementation

    structuresthatcanbeusedtotesttheanalyticpowerofeachrobustdecisionsupportmethod.

    3.4.1 The lake problem

    InordertocomparethemethodsdescribedinSection3.3,theremustbeausableproblemthatis

    representativeofthedesiredbehavior.Thetypeofwickedproblemunderconsiderationhasbeen

    identifie

    d

    as includingdeepuncertainty,athresholdpointofnoreturn,wherebehaviorofthesys-

    temchangesdramatically,andtheconsiderationofmanydecisionmakers withmultipleconflic ting

    criteria.Whatisknownas theshallow lakeproblem,acommonreferenceprobleminpolicyanaly-

    sis research,incorporatesallofthesecharacteristics.This problem,developedintoapolicyanaly-

    sis probleminitiallyby(Carpenter,Ludwig,&Brock,1999),isahighlystylizeddecisionproblemin

    whichatownmustdecidetheamountofpollutiontoreleaseintoanearbyshallow lakeovertime.As

    Fig.3.7illustrates,thishypotheticalprobleminvolvestwosourcesofpollution:anthropogenicpol-

    lutiongeneratedbythetownthroughindustrialandagriculturalwaste,andnaturalinflow s thatare

    uncontrollableandcomefromtheenvironment.Thereisalsoanaturaloutflow processbasedonthe

    capabilityofthelaketorecycleresourcesthatiscapableofnaturallyreducingpollutionovertimein

    thelake(Hadkaetal.,2015).

    Figure3.7:Illustrationofpollutionflow s inlakemodel

    Throughtheinflow andoutflow processes,thelake’swaterqualitywillshiftbetweentwostates(Car-

    penteretal.,1999):

    — Oligotrophicequilibrium,withlow algaeproduction,highoxygencontent,andthereforehigh

    fis

    h

    countsanddrinking-waterquality

    — Eutrophicequilibrium,withhighlevelsofalgaeproductionandthereforelowerfish countsand

    drinking-waterquality.A lakeintheeutrophicstatereducestheeconomicbenefitofthelake

    tothenearbytown.

    PollutionlevelsaredeterminedthroughEq.(3.1),whereXrepresentstheconcentrationofpollution

    inthelake,aistheanthropogenicpollutioninputforthetimeperiod,Yreferstothenaturalinflow s of

    pollution,qindicatestherecyclingrateatwhichpollutionisremovedfromthelakethroughrecycling

    bythelake’s sediment,andbrefers totheloss ofpollutionfromthelakethroughnaturaloutflow s .

    24

  • Code of the lake model

    https://emaworkbench.readthedocs.io

    → general introduction

    Or

    ./site_packages/ema_workbench/examples/lake_model_dps.py

    → search for lake_model_dps.py in your file browser

    https://emaworkbench.readthedocs.io/

  • RECAP

  • XLRM framework

  • Running a model as a function

    X : uncertainties

    • Model structure uncertainties as well as exogenous forces

    • Continuous or categorical

    L : policies

    • Policies to be tested over the uncertainties

    M : outcomes

    • Outcomes of interest, scalar or time series

    J.H. Kwakkel / The Exploratory Modeling Workbench An open source toolkit for exploratory modeling, scenario discovery, and (multi-objective) robust decision making

    interesting differences in the approach taken to supporting exploratory modeling. The workbench is

    implemented in Python. It currently runs under Python 2.7, although an increasing part of the code is Python 3 compliant. The code is available under an open source license, and can be found online on

    Github. The remainder of this paper is structured accordingly. Section 2 introduces a theoretical framework that underpins the design of the exploratory modeling workbench. Section 3 discusses the design and

    key implementation details of the workbench, as well as a compare and contrast with some of other

    available open source tools for mode-based decision support under deep uncertainty. Section 4 demonstrates the use of the workbench for the Lake Problem (Lempert and Collins 2007, Hadka,

    Herman et al. 2015, Singh, Reed et al. 2015, Ward, Singh et al. 2015). Section 5 contains some concluding remarks and a discussion of future extensions.

    2 Framework A variety of analytic model-based approaches have been put forward in recent years to address the

    problem of deep uncertainty in model based decision support. These include, amongst others, Robust Decision Making, Multi-Objective Robust Decision Making, Dynamic Adaptive Policy Pathways, Info-Gap Decision Theory, Real Options Analysis, and Decision Scaling. An idea common to these various approaches is to use models to explore the consequences of the resolution of the various uncertain

    factors, rather than using models for predictive purposes. That is, these approaches built on the idea

    of exploratory modeling (Bankes 1993, Bankes, Walker et al. 2013, Weaver, Lempert et al. 2013).

    There are three key ideas that jointly underpin the design of the exploratory modeling workbench.

    These are the XLRM framework, running simulation models as if they are a function, and a taxonomy of robustness frameworks. We now elaborate these three ideas and how they influence the design of

    the workbench.

    The first idea which underpins the workbench is the system diagram (Walker 2000), or XLRM

    framework (Lempert, Popper et al. 2003). This diagram is shown in Figure 1, where X stands for the exogenous or external factors. These are factors that are outside the control of the decision-makers. L stands for policy levers. R stands for relationships inside the system, and M stands for performance

    metrics or outcomes of interest. In the workbench, this framework is used to structure the exploratory modeling. Exogenous factors are presented as uncertainties, policy levers are presented as policies,

    model structures represent relationships, and performance metrics are presented by outcomes.

    Figure 1. The XLRM framework

    The second key idea behind the design of the workbench is the idea of running a simulation model as

    if it where a subroutine. Adopting the XLRM notation, a simulation model is simply a function called

    with a set of parameters ! and ! . The return of the function is a set of outcomes of interest ! . So

    ! ! , ! = ! In the workbench, there is an interface between the actual simulation model and the workbench. This

    interface enables running the simulation model as if it where a function. This enables the workbench to interface with any modeling or simulation package that exposes some kind of API. For example,

  • Generation of Policies

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Pre-specifiedexpert opinion,

    standardized

    Iterativestress test and

    refine

    Generation of Scenarios

    Pre-specifiedexpert opinion,

    standardized

    Explorationglobal or local

    sampling

    Search(many objective)

    optimization

    Robustness Measures

    OutcomesDescriptive

    statics

    Regretcomparing

    alternatives

    Satisficingperformance

    thresholdRelationships within

    the system

    Vulnerability Analysis

    Sensitivity analysisFactor prioritization and factor

    fixing

    Subspace partitioning scenario discovery and

    adaptation tipping points

  • Decision problem: what is a robust rule for determining the

    annual anthropogenic pollution?

    • Maximize utility

    • Maximize reliability

    • Maximize inertia

    • Minimize maximum pollution

    3.4 Problem and Policy Configuration

    As themodelspecific

    a

    tion,uncertaintyanalysis,andscenariodiscoveryprocessesareallconstant

    across thethreemethods,this researchwillbeexaminingtheimpactofconsideringrobustness in

    thepolicyalternativedeterminationstepofanRDM-basedmethodfordecisionsupport.

    3.4 Problem and Policy Configuration

    This sectionwillprovidebackgroundonthestylizedproblemusedinthis study.Itwillalsoexplore

    commonlyusedpolicyimplementationstructures,inanefforttoselectasubsetofimplementation

    structuresthatcanbeusedtotesttheanalyticpowerofeachrobustdecisionsupportmethod.

    3.4.1 The lake problem

    InordertocomparethemethodsdescribedinSection3.3,theremustbeausableproblemthatis

    representativeofthedesiredbehavior.Thetypeofwickedproblemunderconsiderationhasbeen

    identifie

    d

    as includingdeepuncertainty,athresholdpointofnoreturn,wherebehaviorofthesys-

    temchangesdramatically,andtheconsiderationofmanydecisionmakers withmultipleconflic ting

    criteria.Whatisknownas theshallow lakeproblem,acommonreferenceprobleminpolicyanaly-

    sis research,incorporatesallofthesecharacteristics.This problem,developedintoapolicyanaly-

    sis probleminitiallyby(Carpenter,Ludwig,&Brock,1999),isahighlystylizeddecisionproblemin

    whichatownmustdecidetheamountofpollutiontoreleaseintoanearbyshallow lakeovertime.As

    Fig.3.7illustrates,thishypotheticalprobleminvolvestwosourcesofpollution:anthropogenicpol-

    lutiongeneratedbythetownthroughindustrialandagriculturalwaste,andnaturalinflow s thatare

    uncontrollableandcomefromtheenvironment.Thereisalsoanaturaloutflow processbasedonthe

    capabilityofthelaketorecycleresourcesthatiscapableofnaturallyreducingpollutionovertimein

    thelake(Hadkaetal.,2015).

    Figure3.7:Illustrationofpollutionflow s inlakemodel

    Throughtheinflow andoutflow processes,thelake’swaterqualitywillshiftbetweentwostates(Car-

    penteretal.,1999):

    — Oligotrophicequilibrium,withlow algaeproduction,highoxygencontent,andthereforehigh

    fis

    h

    countsanddrinking-waterquality

    — Eutrophicequilibrium,withhighlevelsofalgaeproductionandthereforelowerfish countsand

    drinking-waterquality.A lakeintheeutrophicstatereducestheeconomicbenefitofthelake

    tothenearbytown.

    PollutionlevelsaredeterminedthroughEq.(3.1),whereXrepresentstheconcentrationofpollution

    inthelake,aistheanthropogenicpollutioninputforthetimeperiod,Yreferstothenaturalinflow s of

    pollution,qindicatestherecyclingrateatwhichpollutionisremovedfromthelakethroughrecycling

    bythelake’s sediment,andbrefers totheloss ofpollutionfromthelakethroughnaturaloutflow s .

    24

  • Code of the lake model

    https://emaworkbench.readthedocs.io

    → general introduction

    Or

    ./site_packages/ema_workbench/examples/lake_model_dps.py

    → search for lake_model_dps.py in your file browser

    https://emaworkbench.readthedocs.io/