Viewing SubModel Results in Time History Result Elements

In most cases, when you add an output to a Time History Result (via the Add Result... button in the Result Properties dialog), you will simply be adding a standard output (such as the output of an Expression element A function element that produces a single output by calculating user-specified mathematical expressions. or the primary output For an element with multiple outputs, the output that has the same name as the element. of a Reservoir A stock element that integrates and conserves flows of materials. element). However, in one special case, you can add (and view) a specialized output referred to as a Time History Definition output in a Time History Result.

Time History Definition outputs are complex outputs that represent all the information necessary to define a time series. These outputs can be identified when viewing the output port of an element:

In this example, "Volume_in_Pond" is a Time Series Definition Output. Note that the Time History Definition output is highlighted with a gray icon.

Time Series Definition outputs can be produced by several types of elements, but only those produced by SubModels can be added to a Time History Result.

Adding a Time History Definition output of a SubModel A specialized element that allows you embed one complete GoldSim model within another GoldSim model. This facilitates, among other things, probabilistic optimization, explicit separation of uncertainty from variability, and manipulation of Monte Carlo statistics. to a Time History Result in the parent model provides a mechanism to view the time history results generated by the SubModel directly within the parent model.

In order for SubModel time history results to be displayed in the parent model, you must do the following:

  1. Create a Time History Result element A Result element that shows the history of a particular output as a function of time. in the parent model before running the model (i.e., while the model is in Edit Mode The state of a model when it is being edited and does not contain simulation results.).
  2. Within the Result Properties dialog, select "SubModel Time" for the Time Display Setting:

  3. When you do so, this restricts the types of results that can be added via the Add Result... button. In particular, when you press this button, you will only be presented with a list of SubModels, and you can only add SubModel Time History Definition outputs:

Several points should be noted:

Note: The Time settings of the parent model have no effect on how time history results associated with a SubModel are plotted in a Time History Result element within the parent model.

As pointed out above, when creating a Time History Definition output for a SubModel, three types of outputs can be specified:

Last Calculated: This represents a single time history of the output for the final realization of the SubModel (which is equivalent to the only realization if the SubModel Monte Carlo Settings do not specify multiple realizations).

Statistic: This represents a single time history for a specified statistic (computed over all realizations of the SubModel).

Realization Histories. This is the time history of the output for all realizations of the SubModel.

The options provided for displaying time history results associated with a SubModel in a Time History Result element within the parent model are a function of the type of Time History Definition output being displayed and the Monte Carlo settings of the SubModel and parent model.

Viewing Last Calculated and Statistic History Results from a SubModel

Due to the manner in which they are defined, "Last Calculated" and "Statistic" Time History Definition outputs produce a single time history for each realization of the parent model (regardless of how many realizations were carried out for the SubModel).

Therefore, the manner in which these results are viewed is identical to how time histories of multiple realizations would be viewed for any other type of output. In particular, when you are viewing time histories of Last Calculated or Statistics for a SubModel output after you have run multiple realizations of the parent model, there are a number of different ways that you can view the results (e.g., view one realization at a time, view all realizations, view a particular statistic). The Display windows provide a number of options that allow you to select how you want to view the results:

Note: If only one realization of the parent model is run, only one option (Display Realization or Display History) will be available.

Viewing Realization Histories Results from a SubModel

Viewing "Realization Histories" outputs from a SubModel is considerably more complex than viewing "Last Calculated" and "Statistic" outputs, since "Realization Histories" Time History Definition outputs can produce multiple time histories for each realization of the parent model. This is because "Realization Histories" consist of time histories of all realizations of the SubModel. For example, if the parent model was run for 100 realizations, and the SubModel was run for 50 realizations, the results being displayed in a Time History Result element within the parent model would be based on 5000 individual time histories (50 * 100).

Fortunately, GoldSim provides some powerful tools to view this complex set of results. To better understand these tools, it is instructive to first understand how such results would be viewed in a simpler case: a model in which the SubModel was run for multiple realizations, but the parent model was run only for a single realization. In such a case, the Result Display (for a chart) would look like this:

In this particular case, the manner in which these results are viewed is identical to how time histories of multiple realizations would be viewed for any other type of output. The Display windows provide a number of options that allow you to select how you want to view the results.

Note: If only one realization of the SubModel is run, only one option (Display History) will be available.

However, there is one very important distinction that is critical to note. This result is not displaying multiple realizations of the parent model (recall that only a single parent model realization was carried out). This result is displaying multiple realizations from within the SubModel. That is, although the Result element is located in the parent model, in this particular case, it is displaying the realizations carried out by the SubModel. This is clearly indicated in the Display drop-list by listing "(SubModel)" after each of the five display options. This is also indicated when displaying tables in the manner that the histories are labeled:

Note that the various time histories are labeled as H#1, H#2, and so on. For realizations of the parent model, they would be labeled as R#1, R#2, etc. The idea is that H refers to a SubModel "history", while R refers to a parent model "realization".

Result display is more complex when both the parent model and the SubModel are run for multiple realizations (referred to as "nested Monte Carlo simulation A method for propagating (translating) uncertainties in model inputs into uncertainties in model results."):

As can be seen, multiple options are provided to allow you to view the nested Monte Carlo results. These options are discussed in detail in the topic discussing nested Monte Carlo simulation listed below.