http://www.goldsim.com/Images/newsletter/e_newsletter2.gif

Autumn 2006

Newsletter Home | Contact | GRC

 

http://www.goldsim.com/Images/newsletter/e_bottom.gif

 

Modeler’s Corner

Tips for Modeling Multiple Scenarios or Alternatives

Rick Kossik
Principal
GoldSim Technology Group
rkossik@goldsim.com

Many GoldSim models are intended to compare various alternatives or options, or to run multiple scenarios for a particular system. What is the best way to model multiple scenarios or options in a GoldSim model?

There are four ways to approach this:

  1. Run all of the scenarios/options simultaneously in a single model.
  2. Run each scenario/option separately using a scenario/option flag.
  3. Run all of the scenarios/options in series as multiple realizations.
  4. Run all of the scenarios/options in series as multiple realizations using SubModels

Each of these four approaches (and their pros and cons) are discussed below.

1. Run All of The Scenarios/Options Simultaneously in a Single Model

In this approach, you build all scenarios into a single model. Typically, this means having a localized Container for each scenario/option. By using cloned Containers for the primary parts of the algorithm in each Container, you can ensure that when you edit it, it only needs to be edited in one place.

NOTE: To learn more about cloning Containers, open the GoldSim Help system, go to the Index tab, and search for "Clones" and select the subtopic "Containers".

To ensure that each scenario/option uses the same random number seeds for Stochastic variables, all common Stochastics should be modeled as global parameters (at the top level of the model)

Pros: All results are in a single model. Simulation can be probabilistic.
Cons: This approach works well for simple models, but breaks down if your model is very large and complex.

2. Run Each Scenario/Option Separately Using a Scenario/Option Flag

In this approach, you build a single model that simulates one scenario/option at a time. The scenario/option being simulated is determined by a single Data element (a flag). If statements (and/or Selectors) are then set up that are functions of the flag (and switch the logic appropriately for each option).

NOTE: Starting with Version 9.5, the scenario flag could also be a Global Property (defined in the Globals tab of the Simulation Settings).

In order to view all the option results simultaneously, it is necessary to export the results for each run (e.g., to a spreadsheet).

Pros: Can handle large, complex models. Simulation can be probabilistic.
Cons: Results for different scenarios/options must be exported to be viewed simultaneously.

3. Run All of the Scenarios/Options in Series as Multiple Realizations

In this approach, you build a single model that simulates one scenario/option at a time (just as in Approach #2). Furthermore, the scenario/option being simulated is determined by a single element (a flag). If statements (and/or Selectors) are then set up that are functions of the flag (and switch the logic appropriately for each option).

The difference with Approach #2 is that that flag is not a constant Data element, but is instead an Expression defined as "Realization". The model is run in Monte Carlo mode, with the number of realizations equal to the number of scenarios/options. Of course, this means that true Monte Carlo (probabilistic) simulations of the scenarios/options cannot be carried out.

Pros: Can handle large, complex models. All results are in a single model.
Cons: Simulation can not be probabilistic.

4. Run All of the Scenarios/Options in Series as Multiple Realizations Using SubModels

This Approach is identical to Approach #3, but uses GoldSim's SubModel feature (introduced on Version 9.5).

NOTE: To learn more about SubModels, open the GoldSim Help system, go to the Contents tab, and under "Advanced Modeling Concepts", go to the topic "Using SubModels to Embed Models Within Models".

In this approach, the "inner model" is the scenario/option (which can be run as a Monte Carlo simulation). The "outer model" is run in Monte Carlo mode, with the number of realizations equal to the number of scenarios/options. The flag is the primary element in the "outer model" that is sent to the "inner model".

It is important to note that the outputs of a SubModel are statistics (e.g., a mean or percentile). They cannot be time histories. As a result, this approach only works if the scenarios/options can be compared in terms of statistics (e.g., mean peak water level, 95th percentile of cumulative cost), rather than by directly viewing and comparing time histories.

Pros: Can handle large, complex models. All results are in a single model. Simulation can be probabilistic.
Cons: Cannot view time histories of individual scenario results.

 

Suggestions?

Do you have any ideas to share for simulating different scenarios/options, or suggestions for future Modeler's Corner articles? If so, I'd love to hear from you. Please contact me directly at rkossik@goldsim.com.