Skip to content

use_cases

Will Usher edited this page Jul 19, 2017 · 52 revisions

Use Cases

See - Actors for a list of actors

Contents

^Top

Run

Use Case 1: 🏠 Run an Analysis ☁️

Primary Actor: Modeller

Level: Enterprise

Main Success Scenario:

  1. Actor manages data
  2. Actor manages infrastructure simulation models
  3. Actor manages system-of-systems models
  4. Actor manages model runs
  5. Some time later, Actor performs a model run
  6. Actor analyses results

^Top

Data

Use Case: ⬛ Manage Data ☁️

Primary Actor: Modeller

Level: System

Main Success Scenario:

  1. Actor Manages Scenario Sets
  2. Actor Manages Narrative Sets
  3. Actor Manages Spatial Resolution Sets
  4. Actor Manages Temporal Resolution Sets

^Top

Scenarios and Scenario Sets

A Scenario is a source of data which is used to manage uncertainties beyond the control of a decision maker. For all practical purposes, models treat scenarios as a source of input parameter values. As with other data sources, scenarios have a spatial and temporal resolution.

A Scenario Set is a collection of scenarios of the same type. When configuring a SosModel, free inputs to a model will be associated with a Scenario Set, deferring the choice of scenario to the definition of the Model Run.

Usage Narrative:

Chris uploads the electricity demand scenario data using the scenario manager. He first defines a new scenario set called Demand Scenarios, then adds the central electricity demand scenario to the set, uploading the data from a flat file. He then selects the spatial and temporal resolution already uploaded in the gazateer to associate with the central electricity demand scenario.

Use Case : Manage Scenario Sets

Actor: Data Guru

Main Success Scenario:

  1. Actor navigates to the data management page
  2. «system» displays list of existing Scenario Sets
  3. Actor creates a new scenario set and gives it a unique name and description
  4. Actor manages scenarios
  5. «system» writes changes to «database»

Alternative Flows:

3 a. Actor edits an existing Scenario Set

  1. Actor selects existing scenario from the list
  2. Actor amends attributes
  3. Actor save changes
  4. «system» write changes to database

3 b. Actor deletes an existing Scenario Set

  1. Actor selects existing scenario from the list
  2. Actor amends attributes
  3. Actor save changes
  4. «system» write changes to database

Use Case 10: Manage Scenarios

Actor: Modeller

Scenario:

  1. «system» displays list of existing scenarios
  2. Actor creates a new scenario
  3. «system» displays import dialogue
  4. Actor selects a flat file containing value, locational and time data
  5. Actor selects relevant metadata including appropriate spatial and temporal resolutions
  6. «system» reads in data and writes to «database»

Alternative Flows:

3 a. Actor edits an existing scenario

  1. Actor selects existing scenario from the list
  2. Actor amends attributes
  3. Actor save changes
  4. «system» write changes to database

3 b. Actor deletes an existing scenario

  1. Actor selects existing scenario from the list
  2. «system» requests confirmation
  3. «system» write changes to database

^Top

Narratives and Narrative Sets

Use Case : Manage Narrative Sets

Actor: Data Guru

Main Success Scenario:

  1. Actor navigates to the data management page
  2. «system» displays list of existing Narrative Sets
  3. Actor creates a new Narrative Set and gives it a unique name and description
  4. Actor manages narratives
  5. «system» writes changes to «database»

Alternative Flows:

3 a. Actor edits an existing Narrative Set

  1. Actor selects existing Narrative Set from the list
  2. Actor amends attributes
  3. Actor save changes
  4. «system» write changes to database

3 b. Actor deletes an existing Narrative Set

  1. Actor selects existing Narrative Set from the list
  2. «system» requests delete confirmation
  3. «system» write changes to database

Use Case: Manage Narratives

Actor: Modeller

Scenario:

  1. «system» displays list of existing narratives
  2. Actor creates a new narrative
  3. Actor configures narrative
  4. «system» writes to «database»

Alternative Flows:

3 a. Actor edits an existing narrative

  1. Actor selects existing narrative from the list
  2. Actor amends attributes
  3. Actor save changes
  4. «system» write changes to database

3 b. Actor deletes an existing narrative

  1. Actor selects existing narrative from the list
  2. «system» requests confirmation
  3. «system» write changes to database

