There was some discussion about my statement that SD and discrete simulation
can be seen as two flavours of the same thing. I would like to illustrate my
point with an example.
Assume we want to simulate a simple prey-predator system that can be
described by the differential equations of Lottke and Volterra. These are
given here as difference equations. “t” identifies the time step. We work
with rabbits and foxes.
(fox, t+1) = (fox, t) * (rabbit, t) * (fox birth constant) – (fox, t) * (fox
death constant)
(rabbit, t+1) = (rabbit, t) * (rabbit birth constant) – (rabbit, t) * (fox,
t) * (fox efficiency constant)
We generate two levels (fox) and (rabbit) and define the appropriate flows.
Assuming that
(rabbit, t=0) = 100
(fox, t=0) = 100
(fox birth constant) = 0.002
(fox death constant) = 0.2
(rabbit birth constant) = 0.5
(fox efficiency constant) = 0.006
The resulting model shows an oscillation with a frequency of about 20 years.
A simple, classic SD model. We want to study the effect of diseases and
treatment, so we need more detail. Young rabbits do not have offspring, and
different ages have different fertility, so we split our rabbit level into
ten levels, one for each age group, with the appropriate flows in between.
In each age group we have some rabbits that have myxomatosis (a disease), so
we have to double our number of levels. We do not see our rabbits as pests,
so we treat those we can get hold of. Of the treated some get better, some
not, and that depends on age as well, so we need more levels. During our
trial we find that there is another factor such as food, so we have to
change all our “plumbing” again. Even with arrays that can be quite a
bother, so lets try a discrete model.
We start with 100 fox objects and 100 rabbit objects. At each time step all
foxes still alive report to a counter object that is accessible by all
objects. The rabbits do the same. At each time step each fox object deletes
itself with a probability of 20%, which is equal to (fox death constant). At
each time step each fox object generates a new fox object with a probability
of ((rabbit, t) * fox birth constant)). The rabbit objects behave
correspondingly. The resulting simulation will look quite similar to the SD
simulation, as long as the number of objects in either category does not get
too small.
We can now introduce probability profiles that determine how rabbits at
different ages multiply, how likely they are to contract myxomatosis at
different ages, how likely they are to be exposed to our treatment, etc.
This can all be done without changing any links. The objects move through
the simulation and report to the reporting objects, which are our urw
determinemine theequivalent of SD levels.
If there are many levels, we have to increase the number of objects to get
good accuracy. However, it would be computationally quite clumsy to do the
same thing for all objects of the same state. Instead of changing 1000
“diseased” rabbit objects one by one, with probability of 2% to healthy
rabbit objects, we can split our population of 1000 into 20 healthy ones and
980 still diseased ones in one computation process. To make admin even
easier, we keep only one representative object of each type and attach a
weight to it. If we generate an 18-month-old rabbit with disease, and there
is no such object yet, we create it. If there is one with a weight of 10,
for example, we change this weight to 11.
We do not have to stick to integers for weights. If we use real numbers, we
do not need to increase the number of objects for accuracy, and get now
exactly the same results as in an equivalent SD simulation. Weights
correspond to levels. As the changes in the real weights can be expressed
with differential equations, even numerical methods such as RK4 can be
applied. The remaining difference between the methods is now a more suitable
user interface for data input (for this specific application) and the
convenience that all our plumbing (creating levels, links, flow definitions)
is done automatically.
We can see the different methods now along a “grain” axis as follows:
* Classic SD: levels or real-number weights. Shows effects such as chaos
easily. Randomness is handled via Monte Carlo changes of controlling
constants.
* “Grainy SD”: levels or weights are restricted to integer numbers (whole
objects only). Maybe use numerical methods such as RK4 first, then round
values. Effects such as oscillation or chaotic behaviour might change, which
might in some cases indicate that they were an artefact of classic SD and
would not occur in real life.
* “Very grainy SD” or discrete objects with small weights: the number of
objects in the same state becomes small, so a few more or less might make a
difference to the system behaviour. Classic discrete simulation might here
work as good or better.
* “Classic discrete simulation”: individual objects change according to
rules with defined probabilities. Randomness is handled at the object level.
A simulation of a complex system such as a company or an economy might
require sub-system from several of the above categories. I can also see no
reason why the above differentiation should not be handled on object level,
allowing for different “methods” in a single system.
We can further see models along a “feedback” axis, ranging from powerful
feedback (classic SD) via moderate effects of feedback to negligible
feedback. There is no reason why these models should be handled with
different tools, involving the learning of different user interfaces, the
payment of additional license fees and artificial problems in communicating
with colleagues. Using the same tool for all types of such models will also
lead to smarter results, as it will be easier to introduce feedback in a
model where it was initially ignored.
I would like to add a comment on the philosophy of SD. To understand a
domain, people have to sort the relevant things in their minds. Some people
focus on the rules and properties that make those things different (e.g. a
spider has eight legs, an insect has six, a cow has four). Others feel the
need to look first what these things have in common (e.g. all made of cells,
with a core, protein synthesis controlled by DNA), and then try to describe
them as “different flavours of the same thing”. Both ways are OK. Lawyers
might get more use out of the first way. Engineers might prefer the second.
SD postulates that very different things such as galaxies, cells, biotopes,
economies etc. are all systems that behave according to universal systems
laws and can therefore be described using the universal systems dynamics
method. SD people are saying that all objects in the universe are in some
way “different flavours of the whole thing”. Would it not be very peculiar
if the only thing in the universe exempt from this way of thinking is their
pet modelling tool?
Roland Schiefer
Technical Consultant
schiefer@iafrica.com