Database Reference
In-Depth Information
of F(t). Euler's method is fastest and Runge-Kutta 4 is slowest, however. This is
because at a given choice of DT, more computational steps are needed with Runge-
Kutta 4 then with Runge-Kutta 2, and more with Runge-Kutta 2 than with Euler's
method.
F(t, X(t),
)
Estimated value for
F(t, X(t),
) over a length
of DT
Estimated value for
F(t, X(t),
) over a
length of DT
Time
DT
Fig. 1.17
Given the number of equations in each of the models of this topic and given the
use of state-of-the art computers, computation time is often not much of an issue.
But if your computer is slow and your model is large, the choice of DT and solution
method may have a significant impact on computation time. Your choice of DT and
solution method will likely depend on the level of accuracy that you are willing
or able to sacrifice for computation time. As we have mentioned before, a rule of
thumb for this choice is to continue to decrease DT (or at a given DT switch to
a more accurate solution method) until the changes in the results of your model
fall within an acceptable limit. If for example, you reduce the DT of your model
from .25 to .125 and the results of your model differ by less than a percent, while
your input parameters are accurate only to about
5% and the model takes now
twice as long to run, you may decide that cutting the DT was not worth the extra
computational effort.
If your model is defined over discrete time, then you should choose a DT that is
consistent with the length of the discrete time step. Experiment then with the choice
of solution method to improve model accuracy.
Let us return to the disease model of Section 1.5 and investigate the sensitivity of
the model results to the frequency at which we update the stock SICK in that model.
Assume that the specification of this model presumes that the equations are defined
over continuous time. The equations for GETTING SICK and GETTING WELL
are thus differential equations (albeit they will be solved for DT
±
0 and therefore
be treated by STELLA as difference equations). For the model runs above, DT was
set to .25. Generally speaking, a smaller DT leads to more accurate numerical cal-
culation for updating state variables and, therefore, a more accurate answer. Also
>
Search WWH ::




Custom Search