Use Case: Configure Narrative

Actor: Modeller

Scenario:

To be written

^Top

Spatial and Temporal Resolutions

^Top

Defining Interventions

An Intervention is a possible action which has a name, a number of required attributes, including capital cost, economic_lifetime, capacity and operational_life, other attributes and location, but no build date.

Interventions are intrinsically linked to simulation models in that they correspond to one, and only one simulation model.

Interventions are collected into a package within a SoSModel so that the Decision Manager can choose which to perform, where and when. The Intervention is the smallest divisible unit of a decision within the framework.

Use Case: Manage Interventions

Primary Actor: Modeller

Main Success Scenario:

  1. Actor navigates to the intervention manager screen
  2. «system» displays list of existing interventions
  3. Actor adds new interventions with required attributes, suggested attributes and/or custom attributes
  4. Actor saves intervention
  5. «system» saves intervention to the «database»

Alternative Flows:

3 a. Import interventions from a yaml file

  1. Actor clicks "import interventions" button, dialogue asks Actor to select a file, (dialogue filters to *.yaml, *.yml files).
  2. Actor selects one or more yaml files and clicks "import" button. Dialogue box closes.
  3. Interventions are imported and appear in intervention list.

3 b. Edit an existing intervention

  1. Actor selects the intervention to edit
  2. «system» retrieves intervention from database
  3. Actor makes changes
  4. «system» writes changes to «database»

3 c. Delete an existing intervention

  1. Actor selects the intervention to delete
  2. «system» requests confirmation
  3. «system» writes changes to «database»

Extentions:

3 a. One or more interventions already exist in list

  1. «system» displays list of duplicate interventions.
  2. Actor chooses duplicate from the list to retain

^Top

Configuring Models

Usage Narrative: Configuring an energy supply model

Harpreet is an energy modeller who wishes to couple the energy supply simulation model she is developing with an existing water supply model. She wants to investigate the resilience of the electricity system to constraints on water abstractions during drought events. Harpreet has written a wrapper for her model executable using the smif.SectorModel class and identified one key input to the model (electricity_demand) and two key outputs (water_demand, unmet_demand). Harpreet also writes a spatial and a temporal resolution definition file which apply to all inputs and outputs.

Harpreet logs onto the «system» and navigates to her project. She chooses to create a new model configuration, which she names es_resilience. She then directs the system to her wrapper file, registers the spatial and temporal resolutions with the gazateer and uploads the data. She then adds the inputs and outputs, associating each of them with the spatial and temporal resolutions registered previously. She checks the visual representation of her model configuration and notes the one input and two outputs detailed on the diagram. Hovering her mouse over, she can view the meta-data associated with the input and outputs. She adds some notes to her configuration, and sets the model version to match that of the model from her version control system.

Open Questions

  • How do we manage simulation model versions from the interface?

Use Case 1: ⬛ Manage simulation models 🌊

Primary Actor: Modeller

Level: User Goal

Description:

Each of the simulation models needs to be configured so that it can be run by smif. Models are wrapped using the SectorModel class which exposes initialise and simulate methods. Models have input and output parameters, each of which have spatial and temporal resolutions definitions stored in the interval and region registers.

Main Success Scenario:

  1. Actor navigates to simulation model configuration interface page
  2. «system» displays a list of existing simulation model configurations
  3. Actor adds a new simulation model configuration
  4. Actor enters unique model name and the path to the model wrapper (to execute the model)
  5. «system» displays list of classnames in model wrapper
  6. Actor chooses the classname from list
  7. Actor Manages Interventions
  8. Actor Manages Parameters
  9. Actor saves simulation model configuration
  10. «system» saves configuration to «database»
  11. «system» returns focus to model configuration interface page now displaying added model configuration

Alternative Flows:

  1. a. Edit an existing simulation model configuration

    1. Actor views the list of model configurations
    2. Actor selects model configuration to edit
    3. «system» requests configuration data from «database»
    4. "Edit model configuration" form is displayed with entries for various attributes.
    5. Actor edits the entries and saves changes
    6. «system» saves changes to «database»
  2. b. Delete an existing simulation model configuration

    1. Actor views the list of model configurations
    2. Actor selects model configuration to delete
    3. «system» requests confirmation of deletion
    4. Actor confirms deletion
    5. «system» saves changes to «database»

