Choosing the appropriate integration method and DT
Each of the integration methods employed by the software has its own
niche. The appropriate choice for an algorithm depends largely on the
constructs that you employ in a given model. Similar considerations exist
when you choose the DT. Below, we provide a brief set of guidelines for choosing
an appropriate integration method, and an appropriate step size (DT)
for your simulation.
Note: For more information on specifying DT for your models, see Understanding DT (Delta Time).
- If your model uses any of the software's discrete
objects, or if you use builtin functions to generate integer values (e.g.,
IF-THEN-ELSE logic to set 0-1 flags, INT, ROUND, SWITCH, etc.), use Euler's method (or its counterpart, cycle-time). Runge-Kutta
methods were designed to deal with continuously varying systems. As
such, they don't deal well with queues, conveyors, or ovens. Nor do
they deal well with integer values. Check to make sure that there are
no discrete objects or builtins that generate integer values in your model
if you're using either of the Runge-Kutta methods.
- Use Runge-Kutta if the system
you're modeling is continuous and has inherent oscillatory tendencies.
Because the integration error of Euler's method is cumulative, you'll
get specious results if you use Euler's method. A system that you know
to be a sustained oscillator, for example, will always generate expanding
oscillations if you're using Euler's method.
- Use a step size (DT) that achieves a good compromise
between accuracy of results and speed of simulation. The smaller your
simulation time step, the more accurate your simulation results (to a point: very small DT values can result in numerical problems). Unfortunately,
the price of this accuracy is a long turnaround time for your simulation.
Choosing a DT that achieves a good compromise may take a few trials. In
general, a good first approximation would be to choose a step size that's one-half
of the shortest time delay in your model. Many time delays may be apparent,
such as average days payable, a shipping lead time, an oven cook time,
or a training delay. If you can determine the shortest time delay, you've
got a good starting point for selecting the step size.
- Always test your model for sensitivity to step
size. Begin by running your model for the full length of a simulation.
Plot and print some variables. Cut the step size in half and repeat the simulation. Compare the results from the two runs. Did the results change
significantly? If they did, cut the step size in half and test again.
Continue this process until the improvement in results becomes negligible.
See Also