Step 10: Running Monte Carlo analysis

 

Monte Carlo analysis enables model parameters to be specified as random distributions. A model is run for a specified number of times, and during each run the value of the parameter is taken from a specified probability distribution. In this way, the effect of varying parameters on a component value can be investigated.

In our model, we shall investigate what effect varying estuary_rate has on the value of Lake2 on day 50 of the model run. We will specify that estuary_rate follows a normal distribution.

To follow this example load the model "tutor6.mod"

  • Activate the Parameters view
  • Select the Monte Carlo check box for estuary_rate
  • Click the ... button in the in the Dist Type field for estuary_rate

The Distribution dialog box opens.

  • Select Normal from the Distribution drop-down list
  • Enter 0.05 in the Mean edit box and 0.02 in the Standard deviation edit box
  • Click OK
  • Click the Sample Points icon to activate the Sample Points view

As with minimization, Monte Carlo analysis uses sample points to test the values of selected components at selected moments in time.

  • Add a sample point, SP1
  • Double click SP1 to open its definition dialog box
  • Enter 50 in the Time Point edit box and select Lake2 in the Component list box
  • Click OK
  • Select the Monte Carlo button in the Sample Points view for SP1

The Monte Carlo configuration is now complete and is ready to run.

  • Click the Integrate icon arrow and select Monte Carlo from the drop-down menu

The Monte Carlo Run dialog box opens. This dialog summarizes the parameter and sample point configuration. We shall keep the default value of 100 trial runs.

  • Click OK to run the analysis

Next we will display the Monte Carlo results as a histogram.

Displaying histograms

  • Click the Histogram icon

The Histogram Selection dialog box opens.

  • Enter 15 in the Number of Bins edit box

The x-axis will be divided into 15 columns.

  • Select SP1 in the Sample Points list box and click >> to move it into the Selected list box
  • Click OK

The histogram is added to the Results view as Histo2. The graph shows the frequency distribution of Lake2 values (in 100 trials) if the estuary_rate fluctuates by a standard deviation of 0.02 around a normal distribution.

Like graphs, histograms can be customized in the Series, Attributes, X-axis and Y-axis dialogs which can be accessed from the Graph toolbar.

Try adjusting the axis scaling until you are happy with the distribution.

Monte Carlo statistics

To view the statistics from the Monte Carlo analysis:

  • Click the Series icon on the Graph toolbar

The Graph Series Options dialog box opens.

  • Click Series Statistics

The Global Sensitivity Results dialog box opens. This dialog summarizes the statistics for SP1. In our distribution, Lake2 varies from 250.9 to 399.5 kg with a mean value of 317.2 kg.

The completed model for this step is "tutor11.mod"

Return to the main tutorial page
  
ModelKinetix is a trade name of FamilyGenetix, managed by AP Benson.
© FamilyGenetix 2001-2003