Extensions:

2 a. No model configurations exist

  1. «system» displays message saying that there are no existing configurations

8 a. Database connection error

  1. Resolve connection problems

^Top

Use Case: Manage Parameters

Primary Actor: Modeller

Main Success Scenario

  1. Actor view list of model parameters
  2. Actor creates new parameter with a unique (to the simulation model) name, type (input or output), and spatial and temporal resolution
  3. «system» validates changes and writes parameter to «database»

Alternative Flows:

2 a. Edit an existing parameter

  1. Actor selects a parameter to edit from the list
  2. Actor amends parameter attributes
  3. «system» validates changes and writes changes to «database»

2 b. Delete an existing parameter

  1. Actor selects parameter to delete
  2. «system» requests confirmation of deletion
  3. «system» saves changes to «database»

Configure a System-of-system Model (SosModel)

A SosModel is a collection of simulation models with a requirement for data input.

Usage Narrative: Configuring a water energy resilience system of systems model

Chris, Harpreet's colleague, has finished work on the water supply model, and has already configured it using the «system». He's now ready to define a new system-of-systems model (SosModel), which will couple the two simulation models together.

Chris logs into the «system» and selects the water-energy-resilience project. He navigates to the SosModel configuration page and follows the instructions shown as this is the first time he's configured a SosModel. The instructions direct him to create a new SosModel configuration. Presented with a list of previously defined simulation models, he selects the energy model which was configured by his colleague Harpreet called es_resilience. He reviews the notes and description associated with the energy model and scans them for any particular issues Harpreet identified. He then selects his water model and confirms the additions to his SosModel project.

Now two models exist in the SosModel configuration, Chris needs to link the model input and outputs to one another to define dependencies. The «system» displays a visual representation of the models inputs and outputs. He connects the water_demand output from energy model to the water_demand input of the water supply model. A «system» warning notifies Chris that he has connected inputs and outputs with a different spatio-temporal resolution. Luckily, Chris is prepared, and has written a function to cope with this which he wishes to use instead of the default assumption of area weighting. He selects the function and adds it to the configuration. Chris now selects the remaining input to the energy model, electricity demand, and categorises its source as a scenario input. Then, he selects the rainfall input to the water supply model and categorises its source as a scenario input. This will allow him to select multiple different scenarios when running this SosModel i.e. defer the selection of the input parameters to the definition of the model run.

Chris saves the SosModel configuration and goes for a cup of tea.

Use Case 3: ⬛ Manage SosModels 🌊

Actor: Modeller

Scenario:

  1. Actor navigates to SosModel configuration
  2. «system» shows list of existing SosModel configurations
  3. Actor creates a new SosModel
  4. «system» displays a list of available simulation model configurations
  5. Actor selects one or more simulation models from list
  6. Actor manages simulation models as required
  7. «system» provides list of the aggregate model inputs required and the model outputs produced by the collection of simulation models
  8. Actor links the inputs and outputs between pairs of models, where relevant, to define the data dependencies between the models
  9. Actor defines custom spatio-temporal conversion functions along each of the dependencies, or accepts the default assumption of area weighting
  10. «system» computes the running order of the models suggested by the graph of dependencies and indicates where iteration will be necessary
  11. When happy with the collection of simulation models in the SosModel, the defined dependencies, the running order, and the remaining inputs and outputs, the Actor saves the configuration
  12. «system» validates SosModel configuration
  13. The focus returns to the list of existing SosModel configurations, now displaying the newly created SosModel

Extensions:

4 a. There are no existing simulation model configurations

  1. «system» asks Actor to add a new SosModel configuration

4 b. The required simulatiom model configuration does not exist

  1. «system» asks Actor to add a new SosModel configuration

7 None of the simulation model configurations have inputs or outputs

  1. Edge case - no use for smif in this situation. Simulation model configurations are invalid

10 Running order is infeasible

  1. Raise an error and return to linking of inputs and outputs step

13 Database connection fails and unable to save configuration

  1. Save configuration locally to text file

Alternative Flows:

3 a. Edit an existing SosModel

  1. Actor selects SosModel to edit
  2. «system» retrieves SosModel configuration
  3. Actor edits SosModel configuration and saves changes
  4. «system» writes changes to «database»

