Database Reference
In-Depth Information
answer to this question, note that equation (1.6) can be used to express the net flow
F(t, X(t), . )
that occurs over a small time interval DT as the difference between the
stock size at the beginning and end of a period of time. For example, equation (1.2)
yields:
X
(
t
)
X
(
t
DT
)
=
F
(
t, X(t),
· )
(1.12)
DT
Equation (1.12) is known as a difference equation. It assumes that the stock X is
updated over a discrete time interval DT.
Let us now define
X
(
t
)
X
(
t
DT
)
dX
dt
lim DT 0 =
(1.13)
DT
then
0wehave dX
for DT
dt =
F
(
t
,
X
(
t
) , · )
(1.14)
A calculation of dX/dt such as in (1.13) assumes an infinitesimally small time inter-
val, and is known as a differential equation. The differential equation can be used to
define the change in a stock X(t) as
dX
=
F
(
t
,
X
(
t
) , · )
dt
(1.15)
Analogously to equation (1.3), the stock X(t) in time t can be calculated for a given
initial value of X(0) by summing up all the flows that occurred between time t = 0
and t:
t
x(t)
=
X
(
0
)+
F
(
u
,
X
(
u
) , · )
du
(1.16)
0
With these mathematical insights in mind, let us return to the comparison of the
different numeric solution methods available in STELLA. If your model deals with
changes in a system that is defined over continuous time, then a choice of DT sig-
nificantly smaller than DT = 1 is required. Ideally, one would want DT to become
infinitesimally small to do justice to the fact that time changes continuously, in in-
finitesimally small steps.
STELLA requires DT
0 and will therefore solve all differential equations as
difference equations. However, making DT very small gets us closer to a represen-
tation of changes in continuous time. Unfortunately, for a given numeric solution
method and a given length of simulation the number of calculations needed to up-
date the stocks increases as the size of DT is reduced.
If a system contains nonlinearities such as in Figure 1.17 and the DT is signifi-
cantly 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 DT will 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 typi-
cally more accurate than Euler's method because of the intermediate estimates made
>
 
Search WWH ::




Custom Search