User Tools

Site Tools


simulation_issues

Introduction

The dynamic nature of the environmental models make them very sensitive to input data. This means that with inconsistent parameter and time-series input data, the numerical solver might not be able to solve the equations or might end up with crazy results.

With the risk of annoying the reader, it must be re-iterated that the most common source of problems is that the user has started too big. By working in smaller increments many problems can be avoided.

Checklist

  1. If you can't start a simulation, check the error message
  2. If the simulation halts due to an error, consult the simulation error listing.
  3. If you can start the simulation but crashes, or if the results are crazy, try to lower the absolute and relative error settings of the solver and run a new simulation. This helps in some situations and is an easy thing to try before digging deeper.
  4. Disable all sub-systems except for one: right-click each sub-system in either the graph or interaction matrix and select Disable from the menu. Run a simulation and make sure that the results seem reasonable. Then enable the sub-systems one by one and run simulations after each, until you see which sub-system causes the problem.
  5. Make sure that all connections are correctly set by opening (double-clicking) each connector going to and from the sub-system.
  6. Review the parameter values. If min and max values have been suggested, see if any of your parameter values are outside of this range.
  7. If you feel you have the understanding of the model to do it, disable transfers in the sub-system until you have found which transfer causes the problem. Use the Information panel to see which objects are used by the transfer and that might cause the problem.

Probabilistic simulations

If you experience problems with probabilistic simulations, before doing anything else, make sure that you can run a deterministic simulation and that the results are reasonable.

In a probabilistic simulations it is even harder to avoid inconsistent parameter values; when samples are randomly drawn from the parameter PDF's it is easy to end up with odd parameter combinations. It is also not uncommon for parameters to receive illegal values, like parameters that end up with negative values or zeroes. Even if a simulation completes, some iterations might take a long time to finish (this is a good indication that there is a problem with parameter values).

Opening the tool box

By default, the simulation is halted once an iteration cannot be run. The reason is, of course, to avoid a situation where the user is not aware that something has gone wrong during the simulation and that the results are not to be trusted. But when trying to find out what is causing the problem, it is sometimes useful to be able to run all of the iterations.

To remedy this problem, go to the advanced simulation settings tab and make sure that Halt on error is unselected.

Even with sound and healthy PDF's, some parameter combinations can cause make iterations take a long time. If one or two iterations take an hour each, then it doesn't matter if the remaining iterations take 1 second. Therefore, enter a (reasonable) time out, eg. 5 times the time for a normal deterministic simulation.

Finally, the software can help you with some output statistics. Make sure that this box is checked.

Raw data table

Your new best friend is the raw data table. For a given output, it shows all values that have been generated for a specific time point.

Time chart

Another useful friend is the time chart, which can help you identify outliers for time dependent outputs. Before you proceed, be aware that if you have run many (>500) simulations, drawing the chart will take some time.

  1. Create a time chart of the troubling outputs.
  2. Right-click and Edit the chart.
  3. In the Data tab, for Iterations, select All.

Histogram

Finally, for parameters it is sometimes faster to quickly identify a problem using a histogram. The histogram will display the distribution for your parameter.

Simulation fails to run

simulation_issues.txt · Last modified: 2015/08/13 14:45 (external edit)