3 b. Copy an existing SosModel

  1. Actor selects SosModel to copy
  2. «system» duplicates SosModel configuration and requests unique name
  3. Actor enters unique name for new SosModel
  4. «system» writes changes to «database»

3 c. Delete an existing SosModel

  1. Actor views the list of SosModel configurations
  2. Actor selects SosModel to delete
  3. «system» requests confirmation of deletion
  4. Actor confirms deletion
  5. «system» saves changes to «database»

^Top

Configure Model Runs

Usage Narrative: Configuring a Model Run to study energy water resilience

Harpreet and Chris now wish to conduct a number of model runs using their combined energy and water system-of-systems model. They start by defining a reference scenario model run. Harpreet navigates to the model run configuration page, and observes the empty list of model runs. Clicking on the 'New Model Run' button, she enters a description of the model run, and selects the SosModel configuration es_resilience from a list. A visual graphic representing the SosModel pops up showing the inputs rainfall and electricity demand and the outputs unmet demand. The unmet demand parameter is automatically linked to a results node. The rainfall and electricity demand are unlinked. Harpreet selects the rainfall sub-category of climate scenario central case from a series of drop down menus, and rainfall appears as a data source on the visualisation. She drags a link between the two rainfall nodes to link them, accepting the default area-weighting for spatio-temporal conversion. She then selects the electricity demand data source from the New Data Source menu and links that to the electricity demand node.

Use Case: ⬜ Manage Model Runs 🌊

Description:

The Model Run collects scenarios, timesteps, narratives, and system-of-system models into a package which can be deployed and run.

Once a Model Run has been performed (simulated) successfully, then the configuration is locked to maintain data provenance. Model Runs can only be duplicated, edited and rerun.

Trigger:

Actor chooses to create a new model run

Primary Actor: Modeller

Supporting Actors: Database

Main Success Scenario:

  1. Actor navigates to the model run screen
  2. «system» displays a list of model runs
  3. Actor creates a new model run, entering a unique name, and choosing a SosModel from the list of available SosModel
  4. Actor chooses from a list of time steps which define the years for which the model will run
  5. For all inputs to the SosModel which do not match to a data source (either an external data source or another model output), «system» displays a warning
  6. For each input parameter: Actor provides data for input parameter
  7. Actor saves the model run configuration
  8. «system» saves new configuration to the «database»
  9. «system» adds displays configuration name and summary metadata in the Model Run list

Extensions

  1. No SosModel definitions have been configured

    1. Configure a SosModel

Alternative Flows:

2 a. Configure a new model run from an existing model run

  1. Actor creates a new Model Run, checking a tick box indicating that she wishes to copy an existing Model Run
  2. «system» notifies Actor to choose an existing Model Run
  3. Actor selects from a list of model run configurations
  4. New model run is created on «system»
  5. «system» notifies Actor to enter a unique name for the model run
  6. Actor is able to edit the configuration and save/cancel the changes.
  7. «system» tags the model run with a warning symbol if it appears to duplicate an existing model run (nothing is different from the parent model run).

2 b. Copy an existing Model Run

2 c. Delete an existing Model Run

2 d. Edit an existing Model Run. Only non-running

Use Case: ⬜ Provide data for input parameter 🌊

Scope:

Within a Model Run definition, any free-hanging input parameters in the chosen SosModel must be linked to scenario data

Primary Actor: Modeller

Main Success Scenario:

  1. Actor chooses to add scenario data for the input parameter.
  2. «system» displays list of available scenarios
  3. Actor selects one of the scenarios

Extensions:

  1. No scenarios have been defined

    1. «system» asks Actor to define scenario data sources

^Top

Run a Model Run

Usage Narrative: Running a Model Run to study energy water resilience

After finishing the configuration of the model run, Harpreet navigates to the Model Run list, and scans through the list. She filters by model run status, to show only runs with the status Ready. She selects the model run, and clicks Submit Model Run. The system responds informing her that the run has been submitted to the job queue

Use Case 6: ⬛ Perform Concurrent Model Run 🌊

Primary Actor: Modeller

Supporting Actors: Database

Main Success Scenario:

  1. Actor selects a model run
  2. Actor submits run for simulation
  3. «system» locks and deploys model run
  4. «system» notifies Actor that model run has been submitted
  5. «system» creates results entry for model run
  6. «system» notifies Actor of successful completion
  7. «system» populates results entry with data from «database»

