This section lets you enter the start and end time as well as the type of simulation to perform.
Start time - The start time for the simulation in the unit given above. Typically a simulation starts at time=0.
End time - The end time for the simulation.
Type of simulation - Select the type of simulation to run.
Best estimate - Run a deterministic simulation, using nominal parameter values.
Probabilistic - Run a Monte Carlo simulation, using probability density functions for uncertain parameters.
Sensitivity analysis - Run a simulation for sensitivity analysis. This type of simulation is used for finding the impact of parameters on simulation results.
- If selected, a series of simulations are run for different scenarios
Number of simulations - Only applies when running a probabilistic simulation. Set the number of realizations (iterations) to perform.
The simulation section will display simulation progress as well as errors that need to be resolved before a simulation can be performed. The button will start a simulation, and the button will stop an ongoing simulation. The progress bar will show you how far the simulation has progressed. For deterministic simulations it will display the current time point, and for probabilistic simulations it will show the current iteration.
While the simulation is running, information about the simulation is presented here. If the simulation is aborted for some reason, the error causing the simulation to stop will be displayed here.
For a simulation to be run, the model need to be free of errors. The most typical error is a missing parameter value.
The simulation settings window contains four pages:
Here you specify the start and the end times for the simulation and output options.
Output option – By default, the time vector returned from a simulation contains the exact time steps the ODE-solver has chosen. For difficult numerical solutions the number of time points may be very large. Also, it might be of interest to the user to get values for specific time points. The three output options are:
Produce no additional output - The time vector will only contain the time steps chosen by the ODE solver. This is the default setting.
Produce additional output
- The time vector will contain both the time steps chosen by the ODE solver and the time points given in Time Series. Use this setting when your model
contains discrete events to force the ODE solver to include those time points.
Produce specified output only - The time vector will contain only the time points given Time Series. This setting will greatly decrease memory consumtion and will improve simulation speed.
Note: For probabilistic, sensitivity analysis and simulation table simulations the output option should be Produce specified output only, otherwise only the start and end time is included in the result. A warning message will be presented in the error section. This is to limit the amount of data produced and to guarantee that the same time vector is returned from all simulations.
Time series – This field is only available when the output option is set to either ‘Produce additional output’ or ‘Produce specified output’. To create a time series click the Add button. From the window that appears select the type of time series you want to create using the drop-down list. You can add as many time series as you want. However, the possibility to add more than one time series is typically only used when you wish to combine a linear/geometric time series with some custom time points. To remove a time series just click the time series to be deleted and click the Remove button.
If you select ‘Custom’, enter the time points in the Time point field separated with commas or blank space.
If you select ‘Linear’ or ‘Geometric’ time series enter the first and the last time in the Min and Max box respectively. Enter the number of times points in the N box. For example: Start = 5, End = 10, N = 6, Type = Linear will give a time series with the values 5,6,7,8,9 and 10. In the case of the Linear time series the default value for Min is the start time of the simulation and for Max is the end time. In the case of the ‘Geometric’ time series the default values for Min and Max times is set to auto.
If you select ‘Linear Increment’ time series, enter the first and the last time in the Min and Max box respectively. Enter the increment in the increment box. The default value for the Min time is set to the start time and for the Max time is set to the end time. For example: Start = 5, End = 10, Increment = 2.5 will return a time series with the values 5, 7.5 and 10.
The output page lets you choose simulation endpoints. All blocks of the project are displayed and are organized by sub-system. By selecting/unselecting either endpoints or whole sub-system nodes, you determine which simulation outputs will be available after the simulation is finished.
By removing simulation outputs the simulation time and memory consumption decreases. Also, the list of results will be shorter which makes it easier when creating charts and tables.
The solver page lets you select numerical solver and edit it's settings. The solver to use depends on the model and the model parameters. For stiff problems you should start with the solver NDF, for non-stiff problems with DOPRI45.
Each solver has settings which control error tolerances and other specifics. Some common settings include:
Relative tolerance - Relative error tolerance that applies to all components of the solution vector y. This tolerance is a measure of the error relative to the size of each solution component. Roughly, it controls the number of correct digits in all solution components, except those smaller than thresholds defined in Absolute tolerance. The default, 1e-3, corresponds to 0.1% accuracy. Default value = 0.0010
Before starting a probabilistic simulation there are certain settings to make. The minimum is to select which parameters to include in the probabilistic analysis.
- Specifies the scheme for generating parameter samples, either Monte Carlo
(pseudo random numbers) or Latin hypercube sampling
This page lets you select the parameters that will be included in the analysis. Only parameters that have been assigned probability density functions can be selected.
Note that you must select at least one parameter to run a probabilistic simulation.
Correlations between parameters can be assigned in order to reduce noise and to avoid impossible parameter combinations.
A probabilistic simulation starts with sampling values for all the probabilistic parameters, using either a (random) Monte Carlo scheme or Latin Hypercube sampling.
After the values are sorted so that correlated parameter values are used in the same iteration.
For example, consider the parameters weight and height. These parameters are log-normally distributed and are positively correlated, meaning that it is common for heavy humans to also be tall. By assigning a correlation of say 0.5, the likelyhood of the weight parameter being large in the same iteration as the height parameter is large will increase.
To add correlations you must first select the Enabled button. You then click the Add button for each parameter pair, select the two parameters from the left and right lists and enter a correlation between the two.