2.3. STELLA's Numeric Solution Techniques
35
model deals with changes in a system that is defined over continuous time,
then a choice of DT significantly smaller than DT = 1 is required. Ideally,
one would want DTto become infinitesimally small to do justice to the fact
that time changes continuously , in infinitesimally small steps .
STELLA requires DT>O and will therefore solve all differential equations
as difference equations. However , making DTvery small gets us closer to a
representation of changes in continuous time. Unfortunately, for a given
numeric solution method and a given length of simulation, the number
of calculations needed to update the stocks increases as the size of DT is
reduced.
If a system contains nonlinearities such as in Figure 2.15 and the DT is
significantly larger than zero, approximation errors occur simply because the model keeps "jumping ahead in time" faster than is appropriate
to keep track of the changes in system behavior that occur over the length
of a DT. A smaller DTwill minimize these errors, but slow down the run of
the model.
At a given DT, the Runge-Kutta 2 and Runge-Kutta 4 solution methods
are typically more accurate than Euler's method because of the intermediate estimates made of Fet). But again, because at a given choice of DTmore
computational steps are needed with Runge-Kutta 4 than with Runge-Kutta
2, and more with Runge-Kutta 2 than with Euler's method, Euler's method
is fastest and Runge-Kutta 4 is slowest.
F(t, X(t), . )
estimated values
for F(t, X(t), . )
over a length of
actual values for
F(t, X(t), . ) over
a length of DT
Time
DT
FIGURE 2.15
Précédent

- 52/461

Suivant