Extentions:

3 a. Model run fails 3 b. Model is infeasible (optimisation)

Use Case: 🔩 Deploy Model Run 🐟

Description:

  • PlanningHorizon is a parameter of the Model Run
  • Behaviour of Decision Manager is a function of PlanningHorizon and DecisionModule type (planning/rules/optimisation)

Primary Actor: Model Runner

Supporting Actors:

Main Success Scenario:

  1. Actor Initialise Model Run
  2. Actor Requests Decisions
  3. Decision Manager Makes Decisions
  4. Actor Runs simulation with decisions
  5. Actor Persists results

Use Case: 🔩 Request Decisions 🐟

Primary Actor: Model Runner

Supporting Actors:

Main Success Scenario:

^Top

Analyse Model Results

Usage Narrative: Analysing Results

Harpreet returns to the Model Run screen and filters on Successful status. No model run appears, as her run has not yet finished. She removes the filter and sorts by Submission Time and finds her Model Run at the top of the list. She selects it and tries to click View Results, but the button is greyed out.

Later, Harpreet returns to the Model Run screen and filters on Successful status. He model run appears at the top of the list. She selects it and clicks View Results. The black results dashboard is displayed with space where a range of useful metrics could be shown. She configures the dashboard with a number of useful result widgets, so that she can ensure at a glance that the model is performing as it should.

Use Case 7: View model run results

Actor: Modeller

Scenario:

  1. Actor navigates to results viewer
  2. «system» displays list of completed model runs with linked results
  3. Actor selects model run
  4. «system» displays model results

Use Case 8: Compare the result model runs

Actor: Analyst

Scenario:

  1. Actor navigates to bundle viewer
  2. «system» displays list of bundles
  3. Actor Manage bundles
  4. Actor selects a bundle
  5. «system» retrieves bundle from «database» and displays results comparison

Extentions:

4 a. Bundle contains model runs with no results

  1. «system» shows results of only model runs with results and warning for others

5 a. Model run results are identical

  1. «system» displays warning that results difference cannot be shown as results are identical

Use Case 8b: Manage Bundles

Description

A bundle is a collection of model runs within a project which enables results comparison of one or more model runs.

Actor: Analyst

Main Success Scenario:

  1. Actor navigates to bundle viewer
  2. «system» displays list of existing bundles
  3. Actor creates new bundle
  4. «system» displays list of model runs of all statuses
  5. Actor selects one or more model runs to add to bundle
  6. «system» saves bundle to «database»

Use Case 9: View results for a recent model run

Actor: Modeller

Precondition:

Actor is on the model run page and a successfully completed model run exists in the model run list

Scenario:

  1. «system» displays list of model runs
  2. Actor selects completed model run in the list of model runs
  3. «system» displays results dashboard for model run

^Top

Decisions

Use Case 11: Define a pre-specified planning strategy

Precondition:

Actor: Modeller

Scenario:

  1. Actor navigates to planning interface
  2. «system» displays list of strategies
  3. Actor creates a new pre-specified planning strategy with a unique name and a description
  4. For each of the sectors in turn, Actor associates one or more interventions from the list populated by the sector models with a timestep from the Model Run
  5. «system» writes the data to the «database»

Extension: No interventions are defined

  1. {as above}
  2. Interface doesn't let Actor create a new planning strategy and displays a warning message saying that no interventions have been defined.

Use Case: Pre-specified planning

Actor: Decision Manager

Scenario:

Use Case: Make Decision

Scope: Decision Layer

Actor: Decision Manager (DM)

Supporting Actors: Model Runner

Scenario:

  1. DM asks strategy for a decision

  2. Strategy requests list of available interventions

  3. SosModel returns list of interventions

  4. Controller requests results from Model Runner for Model Run

  5. Model Runner looks up Strategy Configuration for Model Run

  6. Model Runner Loads SosModel Data

  7. Model Runner initialises Decision Manager with configuration

  8. Model Runner requests decisions from Decision Manager for Time Horizon

  9. Decision Manager

^Top

Notes

Title: Actor: Scenario:

Extensions: (when things go wrong)

Precondition: (what must be true to begin this use case)

Postcondition: Stakeholders: Technology list: Scope: Level:

^Top

Clone this wiki locally