R.G. Coyle - System Dynamics Modelling
R.G. Coyle - System Dynamics Modelling
R.G. Coyle - System Dynamics Modelling
R.G. Coyle
Cranfield University, UK
Foreword xi
Preface Xlll
2 Influence diagrams 18
Introduction 18
An influence diagram for a central heating system 18
The conventions for influence diagrams 20
The central heating system revisited 22
A production management problem 24
The list extension method 31
The entity/state/transition method 33
The common modules method 36
Which is the right method to use? 39
Some general guidelines for drawing influence diagrams 40
Diagrams at a more aggregated level 40
The cone of influence diagrams 43
Limitations of influence diagrams 45
Level/rate diagrams 45
What is a 'good' diagram? 47
Summary 47
4 Introduction to simulation 84
Fundamental ideas 84
The fundamental equations of system dynamics 86
Time shift and relabelling 89
The simulation process 90
A simulation example 91
Tests of confidence in a model 96
Representing delays in models 98
Smoothing of information 102
Policy experiments with the food model 106
Selecting a value for DT 109
The significance of DT 109
Summary 109
Introduction 306
Some system dynamics history 306
The New Zealand forestry industry 309
Developing Argentina's electricity capacity 315
Comparison of the New Zealand and Argentina cases 322
Qualitative system dynamics 323
An air traffic control system 323
The drugs 'problem' 326
Business effectiveness - the case of Universal Industries 330
A study of police force measures of performance 331
The collapse of a company 338
System dynamics applied to defence analysis 340
Summary 343
References 343
More and more people are realizing that social and business systems are too
complex to be understood by intuition , compromise, and superficial debate.
But, the traditional social and managerial sciences are providing little help
in designing policies for better behaviour of large dynamic systems. The
rapidly growing field of system dynamics is increasingly seen as the best
hope for dealing with multiple-feedback-loop, nonlinear systems that ex-
tend across many different intellectual disciplines.
Conferences on the application of system dynamics to business are be-
coming larger and more frequent. Many system dynamics models deal with
interactions between people and the environment. Use of system dy-
namics is under way in economics, government and the management of
universities.
The field needs an expanding literature in each of the many areas where
people are concerned with how things change through time. In this book,
Professor Geoff Coyle has written a welcome addition to system dynamics.
He brings to this book an extensive background as a leader in both the
academic and operational sides of system dynamics. At the University of
Bradford, Coyle founded one of the early academic programs in system
dynamics. The extensive practical aspects of his career are reflected here in
experiences with systems in business and government. His professional
background yields insights regarding both systems and the political and
psychological aspects of working with clients.
Beyond modelling of specific systems, Coyle also is explicit about his
modelling philosophy and raises issues that deserve increased attention and
debate. Some of his modelling practices are of great importance but are
often overlooked, some are controversial and need more discussion, and
some represent unsettled territory. His stress on consistency of units in
equations is a welcome emphasis on a fundamental step in good modelling
that is too often overlooked. Coyle presents an approach to computer-
optimization of models, which is an area of intriguing promise but where
the strengths and limitations are not yet clear.
Geoff Coyle has given us a well-written and useful contribution to the
practical side of system dynamics. He sets an example and opens questions
that can shape future work in the field.
Jay W. Forrester
June 1995
Preface
I have spent more than 25 years using system dynamics for modelling
complex problems, mainly in management and defence, and this book is the
result. System dynamics (SD) has proved to be particularly powerful for
analysing why social, economic, ecological and other managed systems do
not always behave as we wish them to. It sheds light on why management
actions can have negligible or destructive effects, rather than the beneficial
ones which were hoped for, and why systems sometimes behave in ways
which are contrary to intuition.
The system dynamics method has also proved to be particularly good at
supporting a strategic point of view, in the sense of matching very closely the
concerns of top-level decision-makers. By supporting the modelling of the
forces underlying a system's evolution into the future, it allows the analyst
to offer advice on how evolution can be directed so that the system can be
made robust, in that it is enabled to defend itself against setbacks and to
exploit opportunities.
Much of the strength of SD comes from its ability to be used in two
related, but different, ways. On the one hand, it can be used qualitatively to
portray the workings of a system as an aid to thinking and understanding.
On the other, the diagram can be turned into a simulation model for
quantitative simulation and optimization to support policy design.
The purpose of the book is to introduce and explain these powerful ideas,
to illustrate them with some cases and, above all, to teach how these models
are built and used. It is, in short, a model-builder's textbook and the aim is
to bring the reader to the point at which he or she can build, analyse and
optimize system dynamics models of serious problems. As such, it should be
useful on graduate and undergraduate courses in the management sciences,
economics and other disciplines in which the student learns to build and
analyse models of problems involving human intervention in social and
economic systems. It should also be useful to academics in other disciplines
and to practitioners in industry, business and government who wish to
acquire a new skill.
I have long since lost count of how many SD models I have worked with,
but it must be hundreds. They range from simple teaching models through
the work of numerous research students at three universities and into my
own practical work as a consultant to numerous business firms and govern-
ments and in NATO. The experience has convinced me that mistakes are
XIV Preface
very easy to make when one is modelling a complex problem and that it is
easy to overlook errors. The book therefore places much emphasis on
techniques for avoiding errors. The treatment is developed through simple
models to illustrate ideas and more complicated case studies to develop
understanding and skill. Throughout the book important points are printed
in bold type when they are first introduced and italic type when it is
necessary to re-emphasize them .
My ideas about, and understanding of, system dynamics have developed
considerably during the 15 years since I wrote Management System Dynam-
ics. This is, therefore, a completely new work. As with all books , it has
benefited from the comments of colleagues and students too numerous to
mention. I am, however, particularly grateful to Professor Jay Forrester,
who introduced me to SD many years ago. Professor Eric Wolstenholme
was a stimulating colleague with whom I worked happily for a long time.
Many of my colleagues and students at Shrivenham have made helpful
comments on earlier drafts of the book. Mr Ken McNaught and Mr Don
Valler have been meticulous in reading drafts and finding typing errors and
infelicities of explanation. Those that remain are my responsibility .
My thanks are also due to Arlene Curtis and Stephanie Muir who put up
with my occasional distractedness, guarded my door and telephone when I
was trying to work and did endless photocopying in the midst of running a
very busy departmental office.
The people who, above all, have supported the years of work which led to
this book are my wife and sons. When my children were young they, and my
wife, endured many hours of 'Daddy is working'. They, and above all my
wife Julie, have never failed to encourage me when the work wasn't coming
out . My elder son, Jonathan, makes his living from SD and has proved to be
extremely good at it.
RGC
Shrivenham
March 1995
CHAPTER 1
Introduction to system
dynamics
This chapter introduces system dynamics and gives the reader a preview of
what is to come. We start, however, with a history lesson, as it is usually
helpful to be able to put topics into a wider context. In this case, we want to
relate the system dynamics modelling methodology to other approaches to
the study and analysis of managed systems so that we can see how system
dynamics complements and competes with other methods.
During the 1940s, formal analysis, often involving mathematical and
statistical techniques, had been applied to the problems of fighting a war
and, subsequently, to the running of industries and business firms. These
methods were eventually formalized into the disciplines of operational
research and management science, on which there are any number of good
textbooks. For example, the mathematics of linear programming (LP) was
evolved and applied to such problems as how to plan production in an oil
refinery so that given quantities of a range of end products could be manu-
factured at minimum cost by a very complicated process from crude oil
inputs of varying chemical composition and price. This is a problem of
considerable importance to oil companies, and LP, and its later variants, are
very useful for solving it. Similarly, techniques of decision theory were
developed for tackling problems of choice when there are a range of
uncertain outcomes and possibly several conflicting criteria. There are
several more management science methodologies for different categories of
problem.
These methods have proved to be excellent and powerful for dealing
with certain classes of problems: in essence those in which the ability
of a system to adjust to changing circumstances as time passes is not a
significant aspect of the management problem. However, the behaviour of
a system as time passes and new decisions have to be made is a significant
type of management problem which requires the analyst to tackle the issues
of how a system (a term we shall define in a moment) reacts to dynamic
forces and how those reactions shape its behaviour as it moves into the
future .
2 Introduction to system dynamics
Information
-~- "
/
State
/'
'" -,
\
~
en Knowledge
(1)
o \
c \
(1)
:::J
0- I
(1)
I»
o
en
c
o IJc
/
g.
:::J
/
/'
,./
Choice . . -
structure of its loops to achieve better behaviour. The dotted lines for
information and action in Fig. 1.1 imply that these parts of a system are
capable of being changed. As we shall see when we analyse models, loops
can be abolished or created, and it is this ability to redesign parts of the
system which makes system dynamics a viable methodology for managed
systems.
It is tempting to assume that a managed system is always a business firm,
and there have indeed been numerous examples of the study of such sys-
tems. System dynamics has, however, also been applied to the dynamics of
decline in cities, to oscillation in ecological systems, the growth and collapse
of civilizations, the behaviour of national social and economic systems, the
future of the world, the criminal justice system, and to a range of military
problems as well as to many other topifs . All of these have two things in
common.
The first is a wish to make matters better by suggesting how people can
act upon the system, which is why we term them 'managed systems'. What,
for example, would be a good policy for controlling fishing so that food is
obtained but stocks are not depleted? How can the criminal justice system
be made more 'effective'? What type of labour recruitment policy should a
firm adopt? These questions all imply that there must be a set of criteria by
which we shall assess the quality of performance. Evidently, criteria are not
a simple matter, as some aspects may be more important than others and it
may be necessary to trade off one against another. We shall have much
more to say about this in the chapters on optimization.
The idea of trading off between criteria means that we must know what
is supposed to be achieved, and that may depend on the circumstances. A
firm which is experiencing growth in demand may wish to expand as fast
as possible, though without over-taxing itself and getting too big for the
market. If, on the other hand , the same firm faced a declining market it
might well seek to contract in size in an orderly fashion. The required
behaviour in these two cases would be different, but it would be desirable
for the behaviour to be the best that could be achieved in the circumstances.
This is expressed in the important principle of robnstness, which states
that:
the system should always perform as well as the circumstances allow,
regardless of what the circumstances are.
In particular, a managed system should be able to defend itself against,
or recover from, shocks, and it should be able to create and exploit
opportunities.
The second thing that managed systems have in common is the ubiqui-
tous presence of feedback loops in all these systems. There are, however,
two types of feedback loop: goal-seeking, or negative loops and growth-
producing or positive loops.
Positive and negative feedback 7
Desired _
State
-.... Discrepancy
.,.. . . . Between Actual .......
and Desired '- System
/
"' Policies
ExtShocemksal _ _....... Actual
State \ I
\
Action
Completed
\
+ ;'
~;t~~.
a Negative Feedback
~~::,;;f_
<,
-,
\
\
I
I
/
/
Rate of ... . /
Change
Change'" - -- Parameter
b Positive Feedback
Fig. 1.2 Negative and positive feedback loop structures.
1 Some authors refer to negative loops as 'balancing ' loops. This is acceptable , though it
implies that the loop will succeed in its balancing act. A badly-designed negative loop can,
however, unbalance a system, so the term goal-seeking is probabl y better. The traditional term
of 'negative feedback ' will be used throughout this book.
8 Introduction to system dynamics
Having discussed some basic ideas, we are now in a position to put forward
some definitions of system dynamics. The earlier remark about the applica-
tion of control engineering to managed systems makes it clear that the aim
is to achieve in managed systems the same standards of performance that
control engineers can attain in very complex systems such as the autopilot
for a Boeing 747. It does not , however, tell us much about how system
dynamics goes about its task.
Forrester, the founder of system dynamics, defined it as (Forrester, 1961):
... the investigation of the information-feedback characteristics of
[managed] systems and the use of models for the design of improved
organizational form and guiding policy.
In a previous book, this author's version was (Coyle, 1979):
A method of analysing problems in which time is an important factor,
and which involve the study of how the system can be defended
against, or made to benefit from, the shocks which fall upon it from the
outside world.
or, alternatively
System dynamics is that branch of control theory which deals with
socio-economic systems, and that branch of Management Science
which deals with problems of controllability.
Wolstenholme (1990) offered:
A rigorous method for qualitative description, exploration and analysis
of complex systems in terms of their processes, information, organiza-
tional boundaries and strategies; which facilitates quantitative simula-
tion modelling and analysis for the design of system structure and
behaviour.
None of these is completely satisfactory. Forrester does not say what type of
models are involved. Neither Forrester's nor Wolstenholme's definitions
refer to time, and mine does not mention information feedback.
Wolstenholme rightly mentions qualitative analysis but does not include
the powerful optimization methods that we shall study later in this book .
Perhaps something on the following lines will suffice to start us on our
study:
10 Introduction to system dynamics
Model testing
Sensitivity testing
,
5A ExploratoryModelllngand ltt.'nsights
..
Policy Designby Simulation ~ Ideas
(assessment by jud gement)
.. Robust
56 Policy Design by Op timisation --~'~POlicieS
model can be written from it without a separate stage of flow charting. This
derives from the use of special simulation languages for system dynamics
and , in effect, the influence diagram and the simulation model are simply
two versions of the same model; one written in arrows and words, the other
in equations and computer code. This property is of fundamental
importance in system dynamics as it gives rise to some powerful practical
consequences.
The first is speed . The equations can be written in any order the modeller
chooses. In practice, an order is chosen which is easy to understand and
explain, but the modeller does not have to worry about the order in which
calculations must take place; the specialist languages do that. This means
that the model can usually be written 10 or even 100 times faster than the
equivalent model in BASIC or any other high-level programming language .
The time saving means that initial results from a model can often start to
emerge within days or even hours of starting work, which is vitally impor-
tant from the point of view of communicating with, and retaining the
interest of, a client or sponsor.
The second is ease of revision and expansion of a model. It is a truism of
practical modelling that one never understands the problem correctly at
first and the initial attempt at a model will usually be inadequate in some
way. Since equations can be written quickly, a model can easily be revised
as better understanding develops. Similarly, it is easy to extend a model
when the need arises without the existing code ceasing to work , something
which almost invariably happens when a program written in a high-level
language is extended or modified. Indeed, system dynamics modellers usu-
ally exploit this property by building small models to start with and allowing
them to expand in a controlled fashion, rather than seeking to write a large
model from the outset.
Thirdly , the fact that the model exists in the two equivalent forms of a
diagram and a set of equations is a powerful aid to thinking about and
understanding a problem. One uses whichever form is most conducive to
effective thought and communication.
Naturally, this stage also includes the testing and debugging of the model;
most important steps, which are often referred to as 'validation'
of the model. This is a most inappropriate terminology as it implies
that the model somehow becomes absolutely correct and true. It is far
better to regard 'valid' as meaning : well suited to a purpose and soundly
constructed.
To test the soundness of construction, system dynamics modellers make
use of techniques such as dimensional analysis, mass balance checks, ex-
treme value tests, and other approaches which we shall encounter when we
build some models in later chapters. For the moment, the reader need
simply be aware that testing a model to ensure that it is well constructed is
something which is taken very seriously in system dynamics and that there
are several approaches to carrying out the tests.
The process of system dynamics 13
Stage 5 is where results based on quantitative analysis start to emerge.
Initially, use is made of the insights from the bright ideas and pet theories
from qualitative analysis, which is the meaning of the line joining the two
stages.
In the first stage, the emphasis is on policy design and system testing by
simulating potential changes to the system to see what effect they have and
on trying to understand those effects by thinking about the system's loops.
The assessment of whether behaviour has improved , and why, is done by
qualitative judgement and looking at the output. This is, as it were, Stage
SA, in which the emphasis is heavily on exploring the behaviour of the
system rather than predicting precise details. This stage represents explora-
tory modelling of the system's characteristic patterns of behaviour with the
aim of enhancing understanding.
The large arrow going down to the words 'objective function' suggest
that, as one's insights into, and ideas about, the problem develop during this
simulation stage, it should be possible to develop an extra set of equations
which capture the essence of what the system is trying to achieve, or what
one would like it to achieve, and measure how well it succeeds. Objective
functions exist in other branche s of management science, such as linear
programming, and system dynamics uses them to unleash the power of
optimization software to design robust policies which addres s the issues
identified in Stage 1. This phase of system dynamics is applicable whether
the system is closely managed, as in a business firm or a defence problem, or
whether the purpo se is research into how a past civilization might have
avoided collapse.
Figure 1.3 showed the technical stages in the system dynamics methodol-
ogy, but it is also useful to look at the same ideas in another way to
emphasize the relationships between stages of work and the results to which
they give rise. This is shown in Fig. 1.4.
The left-hand side shows 4 of the stages of system dynamics and the right-
hand the results produced. Notice that Stage 3, qualitative analysis, leads
from system description to understanding and ideas and that the latter may
lead back to the problem definition stage. Similarly, Stage SA corresponds
to the use of the model to verify ideas generated earlier and to stimulate
new ones. Finally, Stage SB, Optimization, uses the model as its basis, but
relies more heavily on the emerging ideas and insights which have devel-
oped down the right-hand side.
The double-headed arrow between optimization and robust policies is
intended to emphasize that optimization does not automatically produce
the single answer to the problem. Very often the nature of the policies
suggested by the optimizer leads to further understanding of the problem
14 Introdu ction to system dynamics
Stage I Result
I
I
---------T---------
Problem Definition---...I._
SA
4 Simulation Model......f--.=:..:._+----'.~
(egCOSMIC)
I
Verification, ideas
1
58 Policy Design ......I----r--.~ Robustpolicies
(eg COSMOS optimisation)
and the workings of the system and hence to a richer vein of thinking
leading to more profound policies being discovered.
Technically, as we shall see in a later chapter, the optimizer works by
running the simulation model many times. This can be called optimization
by repeated simulation . However, the double headed relationship by which
optimization can lead to better optimization is similar to a simulation ex-
periment making one think of a better experiment, and should make one
think in terms of simulation by repeated optimization.
Figure 1.4 refers to two of the specialist system dynamics software sup-
port tools, COSMIC and COSMOS: the former for model building and
testing and the latter for optimization. There are several commercial pack-
ages available and it must be emphasized that the most significant aspect of
successful system dynamics is intelligent and careful use of the package to
which one has access, not the use of any particular package. The models in
this book were developed with COSMIC and COSMOS, but users of other
packages should have no difficulty in using the models, with minor amend-
ments. The software packages available for system dynamics, some of which
do not optimize, are reviewed in Appendix A.
System dynamics and top management 15
SYSTEM DYNAMICS AND TOP MANAGEMENT
Top management
SD Characteristic
concerns
Robustnessagainst
I
Optimisation
uncertainty
client team , with some assistance from an analyst, can work with the model
themselves , testing their own ideas and developing their own insights, over
a period of a day or so. Practical experience of these sessions suggests how
enormously valuable they can be, both in drawing out ideas and insights
from the problem proprietors and in giving them confidence that they
understand and support what has been done and that 'their' problem has
not been taken over by the analyst.
SUMMARY
Coyle, R.O. (1979) Management System Dynam ics, John Wiley & Sons, Chichester.
Forrester, J.W. (1961) Industrial Dynamics, MIT Press, Cambridge MA.
Wolstenholme, E.F. (1990) System Enquiry, John Wiley & Sons, Chichester.
CHAPTER 2
Influence diagrams
INTRODUCTION
We start by studying the completed diagram for the central heating system
discussed in Chapter 1, the diagram being Fig. 2.1. Initially, we shall not
worry about the solid and dotted lines, the + and - signs or any of the
details, but concentrate on what the diagram shows, which are the influ-
ences at work in the system, the interplay of which is the cause of its
dynamic behaviour.
For this system, the influences are fairly simple, or, at any rate, readers
will think so when they have studied some of the more complex cases in this
book. The householder has set a desired temperature on the thermostat,
but the actual temperature may not be at that value. If it is not , the boiler
is automatically turned on and heat starts to flow into the water pipes and
radiators or into the hot air ducts. After a delay due to the length of the
pipes, heat starts to reach the room, adding to the quantity of heat already
An influence diagram for a central heating system 19
Hr:..,:.::::::r::t:
"
Desired Temperature
on Thermostat
- \
"
+ SyoIem
'PoIIey'
" <, ,/
- - +~~f':~~"6~-
E,
_ <, /
/
~
_ _ Actu~~T=rajure
/ \ \ /
+, /
,/ +.... /
/ ~ ... -... I \
/ Negative', I
1 Feedback ,
I \
Loop 2 I
\
Negative
Feedback
Rate of Supplying
Heat
+t ' / Loop I ~
Difference Between - - \ \ \
. . _. \
Internal and External Quantity of Heat \ \
~~~a\res _/lnRoom~'
/ + PowtHol
\ ~~
_~'--..., ~Rate of Losing
.- ....", Heat
External ... Rate of Arrival
Temperature .\ of Heat In Room
+
\
Temperature DIIIerence to
Rote 01 Loa 01 H_ ConvetSlon Foetol
there. Depending on the size of the room , the heat quantity is sensed as
temperature by people in the room and by the thermostat and , when the
temperature is close to the desired value, the supply of heat stops . We shall
suppose that this is also an air-conditioning system so, if the room is too
warm, the system starts to subtract heat until the room cools down. Sub-
tracting heat should be thought of as supplying negative heat , so the words
on the diagram do not need to be changed.
This simple system shows the essential trick in developing a good dia-
gram - 'think physics'. In the information/action/consequences paradigm
the consequences are always physical in the sense that something flows in
the system - people are recruited, heat is supplied, goods are manufactured,
casualties are incurred, money is transferred and so on. Even in a psycho-
logical case, unhappiness builds up or decreases. In all cases, therefore,
something flows, and recognizing what flows in the system is the key to a
good model, a good trick being to visualize the problem as a set of pipes
and tanks through which water flows. In fact, flow analysis is the basis of one
of the techniques of diagram construction which we shall examine later. We
shall leave the question of what a 'good' diagram is until later in the chapter,
when we have built some influence diagrams .
At the risk of labouring the point , in this case the heating system cannot
supply temperature; it must supply heat, and the amount of heat which
has accumulated in a room of a certain size is what determines the tempera-
ture, and it is temperature which the managers of this system wish to
achieve.
20 Influence diagrams
.
Smoothing of Information
ExternalFOICe.
B----+
)
These are forces oul~de the system
over which thesyslem's 'mana99'"
ex have no control. They may be physical
or Inftuences from !he behavlour of
nature. The link has a + or • sign
Positive Unks
If j- -+ t and !- -'- i
then the link ~ POSITIVE
Negattve Unks
Placing of SIgns
The sign for a Ink must be althe head or po int of the a rrow.
It ca n be on el1hef side. but must be placed so thal the link
to which It applies Is una mbiguous.
Signsfor Loops
the rate of sales, might fluctuate quite sharply from day to day and
one might want to smooth out that variation by taking the average
sales rate over a period of time, such as a month. Thus, the variable influ-
ences its own average , but requires a parameter of the period over which
the average is taken. Figure 2.3 summarizes the sign rules for links and
loops.
Having explained the conventions, we can now explain some of the factors
in the central heating problem a little more closely.
The discrepancy, or difference, between desired temperature and actual
temperature is denoted by the Greek letter epsilon , E, with a subscript 1 to
distinguish it from other epsilons. The difference is calculated in the sense
of:
Desired Temperature - Actual Temperature
The central heating system revisited 23
1 This problem is a very simplified version of a consultancy assignment the author undertook
for a manufacturing company, though the product has been changed. The real company did
use the policies and parameter values given here . We shall revisit this problem several times
throughout this book.
A production management problem 25
DMC have never been able to forecast the inflow of new orders and
just have to try to cope with a very unpredictable order pattern. New
orders accumulate into a backlog which the company tries to keep
down to a target level.
Fig. 2.4 Narrat ive of the product ion and raw material problem.
discrepancy' is usually called the time constant. This simple analysis intro-
duces two very important ideas.
The first is that this form of control is called proportional control:
the strength of the control action is proportional to the size of the discrep-
ancy to be controlled. It is a very common mistake in system dynamics
models to omit the time constant. Dimensional analysis shows that the
time constant is essential to the equation, so not explicitly including
the time constant in the preceding equation is tantamount to including
it with the numerical value of 1. There is no earthly reason why it has to
be 1, nor is there any reason to suppose that a value of 1 will produce the
best behaviour in the system. Omitting the time constant is, therefore,
not only a dimensional mistake, it also denies the analyst the use of
what might be an important opportunity to design better behaviour into the
system.
The second idea is that the time constant is an aspect of the system's
policies, generating action in response to information about the conse-
quences of earlier actions. It can and should be chosen to suit the system's
need for robust behaviour. In this case the managers have chosen to use
time constants of 4 weeks, which may, or may not , be good values. The
system dynamics analyst's task is to find out whether x weeks is a value
which makes the system work well and to propose another if it is not. As we
shall see, the modeller has a very large degree of freedom to redesign
systems to improve their behaviour, and it is that freedom which makes
system dynamics a practical possibility.
Reverting to the problem, it usually requ ires a little care before attempt-
ing to draw a diagram from a narrative. A good method is to highlight in
the narrative the names of the variables which will be needed, to pin-
point parameters and, above all, to identify the flows as an essential
precursor to the need to think physics. Figure 2.5 reproduces Fig. 2.4, but
with items noted in italics. This process is called 'parsing', by analogy with
grammar.
In practice, parsing is usually more difficult than Fig. 2.5 implies. Figure
2.4 was a completed narrative for a textbook problem, but practical
narratives are rarely complete. The attempt to parse reveals the incom-
pletenesses in the narrative and thus takes the analyst back to the problem
which has not been understood if the narrative is imperfect. This is a good
example of what was meant in Chapter 1 about the methodology of system
dynamics helping one to understand the problem more clearly.
Clearly, what flows is washing machines, but there seem to be two sub-
flows: orders and raw materials. One of the tricks of system dynamics is not
to get bogged down in too much detail in the early stages of an analysis. In
this case, the narrative gives no reason to worry about the difference be-
tween, say, motors and paint as raw materials, and we can assume that the
raw material manager knows his job and orders raw materials in 'washing
A production management problem 27
DMC have never been able to forecast the inflow of new orders and
just have to try to cope with a very unpredictable order pattern. New
orders accumulate into a backlog which the company tries to keep
down to a target level.
Fig. 2.5 Parsed narrative of the production and raw material problem.
The physics is shown in Fig. 2.6, the rather strange layout of which is to
give consistency with the final diagram in Fig. 2.7. In Fig. 2.6 New Order
Inflow Rate is drawn in a box to show that it is an unpredictable driving
force, as was external temperature in the central heating diagram. Orders
accumulate into a backlog, which is depleted by production. The production
rate depletes raw material stock which is fed by raw material arrivals, in
tum a delayed version of raw material orders.
Figure 2.6 is the skeleton of the system's consequences on to which we
must impose the nerves and muscles of the information and action compo-
nents. To emphasize that, Production Rate and Raw Material Order Rate
have been enclosed in ellipses. These are not part of the influence diagram,
but are temporary additions to draw attention to the fact that these two
variables are the controlling flows for this system to which the information
and action parts of the influence diagram should lead. Recalling the analogy
of water flowing in a set of pipes and tanks , these are the valves which
regulate flow. Again, the reader should try drawing the regulating influ-
ences before looking at Fig. 2.7.
Figure 2.7 shows the complete diagram. It is unlikely that the reader used
these variable names, though they are not important in themselves . It is also
unlikely that the reader's solution was as clear as this and involved no lines
crossing. Laying out a diagram so that it is easy on the eye is important to
give the impression of a smooth flow of control. The reader now has to go
back to Fig. 2.5 and verify from the narrative that the factors in the diagram
are those mentioned there and that the signs on the diagram are those
required by the narrative.
For example, the narrative comment that the average usage rate (of raw
materials) is added to the raw material orders required to eliminate the
discrepancy requires that there be a + sign on the direct link from Average
Production Rate to Raw Material Order Rate.
The pattern of signs on the links from Desired Backlog and Backlog to
Backlog Discrepancy should be compared with those on the links from
Desired Raw Material Stocks and Raw Material Stocks to Raw Material
Stock Discrepancy. The Backlog Discrepancy takes the form:
Backlog - Desired Backlog
while the Raw Material Discrepancy takes the form:
Desired Raw Material Stock - Raw Material Stock
Again, the narrative makes this clear. The production task is to keep Back-
log down to a level which will satisfy the customers, while the Raw Material
Manager tries to keep Raw Materials Stock up to a level which will ensure
that the factory can keep running . Great care is needed in ensuring that
discrepancies are properly defined, but the influence diagram provides a
vital clue. The influence of New Order Inflow Rate on Backlog is positive,
that is it will tend to drive Backlog up and the manager has to try to bring
W
_ Ra M aterial
»>
.---- s tocks
++
New Order
Inflow Rate
Raw Material
Arrival Rate
+
.
Fig. 2.6 The physics of the production and raw material problem.
Averaging Period
- - _ lex Produclion /la/e
Averaging Period
IOf Old« Rat. ........
./ - - - <,
....... .... Average
/ "Production
~ / \ Rote" <,
Average
Order
"+
• Rote +~ ".. Desired <,
\ / + Row Material ....
/ , +
--
Stocks" .....
/ ' . Desired \ / /' \ \
Backlog
/ of Orders - - \ / // \ \
/
.,. \_-
..
I / W""'atAve~ge
PlOduclion In
*+
'f
\
/ Backlog o.sired Raw Row Material \
/ Discrepancy " I / ldalMial Slocks - Stock Discrepancy
/ +~ ."." \ I / /' ~ -, \
I W.e'" at Average
Orders as o..,ed /, /'/' '\ \
\ Backlog .\ \
I I NegatIve" I / / _ _
MorenOI I~OW .". - "
\ I \ Loop 1, .....
\
+' +too/ _»> "':;": ,'"
\ prag:f:
: .s- \
\ Negative
Backlog of
\ + Orders I
I I : Loop 2
,
\ I It-
I \. / \
riffle 10 Correcl Row Moteriol ",
Order Backlog Arrival Rote \
Discrepancy ....c-
+ \
Time10 Co"ecl
Raw Ma/erial
Discrepancy
)/ .>
/ I "
Difference / I " /
£Z: :
Fig. 2.8 List extension for the central heating problem.
The entity/state/transition method 33
case, the temperature discrepancy is, by definition, the difference between
target and actual temperatures in the room. One might be tempted to
write 'External Temperature' in the first extension, but that is an indirect
influence.
The second extension continues the process by writing down the direct
and immediate influences on the variables in the first extens ion. A chain of
influence terminates when a parameter or an external force is encountered.
As each extension unfolds, a check has to be made to previous extensions
for links from earlier variables. Thus, in Fig. 2.8 we see links running from
right to left which emerge as extensions are built. Notice , however, that Fig.
2.8 is nothing like as neat and orderly as Fig. 2.1; in particular, one of the
loops is in the shape of a figure of eight. Diagrams built using list extension
almost always have to be drawn again to minimize crossing links and por-
tray a smooth flow of influences and clearly visible feedback loops.
The reader should now repeat the exercise for the central heating prob-
lem, starting from any other variable, and repeat it again for the production
management problem. In each case, the process should lead automatically
to the same solution each time. It is one of the very attractive aspects of list
extension that two analysts tackling the same problem should come up with
recognizably similar solutions even if they started with different ideas as to
what were the key variables . This is a solution to the 'two-analyst problem',
and it is vital to good modelling that one should get the same end view of
the system, regardless of one's initial prejudices about significant variables .
List extension is a good method for starting work on a problem, espe-
cially in one 's early stages of developing skill in influence diagramming. It is
usually not necessary to go past four or five extensions as the pattern of the
diagram will probably have emerged by then and one can use one of the
other two methods to proceed. It is, however, essential to have the patience
to redraw the diagram to make it look neat.
As a rough guide, the first stage of modelling a new problem should
not involve more than about 15 or 20 variables and parameters. It is very
easy to expand a model in later stages of a project and it is better to start
with something simple. The key to successful modelling is to keep one's
understanding of the model and what it says about the problem ahead of its
size. A model which is too large to start with restricts that development of
understanding and insight which was emphasized in Fig. 1.4.
2. For each entity identify all the possible states in which members of
that entity can be.
3. For each state, identify the flows which can cause the state to
increase or decrease.
4. Check for connections between flows. Does the outflow from one
state feed another?
5. Identify the controlling flow rates which drive the system. In gen-
eral, these will have arrows coming out of them, showing that they
influence something, but no arrows going in to show what influ-
ences them.
Fig. 2.9 The steps in the entit y/state tran sition method.
r
+ Trainee Qualified
+ Consultants
T~~~2J ">.
c onSl,Jltants-
, (
~~~~~~~fsro~
-
+ Tralnin~ + Consultant
Trainee
Recruitment
Rate
DniAti • Completion
Rate
DIM'\.OV • Leaving
Rate
Fig. 2.10 The entities, states and trans itions in the consultant problem.
depends on the demand for the firm's services. It also states that some of the
qualified consultants have to be used to train recruits and we shall assume
for the moment, because the narrative does not tell us to assume anything
else, that qualified consultants can be moved instantly between working on
assignments and training recruits. This leads to the final picture , shown in
Fig. 2.11. Note the parameter, 'Time to Correct Consultant Discrepancy',
which was not mentioned in the narrative but which, for reasons to be
discussed later, has to be introduced into the model. The reader should
study Fig. 2.11 carefully, relating it to the narrative for this problem and
comparing it to the previous examples, noting and understanding the simi-
larities and differences.
The point made in the previous paragraph about not making an unsup-
ported assumption is rather important. System dynamics models, as we shall
see when we come to write equations, are very easy to write. That means
that they are also easy to extend as more information comes to hand and as
understanding of the problem deepens. However, the ease of writing also
tempts one to make the model larger than it needs to be in the early stages
of a project. It is essential to keep one 's understanding of a model ahead of
its size and that means that it is good practice to keep the model simple to
start with and only to make it more complicated in due time. Making a
model more complicated is not the same as improving the sophistication
with which it represents a problem, and subtlety is always to be preferred to
mere size.
Figures 2.1 and 2.7 use the same unit of structure in that they both contain
a flow which, after a delay, leads to an effect. In one case the flow starts with
the supply of heat, in the other with the ordering of raw materials, but, apart
from these differences in names, the two portions of the influence diagrams
are identical. Figures 2.7 and 2.11 both contain information and action
components in which target and actual states are compared and action is
taken to correct a discrepancy over a time constant. Figure 2.11 uses the
same format for the delay in training recruits and for the duration of
employment of qualified people . In short, managed systems contain com-
mon modules of structure which recur in utterly different problems. Once
one has learned to recognize these modules , building influence diagrams
becomes quite easy. Caution must be exercised , however, against simply
throwing modules into a diagram without taking sufficient care to ensure
that they are the right ones for the particular case.
Some of the standard modules are shown in Fig. 2.12, which uses 'level'
to suggest the analogy of the contents of a water tank . The reader should
not bother to remember the names of the modules, but should learn to
recognize the phenomena they represent.
Required
Number ot + Demand for
------ - - ------ - ------ -- - - Qualified .. - - - - - - C onsulta ncy
Consultants Services
Available for
+/ " Projects
~
Qualified __ - - - - - - - - -- -- - - - _ "-, -,
Consultan t - - <, -,
Discrepancy - <, -,
-, -, Qual/fled
\ Consultants
per Unit
\ of Demand
Qualified Qualified
I
Ra"oof Consultants - Consultants
Supervlsors - - - - .. Required to - - - - - - - - - - ~ Available
10 Trainees / .. Supervise for Proje cts
Trainees
/ + •
I + I
I I
I I
nme to I I 'I
Correcl I I
Consuffonl + Trainee + Qualified
+ -
Inflow---+- Level ~ Drain
A - SImple Inflow/Ouffiow
B - Delayed Inflow
C - Transitional Flow
_{~z;;-~*--+·~~:~t: \+
Levell Level2
+\ Inflow Outflow}-
' - - - 10 • from ---'"
Levell + Leve12
Ta rg et Sta te _ ......... +
Actual state- ,/
.-
Discrepan cy....
\
\",
Time Constant
, Variable +~S~~~d
/
11
+t ¥ /
Flow Role smoothing
Variable 1
(eg Prlce) - -
m
- ,,- -
+ 0(- Vartoble 2
-~ (eg Demond)
H - Behavioural Transformation
Case A, simple inflow/outflow, occurs in Fig. 2.6 when orders flow into
backlog and production depletes it. Case B, delayed inflow, represents the
ordering of raw materials in Fig. 2.6, except that the contents of the delay,
the amount of raw material ordered but not yet delivered , is not shown
in that illustration, the reason being that the narrative account did not
mention it. Clearly, the contents of a delay are present in a system and
Which is the right method to use? 39
it is typical, in practical work, that narrative accounts do not mention
everything. The value of the common modules is that they help one to
recognize items that may have been omitted from a narrative. The reader
should now study the earlier diagrams in this chapter and find examples of
cases C, F and G, noting how modules sometimes overlap. Figure 2.7 uses
cases F and G combined to represent the influences on production rate.
Case C implies that the transition can be in either direction, such as
swings of allegiance between one political party and its rival ; a positive
transition rate flowing from Levell to Level 2, and a negative rate flowing
the other way. In other cases, such as the flow through a pipe, or the
ordering of raw materials in Fig. 2.6, the flow cannot be reversed, and this
is shown in case D. If, for example, the qualified consultants required a
period of time to adapt from working on projects to training recruits, Case
D would be an appropriate module, and the delay contents would be those
consultants who were neither available for work nor to supervise training.
Unfortunately, case D would not allow them to move back to project work
as needs changed, and for that we should have to use Case E, which
provides for a reversible flow, the two delay contents not being shown;
readers should practice drawing them for themselves',
Case H represents a common phenomenon in managed systems whereby
one variable is transformed into another, sometimes by managerial choice,
but also, as shown here, by an ungovernable force of the economy in which
price is transformed into demand. The Greek letter e, phi , denotes that
there is a function or formula which models the transformation of one
variable into another. The effect may be + or - or even +/-, meaning that
in some circumstances it is + while in others it is -. This is an example of
non-linear behaviour in managed systems, which we shall study in much
more detail later in the book.
2 In quantitative modelling, it would be necessary to ensure that the flows were not working in
both directions at the same time, a problem we shall address in a later chapter.
40 Influence diagrams
1. Always be clear about the purpose for which the model is being
built. Is it a top-level, strategic view or a more detailed, tactical,
problem? Who is the customer for the model - a fee-paying client
or the academic community?
4. Whenever a va riable such as 'actual backlog ' is seen, look for the
corresponding 'desired backlog' and vice versa. As we have seen,
without the comparison of an actual and a desired state, negative,
goal-seeking, feedback does not exist and control cannot be
achieved.
problem, though without the use of solid and dotted lines, and without
identifying parameters. The exogenous driving force of metal prices, which
even ACZ is not big enough to influence, is shown with the usual box. In
short, this is a top-level view of the problem. It is, in fact, deliberately drawn
to be a rather poor top-level view, because it says little about the policies by
42 Influence diagrams
exploration D + Disc
over ad
+ Spending 1 • Reserves
%O~FIOW . I J-
Devotedto~
exploration
/
Spending +
"InNewu·~
"L.--t--- ~
I
D
'T~\~ /
+ +"00
:Tl~ 2
~
(
ACZ's Cash Depreciation Profits
Flow . / \ \
+ Mine
Cash
y '---- -
Inveslmentln
Exis~ng Mines
Flow
+~~roooo+ Profit
_ _ _ Distrlbut"",--+~
Profits
which ACZ decides to split its cash flow between the two streams other than
to imply that , when ACZ has sufficient discovered reserves, more money
will be put into developing new mines and vice versa. The ideas of 'target'
or 'acceptable' reserves and mine capacity are not present. The diagram
says nothing at all about the operating companies ' policies.
Oth er apparent faults are that the diagram includes delayed flow modules
of type D from Fig. 2.12, but it shows only the inflow to the delay, Explora-
tion spending measured in $/year, no outflow, such as Exploration spending
becoming effective, and Discovered reserves must be measured in tons
of metal, so there is a dimensional inconsistency, caused by a missing
parameter.
In short, the diagram seems to break all the rules of influence diagrams
which has been done to engender in the reader the habit of looking critically
at an influence diagram: a most essential skill to develop. The aggregated
diagram may, nevertheless , be a more useful diagram for discussion with
senior managers in ACZ. Rules are often said to be for the observance of
fools and the guidance of wise men. That is putting it a little too strongly,
but the reader should break the rules when it helps, especially when some
practice has been gained in following them.
It would probably be good practice for the reader to redraw Fig. 2.14 in
The cone of influence diagrams 43
_ - - - D i s c overed -
Emphasis
..
_~ the F~Uffi
'~~~)+
~_ _.....:+:..rc~p~~:~n
In Operating
~------ Mines
We have drawn two different diagrams for the same problem and this leads
to the ideas shown in Fig. 2.16, namely that it is not only legitimate, but it
can also be desirable to draw many diagrams of the same problem.
44 Influence diagrams
Sponsor's Analyst's
Pointof Point of
View View
Fundamental Most
Insight Significant
1'lesu~s
Main
Srmptoms Features
o Concern of Problem
Main Most
Operations Variables
Descnbed
Fine 4
:-----L J-- --H-+-- _
Computer
Detail
- - --- - - - -- - - - - Coding
Level
Each of the ellipses in Fig. 2.16 symbolizes an influence diagram, the size
of the ellipse suggesting the amount of detail the diagram contains. The
diagonal ellipse implies a diagram in which some parts of the problem are
shown in great detail , while other parts are shown in broad outline. Notice
the division between the sponsor's and the analyst's points of view. Clearly,
there is no magic about having four levels, and it is usually fruitless to argue
about whether a given diagram is at a particular level. The true point is that
influence diagrams are flexible tools and should be adapted to the purpose.
Notice, though, that the expression 'Conceptual consistency, variable
detail' in Fig. 2.16 does not mean that the same variable names have to be
used in diagrams at different levels. As we saw in Fig. 2.15, new variables
representing security and stability were introduced because they were ap-
propriate for the level 1 view. These variables do not exist as such in Fig.
2.14 because they would not be appropriate at that level.
In a practical project, the problem is usually first encountered at level 2.
Further analysis leads one to level 3 and perhaps to level 4 if a simulation
model is constructed. The emphasis in Fig. 1.4 on insight and understanding
implies that one might then work back up the levels to convey the most
significant results. The level 1 diagram is often drawn only at the end of the
study.
Level/rate diagrams 45
LEVEL/RATE DIAGRAMS
<,
~" " \
\
\
\
\
\
\
\
Backlog of
OrdElB
1
New Order I
Inflow Rafe I
I
\
\
\
\
\
, I
-,
--_/ /
1. Have the purpose and the target audience for the diagram been
carefully chosen? It would be no good using a level 4 diagram for
a level 1 audience.
this style, the arrow would have led to another box for Raw Material Stock.
The circle denotes the auxiliary variable and other symbols exist for delays.
Obviously, such diagrams are incredibly tedious to draw by hand or with
a graphics package, but they are the basis on which two of the software
Summary 47
packages for system dynamics work. In those packages, symbols are drawn
on the screen using standard icons, which reduces the labour involved.
Once the symbols have been drawn, some of the equations for the simula-
tion model can be generated automatically, though the user has to create
the rest. Equivalent facilities exist in other packages which use influence
diagrams, rather than level/rate diagrams. The topic of software is explored
in more detail in Appendix A.
Simply drawing diagrams is not enough: one must know how to recognize a
good diagram from a poor one. There are no simple answers, but some
criteria are listed in Fig. 2.18. These should be reviewed carefully and
applied to the diagrams which appear in this book.
SUMMARY
This has necessarily been quite a long chapter, as it sets out to explain the
foundation on which system dynamics analysis is based. We have studied
the development of diagrams and suggested conventions. From that point,
a number of diagrams were developed.
Towards the end of the chapter, we introduced the important notion of
drawing different diagrams for the same problem and put forward some
criteria for a 'good ' diagram.
The fundamental point is that the diagram should portray the interaction
of cause and effect within a system, because it is that interplay which will
govern its ability to generate its own future behaviour.
In the next chapter, we shall study some more diagrams, some of which
will be the basis for the quantitative models developed later in the book.
CHAPTER 3
Influence diagram
case studies
INTRODUCTION
The essential first step in studying any problem is to be clear about what the
model is for, as was mentioned in Fig. 2.18. A model's purpose has a strong
influence on what it includes, so being clear about the purpose is an impor-
tant step in good analysis.
The consulting firm 's problem 49
Narrative description
The management of a consultancy firm has been concerned about the
firm's seeming inability over the past few years to grow with the market
for consultancy services. The firm also seems never to have the right
numbers of qualified consultants and trainees to offer a balanced ser-
vice on existing jobs and to obtain new business.
The firm recruits new staff who require two years of training before
they are considered to be qualified. At the end of the training, a
proportion of the trainees leave, for various reasons, the rest becoming
full-fledged consultants . Qualified consultants stay with the firm for
about 10 years on average before they leave to pursue other careers.
For every 10 trainees, a qualified consultant acts as tutor, and tutors
and trainees are able to work on projects, though they are only about
half as productive as qualified people who are not acting as tutors.
Qualified consultants can move freely between acting as tutors or
working on projects.
Projects tend to be similar in size and, on average, take about 5
months to complete once work has started, but the actual time depends
on the effort the firm can deploy. On average, each project requires a
50 Influence diagram case studies
A suggested solution
Notice, first, that Fig. 3.1 contains only one place at which links cross. It is,
indeed, impossible to draw the diagram with no crossing links. It is very
unlikely that the reader's solution is as neat, and time must be taken to
redraw diagrams so that they are clear and contain as few crossing links as
possible. If this is not done, the diagram is likely to confuse rather than
illuminate and a diagram which resembles a plate of spaghetti in a bad
temper is poor system dynamics practice.
As before, solid lines show physical flows and broken lines show informa-
tion, actions and behavioural effects. Parameters are in italics and without
signs.
Figure 3.1 is drawn in terms of the physical flows of three entities
(trainees, qualified staff and projects), although the physical flows of
trainees and consultants are measured in a common unit ; they are said to
have the same dimensions.
Both projects and people have essentially the same structure of two
delayed modules in sequence, though the number of projects obtained but
not yet started is not shown, because it was not mentioned in the narrative.
As was stated in Chapter 2, such omissions from narratives are very com-
mon. In this problem, the number of projects being worked on drives the
recruitment process, but the number obtained but not yet started is ignored
in that decision. That may have a significant effect on the ability of the firm
to grow with the market while surviving the oscillations of the business
cycle, so perhaps the number of projects pending should be included in the
recruitment decision; a good example of the qualitative analysis which was
mentioned in Fig. 1.3. The reader should test this, and other policy options,
when we undertake policy analysis for this problem in Chapter 6.
Most of the delays in the problem are shown by a simple D on the link
with an identifying subscript, as was done earlier. This implies that the
- - - -- - - --- - - - -- --- --- --
, ,
,
.... ....
....
....
Ilasoc
""
DefT'lCl')d fo r
Consuttancy
"\ \
SoNIC6S
\
I
I
I
· - ---.:.. Effo rt _ / ..... ~ ,
Ratlo - -- - - 1'roJ«;t
IlM I
,
I
I
" N«maI
" I
I
-----_ _ - - - R~~
"" <-"J.;::;.....
_cI ---
c~.
".,1'IoJ«:I Quohhed .. _ /
- - - Cons.utta nh. _
per Pro iect
-It'
cI_ ~+
aJd~ I
I /
/
/
I - - -- - -
-_/
\ / - - -- --- -
I
\+ /
R«""",,'
Av.~
,.-
Fig.3.1 The consulting firm's problem.
The consulting firm 's problem 53
delay's duration is constant ; in terms of the water flow analogy, the length
of the pipe is fixed.
The narrative states , however, that the delay between project starts and
project completions is not constant; the pipe is, as it were, elastic and can
change its length. That is shown by the arrow and sign leading to DpROJECf
from Effort Ratio! and by the arrow from Standard Project Time-. These
express the narrative statement that if the Equivalent Consultants per
Project , to allow for the lower productivity of trainees and supervisors , are
not sufficient for the projects being undertaken then projects take longer
than normal. This is really only common sense, and painstaking thought and
common sense goes a long way in system dynamics.
The Effort Ratio derives from the workforce available per project rela-
tive to that required per project, and the Equivalent Consultant Workforce
makes allowance for the lower productivity of trainees and tutors. Notice an
example of the limitations of influence diagrams (and of level/rate dia-
grams). The Equivalent Consultant Workforce is shown as being influenced
by three variables and one parameter. The productivity parameter is neces-
sary because it is equivalent consultants the firm wants, but trainees which
it recruits. However, there is no indication of how these four influences
determine the variable.
It is, however, evident that the relationship must be:
EWF= QCAFP+ (QCST + TCBT) *POTAS
where EWF means Equivalent Consultant Workforce , QCAFP means
Qualified Consultant Available for Projects, QCST means Qualified Con-
sultants Supervising Trainees, TCBT means Trainee Consultants Being
Trained and POT AS means Productivity of Trainees and Supervisors, but
this formula cannot be included in the diagram without losing the clarity of
its portrayal of the forces at work in a system. The more sophisticated
software packages for system dynamics do allow one to browse through
portions of the influence diagram and the corresponding equations and
definitions.
As with the Effort Ratio , a Consultants per Project Ratio is defined as a
means of modelling the behavioural influence on the Rate of Obtaining
New Projects. Notice that Basic Demand for Consultancy Services drives
the system with a behavioural link, not a physical flow, the reason being that
the physical flow only starts when projects are obtained.
The link from Desired Recruitment Rate to Trainee Recruitment Rate
has a II symbol to show that there is a non-negativity constraint: trainees are
only recruited when the Desired Recruitment Rate is positive and they are
I We shall adopt the convention of using initial capital letters for the names of variables which
appear on influence diagram s.
2 As before, the reader may well have used different name s for variables and parameters, but
that doe s not matter.
54 Influence diagram case studies
not dismissed, or negatively recruited, when there are too many staff for the
projects on hand.
With these comments in mind, the reader should carefully study this
solution and his own version and ensure that he fully understands what has
been done .
3 As with the production planning model in Chapter 2, this is based on a real problem in which
the policies were as described in the narrative.
The consulting firm's problem 55
Loops are important to the dynamic behaviour of models and Fig. 3.2
highlights some of the loops in Fig. 3.1 by drawing them with different
patterns of line. The reader should follow the loops by eye, noting that
Loop 4 has a common path with Loop 3 between Qualified Consultants
Available for Projects and Qualified Consultants per Project. Similarly,
Loop 3 is common with Loop 2 from Qualified Consultants per Project via
Projects per Consultant Ratio and thence to Number of Projects in Progress
and is common with Loop 1 from manpower Discrepancy to Trainee Con-
sultants Being Trained. In tracing these loops, take care to follow them in the
direction of the arrows.
Loops 1 to 3 are negative, goal-seeking, loops. Loop 1 controls recruit-
ment to make sure the firm has enough staff. Loop 2, however , acts to
reduce business when there are not enough qualified staff available to
generate it, or generates business to absorb those staff. Loop 3 acts in a
similar way to Loop 2. Loop 4, which is positive or growth-producing,
should act to increase the firm's business in that the more qualified consult-
ants there are, the more projects should be obtained, which should support
more staff. The reader should think round the loops, confirming these ideas.
However, there are some snags in this system of loops which cast doubt
on how well they will function.
Although Loop 1 should ensure that recruitment does not go too far it
competes with a loop, not marked in Fig. 3.2, which runs from Trainee
Recruitment Rate, through Average Recruitment Rate and back to the
start. That appears to be a positive loop which would drive recruitment ever
higher, or lower. The unmarked loop exerts an 'inertia' effect which ought
to be counteracted by Loop 1. Notice that the non-negativity constraint,
which operates in Loops 1,3 and 4 means that these act only when there is
a shortage of manpower. However, as soon as trainees are recruited, some
qualified consultants are immediately switched to supervision, reducing the
resources available to Loop 4 to generate business. Further, the long delay ,
D TR A1N , also means that Loop 4 has little chance to get started.
This kind of qualitative thinking about a system helps to generate ideas
for policy design which are tested in Phase 5 of the system dynamics ap-
proach which was discussed in Figs. 1.3 and, especially, 1.4.
System dynamics models are so easy to build that it is nearly always very
bad practice to take a model built for one purpose and adapt it to deal with
another problem. It is usually just as quick , and more satisfactory, to build
a new model for the new problem.
Having said that, it is evident that there is a large class of manpower
planning problems to which the ideas used in this model could be applied.
... .. . . . ............ .... ------
- - - - - -...:., . . I " ... ...
//
- (_N
="Of.c Loop 2 .....
" II"l Progress ...... .....
/ / .....
/ /
"\
II Protect + I + Rate o f + BasK:
"
Demond for "\
I CR~tion II D N~~~~;t ... B CONrAACY- NeC:t~g~ts ...-- Consuttoocy
I _. PROJEC T ~
Services \
Y+ , , " A+ I
~~~f + / " I
• Cons<Jto nt _ _ _ .. Equivalent
AC~d + / I
EQ\JNOIen" / ......... ~d
.... I .... ConsuI talb - - - -
_ Pfoject _ ..... Effort
Ratio _ -- ~ ,
..... .......... ,
-
I "
\
-\.....
,
,
- .
I
("'t'V'\•• ,ltnnt'l:
,
+Y " -, -.-
NutN»r 01
,
\ '- ~- - I
,---- ---
' II" -ed COI'IIiCACJnI.
\ ----------- - - -
Loop 1 EquivOlen t + CotlalManl. ".,~ _ C=:::,,~"
CoroUtonl .. - - _ _ "., ~ _Project
_ • WoncfOl'c e
fJ ..
- - _
.....
- .Qualified
- --- .... +
+ +,
/
-~
I
_to
Cotrecl I
=I "\ . ~C=::'''
lor Plojech +
~ =-.• -•••
.... • ... Loop 3
I
..... .. . .... . ..
"""'_Y I
\ <,
, .
I
, + I
Qualified
CoN<Jltonts .. ~_
_ 01
' .....
- . . Desired,! Su~ 10_ "
Recruitment Loop 4 \
/ ..... ~ Rate +,.
/ \
/ hopCf/lon Quali fied
I Co nsuttants
+
___ . . . Avcik:Jble for
I ___ Projecb Of
I Training
Average Trained \ r
Rectuilmenl
Rate
C~E?"~
- ~ ~
\ "
• \+
\ "\+ ,I
\
" ' .....
\ .....
Tro lne e TransitIOn
\ -- -
(
Recruitment _ _ _ Clo- _ _ . . . Rate to
D EMPLOY + II C~~~t
\ rote t::7fRAIN QuoIifted Rat e
Stat us
Ilecru""""
A ••/alI*Ig
-
Fig.3.2 The consulting firm's feedback structure.
The pharmaceutical company's problem 57
Narrative description
A pharmaceutical company both develops new products and launches
them on to the market. Its products are technically good and the
demand for health care is practically limitless, so the company should
A suggested solution
As with the consulting firm's problem, the suggested solution in Fig. 3.3 has
been carefully drawn, and in this case there are no crossing lines.
The physical flow for products being introduced and at the market is two
The pharmaceutical company's problem 59
delayed modules . In Fig. 3.3 the products in the DRESEAR CH and DINTROD
delays are shown, even though they were not mentioned in the narrative.
Recall the discussion of this point in the consulting problem. There is no law
about whether the contents of delays should, or should not, be shown in an
influence diagram. The issue is whether doing so clarifies or confuses the
issue and, more importantly, being aware that the contents of delays might
offer options for policy design.
The physics for product research is more subtle. There is, indeed , a
standard delayed flow module for the research phase, after which products
accumulate into a pool of products available for the market. There are,
however, two flows from that pool; one a matter of management action, the
other a consequence of actions.
Product Research
~~~- I:) C001l'01'onRole
-" Start+
/1 1+
Rate - RESEARCH
/ .... ----' -,
\
/ I +// ', +
I I PIOduct AtxtndorYnonl \
I I Rol. "'OdUCllA """bIe
I I A \ _)"forMa1<ellrg
!! :I /
/ <:> \-
: i _lie +
I I _ - - - - - - - - _otSblrQ
I I / / - - ~ PlodJct~l'1tT<>duc1lonl+"
I
, ,
I //
,, +/
Products
" '\
: : ;/ lnln~non INmOD "
: I / _\ + \
I I I "--- _ olCOO1l'01I"O \
I I , "'oductln1Todueftor'o \
i
I
~~"
+~ "" +
/ -, . . ,\' \\
I t ..... .......... ..... \ ,
I I _ Ptoducfs at Martcet \ \
\ 5 \ Pr"2 uct
//
,
\ UFE
I\ 1
I
I
\
\
\
\
,-
\
\
\
\
"'Oducl_
/ / Ilo!.
+ I
I
I
1
1
\\ " -, - \ 1I -tl / II II
\ ..... ..... Average Aoe I I
\ - - - ofProaJc1s ... II I
\ I _ .... ..... _ ;" I
\ I --_ ..../ /
'" //
""
. . . ..... ......
..... _- Froctlonor~
~~~-----
1+
" __ - -- , .. ""
In1roduc1Ioro
The influences on Average Product Age are all negative. At this stage,
that is intuitively correct; introducing new products should reduce age, as
should withdrawing old ones. Similarly, the more products there are in the
market, the lower should be the average age.
The rest of the model is straightforward. The older the products, the
greater the proportion of available money spent on introductions. The
greater the proportion and the greater the flow, the larger will be the Rate
of Starting Product Introductions and the lower the Product Research Start
Rate. It is essential that the reader does not simply glance at these explana-
tions, but follows them closely on the diagram.
Qualitative analysis
There is much else that is missing from this diagram, and the purpose of
giving the reader an incomplete solution is to develop a critical habit of
looking at narratives and models . It is implicitly assumed that the research
capacity and the ability to introduce new products are both unlimited and
completely flexible; the research laboratories can be switched on and off at
will. In Fig. 2.13, point 4, the variable (actual) Products in Research Phase
should make one think of a Desirable or Feasible equivalent, to represent
the ideas of keeping the research team reasonably busy or their physical
capacity, respectively . Similar ideas apply to product introductions.
~~~~
( t l'locNct_
PrOduct Research D ..... Comp!e1lonRate
Start Role - RESEARCH \
I
~~ +t
I / ...- --- .... .....
/ I t i l '\ t
I
I
1'locNct~
Rote Ploc1Jc1s_.
\
, f~""MaI<~_
II II - \- \ The Missing
I
I
I
SlIoIIIo t
J Link?
: ~~t
i
I
.~ Phase
1'NT1lOD ~", \
\
I _\ t \
I
I
I
I
I '--=~
I
D1!posoble
Revenue Loop 1 / \ " ' -, \
Flow ~ ---r· \ \ \
ofi' ( --- Of
I
I
I
t~ ..-.......... t \ \ ,
,~~ ') :
\
\
\
\
\
I'
\
\
\ A- \\ \ "./
1'locNct_-t I
\
\ \ ,,- I I
, I
\
\ - ', _~ / I
\
\ • -~~
otProc1Jc1S ~.... / / I
Company
\
\
I -" ",I /
Polley on \ I -------'" '" /
ControlUno
"" ,
~tAge
\ " -, t+ Loop2
5The order in which the loops are numbered is deliberatel y arbitrary and does not imply that
Loop 1 is more important then the other loops mentioned here.
62 Influence diagram case studies
hence more can be spent on introducing new products, driving product age
further down. On the other hand, Loop 2, which is negative, acts to inhibit
Loop 3 in that, whenever products are relatively young, the firm cuts back
on product introductions to leave more money for product research. Fur-
ther , the link from Product Withdrawal Rate to Products at Market con-
nects Loop 2 with Loop 1 and may inhibit Loop 1 from generating its full
growth power.
It is clear that reasoning about loops in this fashion rapidly becomes
cumbersome and it is best seen as a source of insight into aspects of the
model which might repay closer study. In this case, it suggests that the
corporate policy which varies Fraction of Disposable Revenue Flow Spent
on Product Introductions, which was implied in Fig. 3.3 but is explicitly
shown in Fig. 3.4, will need to be worked out very carefully if smooth
growth is to be achieved.
Similarly, following the links up the left-hand side of the diagram leads to
an impasse in that there are no links coming back down and hence there is
no feedback to harmonize the activities of research and marketing. This is
emphasized by the link added from Products Available for Marketing to
Rate of Starting Product Introductions, a link which was missing from the
original system but the addition of which might have a major effect on the
corporate behaviour. We shall test some of these possibilities in a quantita-
tive model in Appendix B.
A PREDATOR/PREY SYSTEM
Narrative description
Rabbits are killed by foxes and rabbit deaths from natural causes are
very rare.
Foxes eat only rabbits. The rate at which rabbits are killed depends
on the numbers of both species and the efficiency with which foxes
hunt. The rate at which foxes are conceived depends on the numbers of
foxes and their natural fecundity. Since the foxes have no natural
enemies, their life span is determined by the inherent life span of the
species, but life span is reduced if the average food intake of foxes
(from killed rabbits) is less than the food a fox requires for a normal
life span.
A suggested solutiou
An initial and, as we have just pointed out , very simple diagram for this
problem appears in Fig. 3.5. This differs from previous diagrams in that
abbreviations for the variable names are given under the text for each. This
is often done as the basis for the connection between the influence diagram
and a subsequent simulation model. The reader should decide whether it
adds to or detracts from the diagram.
The rabbit population sector consists of a simple flow module, with rabbit
births depending on Rabbit Conception Rate delayed by a gestation period.
The physics of fox birth and death are a little more complex as we need to
64 Influence diagram case studies
". RobbII
RGEST
Normd
_
( - -- -
+ ~~4--- -- -~
'r:"
RobbII RABeR
- -PopuIa~ / ~+
~1-
' . . . . ......+_ ..Rabblt ,I
~ ~ -----_ I
~y---------~~R - __ i
FHUF t+ -, I
, ~\r :
J ..... _ - - - - _ AV8I'oge
Normd
R~le
,
~ J »< - ..... "
FecundIY
FOXFfC
,
/
/ "
" AKR
I
I
I( ~ J
I
I
I -:
Po~xpop~on~-
FOX A~
Intake . -+- ..... ./
I / + ', per Fox
AVIPf
:+
I /
:
, I
=
f \
Fox
Concep~ \ I
Rate
FeR \
, <, _ .. ='
Fox
Food
~+
+-___
Normd
\~
+ FOR Food
'\- FSF ~
\ J NF1IPF
~~
\ /
A~+ .... / /
Fox 4-
Rate Ufettme
FaR AFUFE ...
" Normd
" ~
~
NFl1F
allow for the fact that faxes only die from old age, accelerated, perhaps by
shortage of food.
The Fox Death Rate problem introduces a new type of delay. Normally,
an inflow leads to an outflow with a delay between the two. The delay might
be constant or variable but, if the variation arises from the contents of the
delay , we need to show the influences involved explicitly. If we do not, we
shall get the wrong feedback structure. Thus, Fox Death Rate is shown as
depending on the Fox Population and the Average Fox Lifetime, with the
latter deriving from the Fox Population mediated through the food intake
effects. The effects of food intake are that , the greater the Average Food
Intake per Fox, the greater the Food Supply Factor , hence the longer the
Average Fox Lifetime and the lower the Fox Death Rate.
At this point, readers should pause and check that they understand the
A predator/prey system 65
reasons for solid lines and dotted lines in the population segments of the
diagram.
An invaluable skill in modelling is to think in terms of the dimensions of
the variables and parameters. In this case, Rabbit Population must be
measured in [RABBITS], where [ ] enclose the units in which the variable
is measured. Similarly, Rabbit Conception Rate must be measured in
[RABBITSNEAR]. Normal Rabbit Fecundity must, therefore, have di-
mensions of [(RABBITSNEAR)/RABBIT], in which we use ( ) within the
[ ] to draw attention to that which flows in the system.
Using a similar line of thought , the Fox Hunting Efficiency must have
dimensions of [l/(FOXES*YEAR)], in other words, the number of rabbits
killed by a fox in a year of normal hunting. The reason is that the narrative
implies that
RABKR=FOXES*RABBITS*FHEFF
Since RABKR must be [RABBITS/YEAR], and foxes and rabbits have
dimensions of [FOXES] and [RABBITS] , ordinary algebra gives the di-
mensions for FHEFF when the variable names in the equation above are
replaced by the dimensions of the known variables and the resulting dimen-
sional equation is solved for the unknown dimensions of FHEFF. As we
shall see in later chapters, dimensional validity is an essential aspect of the
correctness of a model and it is as well to get into the habit of thinking
dimensionally at an early stage.
Average Kill Rate is needed because it is very unlikely that foxes start to
die early simply because today's hunt was not very successful. There must
be a period after which hunger starts to have an effect. Note, however, that
the Averaging Period is a parameter of fox physiology and not, as was the
case with Averaging Period for Order Rate in Fig. 2.7, a matter of manage-
ment choice.
While simple diagrams are generally preferable, this one is too simple for
comfort. Later in this chapter the read er will be asked to extend it to take
account of the food available to rabbits.
(
i:~
LoopRI O~.) NotmaI
ee:.,cbbll _ _ _ I1aIX>II
4---
.-
+ R~tion ~
Rabbit RABeR
_ Population 4 +
RABPOP ~~
I
I LoopR2 I A:",
,
FA7lME
\ + I , J
........ Ra~_ I
Fox _ Rate I
I
~y __ - - - - - -
Rim ++
RABKR LoopF4
• I
,
I
!:Fr
I
Fax _ A~ +
P~~ " Intake ......
per Fax
+ \ \ AVIPf
Loop I
=..
\ F2 I
Conception
Rate
FeR LoopFI \. ~at.
~
Food
T+ NotmQ/
~=
FOR Food
+ ~- FSF ~'
\ I NF1lI¥
\ +
A~~e"", ;'
Rate Ufet1me
AFUFE __
FBR
-, NotmaI
, Fox
IJfeIIme
NFI11
counteracted by F4 which ensures that more foxes will kill more rabbits
producing food to keep foxes alive for longer to kill yet more rabbits.
Obviously, this conflicts with loop R2, which ensures that the more rabbits
are killed the fewer there will be to kill.
Reasoning about loops in a system as complex as this is clearly of limited
value and we shall have to rely on simulation, in Chapter 6, to understand
it fully. The seeds of complex behaviour are, however, clearly present.
policy areas . A complication arises if the fish have other predators, such as
sharks.
System dynamics has proved to be rather good for representing the dynam-
ics of combat. This case study indicates a line of approach to the develop-
ment of an extremely simple combat model which will be considerably
extended later in the chapter.
Narrative description
Two nations, traditionally referred to as Blue, for one's own side, and
Red, for the potential enemy, are hostile, and it is possible that Red
may attack Blue. Blue wishes to improve its combat power with the
aim of deterring Red, but has a limited defence budget. Blue' s problem
is to detect the 'pressure points ' in the system at which defence ex-
penditure might have the greatest effect, or defence cuts the least
effect, on combat power. Blue approaches this problem by modelling
a potential combat , with the aim of assessing the broad effects
of defence improvements", not of predicting the exact outcomes of
battle.
The scenario is that both Blue and Red have forces on the frontier
and others in reserve , some distance away. For both sides, if reserves
are ordered into battle , there is a delay before they can arrive and,
because of limitations in the road network, there is a limit to the rate at
which reserves can be despatched.
Each side inflicts combat losses on the other depending on the rate
at which each man fires, the number of men in action and the propor-
tion of shots which hit a target.
The Red commander wishes to achieve a speedy victory and there-
fore commits his reserves as fast as possible. The Blue commander
hopes to wait for Allied forces to arrive from a neighbouring country
and then to achieve an overwhelming victory. He therefore commits
reserves only when he needs to. His criterion of need is that he does not
wish to be outnumbered by more than 2 to 1 at the point of combat?
A suggested solution
Parsing the narrative and consideration of Fig. 2.12 should show that the
physics for each side consists of a simple Type A module, the inflow to
6 Indicating the broad effects of system changes is exactly what system dynamics is good at in
all manner of probl ems.
7 This is a very simplified version of the Battle of Waterlo o.
68 Influence diagram case studies
which is the outflow of a Type B delayed flow module. This is shown by the
solid lines in Fig. 3.7.
The Red commander's policy on reserve commitments is to do so as fast
as possible, so the transport limitation is the only true influence shown on
Reserve Commitment Rate. The link from Red Reserves Remaining is
marked with the two lines for a non-negativity constraint to show that
Red will have to cease committing reserves when there are none left to
commit.
The transport capacity and non-negativity constraints also apply to Blue
with the addition of the need to commit reserves when Blue is outnumbered
on the battlefield by more than an acceptable ratio . This is expressed by
comparing the actual and acceptable ratios and triggering the movement of
reserves when the actual ratio exceeds the desired ratio. The link from
Force Ratio Trigger is also marked with two lines to show that there is a
non-negativity constraint, as was the case with the link from Desired Re-
cruitment Rate to Trainee Recruitment Rate in Fig. 3.1. The two non-
negativity constraints mentioned in this paragraph represent slightly
different things. In the first case, Reserve Commitment Rate stops com-
pletely when there are no more reserves left to commit. In the second,
commitment takes place spasmodically as and when the need arises. Obvi-
ously, the first constraint will take precedence over the second.
The loss rates for the two sides are driven by the total firing rate, meas-
ured in [shots/hour], which is the number of men multiplied by the rate at
which each man fires [(shots/man)/hour], and the casualties inflicted by the
average shot [men/shot]. As mentioned earlier , the sooner the reader devel-
ops the habit of thinking in terms of the dimensions of the variables, the
better. In this case, it is a common error to regard a parameter such as Red/
Blue Shot as a kill probability: a probability has no dimensions, which
would lead to a dimensionally invalid equation.
. - -l~~~ - --
'Iue//ale /
l
"'::""' -
Fig. 3.9 Loops in the simple combat model.
The decline of the Mayan civilization 73
THE DECLINE OF THE MAYAN CIVILIZATION
8 The discussion in this section , and Fig. 2.10, are based on Hosler et al. (1977). One of Hosler's
co-authors was a system dynamicist, D. Run ge.
• For a fascinating account of similar social structures among the Mexica (Aztecs) see Thomas
(1993).
74 Influence diagram case studies
--
//1 \"
-,
// ', '/ / -,
,,+ \
I I --- "
II \ "/ / - <, , \
I \ II
I
/ Commoner
Death Rote
-com~commOf'le(
1/ \ + BIrth Rote
\
,
I +t ~ + /? \ \
( J , - - - - - -/ / \ '\
I I I
I I I \ E~~""MJf1InlI \
I, II \ rme~ ,
: I I \ I Monument + I
J I \ I ~ +- - ...... -, I
! ,/ \\ _ / t\ )/ i
: I
I
: / '*'Averoge+
pe~~~....._ - - - - ';;numentr- /
I
:
I
i
:: +\ Food -
/
I
1+ / /
I \ Production....... < , / +... ,;'
I I _ - - - - ... C~rd'n ..-- . . .
\ \ ! \ -/ // ,:
J <, , I
\ \ Froctlonof / I
\ \ CommoneB I
\ \ ., Monument I
\ \ CoNtnJeflon I
\\ \\ ++
\
~
Pr;':'~:f I I
\ \ \ I
\ \ ' I I
\ \ I I I
\
"
\
\
',
\
\
\
per
I
ner
co::c
Desired Monuments; /
~tbn
per Commoner
I
.........
.........' ,'-.....
.....
-
:: I
Foodpet' _ - - -
.... . : :
//
- - ...commoner-
tion are correct, but to illustrate the use of influence diagrams and simula-
tion models to provide a framework of understanding another discipline.
The collapse of the Maya is a large topic in American archaeology and
many books have been written on it. This diagram puts onto one piece of
paper a summary of a very complex argument. In their simulation model,
Hosler et al. claim to show that a less severe reaction by the elite to the
decline in their prestige would have averted the collapse.
,/ / /
----- -, -, //
/,- -",
-,
1/
/ ~'.. 1 ", - - - ......... \
I \ 1 / " "
/ \ \1 1 '.ct+ \
I -com~rs
C ommoner \
/ ~~~~ II \ + BirthRate \
I +t \ . +. ",/:; \ \
/ I ------ / \ \
I I \ Elite'.AVe«>ging I
I I \ 71mfI1Or_' \
, I \ COnIIruc_ \
I / \ I Monument + I
I I \ I ~~y ..... - -, -, I
I
/ \, - / '*'Averoge + -t\ ) i I I
: ~~=~er~ - - - Monuments-"' '/ I
'
I
:I
"+ \ II Control Loop
t+ / /
\
\
\
\ Pr~O<1~- I _ ..... + \
C~o:,
+ '/ ..- /
\ 1 /' Rot.
\ I -" / t+
\ \ Fraction of I
\ \ Commonerl I
\ \ In Monument I
\ \ Construction I
\ \ I
\
\
\
\
\
\
A Collapse
+ i P''''g::OI I
l~ ,
I
I
\ \ Loop I I
\
\
\
\
\ I
I
I
J
Desired Monuments -;. ./
\ \ per Commoner I
\ \ ConstnJction
\ " per Commoner
\ , t +
\ \ I
\ " I
,
, ,
, /
I
" " /
" ... '" ..... ~ / /
.............. -" /
....... .... ..... ..... od oer _---
..... - .....commoner
dynamics and does not mean that the managers or the consultant were
incompetent. It almost invariably comes about because the clarity of a well-
drawn influence diagram helps people to think more clearly about what
they do and enables them to describe it more accurately to someone else; a
very useful property for a diagram to possess.
In this case, the management explains that it does not change the flow of
money into product introductions simply because of the age of the products,
even though the Marketing Director might want to do that. Instead, it
attempts to keep spending in the research labs and in the product launch
department on a reasonably even keel, to avoid wasting money by develop-
ing products which are then abandoned because they have passed their
shelf lives and to keep a reasonably steady pool of Products at Market. The
spending problem is approached on the following lines:
• Management takes an average of the product withdrawal rate and bases
the required rate of spending on product introductions on that, in an
76 Influence diagram case studies
attempt to replace old products with new ones. However, it reduces the
required rate as the number of products on the market increases.
• Similarly, management arrives at an idea of the rate of spending on
product research by smoothing out the rate of starting product introduc-
tions, to try to provide for newly-researched products to replace those
being introduced. However, it takes account of products available for
marketing to try to avoid wasting money.
• The total of these two required spending rates may be more or less than
the disposable revenue, but the two required rates enable management
to calculate the fraction of the revenue flow which ought to be spent on
product introductions.
• Having done these calculations, the company is still very market-orien-
tated, so the average product age is used to sway the ratio in favour of
product introductions as the age rises and falls.
This revised narrative is represented in Fig. 3.12, but readers should attempt
the revision themselves before studying the answer. They should, however,
study Fig. 3.12 rather carefully to see exactly what has been changed and
how those changes conform to the new narrative.
Fig. 3.12 is, perhaps, at level 3 in the cone because are still at least six
missing parameters. These are the respective unit costs of developing and
introducing an average product, which were missing from the earlier dia-
gram, the two parameters for the times over which the averages are taken,
and two more which reflect the time constant over which Products Avail-
able for Marketing and Products at Market will be spread in assessing the
two required spending rates . This is clearly seen by thinking in terms of the
dimensions of the variables. For example, if RRSPI is Required Rate of
Spending on Product Introductions, UCPI means Unit Cost of Product
Introductions, APWR stands for Average Product Withdrawal rate and
PAM symbolizes Products at Market we can write the equation implied by
the diagram and then write the equation again, replacing variable names
with the respective dimensions in [ ]:
RRSPI = UCPI*(APWR- PAM)
[$/month] = [$/Product]*([Products/Month] - [Products])
We can now see that the second equation is not dimensionally consistent
as it involves subtracting [Products] from [Products/Month], which is not
legitimate.
Although these parameters would have to be given in a simulation model,
the purpose of an influence diagram is to promote communication and
thinking, and Fig. 3.12 does that.
For instance, the reader should trace the new loops and see that they
provide the equivalent of the missing link which was identified in Fig. 3.4:
Products Available for Marketing does now influence, indirectly, Rate of
Starting Product Introductions. However, there is still no concept of targets
_-'~~~ch
/'
/' I -
I /
I I
I /
A clUal5pendng + I I
on ProductlnlrOduc""", ~ _ I /
~ + r- ~~~
I
I
I "\ /
I ,, " + beSpenton
I
K~;-
I \ 1/ " 1nIr="'n:"..
I
I
\ "t..- ~ +
\ /' I \
I \ /'/' I \
I
I A/' I \
I I \ I \
I I I \ , \
I I \ I \
I I \ J ~o:\ ot ; _
I / \' ProduCllnlToductIons - - - _
I I \ J ++
I I \ I \
I I \ / \
I I Disposable \
I Revenue ...- _ _ _ _ _ \
I I Flow + - ---_ , _ _
I I +. \ ------- _
\ I \ "
\ I \ "
\ 1 \ Ave<ooe Product
\ \ ' WI1hd''''''''' Ilote /'
\ DIspooabIe + It
\
\
\ Reven.Je \ I
/'
---
\ Flow PElf ....
\ \ Product '- I +
\ \ 4 - \ _ Product Withdrawal
\ - -\ - - - - - - - - /' Ilote
\ \\ " "-
/"
\ \ " -,. /
",
\ \ ' - ¥ ....
\
\ \ -- - _ .... Ave<ogeAae
\ - - - - - - - - - - - - - - - - - - olProducIS
\ I . ,
/" _ <,
"",
-,
/
.... ""
" -, I
.... /'
.... ' ............ ..... I
.... .... + ./
-, - ' , PtElSSlJ'6 to Increase
...... ....... ...... - PrOducllnlToducl1on
~'t:
lnaeoses
-- ------ -- --- -
------ -- -- - - -
Fig. 3.12 An extended influence diagram for the pharmaceutical company probl em.
78 Influence diagram case studies
~ ~ ..... ~~~
_
c~ogetion
~e
I · +
\
- Gr~
I I ~
+
,.
~C_
RabbIt " -
', ' GRASS
Avai lable
If
I
_ , I
I , " II
-~ !:!-SOa> ' I <, Food + ,. / Grass
Food ~~ \ I - - _ Avolabkt ... _ GrONth
5uppIy AV_ I __ . per RabbIt Rate
RedJcIlon \ \ I ,. - FAPIl GGR
~ I I I .: ~
FSRFR., ~ 1 \ / \
, Avet 0fiJ8 1\ I \
i- \
~ RDR _ Rabbit _
ConunI>/IOn / - ~\ RabbIt / / /'r::!:!
1ld.1ot / Conc ep tion ..
~. : " ~R
\ -, +~ Av!!!!!!.'11
""", + '-----~/ ~~
H~ ~--- - -- - ---------_ ~n~
E~---- - -_--. Rote ...., /
FHEFF AABKR -, , I
t+ +' ...
I _ -- ---_ Average
_ ' / Kill
Fen I I' -, , Rate
~ Fox' - , Alf
I ....- -- - - ~~~ ' .. I
: ,/ + \ A~+
.+ ,
/'
:
I I \ Inl ok e ..... - .....
I per Fox
y Fox ' Fox AVlPf
~Ilon _:~=
----s::-
' ...
FC~R+ Fox
F\~\ Avetoge +
~ ~SF
..
_ Fox
Blrth lJf~ __ / NFIIPf
~ AFUF£ ....
-- -- -~ ur._
NFUF
Fig. 3.13 Adding the prey's food supply to the pred ator/pr ey system.
the case, a variable for Actual Rabbit Fecundity would be needed, with
appropriate influences from food intake. Howev er, food intake might not
have the same effect on fecundity as it doe s on life span. As influence
diagram practice, the reader should experiment with altering the diagram.
In practical modelling one always has to be careful about extending a
diagram too much, as data for the parameters and effects might be quite
hard to come by.
In the discussion of pressure points refer ence was made to the possibility
of culling faxes to keep the rabbit population up or releasing them into the
wild to keep the rabbit population down. Add these extra flows to the
diagram , bearing in mind that faxes will now no longer die only as a result
of having been born . Do not forget to allow for a Desired Fox Population,
dep endent, perhaps, on a D esir ed Rabbit Population.
80 Influence diagram case studies
Before leaving this model we shall use it to illustrate a wider problem
in modelling. Adding fox culls based on a comparison of actual and
desired fox populations leads to a diagram which implies that the fox
population is instantaneously and precisely known. That is clearly not the
case, and one should refer to perceived actual population, drawing a link
from actual to perceived population, including a delay to imply a time lag in
perceiving what is going on and adding a new factor to represent distortion
and error in observing populations. Similar ideas would apply to the combat
model: it is very unlikely that the Blue commander knows the actual
strength of his own troops in combat, let alone Red's. The reader should
study how the effect of delay and distortion affects the information parts
of the system dynamics paradigm and how to write equations for such
aspects.
The combat model of Fig. 3.8 is very simple and the reader should attempt
to incorporate the following factors:
• Blue's soldiers go into battle carrying negligible amounts of ammunition
and the commander of Blue's support services is responsible for bringing
up fresh supplies. He has a target for the amount of ammunition which
should be available for each man in combat, from which he can calculate
the discrepancy between the total requirement and the total availability.
The reserve ammunition is held some distance from the combat area and
requires the same time to move forward as do troops, and it has to
compete for the same transport capacity, a certain number of rounds
taking up the same space as one man.
• The support services commander and the tactical commander therefore
have to resolve the demands for transport capacity if the one wants
to move ammunition at the same time as the other wishes to commit
reserves.
• The ammunition available per man at the front governs the rate at which
each man fires. If there is plenty of ammunition the individuals fire
rapidly, if there is little they fire more slowly.
• Blue also has long range artillery which cannot be attacked by Red but
which can fire at Red 's supply route . The artillery is not accurate enough
to hit Red troops on the march, but the holes it makes in the road have
the effect of reducing Red's transport capacity and of increasing his
movement delay.
• Red has a certain number of engineer troops who can repair holes in the
road but in doing so, use up engineer supplies.
SUMMARY
The illustrations in this chapter are the foundation on which you will build
skill in system description and the knowledge of that skill will add much to
your confidence when building simulation models .
A.,.,..,_ _
"'-Ccm~". --- -- -- .... .... ....
+ -- --- ....
\ Perce Raro ....
\ _ _ - - (Red/Blue) ",,
- \
\ , .... -- - -- t-
, _ /hd hdlla..
,
\
""" dFW I
\ »" \
\ .... I I .... ,.., ..... I
~ +,; I I : J
FOfCe Ratio \ I To.OI Red + ,
/ Trigger \ : /"'""fifingRate ... - ...... , I
/ \
/ \ I " ' / .... - -H - - ....
/
/ I , " / / ' ,
,,
~~+ , / + p \
I
/ _
~~~
"::::::.::::
,
" ~:' c~~ :-- ~~~~: . DR c~=r::ate -. Rr~~es
~ .... ~ , . f ..
I
"'J +
I .... ,
I ....
- , I I
/ / ' I I
I I ' I I
I I .... - -it- - .... " I I
,I I Red Transport Eroneer
, Ca pocJty ,- - ~':K
I' I
/ '' ,,
nonQ
I' I \ .>. t- e';::"... Rema
, I Blue Reserve. _ BkJeReserv e of' Blue Reserve Blue ., Red lO$$ I / --- - -.~~ -
, Remarjng . . . . - - - Commitment Rate
SB • AnivaJ Rate - - - + Combat '
Rote
II , ..... ..... ....... t _- - -:,? , I /I N_dhd
~_ II
,. I .... ./ \ +•
1 •
I "
, I , / \ • + j
I II .... .... / ~Ammun/_ - - .... \ I / \ Rote ot Damage
\ / / / ~._..... -< / I I I ./ / \ Repa ll' per Toom Rat e 0 ' Cons.lXTllOQ
I \ .... I .... / \ I I
\ I .... I .... / I CUllen' A.m ount \ I E~eer $Lppf18S
I I
+\ . , .~ I"" I \ .... \ ofDallage ~ -\ \ /
+ / I
C 'l.otJ:,~ed I ~ / .. I ' .:. ~otalBlue .... \ .,+ . . t·I
to~ Movement I De5wed Amrnl.rition /' fi'ng Rate Rote ot Repoll ing - ,. I
I 1 stee les +, Damage I
_ _ d ~
I\ Bluello'e ~r~
I- II . II - ..I " ofF,re P8f - /
I '" I Blue~ -" M<>'1 ( ~
,
\
,,\
..... _ \ AI'nrTu'lifion Stock" /
+ I \+
\
J --- Rate ot
hnict10g
, DiocrepaflC'L "
"
- r\ - -' ...... .... _ BlueAmmunfhon _ +- Damoge.,
.... ....
" ...... ,\ - .... ..... ~-st-- .. .... .... ....
...... ............ - '-. ---------- _ _ - - - Rote of Ammunitlon ..... ~P*
~~ng~
-, +
. A~
+. I
,::;.~
,
N...."-rd
Fig. 3.14 Combat model exte nde d to include ammunition supplies and long-range fire effects,
References 83
The main theme of the chapter is that influence diagrams can be applied
to just about any kind of problem in which dynamic behaviour might occur,
whether it be the dynamics of the firm, the ecology, the battlefield or a much
wider socio-economic system. Careful study of the diagrams will reveal a
good deal of commonality between them, even though the topics and the
names of the variables are so different. That commonality is the idea behind
the common modules studied earlier, and the basis of system dynamics is
that managed systems all work in pretty much the same way, that is they
have similar units in their structure, almost regardless of the problem do-
main. Recognizing commonalities, without jumping to conclusions, is an
essential part of the art of influence diagramming and system dynamics.
REFERENCES
Hosler, D., Sabloff, l .A. and Runge , D. (1977) Simulation model development:
a case study of classic Maya collapse, in Social Process in Maya Prehistory (ed
N. Hammond), Academic Press, London .
Thomas , H. (1993) The Conquest of Mexico , Hutchinson , London .
CHAPTER 4
Introduction to simulation
FUNDAMENTAL IDEAS
Having seen how influence diagrams are developed and used for qualitative
analysis, it is time to cross the dotted line which separates Stages 3 and 4 in
Fig. 1.3 and move on to quantitative models .
Influence diagrams are models, in the sense that they represent a real
system by using variable names connected by signed links. A quantitative
model , in contrast, represents a system by using variables in equations. In
practice, there is no hope of 'solving' those equations by normal algebra or
calculus; managed systems are too complicated for that. We therefore make
use of simulation, meaning that we will create a set of equations to repre-
sent the system and then allow the equations to run forward in simulated
time to attempt to mirror the behaviour of the real system as it runs forward
in real time. In principle, one could run the equations forward by pencil and
paper calculation; in practice, a computer and specialized software are used.
The key to quantitative simulat ion is that the equations must do the same
things that the real system would have done, and for the same reasons , if the
model is to be regarded as satisfactory.
In system dynamics, simulation is governed entirely by the passage of
time and is referred to as 'time-step' simulation. The other type of simula-
tion in management science is called 'event-based' and is discussed in the
standard management science textbooks. This chapter introduces the es-
sential ideas of the simulation process used in system dynamics and some of
the basic techniques which we shall need to build models. In a later chapter
we shall show that there is no limit to the complexity which can be repre-
sented in system dynamics, and it is, in fact, possible for a model to be both
time-step and event-based.
The essential idea in time-step simulation is that the model takes a
number of steps along the time axis; as many, in fact, as are required to
simulate reasonably accurately the total period which the modeller wishes
to investigate . Each step is quite short, so that there might be many steps in
total. The step length is a critical factor in good simulation and we shall
discuss in due course how a satisfactory step length is determined. The step
length is always denoted by DT.
At the end of each step, two things happen (automatically in the specialist
system dynamics simulation packages). The first is that the variables which
Fundamental ideas 85
represent the system's state are brought up to date to represent the conse-
quences which have ensued during the previous time step ; special measures
being needed to get the simulation to start the first time step. Next, the
variables which represent the flow of information and the initiation of
action are evaluated and the necessary actions are set in train. What actions,
if any, are to take place will have been stipulated by the modeller when the
equations for the system were written.
To bring this about requires two types of variable. The first represents the
states of the system. In control engineering these are called 'state variables '
while in economics they are termed 'stocks', but system dynamics calls them
'levels'. The second represents the physical flows in the system which arise
as a result of actions and produce the consequences in the information/
action/consequences paradigm. In system dynamics terminology they are
called 'rates'; they have no special name in control theory, but economists
recognize them as 'flows' . These variable types are shown in Fig. 4.1.
Levels and rates are the mathematical basis of system dynamics, but, in
practice , a third type of variable is also used: the auxiliary. These reflect the
detailed steps by which information about the current state, the levels, is
transformed into rates to bring about future change. This is shown in the
inner loop of Fig. 4.1, the right-hand side of which is a dashed line to show
the information/action component of the information/action/consequences
paradigm. The left-hand side of the inner loop is shown by a solid line to
signify physical flow, and it also has an integration sign to show that, the
longer the rate continues to flow and the larger it is, the greater will be the
consequence, as felt by the level. The perfect analogy for this is the quantity
of water in a bath when water flows in or out.
Whereare
wenow ?- - - -_
\
•
\
The outer loop in Fig. 4.1 and the text and arrows at the top remind us of
the connection with time. The levels are the current state of the system ,
shown by the word 'Now'. The right-hand side is movement into the future
and the left-hand side is movement from the past. Past changes produced
present conditions; present conditions will produce future change. Rates
are, therefore, the movements across time steps, levels are the thresholds
between time steps.
What of auxiliaries? These are intermediate stages by which the levels
determine the rates and they therefore also exist at the thresholds between
time steps and are 'now ' variables.
It is important to realize that every variable in a system dynamics model
is calculated at every DT . Some of the calculations bring the system up to
date, others move it forward in time.
What we have said about variables which exist at points in time and those
which exist across time steps suggests a notation for variables to emphasize
their time dependencies. Figure 4.2 shows a time axis with two of its time
steps drawn to a very exaggerated scale.
The three points are conventionally labelled J, K and L. The step from 1
to K is thus referred to as lK and that from K to Las KL. The time length
between successive points, DT, is very small, perhaps only a fraction of a
week. With these time labels, a level, to which we shall give the name
LEVEL, as though it were an ordinary variable, would be referred to as
LEVEL.l or LEVEL.K, depending on which time point was involved.
System dynamics variable names have, therefore, two parts: the name
itself and the time label. The name for a rate would be RA TE.lK or
RATE.KL, again depending on the time step in question. Since auxiliaries
are 'now' variables , existing at the thresholds, they are labelled
AUXILIARY.K.
Figure 4.2 shows that LEVEL has increased from 1 to K because RATE
flowed into it between land K, DT being so small that RATE can validly be
treated as constant over the time-step. Common sense now leads to the first
of the fundamental equations:
L LEVEL.K = LEVEL.l + DT *RA TE.lK
In words, what is in the level at the present time, K, is what was there at the
previous time, J, plus what flowed in during the interval from 1 to K. The
amount that flowed in was the rate of flow, RATE, multiplied by the time
for which it flowed, DT. To emphasize that this is a level equation, it starts
with the type label L.
This seems very obvious, but it is reinforced when we consider the vital
matter of dimensions, or units of measurement. That can be done by writing
The fundamental equations of system dynamics 87
L~EL.K- <,
AUXI~Ry.K
..,
L RATE.KL
RATE.JK
J JK K KL L
l(
time
DT DT
1 L LEVEL.K=LEVEL.J+DT"RATE.JK
The Fundamental
Equations:
1
2 R RATE.KL=f(LEVEL.K,AUXILlARY.K,PARAMETERS)
the equation again with, underneath each term, the appropriate dimen-
sions. In this case, we will use the bath water analogy, LEVEL being not the
depth but the amount of water in the bath. The amount must be measured
in litres, and the rate of flow from the tap (faucet) will be in litres/minute.
DT, being time, must be measured in minutes, though we shall write
'minute' to be consistent with the time unit for RATE. Omitting the type
label and spacing out to show the match between the level equation and its
corresponding dimensional equation, this leads to:
By ordinary algebra , the minute for DT cancels out the minute for RATE,
so the dimensional equation becomes
Ii tres = Ii tres + Ii tres
This is called a dimensional identity because the units of measurement are
the same on both sides of the = sign, and it demonstrates that our first
fundamental equation is dimensionally consistent. Before we move to the
second fundamental equation we must explain why dimensional consist-
ency matters.
Those levels in a system which represent aspects such as the amount of
stock, the number of people, the quantity of water or the balance of cash,
are conserved quantities; what the levels contain cannot be lost or created.
Even if water flows out of the bath , it has not been lost, merely transferred
elsewhere, so there must always be a mass balance in the system and hence
in the model of that system. The rates in a model are the forces of change
88 Introduction to simulation
and must be measured in units which are consistent with the levels they
feed. If we use [ ] to denote the dimensions of a variable, then:
[RATE] = [LEVEL]/[TIME]
and
[LEVEL] = [RATE] *[TIME]
For conservation , a rate must have units of the level it feeds divided by the
units in which TIME is measured. The units of a conserved level must be
those of its inflowing rate multiplied by those of TIME!. That is how a real
physical system works, and a model must work in the same way if it is to do
the same thing as the real system and for the same reasons.
Again, what of auxiliaries? They represent the steps by which a level
causes a rate to flow and must, therefore, have whatever dimensions are
needed to ensure dimensional consistency between rates and levels.
We shall have much more to say about the details of dimensional analysis
when we come to formulate equations for the case models.
The first fundamental equation copes with the consequences of what
happened during the JK time-step. The second is the information/action
phase which will take place at K and produce rates for the impending
step KL. Figure 4.1 emphasized that levels and auxiliaries, together with
any parameters in the model, determine the rates as forces of change, so
the second fundamental equation is much more general in form than the
first:
R RATE.KL=f(LEVEL.K,AUXILIARY.K,PARAMETERS)
where the f implies that there is a function or equation which connects
LEVEL, AUXILIARY and PARAMETERS to RATE, and the type label
is R to emphasize that this is a rate . That equation will model the ways in
which the system makes decisions, given the values of LEVEL and AUX-
ILIARY. (There may, of course, be more than one of each in the equation.)
Notice that in the level equation, the rate has the time label JK on the
right-hand side of the =, because past history is being used to update
present conditions. In the rate equation, the time label is .KL on the left-
hand side of the = to show that future changes are being generated by
present conditions.
The significance of the two fundamental equations is that the RATE
equation can be as complex or as simple as is required by the problem;
provided the modeller can understand what is happening, there are no
constraints on what can be modelled. The LEVEL equations, on the other
hand, ensure that the physical quantities are conserved so that the model
cannot get out of balance. That property of the LEVEL equation contrib-
1 Later in this chapter we shall develop a special type of level equation to represent the
smoothing of information which was shown in Fig. 2.12G. The dimensional rule given above
does not apply to smoothed levels.
Time shift and relabelling 89
utes much to ensuring that the model does the same things as the real
system and for the same reasons , to repeat a slogan which the modeller
should learn by heart and repeat whenever a new equation is written. In
summary, the RATEs are the entrepreneurs driving the system forward and
the LEVELs are the accountants, keeping it in balance.
The LEVEL equation should also be seen as representing the memory of
the system. The size of the cash balance level at time point K is the net effect
of all the cash outflows and inflows which have ever taken place . Later in
this chapter we shall discuss a special form of level, the smoothed level,
which gives a 'memory' for information just as the standard, or 'pure', level
which we have discussed so far is a memory for quantities.
Figure 4.2 seems to imply that the sequence of time points in a simulation
would have to be labelled N, 0, P and so on, and, even using the Greek and
Hebrew alphabets, one would soon run out of labels. The problem is solved
in the system dynamics languages by realizing that J, K and L are simply
labels for a window in time. As simulated time moves forward, the window
is advanced and can be relabelled as a new J, K and L rather than L, M and
N. This is shown in Fig. 4.3; the current position of the window on the time
axis is the nth step, so the next will be n+ 1, at which point the relabelling
automatically happens.
It is important to understand that this can only happen because there are
two main types of variable, levels and rates. The rates are forces
for change into the future, governed by the current state of affairs, the
levels. As the time windows move forward, what was the future for one time
point becomes the past at the next; in Fig. 4.1, we got where we are now
because of forces for change during the last time step and where we want to
go next determines the forces for change in the impending time step.
Step n
I
J K L
I
X
K
Level equations always come in pairs: the equation itself and an additional
equation called the initial condition. Thus our level equation would be:
L LEVEL.K=LEVEL.J+DT*RATE.JK
as before, together with
N LEVEL=100
The initial condition has the type label N and it has no time label because
this is the value at TIME=O when the simulation starts. In this case the
initial condition , usually called an N equation, states that there are 100 units
in the level to start with.
The simulation process thus starts by loading up all levels with their initial
values and then proceeds as shown in Fig. 4.4.
In step 1, all the equations are sorted into the correct sequence for
calculation. This is something that programmers must do for themselves in
an ordinary language such as BASIC , but it is done automatically by the
1
2 If TIME =0 then set levels -,
to stipulated Initial values
!
4 Calculate Auxiliariesat K and ...._ _.....
Rates for KL
~
IsTIME =LENGTH ?
5 Increase TIME by DT
and relabel all
variables
A SIMULATION EXAMPLE
Figure 4.5 shows the influence diagram for this simple model. The 'Food
Stock Time' corresponds to the 10 day period for which current stocks are
made to last. It is shown in bold italic because it is a parameter, represent-
ing the ruler's policy.
The first step in modelling is to decide on the types of the variables in the
influence diagram. Are they levels, rates or auxiliaries? This process is
called type assignment. It is always a good idea to start by identifying levels,
because all the rest will follow from that. In this case, the Food in Stock is
a level because it is the accumulation of quantity in the system. The descrip-
tion of the system tells us so. As Fig. 4.2 showed, the variables which fill or
drain levels are rates, so Food Inflow Rate and Food Outflow Rate are both
rates. Each variable needs a name, so we will call them FOOD, FINRA and
FOUTR, respectively. The system dynamics software packages differ in
their conventions for variable names , so readers should consult the user
manual for whichever package they are using.
The equation for food in stock will be
L FOOD.K=FOOD.J+DT*(FINRA.JK-FOUTR.JK)
N FOOD=O
Food
stock
T1me
-,
-,
-,
~
Food
+
-... Food
Food
Release
Inflow P In Stock ~ Rate
Rate
I 4+
\
\ /
/
" .......
........... "-----~/
./ /
R FINRA.KL=STEP(l00,lO)
would ensure that FINRA would increase from its previous value to 100
when TIME=10. Since there is nothing else in the equation, the previous
value is 0, which will have the required effect. In practice it would be better
to put:
R FINRA.KL=STEP(100,10)+STEP(STEPHT,STEPTM)
C STEPTM=120
C STEPHT=O
• The line numbers , starting from 0, are not part of the model, but are
added by COSMIC when the model is printed out. They have been
retained for ease of explanation.
• Lines 0 and 47 are the start and end of the model. The text in line 0 will
appear as the model title on all output.
• All the model is in lower case type, as it is usually easier to read on the
computer screen.
• The lines starting with 'note' are comments and section headings. It is
good practice to group notes in threes to improve model legibility.
As a rough guide, a well-documented model will devote about 20%
of its lines to explanatory comments. A badly documented model is
useless.
• Lines 22-29 set a value for DT, a topic we discuss later, make the model
run for a LENGTH of 300 days and produce printed tables and plotted
graphs of behaviour. Different languages have slightly different conven-
tions for achieving the corresponding effects. It is essential that all the
o * Figure 4.7 Simple Simulation Model
1 note
2 note file named fig4-7 .cos
3 note
4 note food inflow rate
5 note
6 r finra .kl=step(100,10)+step(stepht,steptm)
7 c stepht=O
8 c steptm=120
9 note
10 note food stocks
11 note
12 I food.k=food.j + dt * (f inr a.jk-f out r.jk)
13 n food=O
14 note
15 note food outflow
16 note
17 r foutr.kl=food.klfst
18 c fst=10
19 note
20 note output and control
21 note
22 c dt=0.25
23 c length=300
24 c pltper= 1
25 c prtper= 10
26 print 1)finra
27 print 2)food
28 print 3)foutr
29 plot food=a(0,2000)/finra=b,foutr=c(0, 150)
30 run steady inflow of food
31 c stepht=50
32 run 50% increase in food inflow
33 note
34 note definitions of variables
35 note
36 d dt=(day) time step in model
37 d finra=(ton/day) food inflow rate
38 d food=(ton) stock of food
39 d foutr=(ton/day) food outflow rate
40 d fst=(day) food stock time
41 d length=(day) simulated duration
42 d pltper=(day) output plotting interval
43 d prtper=(day) output printing interval
44 d stepht=(ton/day) step height in food supply
45 d steptm=(day) time of step increase in food supply
46 d time=(day) simulated time
47 +
No syntax errors detected
==== ======== ===
Fig.4.6 A model for the food problem. ' Figure 4.7' appears in line 0 because this
line is used to generate the caption for Fig. 4.7.
A simulation example 95
variables in a model be printed out and the values are examined closely.
Simply looking at graphs of a few variables is an excellent way to leave
mistakes in a model.
• Line 30 commands the model to run and line 31 sets STEPHT to 50 to
test the effect of the extra supply, after which another run takes place.
This ability to change the parameters and rerun the model is the basis for
the experimentation phase, Step 5A in Figs. 1.3 and 1.4. All the lan-
guages, including COSMIC, allow this to be done interactively on a PC,
but that would not be conveni ent in a book, so we shall use the traditional
method of presetting the experiments to be performed.
• Lines 36-46 are the definitions of the variables, and COSMIC and one of
the other languages differ considerably from the others in this respect.
The type label for a definition is, obviously, D, which is followed by the
variable name, an = sign and, in ( ), the dimensions of the variable or
constant.
• After the dimensions, the meaning of the variable is defined in words.
Notice that definitions must be given for DT , TIME, LENGTH, and the
plotting and printing controls, PRTPER and PLTPER. The definitions ,
'd statements' as they are called, fulfil two essential purposes. The first is
the documentation of the model so that it can be explained to oneself and
to the sponsor. All system dynamics languages provide this in some form.
The second , which is only available in some of the languages , is automatic
checking of the dimensional consistency of the equations. Dimensional
analysis was briefly mentioned above, but it is essential for a model to be
dimensionally valid, otherwise it may not be doing the same things as the
real system and for the same reasons , and no confidence can be placed in
the output. It is possible to check dimensions by hand calculation, but
software does it far more thoroughly.
• Finally, after line 47 is the encouraging message that no syntax errors
were discovered when the model was checked by the simulation
package.
The results of running the model for the base case and with the extra food
inflow are shown, respectively, in the upper and lower halves of Fig. 4.7.
Again , all the packages produce similar graphs and all should give the same
results for this model. As we shall see many more graphs in the book it is
necessary to spend a moment on understanding the conventions.
• The captions on the graphs are the name of the model , which appeared
in line 0 of Fig. 4.6, and the text comment in the run commands in lines
30 and 32.
• The horizontal axis is TIME, in this case from 0 to 300. The d statement
for TIME is drawn immediately under the axis.
• Three variables were plotted, each of which has its own pattern: a solid
line is used for FOOD, for example. The same pattern is used to draw the
vertical axis and to point below the vertical axis to the name of the
96 Introduction to simulation
variable . In some places, FINRA and FOUTR have the same values, so
their lines merge .
• In the base case, the upper graph, food starts to arrive at TIME= 10; the
STEP effect is clearly visible. FOOD starts to rise smoothly, as does
FOUTR. The behaviour does not settle down until TIME=80, approxi-
mately 70 days after the food started to arrive . This is called the settling
time of the system and the settling times of managed systems are usually
very long. FOUTR stabilizes at 100 tons/day and FOOD at 1000 tons. It
is clear that this must happen. The system can only be stable when the
inflow and outflow are equal and that can only happen when FOOD is 10
times FOUTR; a consequence of the ruler's policy.
• The mode, or general form of dynamic behaviour, does not change when
the extra food arrives , though the numerical values at stability do. The
settling time is unchanged.
The purpose of this very simple model was to introduce some of the ideas
of simulation. We shall revisit it later to see that it can become very inter-
esting indeed when some more factors are included.
How do we know that the behaviour in Fig. 4.7 is right? This is an essential
component in building up one's confidence in the model, and there are a
number of steps which apply to all models and which can be illustrated from
this one.
• The influence diagram must correspond to the statement of the
problem.
• The equations must correspond to the influence diagram; in particular
the + or - signs in the equations must match the signs in the influence
diagram.
• The model must be dimensionally valid. This one has been checked by
the software, but readers ought to take each equation and write it out
with the dimensions from the d statements underneath, as was done
earlier with the first fundamental equation, and satisfy themselves that
this is indeed a dimensionally consistent model.
• The model does not produce any ridiculous values, such as a negative
food stock.
• The behaviour of the model is plausible - what it does is what we expect
it to do - and the values at which it stabilizes can be confirmed by simple
arithmetic. These tests are harder to apply to a more complex model , but
they are still necessary .
• The model's masses should balance . This means that the total quantity
of, in this case, food which has entered and left the system, together with
what is still there, should be accounted for. This is achieved by making
Tests of confidence in a model 97
150 2000
11
125~ 1750
1oo-tlII
1500
1250
I: 1000
75-+1
Ii
50+1
750
Ii
25~
500
I: 250
olJ -h-'--l".,.r--b..--+.r.--.q.."..---"""'..---~.--In-r..-'~,----l.,..".----l, 00 .
L
0
II TIME (OAYI SIMULATED TIlE
I! F~O~
--- ----- - F N A
~--- FUR
(TONSI STOCI< r:JF FOOD
(TONS/DAY! FOOD INFl.OIf RATE
(TONS/DAY! FOOD OUTFlOlf RATE
1000
I: !/
75-+1
50+1
750
:I
II II
25~
500
,,
Ii 250 ,,, I
olJ O-;rL--l:m--\m--im-~..-"'o::r..-~r-\m-r-mr~"'---\'
I' L· TIME IOAY! SI~TEO
I!
TIlE
F90~ (TONS! STOCl< Of' FOOD
....=.=-==~O~T~ m=~g:~l ~~ ~~~R~~
50% INCREASE IN FOOD INFLOW (b)
L CUMIN.K=CUMIN.J +DT*FINRA.JK
NCUMIN=O
N FOOD=IFOOD
C IFOOD=O
At first sight, this makes no difference to the model, but it allows the
initial amount of food to be changed in a ~ter run . With these additions,
a check variable can be written:
A MCHECK.K=CUMIN.K-(FOOD.K- IFOOD)-CUMOUT.K
In words, MCHECK compares the total which came in with the change
in the food stock and the total amount which was distributed. Ideally,
MCHECK will be 0; in practice, because of rounding error in the com-
puter, it will be some small number, such as -12.45 X 10- 3 (why does it
not matter that this is a negative number?). Notice in FIG4-7A.COS on
the disk that all the new variables have been added to the printed tables
so that MCHECK can be seen to check, and that they have also been
added to the model documentation so that dimensional analysis can be
done again to make sure that the additions have not undermined the
model 's dimensional consistency.
• We mentioned earlier that the rates in a model can be seen as the
entrepreneurs and the levels as the accountants. On that analogy, mass
balance equation s are the auditors, making sure that the accountants have
done their job properly. These precautions may seem unnecessary for
such a small model , but it is as well to get into good modelling habits from
the start.
Having examined a small model to familiarize ourselves with some of the
procedures, we shall now look at some important components of system
dynamics models.
INFLOW ..
+
CONTENTS .. OUTFLOW
\ + ....
--
\ / \
<, / \
Delay
LCONTENTS.K=CONTENTS.J+DT'(INFLOWJK-OUTFLOWJK)
ROUTFLOWKL=CONTENTS.K/DELAY
-- --
+ - + - + -
+;.. \ +A ..
INFLOW-., CONT1"-TRANSR1----.CONT2. . .TRANSR2.....CONT3..... OUTFLOW
\ 1+ \
\ \ -_/ \
DELAY/3 DELAY/3 DELAY/3
L CONT1 .K=CONTl .J+DT'(INFLOWJK-TRANSR1 .JIO
RTRANSR1 .KL=CONT1 .K/(DELAY13)
LCONT2.K=CONT2.J+DT'(TRANSR1 .JK·TRANSR2.JIO
RTRANSR2.KL=CONT2.K/(DELAY13)
L CONT3.K=CONT3.J+DT'(TRANSR2,JK-oUTFLOWJIO
ROUTFLOWKL=CONT3.K/(DELAY/3)
This type of delay is called 'first-order' because only one level is used to
store the contents'. Its behaviour is shown in Fig. 4.93, in which DELAY has
been set to 20 days, in response to a step in INFLOW. OUTI, the response
of the first-order delay is initially immediate, but is eventually sluggish and,
theoretically, never reaches the value of INFLOW; some trainees never
learn .
The first-order delay, for all its simplicity, can be quite a good model for
certain processes. For example , a bus company recruits drivers, all of whom
have the necessary licence to drive a bus and all of whom know the town
fairly well. Some of them will become fully productive quite quickly; others
will take longer to learn their route, the fares and so on.
For other problems, the first-order delay is too simple. The training of
scientists, for example , must take at least three years to complete a first
degree, after which some will be productive quickly, while others will take
longer. Such delays are modelled by 'cascading' as many first-order delays
as required to produce a higher order of delay. Figure 4.8(b) shows a
second-order delay. There are now two internal levels, CONTI and
25 .
...--:.----:==-==----
, e>
: ~~::-----
: /?,,--
12 .
1,,1
/1f
///1
//,.'1 :
/;/ I
/ ;/
!
:
2.
I
/11 .
90 .
III :L
, . . . . o. ~o. ~o . ~o .
TI ME (WEEK) TIME WITHIN SIMULATION
:'II:-- OUT
INFLOW (UNIT/WEEK) INFLOW RATE TO OELAY
DISPLAY OF DYNAMICS
Fig. 4.9 The dynamics of delays.
2 A first-order delay has the same output shape as an Erlang Type 1 distribution, and corre-
spondingly for the higher order delays discussed below.
3 Notice that the model LENGTH in Fig. 4.7 was 300 days, to allow for the effects of the
second step to be seen. In the rest of this chapter, LENGTH is reduced to 100, which is
sufficient to show the dynamics.
Representing delays in models 101
CON1'2, between which there is a transition rate, TRANSR. Notice that
each of the components of CONTENTS controls its successor rate and
that the total delay is split equally between the two stages. This produces
the behaviour shown for OU1'2 in Fig. 4.9. After the step in INFLOW
there is a short dead time before OU1'2 starts to respond, after which the
rise in OU1'2 towards INFLOW is swifter than OUTl's was, though
OU1'2 is only just over half way to INFLOW 's level after the 20 days have
passed.
Cascading three delays gives the 'third-order' response shown for OUT3.
Figure 4.9 suggests that, as the order is increased by cascading more
delays and splitting the total delay across more transition rates, the shape of
the response comes closer to a step delayed by 20 days from INFLOW's
step. This is, indeed , the case and, theoretically, one can create a delay of
infinite order in which OUTFLOW has exactly the shape of INFLOW and
lags behind by exactly the amount of the delay. In system dynamics, an
infinite order delay is called a 'pipeline delay', though some packages use
slightly different terms, and this is shown in Fig. 4.9 by OUTP, which exactly
matches INFLOW exactly 20 days later.
It would obviously be incredibly tedious to write the equations shown in
Fig. 4.9 every time one wished to model a delay, and all the packages
include some standard delay functions. A third-order delay is usually writ-
ten as:
R OUT.KL=DELAY3(IN.JK,DEL)
C DEL=10
The time label .JK within the DELAY3 does not mean that OUT.KL
depends on IN in the preceding time step; it simply reminds one that the
current value of OUT arises from previous values of IN, approximately
DEL time units ago. COSMIC has standard functions for all the delay
types.
The total amount within the delay is modelled as:
L TAMOUNT.K=TAMOUNT.J + DT*(IN.JK-OUT.JK)
but what should be the initial value of TAMOUNT? To answer that we
recall that a DELAY3, for example, has three internal levels. Like all levels
they have to have initial values and these are generated automatically by the
software package. In most cases, the three internal levels of DELAY3 are
each set to an initial value of:
N CONTl=IN*(DEL/3)
and so on. The total amount in the delay will, therefore, be IN*DEL, so the
correct initial condition for TAMOUNT will be:
N TAMOUNT=IN*DEL
otherwise the external level, TAMOUNT, which the user has created, will
102 Introduction to simulation
not be consistent with the total amount in the three inaccessible levels
within the DELAY3 function. This equation for the initial value of
TAMOUNT would be correct for any order of delay. Initializing delays is a
most important concept to which we shall return when we consider the
modelling of more than one output from a delay.
Although Fig. 4.9 was produced using a step for INFLOW, for simplicity,
the corresponding behaviour patterns are produced for any other shape of
INFLOW. In particular, the output of a pipeline delay will always exactly
match the inflow and will lag behind the inflow by exactly the magnitude of
the delay . The program disk includes FIG4-9.COS, and the reader should
run this program, experimenting with the size of delay and , when we have
studied how to write the equations, with different patterns for INFLOW.
We have shown that different types of delay can be modelled using the
standard functions available in the various software packages, but which
type of delay should one use in any particular case? We shall deal with that
in Chapter 6 when we build models for the case problems.
As we have remarked, delays are a vital component of managed systems
and often have a significant effect on the dynamics, so it is as well to be quite
clear about what is being modelled in a delay. The important point is that
the delays do not represent individual entities, such as particular bus drivers
or bags of food. They do represent the overall flow in the system. This can
lead to apparently strange results in that, while an issue rate of 151.279 tons
of food per day does have meaning , what meaning could be attached to
151.279 drivers completing training per day? At first glance, 0.279 drivers is
nonsense, but the point to grasp is that system dynamics concerns itself,
usually, with the broad behaviour of the system , rather than the fine detail.
When necessary , however, one can model exact integer quantities, as we
shall see later, providing one has thought through whether the extra effort
and detail are really worthwhile , given that the purpose of system dynamics
is strategic policy design for a system.
Before we leave the question of delays, notice that the influence diagram
in Fig. 4.5 is the same as Fig. 4.8(a), the dynamics in Fig. 4.7 are those of
oun in Fig. 4.9, and recall that in Chapter 3 we modelled the elimination
of a discrepancy between desired and actual stocks over a period of time. It
should be clear, therefore, that the ruler's and the production manager's
policies both have the same effect as a first-order delay and that the time
constants in those policies are delays.
SMOOTHING OF INFORMAnON
Suppose that the city ruler decides that making his people wait 10 days for
food is too harsh and instead he would like to issue food at a rate of half the
INFLOW and 10% of the stock. He realizes that, if he issued at the same
Smoothing of information 103
rat e as INFLOW there would be no stock to tide people over any irregular-
ities in INFLOW. We are tempted to write an equation:
R FOUTRKL= FOOD.K/FST + FINRA.KL*0.5
but this would constitute a most fundamental error of system dynamics
theory. The reason is that values with the time label .KL are yet to happen
and cannot be used in decisions about what is yet to happen. In common
sense terms , the ruler does not know what food will come in toda y, so he
cannot base today's decision on something unknown. Even if someone rode
ahead of the food convoy yesterday and told him what was expected to
arrive today that would still not be the same as what does arrive today. It
would be information at time K, not flow during KL.
In short, to use a rate variable on the right-hand side of another rate or an
auxiliary is to make the serious error of confusing the future with the
present. Review Fig. 4.1.
The best the ruler could do, therefore, would be to take account of the
average rate at which food had arrived over the past few days, AVFINRA,
and use a policy of:
R FOUTRKL=FOOD.K/FST + AVFINRA.K*0.5
Notice that the time label on AVINFRA is .K because it is something the
ruler knows now.
This process is called smoothing of information and, like delays, it is a
very important component of dynamic systems. It has a standard equation
form which is shown in Fig. 4.1O(a).
The smoothing equation is a level with a definite structure. The differ-
ence between the variable being smoothed and the smoothed variable is
weighted by the effect of the time constant and added to the smoothed
variable. The effect of this is best understood by imagining that FINRA has
been constant for a long time. Clearly, AVINFRA, FINRA's average value,
will be the same as FINRA and will have been the same for a long time.
That corresponds to the system' s 'memory' that FINRA has been stable.
Suppose that FINRA now steps up to a new value and stays there. In the
first few DTs, the memory will not change much, as the system cannot
abandon all its previous history of FINRA and suddenly switch to the new
value. As time passes and FINRA stays at its new value, the system will
come to accept the change as permanent and AVINFRA will move closer
and closer to the new FINRA.
This behaviour is shown in Fig. 4.11, in which FINRA starts at zero and
steps to 100 tons/day , as it did in Fig. 4.7. Now, however, it becomes very
noisy and unpredictable after day 30, because of storms in the mountains.
When the step happens, the smoothed value tracks up to the new value and
then follows behind the variations, more sharply in the upper graph , in
which the smoothing time constant is 4 weeks, than in the lower graph
104 Introduction to simulation
smoothed variable
/ / <,
/ / ................
/ ........
/ / <,
t/ ~ <, ~
L AVINFRA.K=AVINFRA,J+(DT/TCON)(FINRA.JK-AVINFRA.J)
/' "-
/ "-,,-
/
time constant "-
variable being smoothed
A) The Equation
L AVINFRA.K=AVINFRA.J+(DT/TCON)(FINRA.JK-AVINFRA,J)
B) The Dimensions
",~
150
125
100
75
50
25
175
150
125
100
75
50
25
if IN and OUT suddenly become zero, TAMOUNT will not change from its
previous value but will continue to act as a memory for all the flows which
have taken place. In the smoothed equation:
L AVINFRAK =
AVINFRAJ + (DTrrCON)(INFRAJK- AVINFRA.JK)
if INFRA becomes zero , then AVINFRA will eventually decay to zero ,
thus acting as a memory of INFRA's behaviour, while FOOD will act as a
memory of INFRA's consequences. In short, the variable name Average
Food Inflow Rate does not mean that the variable is rate type.
106 Introduction to simulation
would be bad modelling practice. The value of 0.5 could not be changed in
a rerun to experiment with different policies and it has no stated dimen-
sions, which may well lead to errors when dimensional consistency is evalu-
ated for the model. It would be far better practice to put:
R FOUTR.KL=FOOD.KIFST+AVINFRAK*FRAC
C FRAC=O.5
together with
Having discussed the equations for smoothing, let us now move into the
policy analysis phase of system dynamics and see what effect this change of
policy has. Model FIG4-12 .COS on the disk is set up to provide this by
adding a 'policy switch' to the equation for FOUTR:
R FOUTR.KL= STOCK.KIFST + PSWITCH*(AVINFRAK*FRAC)
,\ ~ I::
II
n
i\
1\ }, ::
II
II
I: 1500 1\ 'I
j". \ ,' 1
, ~,
II
~
r.
I ' , •
I I
,-- L
I I
1\ lA"
I, I
~
I \ 11 I
: '/! i~'\!.....
,-V"" l '\
rvu
't'-"'"1\,!/
l00-n ---------, I , , " '-J"".~ t ,~ I I
1250
...l-.. 1//r'y...... :T \ II
/: 1000 /
" i 'V
I I
II 1' ,I ', '.! ' .:
"II
7!1-H
I ' ,J '
Ii 750 I
50~ /
Ii 500 /
/,
25-W
I: 250
o II 04.---t.,.,--l.",.-l",--I;".,----l."------t...----!,,.--\,;.,.--j,,,---l, 00.
I: L' TIME (CAY) SUU..ATED TIME.
IL-------.~~2aA
- - - - - FOUTR
m=~o:~~a: ~~QI RATE
(TONS/DAY]'ooo ClJTFLOIf RAT!
150 2000
11 Ii
I: r:
125~ 1750
,\ ,~ n
11 i\ ::
I, LWt!'
!'!A
I: 1500
p ~" t\. II
10011
::o.Jl/M
:------::;;.::1, '/
I 1\ :
~, '\,;,..
)o!1~)-,..J t,-,\l,' ,....;~ i,
1\ , ' : '
I \
I tI" :,f\:1\
Ii
1250
I I :\V ,
,
I ,"
" , V' ',I
I'
\\,0.,'
r"u",
,
-; II
v
l~ ,I\,
.
75+1 1000 '
J / ' I
, "
I I "II
Ii :, I 't l
. ,/ ~ \~
750
50+1 II
Ii 500 l/
25 -!J :/
II 250
,1/
oll 0 ~o. 30. ~o. 50. Bo. '0 . Bo. 90. ~OO .
I' L-
I!
T I ME (DAY) S IIiLUTED r UE
2000
17!10
1500
1250
1000
750
500
il~88B
TIME (DAY! .llI.Uml TIlE
OU~ IAIED CN..Y C»I ITOCQ aF "XID
DUTn.. . IAI!D ON ITOCKI IHJ ,,~ INFl.DII
If DT is too small time will be wasted waiting for models to run. If it is too
large, numerical instability may occur, which means that dynamics in the
model may be due to errors of calculation, not to the dynamics of the
system. A good compromise is to ensure that
DT:o:;;DELI(4*ORDER)
for the smallest delay in the model. Thus, if a model contained a DELAY3
with a delay magnitude of 10 and also contained a time constant of 4 in a
smoothing equation, the candidate values for DTwould be 10/(4X3)=0.833
and 4/(4Xl)=I, because a smoothing process is a first-order delay, as is the
ruler 's policy of FST=lO. However, DT must also be set to one of several
standard values in order to avoid rounding error in the calculation of TIME
affecting the times at which time-dependent actions such as STEP take
place. The standard values are 0.5, 0.25,0.125and so on, so the correct value
in this case would be 0.5. In the model in this chapter we have used 0.25,
which is smaller than strictly necessary, but gives smooth graphs.
It is not wrong to use very small values, such as 0.015625, but it would be
unusual, and such small values should only be used when one has had a
good deal of experience of modelling.
THE SIGNIFICANCE OF DT
The equations in a model are supposed to represent the way in which the
real system works. However, in order to get the equations to run on a
computer, an additional factor, DT , has to be invented by the analyst. DT
has nothing at all to do with the real world; it is a figment of the calculation.
It is, therefore, afundamental error to use DT on the right-hand side of a
rate or auxiliary equation. Those equations describe information and ac-
tions in the real system; the real system does not contain DT, so the
equations describing the system's workings must not contain DT. There are
two exceptions to this rule, which we shall encounter in Chapter 5.
SUMMARY
This chapter has necessarily been rather long in order to cover the essential
foundations for much further work. We have explained the fundamental
ideas about how system dynamics simulation works and showed the main
equation types, such as delays and smoothing. These concepts were illus-
trated in a simple model. That model was also used to test the effects of
different policies on the behaviour of the system and we emphasized that
110 Introduction to simulation
INTRODUCTION
package you are using. This chapter focuses on ideas and good practice, not
on the use of a particular package. As mentioned earlier, this book was
written using the COSMIC and COSMOS packages but it must be empha-
sized that the book is not about COSMIC modelling; it is about system
dynamics modelling.
Throughout this chapter, features of system dynamics modelling will be
illustrated by a few equations. The reader should practise setting up these
examples as complete models and runn ing them to demonstrate the behav-
iour discussed. Bearing in mind the requirements of your own software, use
Fig. 4.6 as a guide to good practice, and follow the advice to print out all
variables and study the results, as well as looking at the graphs of dynamic
behaviour on the screen. A value of DT=0.25 will be suitable for all these
examples. Do not neglect these simple exercises. The practice is vital in
gaining confidence in using your software and even more so in developing
the trick of thinking in terms of the passage of time.
TIME
In the model for Fig. 4.7 and 4.11 we used the STEP function to generate a
pattern of food inflow which depended on the passage of time. Another
useful time-dependent process is the RAMP function, which takes the
form:
R FLOW .KL=RAMP(SLP,START)
C SLP=2
CSTART=5
D FLOW=(UNIT/WEEK) A FLOW VARIABLE IN A MODEL
D SLP=(UNIT/WEEK) A SLOPE FOR FLOW
D START=(WEEK) THE TIME POINT AT WHICH THE SLOPE
X STARTS
The effect of RAMP is that the rate variable, FLOW , will start at 0 at
TIME=O. When the inbuilt clock of TIME reaches START, FLOW will
increase at a steady rate of SLP per week, so that, by TIME=20, the value
of FLOW will be 30. X is the label for a continuation line.
One could also write
R FLOW.KL=BASE+RAMP(SLP,START)
Run a model to find the effects of
R FLOW .KL=RAMP(SLP1,STARTl)+RAMP(SLP2,STAR2)
C SLP1=2
C STARTl=5
C SLP2=-4
CSTART2=20
Also, find what happens if SLP2=-2.
Predict in your head the effects of
R FLOW.KL=STEP(STEPHT,STPTM)+ RAMP(SLP,START)
C STEPHT=20
C STEPTM=10
C SLP=3
CSTART=30
114 System dynamics modelling techniques
L RABPOP.K=RABPOP.J+DT*(RAMP(IMIG,IMTIME)+ . . .
D RABPOP=(RABBITS) ACTUAL POPULATION OF RABBITS
X IN THE AREA
D IMIG=(RABBITS/MONTH) RATE AT WHICH RABBITS
X IMMIGRATE INTO THE AREA
though it would be better practice to define a separate variable which could
be printed and plotted to make it easier to check that the model is working
correctly:
L RABPOP.K=RABPOP.J+DT*(IMRATE.JK+ . . .
R IMRATE.KL=RAMP(IMIG,IMTIME)
What would happen to the washing machine firm if its usual pattern of
orders fluctuated as above, but, in addition, it suddenly received a huge
order for 500 washing machines? This requires the use of the PULSE
function, which takes the form
V= PULSE(HEIGHT,FRST,INTVL)
where V is a variable or a term in an equation, HEIGHT is the height of the
PULSE, which lasts for 1 DT, FRST is the value of TIME at which the first
pulse occurs and INTVL is the interval between successive pulses; FRST =
10 and INTVL=20 would make pulses happen at TIME=10, 30, 50 and so
on until LENGTH is reached. If we wrote
R NO.KL= ... + PULSE(OSIZE,FRST,LENGTH)
C OSIZE=500
C FRST=50
D OSIZE=(WMS) SIZE OF LARGE ORDER
where ... represents the previous equation for NO, there would be one
pulse at TIME=50 and then no more, as the second would be called
for at TIME=50 + LENGTH and the model would have stopped at
TIME=LENGTH.
However, this would not produce the required effect, because the
PULSE lasts only for 1 DT and , as DT=0.25, the effect would be a height
of 500 multiplied by 0.25 weeks, or 125 in total. The correct form would be
R NO.KL= . . . + PULSE(OSIZE/DT,FRST,LENGTH)
which makes OSIZE, which is measured in washing machines because it is
a single large order, appear as a rate of inflow of 2000 washing machines per
week for 0.25 weeks, or 500 in all, as required'. This is an excellent example
1 Be very careful when using the PULSE function . Some pack ages tre at it in different ways, so
check the user manual for the package.
2 Bold type cannot, of course. be used when entering this equ ation into a model.
116 System dynamics modelling techniques
of the use of dimensional analysis to get the correct equation. The first
attempt required washing machines per week, which are the dimensions of
the . . . part of the equation, to be added to washing machines, which are the
units for OSIZE.
This use of DT on the right-hand side of a rate or auxiliary equation
is one of the two exceptions mentioned on p. 109 to the rule prohibiting
that. The other is to handle non-negativity constraints, which are discussed
below.
As well as being used to inject quantities into a model, PULSE can also
be used to make sudden changes in endogenous variables. Suppose that one
wished to run a model with time measured in months, for a LENGTH of 10
years with DT set at 0.25. Some processes in the system, such as financial
budgeting, take place annually, so it is necessary to record the time within
a year and set that record back to zero at the end of each year.
The following equations would be appropriate:
L TYEARK=TYEARJ + DT*(l- PULSE(YLENIDT,YLEN,YLEN))
NTYEAR=O
C YLEN=12
D TYEAR=(MONTH) TIME WITHIN A YEAR
D YLEN=(MONTH) NUMBER OF MONTHS IN A YEAR
TYEAR will grow from 0 to 12 in the first year and then the pulse will
subtract a year from TYEAR during the first DT of year 2. During that DT,
however, the first DT of year 2 will be accumulated so that TYEAR will fall
to the value of DT at the end of the first DT of each successive year. In
short , TYEAR will only be zero when TIME=O . To make TYEAR be zero
at the end of the year the first equation would have to be
L TYEAR.K=TYEARJ + DT*(l- PULSE(YLENIDT,
X YLEN-DT,YLEN))
The reader should experiment!
OBFOX until the first sample is taken, in other words the value which
OBFOX will have from TIME=O to TIME=INTVL. In order to get the
initial value right it is usually possible to write:
A OBFOX.K=SAMPLE(FOXPOP.K,INTVL,FOXPOP.K)
in which case the initial value of OBFOX will be set to the initial value of
FOXPOP. Note the use of a variable as one of the inputs to this function .
Obviously, OBFOX, FOXPOP and INIT must all have dimensions of
[FOXES] and INTVL must have the same dimensions as TIME.
Random effects are often included in system dynamics models . There are
two functions: NOISE, which produces values uniformly distributed be-
tween -0.5 and 0.5, and NORMD, which samples from a Normal
(Gaussian) distribution of given mean and standard deviation (some pack-
ages use different names for this function). The principles for using both are
the same , so we shall discuss only the NOISE function.
It is tempting to write and, indeed, one frequently sees in system dynam-
ics models, an equation such as
A VAR.K=NOISE(SEED)
C SEED=99 (for instance)
A VAR=(UNIT) A VARIABLE WHICH VARIES UNIFORMLY
X BETWEEN 0.5 AND -0.5
D SEED=(l) A NUMBER TO SEED THE RANDOM SAMPLING
in which VAR is a random variable and the significance of SEED is that,
every time it is set to a given value, the same sequence of random numbers
will be generated. SEED is a simple number which is regarded as
dimensionless, so its dimensions, or lack of them , are denoted by (1).
The equation above is, however , fundamentally wrong. The reason is
that, in system dynamics models, every variable is calculated every DT, so
the equation says that a new random sample is to be taken every DT. If DT
was halved , random samples would be taken twice as frequently. However,
as we discussed in the last chapter, DT is an invention of the modeller in
order to get the model to run on the computer, and it has nothing whatever
to do with the nature of the real system. In this case, we must take samples
at the same frequency that nature in the real world generates randomness,
and we must ensure that the randomness is of the same magnitude as
nature's. This requires us to combine two of the system dynamics functions
and put
A VAR.K=SAMPLE(SCALE*NOISE(SEED),NFREQ,
X SCALE*NOISE(SEED))
C SCALE=O.l (for example)
118 System dynamics modelling techniques
A PCAP.K=NCAP*(l-SCALE*O.5+SAMPLE(SCALE*NOISE(SEED),
X FREQ,SCALE*NOISE(SEED))
precisely because it would require more effort to see that what is happening
Logical operations - the CLIP function 119
in the model is correct. The greater the visibility of a model 's workings the
more one can be confident in it.
The example for the SAMPLE function implies that culling of foxes might
take place if OBFOX was greater than some target value but not otherwise .
This is an example of a logical choice which, in the original system dynamics
packages , requires the use of a function with the strange name of CLIP.
This takes the form:
V=CLIP(A,B,C,D)
°
To apply this to the fox problem we could define a 'culling switch' which
is 1 when culling can take place and when it is forbidden . That could be
done by:
3 COSMIC is one of the system dynamics packages which allow for more complex logic.
In this case COSMIC has single functions which are the equivalent of two CLIPs com-
bined into one. Other packages allow logic to be entered in the form 'IF x THEN YELSE z'
etc.
Limiting functions - MAX and MIN 121
also check that by looking at the values of the arguments to the CLIPs and
making mental calculations, but that is more prone to error, and the less
chance of error in a model the more one can be confident that it is doing the
same things as the real system and for the same reasons.
Logic involving V=A if C~D OR E~F can also be handled using two
CLIPs:
A VARK=CLIP(l ,O,C.K,D.K)+CLIP(l,O,E.K,F.K)
A VARK=VAR1.K+VAR2.K
A VAR1.K=CLIP(l,O,C.K,D.K)
A VAR2.K=CLIP(1,O,E.K,F.K)
A VARK=VAR1.K+VAR2.K*(1-VAR1.K)
with VARI and VAR2 as before. In this case, if VARI = 1 and VAR2=O,
then VAR=l .IfVARl =O and VAR2=1, then VAR=l, but if both VARI
and VAR2 are 1 then VAR is still 1, as required. As we shall see later, there
is another way of achieving this result.
This example also illustrates an aspect of writing system dynamics models
that one needs to understand at an early stage. In a normal programming
language, such as BASIC or Pascal, the programmer will arrange for logical
paths that are followed in some cases, with different paths being taken in
other cases; parts of the program are simply not used in some circum-
stances. System dynamics modelling is different from computer program-
ming in that all the system dynamics languages work by calculating all the
variables every DT. One cannot bypass VARI and use VAR2 , or vice
versa; both are always 'alive ' and the modeller must arrange to switch off
the one not required. This is a habit which quickly becomes second nature,
but it requires a little practice and careful debugging of the model in one's
early stages of learning. There is no substitute for printing out all the
variables in a model, as was done in Fig. 4.6, and carefully studying the
printout to check what is happening to the variables as time passes in the
model.
where at least one of A and B must be a variable if the use of MAX or MIN
is to have any point. A triple maximum cannot be written as
V=MAX(A,B,C)
Instead one must write
v = MAX(A,MAX(B,C))
MAX and MIN can be combined, if desired, for example
V=MAX(A,MIN(B ,C))
to any desired degree of complexity .
The previous example of VAR1 and VAR2 can be handled easily by
writing
A VARK = MIN (VAR1.K + VAR2.K,1)
The purpose of showing the more complicated method was to emphasize
that, in system dynamics languages, there are always several ways of solving
any given problem.
MAX and MIN, like all the system dynamics functions , can be 'nested' in
this way, sometimes up to 9 deep, depending on the package . Nesting is,
generally, very inadvisable as it makes testing the model's operations for
correctness more difficult. In proper system dynamics notation, and assum-
ing that all the variables are auxiliaries, one should write
A VARK=MAX(A.K,DUMMY.K)
A DUMMY.K=MAX(B.K,C.K)
so that DUMMY can be printed or plotted to make it easier to see that what
is happening in the model is happening for the right reasons.
MAX and MIN should be used only when the logic of the model requires
them, and never to cover up strange behaviour. For example, one might
wish to model Market Share, MS, as depending on a rate of growth, MSGR
To do so requires a level equation
L MS.K= MS.J+ DT *MSGRJK
It is evident that MS can never exceed 1, and if the model produces a value
of more than 1 there is a temptation to write
L MS.K=MIN(l,MS.J+DT*MSGRJK)
Most system dynamics packages would accept this, though they might give
a message that this is an unusual format for a level equation, but the
equation is actually wrong. The fault lies in the equation for MSGR, which
is allowing MS to grow past its limit, and using a MIN in this way is simply
covering up a fault somewhere else in the model, which is hardly good
practice.
Non-negativity constraints 123
NON-NEGATIVITY CONSTRAINTS
In the management consulting firm's problem in Fig. 3.1 and in the combat
model of Fig. 3.7 we encountered non-negativity constraints , though on p.
68 we make it clear that these are two rather different cases.
In the first case, the consulting firm determines the Desired Trainee
Recruitment Rate, DTCRR If this is positive, it indicates that trainees
should be recruited, while a negative value would indicate that trainees
should be dismissed. However, the firm has a policy of never dismissing
people , so we wish to suppress the negative option. That requires
R TCRRKL= MAX(O,DTCRRK)
D TCRR=(PEOPLE/MONTH) ACTUAL TRAINEE
X RECRUITMENT RATE
D DTCRR=(PEOPLE/MONTH) DESIRED TRAINEE
X RECRUITMENT RATE
a perfect instance of a MAX being used where the logic of the problem
requires it.
In the second case, once combat starts, the Red commander commits
reserves as fast as he can, as long as he has reserves left to commit. How
fast he can commit them depends solely on the transport capacity available
to him. That can be modelled by using the following three groups of
equations:
L RRES.K = RRESJ + DT*( - RRCRJK)
N RRES = IRRES
C IRRES= 50000
D RRES=(RMEN) RED RESERVES REMAINING
D RRCR=(RMEN/HOUR) RATE OF COMMITTING RED
X RESERVES
D IRRES=(RMEN) INITIAL RED RESERVES
This level simply accounts for the remaining reserves as they are used up.
Note the use of (- RRCRJK) to represent the drain; most packages will not
allow - DT*RRCRJK. It is good practice to set up initial values by using a
constant as shown. The value of IRRES can be changed in a later run , which
would be impossible if one had used N RRES=50000. Note also the use of
RMEN, for Red men, rather than just MEN. It is always good practice to
differentiate one type of unit very clearly from another, such as Blue men.
A WSWITCH.K=STEP(l ,WTIME)
C WTIME=5
D WSWITCH=(l) A SWITCH TO DENOTE THE START OF
COMBAT
D WTIME=(HOUR) TIME AT WHICH COMBAT STARTS
124 System dynam ics modelling techniques
This is a simple use of STEP to ensure that nothing happens in the first 5
hours of the model run; a useful trick to make sure that the model is set up
correctly.
R RRCR.KL= MIN(RRES.K/DT,RTCAP)*WSWITCH.K
C RTCAP=6000
D RTCAP=(RMEN/HOUR) RED TRANSPORT CAPACITY
The MIN term in the equation for RRCR is prevented by WSWITCH from
having any effect until TIME=5; another instance of switching something
off when it is not required. Within the MIN, the second factor, RTCAP,
is obvious; it is the first factor, RRES.K/DT which represents the non-
negativity constraint. To see how it works, let DT=l for simplicity.
At TIME=5 the combat starts and, since RRES is initially 50000, RTCAP
will ensure that Red can only commit reserves at the rate of 6000 men
per hour. This can go on for 8 hours, by which time only 2000 men will
remain. If there was no non-negativity constraint, a commitment rate of
6000 per hour for another DT would leave Red with -4000 men remaining ;
a clear absurdity . However , at that point , RRES.K/DT will be 2000, so
the last 2000 men will be committed evenly during one more DT, at which
point there will be exactly 0 men left and reserve commitment will have to
stop.
In the above equations, IRRES, RTCAP and WSWITCH are all num-
bers, but note that IRRES and RTCAP have dimensions associated with
real quantities, whereas WSWITCH is dimensionless because it represents
an event occurring rather than something tangible.
Using DT on the right-hand side of a rate equation to model a non-
negativity constraint is the second of the two exceptions to the prohibition
against doing so. Whenever the modeller writes DT on the right-hand side
of a rate or auxiliary equation it is essential to stop and work out whether
one is using one of the two valid exceptions to the rule, the reasons for
which are given on p. 109, or whether one is making a fundamental and
catastrophic error of system dynamics logic. Notice, for instance, that DT is
not used in the consulting company's non-negativity constraint.
In Figs. 4.8 and 4.9 we discussed delays and showed that they produced
different dynamic responses to a STEP input. We also stated that
there were other types of delay and, in particular, tested the perfect or
pipeline delay which exactly mirrors the input after a time lag. How,
though, does one know which delay to use in a given case and, indeed ,
how much difference it will make if one uses one delay type rather than
another?
The best way to understand any of the system dynamics modelling tech-
Choosing a suitable delay function 125
niques is to build a model and experiment, and this is no exception . Figure
5.1 is a model to show four different delay types against two different input
patterns. This model is on the disk as FIG5-2.COS, in COSMIC format,
though the reader should have little difficulty in converting it and, as ever,
the emphasis is on the principles, not on the software.
In Fig. 5.1 the first two lines activate the model mapping which is de-
scribed below and initiate automatic dimensional analysis. The driving
force is in lines 8 to 18 and the reader will see a switch, SW1, to choose
between a PULSE input and a noisy pattern which is very close to that used
in Fig. 4.11, the equation being explained in detail towards the end of this
chapter. The switch is changed in lines 84 and 85 to run the model twice.
This is a traditional system dynamics technique which is useful when one
wants a hard copy of the output. All the system dynamics packages also
allow one to make changes like this interactively.
The output for four different cases is modelled in lines 31, 39, 47 and 56-
57. The four cases are first-order, third-order (recall Fig. 4.8), pipeline and
'sixth-order' delays. The last of these is built up using two cascaded third-
order delays, each of which has half the total delay. This requires the use of
a dummy rate, DOUT4 in line 56 as an intermediary between the two
DELAY3s. Cascading like this can produce any delay order. The reader
should amend FIG5-2.COS to include a ninth-order delay.
For each delay we also calculate the contents and the cumulative output,
as in lines 32 to 35 for the DELAYl. Line 48 is a special COSMIC require-
ment to load the pipeline initially as one wishes to have it; in this case we
want it to be empty.
To check that the delays are functioning correctly, mass balances are
computed in lines 65 to 68. Such balance checks are a most useful method
of debugging models involving complex flows, though they are not strictly
necessary here. Note that all the variables are printed and a selection are
plotted.
Although this is a simple problem to help us in our study of delays,
you may find it helpful to adopt the conventions of Fig. 5.1 when using your
own package, as they represent much of what the author regards as good
system dynamics modelling practice, in particular the heavy emphasis on
generating output to assist in verifying that the model is working correctly
and the full documentation of every variable and parameter.
The output for the two cases is shown in Fig. 5.2.
The PULSE happens at TIME =10 and the graphs for INRAT and 0 UT3
go off the page, as both reach a value of 200/DT. However, the exact match
between the two, 10 days apart, is easily seen. One can also see the imme-
diate response and long tail of DELAYl and the progressively sharper
humps of the third- and sixth-order reactions . The contents of the respec-
tive delays in the lower half of the page show broadly similar patterns,
noting especially the square form of CONT3 for the pipeline, the amount
being 200 units, exactly as one would expect.
126 System dynamics m odelling techniques
°1
map
dim
2 * Figure 5.2 Delay Behaviour
3 note
4 note file named fig5-5.cos
5 note
6 note input patterns
7 note
8 r inrat .kl= sw 1* pulse(heightJdt,f rst,i ntvll+
9 x (1-sw11 * step(base+ am p* sin(6.283* (t im e.k-151/perdl
10 x * clip(1,0,ti m e.k,151 *sample(noise(7l.nperd ,01.1 01
11 csw1=1
12 c height =200
13 c frst= 10
14 n intvl=length
15 c nperd =2
16 c base =40
17 c amp =20
18 c perd =20
19 note
20 note cumu lative input for balance check
21 note
22 I cumin .k=cumin .j + dt* inr at.j k
23 n cumin =O
24 note
25 note the delay magnitude
26 note
27 c del=10
28 note
29 note output rate for first order delay
30 note
31 r out1.kl =delay1( inrat.jk,dell
32 I cont1.k =cont1.j + dt * (inrat.jk-out 1.jkl
33 n cont1 =0
34 I cumout1.k =cumout1.j + dt*o ut 1.jk
35 n cumout1 =0
36 note
37 note output rate for second order delay
38 note
39 r out2 .kl = delay3(inr at .jk,dell
40 I cont2.k =cont2.j +dt*(inrat.jk-out2.jkl
41 n cont2 =0
42 I cumout2 .k=cumout2 .j+dt *out2.jk
Fig.5.1 Model for delay demonstration. 'Figure 5.2' appea rs in line 2 because this
line is used to generate the caption for Fig. 5.2.
Choosing a suitable delay function 127
43 n cumout2=0
44 note
45 note output rate for pipeline delay
46 note
47 r out3.kl=dlpipe(tvals,inrat.jk,del)
48 t tvals=40*0
49 I cont3.k=cont3.j+dt*(inrat.jk-out3.jk)
50 n cont3=0
51 I cumout3.k=cumout3.j+dt*out3.jk
52 n cumout3=0
53 note
54 note output rate for sixth order delay
55 note
56 r dout4.kl = delay30nrat.jk,del/2)
57 r out4.kl=delay3(dout4.jk,deI/2)
58 I cont4.k=cont4.j+dt*Onrat.jk-out4.jk)
59 n cont4=0
60 I cumout4.k=cumout4.j+dt*out4.jk
61 n cumout4=0
62 note
63 note mass balance checks
64 note
65 a mchck1.k=cumin.k-cumout1 .k-cont1.k
66 a mchck2.k=cumin.k-cumout2.k-cont2.k
67 a mchck3.k=cumin.k-cumout3.k-cont3.k
68 a mchck4.k=cumin.k-cumout4.k-cont4.k
69 note
70 note model control and output
71 note
72 c dt=0.25
73 c length=50
74 c prtper=10
75 c pltper=0.25
76 print 1linrat, cumin
77 print 2)out1 ,cumout1 ,mchck1
78 print 3)out2,cumout2,mchck2
79 print 4)out3,cumout3,mchck3
80 print 5)out4,cumout4,mchck4
81 plot inrat=a,out1 =b,out2=c,out3=d,out4=e(0,60)
82 plot cont1 =a,cont2=b,cont3=c,cont4=d(0,600)
83 run Delayed Response to a Pulse Input
84 c sw1=0
85 run Delayed Response to a Noisy Input
86 note
87 note definitions of variables
88 note
89 d amp={units/day) amplitude of sine wave in input
90 x rate
91 d base={units/day) base value for input rate
92 d cont1 =(units) contents within the first order
93 x delay
94 d cont2={units) contents within the second order
95 x delay
96 d cont3={units) contents within the pipeline delay
97 d cont4={units) contents within the sixth order
98 x delay
99 d cumin={units) cumulative input
100 d cumout1 =(units) cumulative output for first order
101 x delay
102 d cumout2={un its) cumulative output for third order
103 x delay
104 d cumout3={units) cumulative output for pipeline
105 x delay
106 d cumout4={units) cumulative output for sixth
107 x order delay
108 d del={day) magnitude of delay
109 d dout4={units/day) dummy output for first delay3
110 x in sixth order delay
111 d dt={day) step size in simulation
112 d frst={day) time of first pulse in input rate
113 d height={units) size of pulse in input rate
114 d inrat={units/day) input rate to various delays
115 d intvl={day) interval between pulses in input
116 d length={day) duration of simulation
117 d mchck1 =(units) mass balance check for first
118 x order delay
119 d mchck2={units) mass balance check for second
120 x order delay
121 d mchck3={units) mass balance check for pipeline
122 x delay
123 d mchck4={units) mass balance check for sixth
124 x order delay
125 d nperd={day) period of random noise in input
126 x rate
127 d out1 =(units/day) output rate from first order
128 x delay
The conclusion from Fig. S.2(a) and (b) is that the choice of delay order
matters quite strongly when one is dealing with very sharp inputs , such as
PULSEs or a STEP. The difference between DELAY3 and the cascaded
sixth-order delay is, perhaps, not all that large; probably well within the
uncertainties of the data in most managed systems. One can, perhaps,
conclude that for practical purposes one can distinguish between three main
possibilities: the output being an exact copy of the input, in which case a
pipeline delay is appropriate; the case where the input has an immediate
effect and then a long tail, DELAYl ; and an intermediate case where there
is a delayed response and then a spread of inflow, in which case DELAY3
will usually be appropriate. It is very tempting to use the pipeline under
some illusion of accuracy, but such cases are rare in managed systems,
dispersed delays being far more usual.
Fig. S.2(c) and (d) shows a more usual case of a continual, though very
unsteady, inflow. Again the pipeline matches it exactly, whereas the three
distributed delays smooth out the input considerably and, indeed, have little
difference between them once the effect of the STEP has been absorbed.
Continuous flows are far more typical than sharp shocks in the modelling of
managed systems. In such cases, the 'accuracy' of a pipeline is largely
illusory, and DELAY3 is a good compromise well within the accuracy of
the data usually available , which is why it is so commonly used in system
dynamics modelling.
It is worth reiterating that all the system dynamics packages have a
130 System dynamics modelling techniques
BO .
I -OUT1
: 1.-._ UT3
ogUT2
(UNITS/DAY)
(UNITS/DAY)
(UNITS/DAY)
OUTPUT RATE FROM FIRST ORDEA
OUTPUT RATE FROM SEClNI ORDER
OUTPUT RATE FROM PIPELINE
(a) L..-··-OUT4 (UNITS/DAY) OUTPUT RATE FROM SIXTH llRIlER
lilt
,' ',II INAAT
TIME (CAVI SIMULATEC rIME
(UNITS/CAV) INPUT RATE TC VARlDUS DELAVS
-- OUT1 (UNITS/CAV) OUTPUT RATE FROM FIRST ORDER
. ~'OUT2 (UNITS/CAV) OUTPUT RATE FROM SECOND ORDER
, L-'-OUT3 (UNITS/OAY) OUTPUT RATE FROM PIPELINE
l..-'·-OUT4 (UNITS/CAV) OUTPUT RATE FROM SIXTH OAOEA (c)
800
700
600
400
o 50,
II L
, ~5 , ~o , ~5, ~o . ~5,
=
TIME (CAVI SIIUJoTED rIME
'II CONn (UNITSI CONTENTS OITHIN THE FIRST ORDER
,L-._
..=.~ g8~H
CONT 4
l:ml g:~~~ :g~~= ~~NE~AY
(UNITS) CONTENTS OITHIN THE SIXTH ORDER
Average Food Intake per Fox (AVIPF) in Fig. 5.3 on the lifetime of foxes
is a good example of the difference between linear and non-linear behav-
iour. Suppose that AVIPF was 10% below the level required for a normal
lifetime (NFRPF in Fig. 5.3), and suppose that would reduce fox lifetime to
5% below normal. If AVIPF fell to 20% below NFRPF then the influence
would be linear if lifetime fell to 10% less than normal, because doubling
the food shortfall had doubled the effect. If the relationship was truly linear ,
132 System dynamics modelling techniques
then a 100% fall in food supply, complete starvation, would lead to a 50%
reduction in lifetime; clearly absurd, so the relationship must be non-linear.
Setting aside for the moment how one collects the numerical data for the
relationship, we can approach the handling of non-linearities in system
dynamics models on the following lines.
In the first place, the model for Fox Death Rate and D U FE would usually
be written in system dynamics notation as
R FDR.KL=DELAY3(FBR.KL,DLIFE.K+MINLT)
A DLIFE.K=NFLTF*FSRF.K
C NFLTF=some suitable number
C MINLT=some suitable number
D FBR=(FOXES/MONTH) FOX BIRTH RATE. AN EQUATION
X FOR THIS VARIABLE EXISTS
X SOMEWHERE ELSE IN THE MODEL
D FDR=(FOXES/MONTH) FOX DEATH RATE
D DLIFE=(MONTH) CURRENT FOX LIFETIME
D NFLTF=(MONTH) NORMAL FOX LIFETIME IF FOOD
X INTAKE IS AT THE LEVEL REQUIRED
X FOR A NORMAL LIFESPAN
D FSRF=(l) A MULTIPLIER TO REPRESENT THE EFFECTS
X OF AN INADEQUATE FOOD SUPPLY ON FOX
X LIFESPAN.
~ _ --.._-
o
00
- ",• " :, •
' . . - .
"
.5
~ . . .. . . . .. . . . . . . . . . . -. .-
"
~ ,"
.a
", " '\ '
ec "-
c c:::
'n til
"-
.g
...e
.~
;; . . . • • . ' . . . . • • '. . • . . - ! • . • . . • '• • . . • . •
:e.
:g
s
"
.c
I-
N
o
•
' ," . . - . :
• •
",
•
" .
~L...--=== _
0.0 0.2 0.4 0.6 0.8 1.0
FRATIO
The ratio of actual and requiredfood intake rates
Fig. 5.3 A non-linear relationship between food intake and the effect on fox
lifetime.
Non-linearities - the TABLE function 133
D MINLT=(MONTH) THE MINIMUM LIFESPAN OF A NEW-
X BORN FOX CUB IF THERE IS NO FOOD
A FRATIO.K=AVIPF.K/NFRPF
D FRATIO=(l) RATIO OF ACTUAL AND IDEAL FOOD
X SUPPLIES
D AVIPF=(RABBITS/MONTHIFOX) AVERAGE ACTUAL
X INTAKE OF FOOD PER
X FOX
D NFRPF=(RABBITS/MONTHIFOX) AVERAGE FOOD INTAKE
X PER REQUIRED FOR
X NORMAL LIFESPAN
o00 ,
.
,
"
.5 I , ':
~ I '
I '
, , ',' l .,
.s"
t>ll
c ""0:: . ' I ' ,
'u
:::l
."
'"
c, I
!!
~
....o ' -, - ' ' .
.2 , : I '
:g. , I
:; . I
E , I
"
~ ;;j : :.". ', " : .
~ 0.0
----====--------------
0.2 0.4 0.6 0.8 1.0
FRATlO
The ratio of actual and required food intake rates
The equation for FSRF means that the value of FSRF at any point in time
will be calculat ed for a given value of FRATlO from a look-up table called
TFSRF. The three numb ers at the end of the equation provide that
FRATlO will range from a minimum of 0 to a maximum of 1.0 in steps of
0.2. Th is requ ires a total of 6 values to be specified, and they are given in the
second line, which uses the type label T for a table, the individual values
being separated by /. Thu s, the first value, 0.0, mean s that when
FRATIO.K =O, FRSRF.K will also be zero. The third value provides that
FRATlO.K=OA will generate a value of 0.12 for FRSRF. If FRATIO
happ ened to be 0.65, say, then FRSRF would be calculated by linear inter-
polati on between the table values of 0.8 and 0.98 which are the TFSRF
values for FRATlO = 0.6 and FRATlO =0. 8, respectively.
Th e 6 numb ers for TFSRF are found by measuring the points at which
the linear segments in Fig. 504 cross the dott ed vertical lines. The numb er
of linear segments is chose n by eye to get a reasonable match between
the linear segments and the real curve. Figure 504 has been deliberately
drawn to be a mediocre match , especially between 004 and 0.6. One might,
indeed, decide to have twice as many segment s to get a bett er fit and the
reader should practi ce setting up such a table, which will require 11 values
in total.
Non -linearities - the TABLE function 135
In the equations above, note that the definition for TFSRF extends to five
lines of text. Writing very complicated equations is bad practice; it is far
better to break up a complex equation into several simpler auxiliaries. Long
definitions, when called for, are very good practice as they make clear to
client and modeller alike exactly what the model 's variables and parameters
mean. This is true whether the client is a paying a fee for a service or is the
academic audience for a book or paper.
The TABLE function has a strict limitation in that, in most system
dynamics software packages , it will produce a fatal error if FRATIO, in this
example, goes below 0.0 or above 1.0, its declared range. A variant on this
is the TABHL function which has exactly the same format but which allows
the argument, FRATIO, to go outside its declared range , using the first or
last of the table values as a horizontal 'tail' for the output, FSRF, if that
happens. Using TABHL is a temptation but is to be avoided unless the logic
of the problem really requires it. In this example, FRATIO cannot logically
be less than 0 or greater than 1, so it would be helpful for thorough model
debugging if the model crashes when that happens.
If a model does crash because a table has gone outside its range , careful
study of the printout of the model 's variables will usually reveal the cause.
There is no substitute for using printed values of model variables in debug-
ging a model. The graphs of a few variables displayed on the screen will
sometimes look right when they are not, because something is going wrong
which is not being seen .
The examples used here to explain the principles of non -linearities have
been expressed in the DYNAMO-type format which is used by at least two
of the other packages. It is essential, however , to check the manual for the
package you are using as the details of setting up TABLE and TABHL
functions, and even their names, differ considerably in some of the pack-
ages. Most packages will offer additional forms for modelling non-
linearities. For example, COSMIC has table types in which the output does
not vary smoothly but steps up or down as the argument changes .
Tables are a most useful feature in system dynamics and can be used very
flexibly. There is, of course , no reason why the output and the argument
both have to lie between 0 and 1; the range of either has to be whatever is
appropriate to the problem. One useful role for a table is to inject into a
model an historical pattern of, say, washing machine orders. In such a case,
the argument would be TIME.K and the values in the table would be the
sales rates in each of the past 48 months, or whatever.
The dimensions for a non-linearity can be understood by writing the
equation in abstract form:
V=TABLE(TABNAM,ARG,LO,HI,INCR)
Recalling that [] means 'the dimensions of', this requires that
[VAR]= [TABNAM] and that [ARG]=[LO]=[HI]=[INCR]. In words, the
table values have to be in the same units as the result, VAR , and the
136 System dynamics modelling techniques
argument has to have the same dimensions as the three points which specify
its range . However, there is no requirement at all for [VAR] to be the same
as [ARG] . In short, the TABLE function and its relatives can validly act as
a dimensional transformation between one variable and another. The curve
of the relationship stands for the unknown causal mechanism which relates
ARG to VAR. Clearly, if one knew that mechanism, one could write the
equations for it and those equations would have to be dimensionally valid,
but the dimensional transformation property allows the modeller to short-
circuit that difficulty.
Equation number 1
r finra.kl=step(lOO,lO)+step(stepht,steptm)
c stepht=O
c steptm=120
Equation number 2
°
by information on the line in the model" in which it occurs, the line in which
it is initialized (in this case, line means that DT does not require an initial
value on an N statement) and the line in which it is defined. After that, the
map shows the names of variables in whose equation it is used.
1 DT=(DAY) TIME STEP IN MODEL
Equation in line 22 Initialised in
Documented in 36
°
Used in equation for -
FOOD TIME
2 FINRA=(TONS/DAY) FOOD INFLOW RATE
Equation in line 6 Initialised in
Documented in 37
°
Used in equation for-
FOOD
The available packages differ enormously in the form in which this type of
information is presented. Some, for example, list all the levels, followed by
all the rates and then the auxiliaries.
4 This book is about the principles of system dynam ics modelling and has, therefore, been
written to be as independent as possible of specific software. The line numbers given here are
correct for Fig. 4.6, but users of COSMIC will find that the line numbers printed out when
running this model are 2 larger than the numbers given here . This is due to the way that
particular package works and does not invalidate the principles explained here .
138 System dynamics modelling techniques
SUMMARY
package and the user must consult the manual for the software being
used.
The reader was encouraged to test these examples in small models be-
cause they will be used, in some cases without further explanation, in the
models in the ensuing chapters.
CHAPTER 6
INTRODUCTION
The narrative for DMC in Fig. 2.4 dealt only with how the system worked,
because we were engaged in practising the techniques of influence dia-
gramming. Before we can build a model, however, we must be clear about
what it is for; that is, we must understand the problems faced by the
company's management. (This problem is based on one of the author's
consultancy assignments. It has been simplified, but the description of the
system and its problems is essentially accurate.)
Fig.6.1 Variable names and dim ensions for the DMC problem.
The domestic manufacturing company (DMC) 143
To emphasize those points , Fig. 6.2 shows the level variables with a
symbol denoting a bucket of water superimposed. Similarly, the rate vari-
ables have the engineering symbol for a valve superimposed', The param-
eters are shown in italics and the other variables must be auxiliaries . There
are no tables in this model.
Type assignment really is as simple as that. The main thing is to follow the
physics and identify the physical and smoothed levels, and the rest will
follow. Later in this chapter we shall state some rules for how variables can
affect one another, but the real key is to think physics and to be quite clear
about the principles embodied in Fig. 4.1.
Finally, one also has to identify any additional parameters which will be
needed and to choose whether or not to make the diagram more compli-
cated in order to show them explicitly. In this instance, extra parameters are
required to specify the pattern of New Order Inflow Rate, NO, but we
choose not to show these on the diagram as they will probably confuse the
client.
Some system dynamics software packages are based on drawing on the
screen, using icons, the level/rate type of diagram, a small example of which
was shown in Fig. 2.17. Using that type of software still requires the mod-
eller to make type assignments and also requires every detail to be shown on
the diagram. Whether this is helpful or laborious is a matter of personal
preference. The author's view is that models can be built just as effectively
and, perhaps, more quickly, with an influence diagram at about level 3 in
Fig. 2.16. The connections between the diagram and the model are clear
from the equations and the diagram is kept in its proper role as a tool for
communication with the client. These are, however, matters of opinion, and
readers must make up their own minds.
The common element in all the packages is that, as explained in Chapter
4, the equations can be written in any order the analyst finds convenient,
and the package will sort them into the correct computational sequence. In
practice, the modeller chooses an order which is easy to understand and
explain . Development of a consistent personal style will be a considerable
aid to speed and quality of work.
I This symbology is not normal influence diagram procedure; it is used here only as an
explanatory device.
Averaging Period
for Order /late
TAO/l Averaging Period
(WEEK) for Produclion /lale
<, ,/ ....... TAPil
<, / (WEEK) <,
<,
- -- Average
Production
Rate
-------.....,
APR <,
(WMS/WEEI() ............ Desired <,
+ + Raw Material <,
/ 1,.....v, 'M~'k t Deslred Stocks " -,
/~DRMS
Backlog <, /
/ ot Orders / (WMS) "
DBLOG
/ (WMS) \- / Weeks of Aver~ \ \
Backlog Production in
Discrepancy .......
/ Desired /law
*l' + " \
/ » EPSl "' / Material Stocks Raw Material
/ +~(WMS) \ WAP - Stock Discrepancy \
I Weeks of Average / (WEEK) . / ;If' EPS2
Orders as Desired
/ ./ (WMS)
\ Backlog / ./ -, \
WAO / - ow Material '\
\ (WEEK) / Stocks \
I ,
--'-!...&I'--lI'''Y''-2
~.... ~
(WMS) '\ ' \
\ ~ I
I
\
\
Time 10 Correct
/law Material
Discrepancy
TA/lMS
(WEEK)
are typed in by the analyst. In each case the set of equations is followed
by a brief explanation. Rather than repeating definitions each time a vari-
able is mentioned they are given in alphabetical order at the end of the
explanation of the equations. The reader will have to flip back and forth
between the equations and the definitions, though they are also shown in
Fig. 6.1.
note
note current and average inflow of new orders
note
r no.kl=blev+d1 *step(20,10)+(1-d1)*amp*sin(6.283*
x (time.k-10)/perd)*clip(1,0,time.k,l0)
c d1=1
c blev=100
c perd=25
c amp=30
I aor.k=aor.j + (dt/taor)(no.jk-aor.j)
n aor=no
c taor=4
Next, we must decide how to drive the model with a pattern of new orders.
A STEP input is a standard driving force Which, as we shall see, gives useful
information about the model, but the company is known to have a pattern
of demand with two peaks and troughs in each year. We therefore also
provide for a sine wave and a 'switch', D1, to choose between them. If
D1 = 1, the form of NO will be a constant value of 100 up to TIME= 10, after
which the value will be 120. If D1 is set to 0, the behaviour of NO will be a
constant value of 100 until TIME=lO, after which there will be a sine wave
oscillating between 70 and 130.The equation for NO is rather similar to that
discussed on p. 137, except that it does not allow for randomness. At this
stage we do not wish to make the model behaviour too complicated to
understand; the ability to cope with random behaviour will be an aspect of
the system's robustness which the reader should examine in Chapter 7.
Note the extra parameters for BLEV, PERD and AMP , which are not
shown in Fig. 6.1. Their values are chosen to correspond to what happens in
the real system. Observe the use of NOTE statements as comments to
improve legibility and to identify the sectors of the model. As a rough rule
of thumb, about 20% of a model's lines should be comments.
The Average Order Rate is a standard smoothing equation, with the
smoothing done over 4 weeks. The )i( means multiplication and has the
146 Case studies in modelling
c tabl=4
I apr.k=apr.j+(dt/tapr)(pr.jk-apr.j)
n apr=no
c tapr=4
The value of EPSl is fed into the Production Rate equation to give the
system dynamics format for the algebraic equation discussed on p. 25, with
the addition of AORK, as was explained in the narrative for this problem
in Fig. 2.4. The production manager's choice of policy is to correct the
backlog error, EPS1, over a period of 4 weeks.
It is essential to see that the choice of PR is a model of the production
manager setting the general level of activity in the factory, not of the
manager dealing with individual orders of specific types of washing
machines for particular customers. Although system dynamics can be used
to model the detail, it is more useful to take this broader view of
the information/action/consequences paradigm in order to get close to
the policies for running the business as opposed to the procedures of its
daily life. In short, one gives the production manager credit for know-
ing how do the job in detail and concentrates on the overall strategic
aspects.
Average Production Rate is Production Rate smoothed over 4 weeks.
The initial value for APR is set to the external driving force to make sure
that the model is properly balanced.
note
note actual and desired raw material stocks
note
I rms.k=rms.j+dt*(rmar.jk-pr.jk)
n rms=drms
a drms.k=wap*apr.k
c wap=8
note
note ordering of raw materials
note
a eps2.k=drms.k-rms.k
r rmor.kl = eps2.k/tarms + apr.k
c tarms=4
The raw materials manager 's sectors of the model are derived on exactly
the same principles as the production manager's, which were discussed
above. You are most strongly urged to cover up the raw materials
manager's equations given above and write them again for yourself using
the influence diagram and the production equations as a guide. No amount
of studying models will enable one to build them; the only way is to do it
oneself.
148 Case studies in modelling
note
note delayed inflow of materials
note
r rmar.kl =delay3(rmor.jk,ddel)
c ddel=6
This uses a standard DELAY3 to represent the inflow of raw materials in
response to earlier decisions to order them .
note
note output and controls
note
c dt=0.25
c pltper=l
c prtper=lO
c length = 120
This section sets the parameters for controlling the simulation , the main
points being the choice of DT and of LENGTH. The former is calculated by
noticing that there are four first-order delay parameters, TAOR, TABL,
TAPR and TARMS , all of which have the value 4. The formula given on p.
109 would require DT=l for these parameters. However , DDEL features
in a third-order delay and has the value 6. That would require DT to be no
larger than 0.5, so we choose 0.25 to be on the safe side. LENGTH is chosen
to allow for just over 4 cycles from the sine wave, which should be enough
to show any characteristic behaviour. The parameters PRTPER and
PLTPER are the DYNAMO tradition for controlling printed and plotted
output, though different methods are used in other packages.
print 1)no,aor
print 2)pr,apr
print 3)blog,dblog,eps1
print 4)drms,rms,eps2
print 5)rmor,rmar
plot no=a,pr= b,rmor=c(0,250)
plot blog=a,dblog= b,rms= c,drms=d(0,2000)
The first five of these statements produce printed tables of all the model
variables. There is absolutely no substitute for printing out tables of the
variables, and actually looking at the results, if one is to debug a model
properly.
The last two lines plot graphs of a selection of variables, using the COS-
MIC techniques for flat-bed plotter output in order to produce the graphs
which will be seen in Fig. 6.3.
note
note simulation experiments
note
The domestic manufacturing company (DMC) 149
250
225
200
175
150
125
100
75
50
25
1 1~2
TIME (WEEK) SIMLl.ATED TIME
(WMS/WEEKI NEW ORDER RATE
(WMS/ WEEKI PROOUCTION RATE
- ·RMOR (_/WEEKI RAW MATERIAL ORDER RATE
2000
1750
225
200
. '10. 20.
I:L TI ME (MEEK) SIMlLATED TIME
IL RMOR
~.
R
NpO (lIMS{WEEK) NEll - RATE
(lIMS{WEEK) PRODUCTION RATE
(lIMS{WEEK) RAM MATERIAL CAllER RATE
2000
1
'. 1 : BLOG
...::...: 2a~OG
(WMS) OAlJER 1lACKL06
(MIlS) DESIRED 1IAC1<LD6
1-. _ DRMS l::l ::I:::~ERJ~~=AL 9TDCKS
:::~:
200 I
I
175 I
150 Ii,
125
100 -t;-t--~
75
50
25
2000
1750
. 20 .
TI ME (WEEK) SIIU.ATEO TIME
note
note variable definitions
note
d amp=(wms/week) amplitude of sine wave in new orders
d aor=(wms/week) average order rate
d apr=(wms/week) average production rate
d blev=(wms/week) base level for order patterns
d blog=(wms) order backlog
d dblog=(wms) desired backlog
d dl=(l) demand pattern switch
d ddel=(week) delivery delay on materials
d drms=(wms) desired raw material stocks
d dt=(week) solution interval
d epsl=(wms) difference between backlog and desired backlog
d eps2=(wms) difference between desired raw material stock and
x actual raw material stock
d length = (week) simulated duration
d no=(wms/week) new order rate
d perd=(week) period of sine waves on new order pattern
d pltper=(week) plotting interval
d pr=(wms/week) production rate
d prtper=(week) printing interval
d rmar=(wms/week) raw material arrival rate
d rmor=(wms/week) raw material order rate
d rms=(wms) raw material stocks
d tabl=(week) backlog adjustment time
d taor=(week) order averaging time
d tapr=(week) production rate averaging time
d tarms=(week) adjustment time on raw material stocks
d time = (week) simulated time
d wao=(week) weeks of average orders in desired backlog
The domestic manufacturing company (DMC) 153
Model validation
So much for developing the model's equations. But how do we know they
are right ? A number of tests can be applied and , the more tests are passed ,
the more one's confidence increases that the model is technically correct in
terms of the rules of system dynamics equations, and that it corresponds to
the real system well enough to be used to make policy recommendations to
its managers.
On pp. 96-8 we suggested some tests of confidence in a model, and this
issue is so important that it is worth restating them so that the reader can
apply them to this problem.
• The influence diagram should correspond to the statement of the prob-
lem. We have already established that it does .
• The equations should correspond to the influence diagram. The reader
must check that they do. Part of this test is, of course , to ensure that there
are no errors of syntax, such as missing parentheses, variables which are
used without having been defined or variables which are defined or
documented without being used. The reader will have to run the model
to verify that.
• The model must be checked for dimensional validity, either by hand or
by software .
• The tests for mass balances were deliberately not included in this model
to encourage you to write the extra equations yourself, not neglecting the
amount of raw material in the delay contents between RMOR and
RMAR.
• The tests that the model should not produce any ridiculous values and
that its behaviour should be reasonable are seen in the three pages of Fig.
6.3.
Figure 6.3A2 shows the step response, and all the plotted variables seem
reasonable. That is not a sufficient test, as not all the variables are plotted,
2 Recall the explanation on p. 95 for the conventions for reading these graphs. The style of
graphical output varies between packages; this is COSMIC's.
154 Case studies in modelling
and in a model even a little larger than this it would be impractical to do so.
One has, therefore, to look at the printed tables . None of the printed values
is implausible. However , intuitively, one would not expect to see negative
values in this physical system, but EPSI and EPS2 do sometimes go nega-
tive. Why is that acceptable?
The dynamics of the step response cannot be compared with the
real system as it never experiences such a simple shock. Even so, the
dynamics show some important results which we have to treat as interim
results until we have tested the model against a more realistic pattern. The
first is the extreme sluggishness of the response . Even by TIME=lOO,
nearly two years after the step, the oscillations are only just dying away. The
second is that the production variables, PR and BLOG, respond reasonably
smoothly to the step and BLOG and DBLOG match very closely. This is
consistent with the company's experience that the production department
copes reasonably well with external shocks. On the other hand, the raw
materials variables show a very pronounced reaction to the step, consistent
with the experience that they do not cope very well. Furthermore, the time
from one peak of the oscillations in RMOR and RMS to the next is about
25 weeks. This is known as the natural period of a system. In this case, the
natural period is the same as the period of the cycles in demand, and it is
usually a recipe for extreme instability to drive a system at its natural
period. The film of the breakup of the Tacoma Narrows bridge is a dramatic
example of that phenomenon.
The sine wave response in Fig. 6.3B is even more worrying, but, paradoxi-
cally, also more convincing.
The worry is that the response of RMOR in the top half of the graph is
explosive, to the point where , at TIME=32, the graph goes off the page,
thereafter going further and further apart. Similarly, the graph of RMS also
shows the explosive oscillation, which was predictable from the natural
period deduced from the STEP input results. RMS and DRMS only match
eight times in two years, and are completely out of phase . For the produc-
tion department, on the other hand, the graph of PR runs fairly smoothly
through the middle of the sine wave of NO, and BLOG and DBLOG match
very closely.
The paradoxical conviction is that the model is broadly on the right lines
because this is roughly how the real system behaves. The production people
can cope with the demand variations, but those in raw materials have a very
hard time, which is what the model suggests. On the other hand , the explo-
sive behaviour will eventually lead to such outrageous consequences as
negative raw material stocks, so we are faced with the problem that, though
the model may be on the right lines, it is clearly unrealistic because a real
system cannot produce negative stocks.
This dilemma means that, on the face of it, we ought to make the model
much more complicated to prevent these unrealistic phenomena from aris-
ing. On the other hand, we could adopt the viewpoint that the unrealistic
The management consultant's problem 155
behaviour arises because of poorly designed policies in the system and that
the measures which the people in the real system would have to take to
prevent negative stocks arising would be no more than desperate attempts
to cope with catastrophe. It therefore seems better to spend our efforts in
designing the catastrophic behaviour out of the system rather than trying to
model it.
This is a fairly fundamental point about the attitude to 'validation' . A
valid model is one which is, as was stated on p. 12,
well suited to its purpose and soundly constructed
We have satisfied ourselves that the model is technically sound by making
sure that its equations agree with the influence diagram, that they are
dimensionally valid and that the model's behaviour is, in important re-
spects, 'like' that of the real system. Its suitability for its purpose is largely
a matter of its simplicity, clarity, acceptability to the client and whether it
contains the policy options which will lead to improvement. In other words,
does the model contain the solution to the problem?
/
\ /
/
/
c bcylen=48
c slptim=10
After the usual opening lines note the way in which the model has com-
ments for its major sectors and subsectors to improve clarity of explanation.
BOC is modelled to offer a choice between constant demand and a rising
oscillatory trend. The former is artificial, but is useful for debugging and
testing, as the behaviour is not clouded by the sine wave effects.
It is always important to be aware of any hidden assumptions in a set of
equations. In this case it is that BOC represents the demand for this firm's
services; its share of the total market. As we shall see below, the firm may
get more or less than its normal share , depending on the service it offers to
clients, so the actual Rate of Obtaining New Projects may be greater or less
than BOC.
Most consulting firms operate on a basis of charging for the time spent on
a project at a rate which covers all costs and a profit margin. The fact that
BOC exists suggests that clients are content with this arrangement, so
money is, if not irrelevant, at least peripheral to this problem.
note
note effect of qualified consultant availability
note on rate of obtaining new projects
note
a qcpp.k=qcafp.k/nproj .k
a cpprat.k=qcpp.k/nnqcpp
c nnqcpp=1.82
These variables and equations are simply those in the upper right-hand
corner of Fig. 6.4. The sector is broken into several auxiliaries to make
writing and debugging easier. Because the names state pretty clearly what
the variables mean , the equation writing can flow easily. For example,
Qualified Consultants per Project can only be the number of qualified
consultants not supervising trainees divided by the number of projects.
Careful attention to variable names will considerably assist modelling,
partly for the reasons just given but also because clear names make it easier
to write the correct dimensions and to get the confidence which comes from
the model being known to be dimensionally valid, because the dimensional
validity can more easily be checked by hand or by software.
a cpmult.k=tabhl (ctab, cpprat.k, 0, 2, 0.5)
t ctab=0/0.3/1I1.5/1.7
These equations represent the functioning of the link from the Consultants
per Project Ratio to Rate of Obtaining New Projects in the top right-hand
corner of Fig. 6.4.The rise and fall of CPPRAT represents the success of the
firm in providing the right number of qualified staff to supervise the projects
The management consultant's problem 159
on hand , and this, as the problem description makes clear, affects the firm's
ability to generate new business. As will be seen below, the multiplier ,
CPMULT, operates on the Basic Demand for Consultancy Services to help
the firm to win or lose market share . This new variable, CPPMULT is not
shown on the influence diagram and this is a typical case of drawing a
diagram at something less than Level 4 so as to convey the right information
to the client without confusing the issue with extraneous detail. For prac-
tice, the reader should alter Fig. 6.4 to show this new variable, the solution
being shown in Fig. 6.5.
The TABHL function is used in preference to TABLE as there is no
reason why CPPRAT should not exceed 2. The numerical values in the non-
linear table CTAB are found by studying previous sales data and relating
them to data on numbers of staff available, by asking experienced managers
their views and by common sense. It is, for example, clear that no work will
be obtained if there are no consultants, accounting for the 0 in the first
element of CTAB. By definition, when CPPRAT= 1 the situation is normal,
so the third entry in CTAB is 1.
The important point is that the influence diagram's portrayal of the
mechanisms of obtaining business has been agreed by the company as
reasonable and it now forms a theory on which data analysis can be based.
It is not a matter of collecting some data and seeing what theories are
suggested; it is a question of having a theory and analysing data with its
assistance.
Note also that NNQCPP is correctly defined in the D statements below as
[PEOPLE/PROJECTS]. It is very common to see numbers carelessly called
'ratio' and given dimensions of [1] and that is usually a sign that the model's
dimensions have not been properly checked . The ratio CPPRAT is, how-
ever, correctly dimensioned as [1].
It would also be easy to make the typing error
a cpprat.k=qcpp.k*nnqcpp
which is clearly wrong, because CPPRAT should be a ratio but [PEOPLE/
PROJECTS]*[PEOPLE/PROJECTS] is not [1]. Such errors can be found
by dimensional analysis, but only if dimensional checking is actually
done.
note
note projects sector
note ========
note
note projects being obtained and started
note
r ronp.kl = bdc.k*cpmult.k
r npsr.kl =delay3(ronp.jk,cdel)
c cdel=2
--- -- -- -- - - - - - --- --------------
/ " --
-- ... ... -,
/
/ ... ....
/
I "
I Bcsc
De mond for
I
" ,,
Con suttoncy \
I ServICes
t+ \
Re QJife d I
Number o f I
,.. - Consunont ,
/ e"'JlVoienh '" ... Slondan:l oIC_
_IorEnect
_. _
/ ~ - - - - - - - f'fof«:/ I
/ o nn. _ _ - Profect on llol. 01 ,
I
... ...
- 0bIaInJng N.w
f'fof«:" I
I _ -- - _ I
I " - I
+ + .:- I
Manpow e r -- /
Discre panc y
Q uohf le d "" _ /
\ C on sultcr. f$ -
\ per Proje ct
\ PlOQIctlv/ly /
/ 1+
\
\
":::::'-. /
"
.
I
/
\ /
nn./o \ / -- "
carr.,,/ / ---
O,"",-y \ / ---
\ /
\
\ + /
" ... /
-. DeSired ,.
,....... +
...Recrultment
Rate
.
/ I
/ I
I \
I \
Ave~oge
Recruitment
-*' \
Ra1e \
.... + ,
\ -: -.
I '" ... -, ...
"\ ------ D EMPlO Y + II c~;~:~~nt
Rate
/leCruII .... nI
Avetaghg
P.rIod
note
note project completions
note
r pcr.kl =nproj .k/dproj .k
a dproj.k=spt*effrat.k
a effrat.k=recpp/acepp.k
a acepp .k=ecw.k/nproj.k
c spt=5
c potas=O.5
c recpp=2
note
r tcr.kl=tcbt.k/dtrain
r trqs .kl=tcr.kl*psat
c dtrain=24
c psat=0.9
TCR is modelled as a first-order delay, for the reasons explained above .
The equation for TRQS is another example of bending the rules of Fig. 4.1,
in this case to allow a rate to affect a rate. TCR is a physical flow from
TCBT and TRQS is also a physical flow into QCAPT. Multiplying by PSAT
simply recognizes that one is not the same as the other.
note
note qualified consultants sector
note ===============
note
note number of people
note
I qcapt.k=qcapt.j+dt*(trqs.jk-clr.jk)
n qcapt=441
note
note consultant leaving rate
note
r clr.kl=qcapt.k/demploy
c demploy= 120
This group of equations is easily followed by analogy with the trainees. In
effect, the trainees' sector and the consultants' are identical modules , and
recognizing such cases is a useful skill as it speeds up modelling, provided
one is very careful not to jump to conclusions and too readily assume that
modules are identical without thinking about it. Some packages support
vectors and arrays , though these features should be used only after careful
thought about the problem.
note
note consultant division of labour
note
a qcst.k=tcbt.k*ratstt
c ratstt=O.l
a qcafp.k=qcapt.k-qcst.k
This is simple arithmetic to subtract from QCAPT the small number of
consultants who are supervisors. With 96 trainees, about 10 consultants will
be required for supervision, which is so few out of 440 consultants that this
aspect of the narrative is probably irrelevant and might, on the face of it, be
dropped from the model. The reason why it cannot be dropped is that the
partner in charge of training is a very powerful and senior figure in the firm.
The management consultant's problem 165
It is highly unlikely that he would take the slightest notice of the model if his
interests were not represented in it. Such political aspects often playa role
in practical modelling. Indeed, it is sometimes a fine judgement to decide
between including detail for political reasons and making the model so
complicated that it ceases to be well suited to its purpose of policy evalu-
ation and design.
note
note control and output
note = = = = = = = = = = =
note
c dt=0.125
c prtper=5
c pltper=l
c length = 120
print 1)bdc,ronp,netdef,npsr,pcr
print 2)nproj ,qcpp,cppra t,cpmult,dproj
print 3)qcapt,qcafp,qcst,clr,acepp
print 4)dtcrr,trr,arr ,tcbt,trqs
print 5)effrat,ecw,rnce,mandis
plot bdc=a(0,120)/nproj = b(0,400)/qcapt=c,
x tcbt=d(0,600)/netdef=e(0,300)
DT is governed by the shortest delay in the model, CDEL, which is 2
months long and third-order. That suggests that DT cannot be greater than
116, to which 0.125 is the next lower acceptable value. The value of
LENGTH is set to the employment period of consultants, which is the
longest delay in the model , and should allow all the interesting dynamics to
be seen. (Experiment with LENGTH=240.) All the variables are printed,
for debugging, and a selection are plotted. The commands used in the
PLOT command are special to COSMIC, and your package may be differ-
ent. The scale for NETDEF is suitable for the two cases tested here, but, in
general, we have no idea what its magnitude will be, or even whether it will
be positive or negative.
note
note simulation experiments
note
run A Constant Demand
c swdp=l
run B Demand Growth and Business Cycle
Two experiments to create Fig. 6.6.
note
note definitions of variable s
note
166 Case studies in modelling
I
100..; I
100~ 50~l
'I 100 25
50 i
, Jjl I
oJ 0 ' oJ 0
. 20 .
I IIII !
I BOC
L' TIME lNONTH) SIIO..UTEO TIME
lPRO.JECTS/I4OHTH) aAsIc DEMAND FOR CONSlA,TANCY
------ NPROJ (PROJECTS) ClRlENT NlHER OF _JECTS
, ~ - - -- QCAPT (P£OP\.E) NlHER OF OUAclFlEO CONSUl.TANTS AVAICAl!CE
75
--- --------~-----
_.........------.... ,,"
-----------L
------ --.. . . . " /
,'-- . ---.
.....
,, / /
I 2oo~11 1!50~
50
/
100..;
I '\ 100~
I
25
r>::
./ "\
/ .._. . . . . -,j
/' . .
_ .
. JJI I
/ -.....~.--./-1 »<:»
oJ oJ o.l 0
o>~~. to. 70 . ~o. 90. 'lOa . 1110 . ~20.
II
I'I :
:
BOC
L' TI ME (MONTH' SIIO..U TEO TIME
(PROJECTS/ NONTHl aASIC DEMAND FOR CONSlA.YANCY
.~
~._
-._
.==-= mB¥ (PROJECTS) ClSlRENT Nl.NllER OF PROJECTS
(PEoPLE) Pf..IiI8EA OF QUALIFIED CONSU...TAHTS AVAILABLE
'--.._ .._ .._ .._ .NETOEF
• .- .- TCBT (PEoPLE) TRAINEE CCHSULTANT9 BEING TRAI NED
(PROJECTS' NET DEFiCIT BETWEEN 80C AND RONP
the productivity of trainees and consultants, and the effects of doing so are
shown in Fig. 6.7A in which POTAS=O.7 . The striking thing is that
NETDEF increases, the value at the end of 10 years actually being 649! The
company is doing worse with more productive trainees. One of the standard
system dynamics tests is to subject the model to extreme, even ridiculous,
values to see if its behaviour is correct for those conditions. Figure 6.7B
shows the effects of lower productivity (POTAS=O.3) of consultants and
trainees, the result being better in that NETDEF becomes negative , reach-
ing - 379 by the end of the run. A negative deficit means that the company
The simple combat model 169
is building market share. It is contrary to intuition that improving produc-
tivity makes matters worse and that reducing productivity makes things
better, hence the caption 'Counter-intuitive Consultants' on Fig. 6.7.
A further insight into this strange behaviour is given by the second part
of Fig. 6.73 on p. 171 which shows comparative plots for the total number of
qualified consultants, QCAPT, and for the net deficit, NETDEF, against
the three cases of productivity. The salient feature is that lower productivity
leads to better market share and to more consultants, whereas higher
productivity does the opposite. A little thought shows the reasons . With
lower productivity, more trainees are recruited who, after about two years,
become qualified. Since it is qualified consultants not supervising trainees
who generate business, it is not surprising that more business is generated.
The reason for the effect is the non-linearity in CTAB, and we have no
really solid data on CTAB. One might worry, therefore, that the results are
not 'correct', since CTAB is not known accurately. While it is certainly true
that changing the values of CTAB would change the detailed results, it
would not change the type of result as long as the shape of CTAB is correct.
No-one in their right mind is going to set out to reduce productivity; the
implications of these experiments are that one needs to be quite careful
about increasing it unless the recruitment policy is also reconsidered. The
real implication is that it is consultants who matter and that ways of increas-
ing the effect of their numbers need to be found .
We referred to 'pet theories' in Fig. 1.3 and someone in the firm argues
that 'we need to get rid of some of the old stagers and bring in some new
blood ', so the reader should experiment by reducing DEMPLOY' Another
theory is that there are better ways of managing projects and of looking
after clients, both of which would have the effect of reducing NNQCPP
from its current value of about 1.8.
The reader should revisit this problem later in the book; for the present
we shall tum to the combat model, which also has some strange behaviour
and illustrates some more of the features of system dynamics modelling.
3 The second part of Fig. 6.7 is produced by model FIG6-7M .COS on the disk, which has been
set up to produce the comparative plots on the same page, purely to make the COSMIC plotter
match the layout of the book.
170 Case studies in modelling
,000 eoo 500 ,50
1: 700 1141 450 i
1
7001600~ 400i 125
3OO11!1 2oo~ 50
150~
: 200-iJ '
-200 , J I'I 1oo~ 25
i 100ij 50~
I
-&cx,j
, 0 JJI' oj
, 0
20 . 30. ~o . 50. Bo . 70 . Bo . 90.
I !\ ! L'esc TIME (MONTH) SllIJLATED TIME
A - HIGHER PRODUCTIVITY
'000 eoo 500 ,50
1: 7004111 450i
1
7°°~1' 600 i! 400i 125 /'
0001' 500-H
:
l 300.,"
I
~ ."
100
~/
/-------_/ -------/'_-- -
/'---"'---,
/ / " , - .....
//
J
2ftO~ 400~ 250~ 75 _ .... ---- --- ...., /' -,-, /'
i: 2oo-iJ 150i'
11
-eoe.i
11oo~
oJJ oJ
50
1 0
o. 30. ~o. 50. Bo. 70. Bo. 90 . '100. I, 10. ~20 .
! !III i L'eoe TI ME (MONTH) SIMUU TED TIME
(PAD.JECTs/MDNTHI BASIC DEMAND FDA CQNSlA. TANCY
:I c-==.== ~g~~T
------NPAOJ (PRQ..lf:CTS) C~NT NUMIl£A OF PAD..ECTS
(PEOPLE) IIJNIIEA OF QUALIFIED COHSU..TAHTS AVAILABLE
(PEOPLE) TRAINEE COHSU..TAHTS BEING TRAINED
L - .. _ •. _ . •_ .. _ , NETDEF (PRQ..lf:CTSI NET DEFiCIT lIE_EN soc AND AONP
B - LOWER PRODUCTIVITY
..
B - HIGHER PRODUCTIVITY
~ ·QCAPT C - LOWER PRODUCTIVITY
Iii
5oo-Hl
250
I
I
o
I
- 250
I
-500
. 50. Bo. 70 . Bo. boo 'lOb . ~ 10. ~20 .
11~~tR~~
TIME (MONTH) SIIU.ATED TIME
A - BASE CASE PAOOUCTIVITY
8 - HIGHER PRODUCTIVITY
~ ·Nh~EF C - LOWER PAOOUCTIVITY
defence capabilities. We shall test this below and again when we study
optimization .
Red men and Blue men. This is done to make dimensional checking as
rigorous as possible. The full model appears on the disk as FIG6-9.COS .
* Figure 6.9 The Simple Combat Model
note
note file named fig6-9.cos
note
note start of war
note ======
note
a wswitch.k=step(1 ,5)
It is often good practice in system dynamics models to prevent anything
happening in the first few time periods. This helps to ensure that the
dynamics subsequently produced are genuinely those of the model's rela-
tionships and not due to faulty initial conditions . In this case, WSWITCH
allows the battle to start when TIME=5.
note
note blue force sector
note =========
note
note blue forces in combat
note
I blue.k= blue.j + dt*(brar.jk- blr.jk)
n blue=iblue
c iblue=10000
Blue forces in combat are a simple level. The initial value is set to a constant
to allow different balances of force distribution between front line and
reserves to be tested easily.
note
note blue losses
note
r blr.klvtrfr.k-bprs
This is what is shown in the influence diagram, Fig. 6.8. Note that Total Red
Firing Rate, TRFR, is modelled as an auxiliary, not the rate which one
would expect. This is another case of the flexibility of the software allowing
one to have two options . Since there is, in the simple model, no stock of Red
ammunition to be depleted, there is no need for TRFR to be a flow rate.
When the stock is modelled, TRFR COUld, and should, be a rate, and the
equation would be
r blr.kl =trfLkl*bprs
which again breaks the strict rules of the connections between levels, rates
174 Case studies in modelling
and auxiliaries which were shown in Fig. 4.1. It is important to grasp that,
though the rules can be broken, one should only do so after careful thought!
note
note blue reinforcement arri vals
note
r brar.kl=delay3(brcr.jk, bmdel)
c bmdel=6
note
A simple flow from Reserve Commitments.
note blue reinforcement commitments
note
r brcr.kl =min(blres.k/dt,bmcap)*frtrig.k
a frtrig.k =clip(l,O,frat.k,bcafr)*wswitch.k
c bcafr=2.0
c bmcap=4000
Blue Reserve Commitment Rate depends on the Blue commander wanting
to commit reserves, which only happens when Force Ratio, FRAT, exceeds
a desired level, thereby making the Reserve Commitment Trigger change
to 1. Note the use of the non-negativity constraint, BLRES.K/DT. Note also
the use of auxiliaries to break the equations into simple components which
are easier to check than one complicated equation for BRCR. The use of
WSWITCH prevents Blue from initiating the provocative act of commit-
ting reserves before the war has started, even if his front line troops are
outnumbered.
note
note blue reserves
note
I blres.k=blres.j+dt*(-brcr.jk)
n blres=iblres
c iblres=20000
A simple drain of Blue reserves as they are committed.
note
note blue firing rate
note
a tbfr.k=blue.k*brfpm *wswitch.k
c brfpm=150
c rpbs=O.OOl
The total rate at which the Blue force fires depends on how many troops
there are and how fast each man fires, once the war has started.
note
note force ratio
The simple combat model 175
note ======
note
a frat.k =red.k/(blue.k + beps)
c beps=0.001
The equation for Force Ratio illustrates the need for protection against
division by 0 if BLUE.K becomes O. The use of a small number, such as
BEPS, is a useful trick.
note
note red force sector
note ========
note
The reader should now write the equations for the Red force, recalling that
Red 's 'policy' is simply to commit reserves as fast he can, once the war has
started. Use the following numerical values.
c ired = 15000
c rmdel=6
c rmcap=2500
c irres=500oo
c rrfpm=150
c bprs= .00033
note
note output and control
note ==========
note
c pltper=0.25
c prtper=lO
c length=60
c dt=0.25
print 1)blue,blres
print 2)brcr,brar
print 3)blr,rlr
print 4)red,rres
print 5)rrcr,rrar
print 6)frtrig
plot blue=a,red=b(0,60000)
plot blres= a,rres = b(0,6oo00)/frtrig=c(0,2)
Although the format is used in some of the system dynamics packages, but
not all, the principle of printing all the variables so that the model can be
checked is universal. The plotting interval, PLTPER, is set to be the same
as DT to give the smoothest possible curves in Fig. 6.9. The scale for
FRTRIG is set to force it to be in the middle of the page, where it will be
easier to see.
176 Case studies in modelling
note
note simulation experiments
note ============
note
run Base Case
A simple test to see how well the model works.
note
note definitions of variables
note = = = = = = = = = = =
note
d bcafr=(red/blue) blue commander's acceptable force ratio - the
x force ratio at which he commits reserves
d beps= (blue) small number of blue to prevent division by zero
d blr=(blue/hour) blue loss rate
d blres=(blue) blue reserves remaining
d blue=(blue) blue forces in contact with red
d bmcap=(blue/hour) blue movement capacity
d bmdel=(hour) delay in before blue reserves committed to combat
x become effective
d bprs=(blue/rshot) blue killed per red shot - the red standard of
x marksmanship
d brar=(blue/hour) rate at which blue reserves enter battle
d brcr=(blue/hour) rate at which blue reserves are committed to battle
d brfpm=(bshot/hour/blue) blue rate of fire per man
d dt=(hour) simulation time interval
d frat=(red/blue) force ratio of red: blue
d frtrig=(l) switch to trigger commitment of blue reserves
d iblres= (blue) initial blue reserves
d iblue=(blue) initial blue force in contact
d ired=(red) initial red force in contact
d irres = (red) initial red reserves
d length=(hour) simulated period
d pltper=(hour) plotting interval
d prtper=(hour) printing interval
d red=(red) red forces in contact with blue
d rlr=(red/hour) red loss rate
d rmcap=(red/hour) red movement capacity
d rmdel=(hour) delay before red reserves committed to combat
x become effective
d rpbs=(red/bshot) red killed per blue shot - the blue standard of
x marksmanship
d rrar=(red/hour) red reserve arrival rate
d rrcr=(red/hour) rate at which red reserves are committed to combat
The simple combat model 177
4 Congratulations to the reader who spotted the deliberate error in the model and didn't get
the behaviour shown in Fig. 6.9!
178 Case studies in modelling
200-n
I
150~ I
I
I
l00~
I
/
/
/
/
/
./
o ------------- -------
-50
2'1
1.7!1J 50. ---,,
1.~ ,,
,,
us] 40 . ,,
,,
I ,
1.
1 30. ~------]
. 7~ 20 ..-t+-
I '\\
-{,
II
.~
I \ I
.24 10 .
I " I
o.J
I \
0 .:-+,-~t._....._lmi____lon::'__4m____'4,....._.........
I
I 1110~ ' . ..L_l".,.__l..rror___l;.",.___1....___6.___{,
o.
L~R~R~S
TIME lHOUR) SII.....ATEo TIllE
the battle with a total strength of about 33000 men. The lower graph shows
the previous behaviour for RRES and BLRES , but FRTRIG, having
switched on at TIME=12, stays on, showing the Blue commander's
wish to commit reserves continues even after the battle is lost, which is
plausible.
Unfortunately, even though the graphs look right, the model still contains
errors. Run the model, looking at the tables and, perhaps, plotting a few
more variables to see if you can detect the error. Plotting all the variables is
usually just confusing: the tables of output are more informative.
The simple combat model 179
---------------------
/
/
/
/
.>
---,,
__ .......
/
/
.,.,..-.........
/
....
1.7~
50 . ---,
1 .~ \
\
\
\
1.2sJ 40. \
I.,
\
\
I 30 .
\
\
\
~---------------
1\,
. 7~ 20.+t------{
\
\
\
\
.5.j \
\
\
.2~
\
10. \
\
\
\
\
O.J O.::'-J.r--l,...,..... \
I L' .
* 10 i TIME (HOUR) SI .....ATED TIME
L_~~R~S
I----FRy~IG (BLUE) BLUE RESERVES R....INING
(RED) RED RESERVES REMlINING
(n SNUa. TO TRIGGER COMMITMENT OF BLUE RESERVES
The error is that Red still continues to fire even after Blue has been
completely wiped out. In other words, TRFR does not go to zero when
BLUE does. In a sense , this does not matter, as neither Red 's nor Blue' s
ammunition stocks feature in the model. It is, however , a logical error and
one can have little confidence in a model which contains errors, let alone
looking rather foolish and destroying the client 's confidence if he or she
happens to question that aspect of the model. FIG6-lOM.COS on the disk
contains the final corrected model.
We shall stud y this model in more det ail in Chapters 7 and 9, but a few
final comments are called for.
180 Case studies in modelling
In the first place, this model differs from the two previous examples in
that it has no external driving force. The first two models are driven , but this
one is closed and its dynamics arise entirely from its initial conditions and
structure.
Secondly, although non-negativity constraints need to be added to the
Blue and Red Loss Rates in Fig. 6.8 they are not needed for Blue Ammu-
nition Reserve Remaining, Blue Ammunition Stocks, Engineer Supplies
Remaining and Long Range Ammunition Stocks in Fig. 3.145 • For the first
of those, the problem statement implied that they were so large that they
could never be used up. In fact, they are probably irrelevant to the problem
and could be omitted. If they are retained, it would be as well to add a
constraint, partly for consistency but also to be on the safe side. The other
three all work by affecting the rate at which they are used; for instance Blue
Ammunition Stocks influence the Blue Rate of Fire per Man and, when
stocks reach zero, consumption automatically ceases. It would not be wrong
to add the constraint, but it would be an unnecessary complication, which is
bad practice. A model should be kept as simple as possible.
5 The point is not only to do with military modelling; it could arise in any other type of
problem .
The predator/prey model 181
NotmQ/ ,. -- - - - - - , -,
Fox /
-,
F_I/y
FOXFEe "- ,
I
I
-\
I
I
I -:
I /
I /
~ .;+
Fox
Conceptlon
Role
feR
\~
~~ Rate
FBR
note
note food supply effect on fox lifetime
note
a fratio.k=avipf.k/nfrpf
c nfrpf=5
184 Case studies in modelling
a fsrf.k = tabhl(tfsrf,fratio.k,O,1.0,0.2)
t tfsrf=0.O/O.024/0.12/0.8/0.98/1
This is the formulation discussed in Chapter 5.
note
note fox death rate
note
r fdr.kl =foxpop.k/(dlife.k +minlt)
c minlt=1
a dlife.k= nfltf*fsrf.k
c nfltf=120
Finally, Fox Death Rate is modelled using a first-order delay with fox
lifetime dependent on the food supply. It would have been easy, though
somewhat more laborious, to have written explicitly the equations for a
third-order delay (recall Fig. 4.8), which would have allowed us to distin-
guish between immature, mature and old foxes, probably with different
tables to reflect the possibility of old and immature foxes dying of hunger
more easily than mature ones . Whether that would add much to the cred -
ibility of the model is a matter of judgement. It would certainly impose
greater demands for numerical data.
note
note control and output sector
note ========== ====
note
c dt=0.125
c prtper=5
c pltper=1
c length = 300
print 1)rabpop,rabbr
print 2)foxpop,fcr,fbr,fdr,
print 3)rabkr,akr,rlife
print 4)fratio,fsrf,dlife
plot foxpop = a(0,40)/rabpop = b(0,800)/fdr=c(0,4)
plot dlife=a(0,120)/rlife= b(0,40)
Choosing a value for DT requires us to evaluate two candidates. The third-
order delay for Rabbit Gestation is 4 weeks long, which would require
DT <4/12. Fox Lifetime is a first-order delay with a minimum value of 1 if
there is no food at all for foxes. That would require DT <114. To be on the
safe side, we put DT=0.125, half the value required by MINLT.
note
note simulation experiments
no~ ============ =
note
The predator/prey model 185
run A - Trial of Model
c inrab=600
run B - Larger Initial Number of Rabbits
Two experiments, to test the effects of uncertainty about the numbers of
rabbits in the area.
note
note variable definitions
note ===== = = = =
note
d akr=(rabbits/week) average kill rate of rabbits
d avipf=«rabbits/week)/fox) average food intake per fox
d dfgest=(week) average length offox pregnancy
d drgest=(week) average length of rabbit pregnancy
d dlife=(week) average fox lifetime
d dt=(week) solution interval
d fatime=(week) averaging time for fox food intake
d fbr=(fox/week) fox birth rate
d fcr=(fox/week) fox conception rate
d fdr=(fox/week) fox death rate
d fheff=«l/week)/fox) fox hunting efficiency - the proportion of the
x rabbit population that a fox will kill during
x a week
d foxfec=(l/week) fox conceived per fox per week
d foxpop=(fox) fox population
d fratio=(l) food intake of faxes relative to normal
d fsrf=(l) reduction factor on fox life span due to relative availability
x of food
d ifox=(fox) initial number of faxes
d inrab=(rabbits) initial rabbit population
d length=(week) simulated duration
d minlt = (week) minimum lifespan of faxes
d nfltf=(week) normal lifespan of a fox when food supply is normal
d nfrpf'<r(rabbits/weekj/tox) food intake per fox for normal life span
d pltper=(week) plotting interval
d prtper=(week) printing interval
d rabbr=(rabbits/week) rabbit birth rate
d rabcr=(rabbits/week) rabbit conception rate
d rabfec=(l/week) rabbits conceived per rabbit per week
d rabkr=(rabbits/week) rabbit kill rate
d rabpop=(rabbits) rabbit population
d reps=(rabbits/week) small number to prevent division by zero
d rlife=(week) average lifetime for a rabbit
d tfsrf=(l) table for food supply reduction factor
d time=(week) time within simulation
186 Case studies in modelling
BOO, 40.
I
I
700.J 35 .
I
I
I
600-J 30 .
I
I
500"': 25 .
I
I
400~ 20 .
I
I
300~ 15.
I
I
200 .J 10 .
I
I
I
100-J 5.
I
I
oj O.
60. ~50 . 11BO.
TIME (MEEK) TINE MITHIN SIMULATION
40 ., 150
I
I
35 .J
I 125
I
30 .J
I
I 100
25 .~
1
1
20 .~ 75
I
I
15 .oj
I 50
I
10 .J
1
I
25
5.JI
I
O.J 0-+r---1",.,-i;o-:- bOo 1120 . 1150 . ~BO . 210 . 240 . 210 . ~OO.
TIME (MEEK) TIME MITHIN SIMULATION
(MEEK) AVERAGE FOX LIFETIME
(MEEK) AVERAGE LIFETIME FOR A RABBIT
A - TRIAL OF MODEL
40 ., 150
I
I
35 .J
I 125
I
30 .J
I
I 100
25 .~
I
I
20.~ 75
I
I
15.~
I 50
I
10 .J
I
I
25
5 .J
I
I
O.J 0 *--l."....--\:,-,.,..--i,,,,-~,......,...--I6r-b..----~,,..----6~*'m---l,00 .
i J·~l:!~~
TIME (MEEK) TIME MITHIN SIIOA.ATION
6 Recall that the acceptable values of DT are 0.5, 0.25, 0.125 etc. There are the decimal
equivalents of exact binary fractions and are used in order to avoid rounding error when
functions such as PULSE and STEP are activated by comparison with the imbuilt TIME
variable.
The predator/prey model 189
40 ,
35,
10 ,
5, iI
I
o , .1.-"""*-~-i.1'r-;."....--~.,.,--lno"...-""=r.,....-~--";',,.,.,.-----"",.,.,-----l,
, 00.
TIME (OffK) TIME O!THIN SI .......TION
!II!--F
L'F8 XP8P
I
A - DT-O •• 215
XP P 8 - OT-O,28
C - OT-0.8
L.:=~8~~8~ o - OT-1
FOXPOP (FO X) FOX POPULATION (a)
BOO
700
600
400
The pattern of oscillation in Fig. 6.12 implies that there might be popula-
tion levels which make the system stable. A little experimentation shows
that, with 411 rabbits and 20 foxes initially, the populations do stabilize,
though with rather short lifespans. This is shown in Fig. 6.14, the model
being FIG6.14.COS on the disk. With 300 rabbits, there is no value of fox
population which stabilizes the system. One might conclude that fox culling
will not stabilize the system and that the correct policy is to introduce
enough rabbits to bring the population up to 411 at a time when there are
190 Case studies in modelling
40.
35 .
30 .
25.
20 . ------------------------------------------ ---
15.
10 .
40 ., 150
I
I
35 '1
I
125
30 .J
I
I 100
25)
I
I
20 .~ 75
I
I
15 ·i
I 50
I
10 .J
I
I
25
5.JI
I
O.J o-h----I,-"r-""r---hrr-,..,rn---urn---u,.,.,---ln,.,.,---ln,.,.,---l,-"..----I,OO .
L' TIME
i--------. RLIFE
I (WEEK) TIME WITHIN SIMll.ATION
DLIFE (MEEK) AVERAGE FOX LIFETIME
(WEEKI AVERAGE LIFETIME FOR A RABBIT
(b) 411 INITIAL RABBITS
4.5.j 700~ 35 .
4. I :
1 600-1 30.
3.J :
I 5OO~ 25.
3'1 :
2. 5.j 400~ 20 .
I
d 3oo~ 15 .
1.,1 200-l: 10 .
1'1 I
I
.s.j 100~ 5.
O. J 0 J 0. *-~.....-~...-=I;;;;;::.J...,.,.,--~rl~=l;,;"""'..,.".--l",,.,r.lJ;;;,:;=:r,,.,.,.,--l;.,,j.,
~·~~~~g~
TIME IWEEK) TIME WITHIN SIMU..ATION
I i (FOX) FOX POPUU TION
(RABBITS) RABBIT POPULATION
------FOR (FOX/WEEK) FOX DEATH RATE (a)
40 ., 150
I ,,
I
,
I
I
1
I
I , ,,
I
35 .-j
I
125
I
I I
I ,
30 .J
I
I
I
I
I
I
I
,
I
I
100 \
I I
25 .~ I
I I I
I I I I
,
I I \ \
I \ I
20.~ 75 I I
I \ \ \
I \ I \
\ \ \
15 .~ I \ \
I 50 \ \ \
I \ \ \
10 ..J \ \ \
I \ \ \
I \ \ \ \
25 \ \
5.JI \ \
\ \
,,
\ \
,
\ \
\
"
I
\
\ , \
\
O.J
I
"
I L" TIME (WEEK) TIME WITHIN SI .......TION
ste adily decay. If the model is run for 5000 days the cycles do reach approxi-
mate stability.
The behaviour is so strange that a littl e further inve stigation is called for.
It turns out that RABKR reaches a maximum valu e of 3616 rabbits per
week , which means that th e average fox is killing 180 rabbits per week, or
26 times the food intake it requires for normal life. It is possible that th e
model should be modifi ed to prevent a fox killing more than, say, 10 rabbits
per week. What would th e effect of that be with this larg e initial population
of rabbits?
192 Case studies in modelling
The techniques used here , particularly the modelling of Rabbit Kill Rate as
dependent on the interaction of both populations, are quite widely appli-
cable. A model of this general type might, for instance, be used to study the
practicalities of reindeer harvesting when there is also a population of
wolves to manage. The same general approach can be used in modelling the
spread of a disease. Similar ideas are used in some types of combat model-
ling, such as air defence and submarine warfare.
physical flow. The software might well accept a level or an auxiliary, but to
write anything other than a rate may mean that the modeller is seriously
confused about how the physics of the system works and is incorrectly
creating a memory of the physical consequences in it. That becomes even
clearer when we recall the rules for the dimensions of levels and rates given
on p. 88.
If, on the other hand, the level is the smoothing type which creates a
memory of information it is perfectly permissible to have a level or an
auxiliary as the variable being smoothed.
In the manufacturing problem, we used Average Order Rate to represent
the smoothing of the physical inflow of orders. It would, however, have
been perfectly logical to model the smoothed (averaged) backlog or dis-
crepancy using equations such as:
L SBLOG.K=SBLOG.J+(DTrrCON) (BLOG.J-SBLOG.J)
and
L SEPSl.K=SEPSl.J + (DT/TCON) (EPSl.J -SEPSl.J)
Equations such as these could be written, for example, as
L SEPSl.K=SEPSl.J + DT*RCSEPSl.JK
R RCSEPSl.KL= (EPSl.K -SEPSl.K)rrCON
with RCSEPSI representing the rate of change of SEPSl. This would make
a level, SEPSl, depend on a rate, RCSEPSl , which, in turn, depends on a
level, SEPSl , and an auxiliary, EPSl. That is formally consistent with the
Level J JK: J
(accumulation) I I
-------~------~- -------
I I
Level
(smoothing) J : JK : J
I I
I I
Rate
-------r------r- -------
(no delay)
K I KL I K
I I
Rate
-------,------,--------
I I
(delay) J : JK : J
I I
------~-------r- - ------
Auxiliary K I KL I K
SUMMARY
This chapter has shown, in careful steps, the building of four models. In
each case, they were tested in various ways, and we shall use some of them
for policy analysis and optimization in later chapters. You should study
these examples carefully and further extend that knowledge by building for
yourself some of the problem models given in Appendix B.
CHAPTER 7
INTRODUCTION
In Chapter 1, we discussed the idea that the main aim of system dynamics
is to develop policies which improve the dynamic behaviour of a system.
This is obviously the intention when the clients are the management of a
business firm, but it is also the objective if the 'client' is the academic
audience for a book , as was the case for the decline of the Maya, studied in
Chapter 3. At first sight, it might seem that the purpose of such a model
would be simply to understand why the system had behaved in a certain
way, but, inevitably, the researcher becomes interested in how the collapse
might have been avoided had the Maya rulers acted differently, and that is,
by definition , policy analysis.
In Chapter 6, we developed models of four problems and showed that,
when the models were tested, their modes of behav iour could be changed
quite noticeably. The behav iour was not necessarily better than the 'base
case', but it was different, and knowing that behaviour can be changed lends
encouragement to the idea that we might be able to design the best possible
robust beh aviour into the system in question.
This chapter will apply that idea to some of the models from Chapter 6.
The aim is not to imply that the solutions to be developed are in any sense
'ideal' or representative of good practice . The intention is simply to show
how models can be experimented with to test policy effects and to indicate
the wide range of behaviour which is usually found. At the end of the
chapter, you should have developed confidence in working with models and
have had your imagination stimulated with ideas about what can be done
with them. In Chapter 9, we shall take this idea of design much further when
we study the use of optimization for policy design in system dynamics
models.
Before we can say much about policy analysis, we should be clear about
what 'policy' means in system dynamics modelling and how policies are
196 Policy experiments with system dynamics models
I The author realizes that some of his system dynamics colleagues, whose views he respects,
will differ from this interpretation. They will argue that the feedback loops give all the
guidance one needs to design good behaviour into a system. The difficulty is that a model of
even moderate size can contain many thousands of feedback loops.
198 Policy experiments with system dynamics models
The Raw Materials Manager is heavily criticized within the firm for the
extreme volatility in Raw Material Stocks, and by DMC's suppliers for the
great variations in Raw Material Order Rate. His defence is that the large
number of different raw materials used in making washing machines, and
the inadequate clerical and computer support which he has, make it impos-
sible to keep even reasonable track of what has been ordered but not yet
received . It is, therefore, impossible for him to avoid the over-ordering and
excessive cutbacks which underlie the extreme swings in the raw material
variables. In short, his view is that the company's troubles are due to its
failings, not to his incompetence. His solution, or pet theory , is that he
should be allowed to invest a considerable sum of money in acquiring,
and subsequently operating, a Management Information System (MIS) to
allow him to control the quantity of raw materials in the delivery delay
pipeline.
Our first task is to find out whether or not it is true that the Raw Materials
Manager's 'pet theory' will bring the system under control. Testing the
effects of putative information systems in the inexpensive world of the
model is a most fruitful area of system dynamics application. Of course ,
we have already seen in Fig. 7.2B that there is a solution to the problem
of achieving stability which involves no more than changing the policies
which control the system, and that has the attraction that it would
cost nothing to implement. If the MIS also achieves stability, the question
will be whether it is 'better' than the policy solution and, if so, whether the
improvement is worth the cost. There might, of course , be other free solu-
tions which are better still, and we shall search for them when we have
tested the MIS.
The first stage of testing this pet theory is to change the influence diagram
to represent the new system. This requires us to model the contents of the
pipeline between RMOR and RMAR. This is the actual Raw Material on
A:.::c' ~0I1
(WEEIO Average
--~ ~~
W-b 01 A.v.mge
:~M~):EEK) PtoducNon in
De.u.dRaw
/ " I I ,/ ...... Ala_rial Sfoclc.
/ I I ;' WAP
RowDes~~11Q1 ..""" (Wf(K)
/ I \ Stocks
_ ..... DRMS <,
// , \ 1~;::3uc~,;:;{. ;' + (WMS)
/ I \ ~ ,, ;' \
\
/ I \ \ "
/ I \ \ / " \
I I \ \ / ;' ------ \
-t"' _ . . . .
I I \ \ / / .>
\ ..... <,
I I \ \ / / I ,
+y \ /
I \ ~ Average /
I Des ned PrOd uc fion
Bac klog , Rat e
,
I
'" \
I °b?t'~.. <, \ (WM~~EEK) I \
I (WMS) ' \ "
I 11 -, \ ,+ I \
\
I / \ \ I t+ \
, / -~ \ , Raw Material \
_ ~ Sf OCk ~eponcy ........ \
I / Back log \ I ;'
I =c:.AO:: + DoscE~ncv \ I / (WMS) <, +\
Iocklog / '" (WMS) <, \ I /
I WAO / \\ I ... \at, Material
I (WUK) / \ \ I Row Mole,,,,' Orde r Rate
I \ \ ' _ S~kS - .. (W~~~~EK)
I I \ \ '~(wMS) nm./o COINCI /'
'QwlrfaI.noI / '
1 I \" \ ~ Di"~r
<, _ . . (WEEK)
I, \
~'" Proocc, non
\ + Rat e
I \ ~WMtt~EEK)
, \ <41 R~r':'N~~~1 +
I Bac klog 0' - / RMAR" _
\ + ~~ / (W MS/W EEK)
\ .--" (WMS) /
/
r,.,.. Jo Correel
Ne w Order 0,., Backlog
Innow r~ote Dacl.pancy
NO ~IL
(WMS/wEEK) (WEEIO
225
200
50
25
2000
500
250iI
I
o·
TIME (MEEK) SIIlIA.ATED TIME
(_ ) ORDER BACKLOG
(_) OESIRED SAClCL08
( _) RAW .... TERIAL STOCKS
(_ ) OESIRED RAW .... TERIAL STOCKS
225
200
176
160
125
100
76
50
25
11 2 e
N
~·~MOR
TIME (llEEXl SIMl1.ATED TIME
/ llEEX) HEll ORDER RATE
IlIEE1CI PRODUCTION RATE
/MEEK) RAW MATERIAL llAllER RATE
2000
.
iL'~LOG
!III
~:~a~OG
TIME (WEEK) SIMl1.ATED TIME
I-I ORDER 1lAClCL08
t_ D1!&IRED BACI<l08
I_I RAW MATERIAL STOCI<I
l-.·-ORMS I_I DESIRED RAW MATERIAL STOCKS
/
"=..'"
D.....
----- / (WEE«)
,/
..- - ........
A:=~ ,/ <, /
(WfEIO
,/
-- <,
Av..o /
.."" O rd erge
/
.......
.........+ ,.
/
- +1WMS/W"
- .. ~6:: 1O / ... Do uedRow
Mo 1eriol on
.> ,I / w..n 01Av.ra"...
De seed _ _ o...d law D~ -..
/
//' "
I
\
\
A.__
... _ ..,...- I __
_ __ -- _
Raw Molena! .....-
Stocka
- . DR' ... -
-
_
MaMIIaI:IIocb
...WA~
_ ...-
(WMS) "
+ ~
(W MS) " '\ \
' " I / \ \
/ /
\
/' '
" \
~,\ I / __ ----- \ I
- t-,
" " \ , ,
/' '\ \ 1,
/"/ <,
I
I ' \ 11 Av..o ge " \
' ",od uc''''" I " -, -, I
' "" lI: I
I '' 010''''''' "
= ,\ I I \ I
\
-~'
-, " I \ I
0;::;:; " I / ~+ \
/
'' ",
Raw Mat eria l \
' .
, -,, ,
,, , _ ....,..stoc k ~epon cy
(WMS )
_
\
Switch J
I
t+
Row Mo to llOJ
on Odel
' ", , " '\ +\ -- l>tIc leponcy
.i-- 'PSJ
+ \cl Ma tenol ,y (W MS)
:
I
"
... 0 / \ -, ,
, '"="' Q rde, Ro fe - A-
........... ~ (W~~EK) ,
(UR) \ -, ,
: =.l.=
I I
;/'~
- """ \, '\ '\
: ~_ (~ ) 1m. 10 eon.t:t
.,..".".tId .....
I
I , -, " "':'_ -- " " -, I
(UEI)
-~
' I ;_ 'Jl.O __ <, "::w-:.ac::::' I
I \ A"1lMAA
r a.. I
~MS/W"K) (UEIO
=.~ _ -
, • +
/
IlLOG /
,\ +
(W MS) I
/
'' II ~"
" -- - _~C~ ,
._~" 0_ .
_=- /
\ 0<d0,1oc_ /
,/
K) --~."
,,"w o.de' ..-
Inflo~Ole
(WrvtS/WEEK)
I _. ' Ali
(Wfl1O
-
Fig.7.3 Th e Raw Mat erials Man ager 's information system in the DM C probl em.
204 Policy experiments with system dynamics models
note
c switch1=1
note raw material on order
note
I rmoo.k = rmoo.j + dt*(rmor .jk- rmar .jk)
n rmoo=drmoo
note
note desired raw material on order
note
a drmoo .k=apr.k*dwrmp
n dwrmp=ddel
note
note pipeline discrepancy
note
a eps3.k=drmoo.k-rmoo.k
The equations for the raw materials pipeline and its control are exactly like
those for, say, BLOG. Note the use of
n dwrmp=ddel
It seems sensible for DWRMP to be the same as the delivery delay, and this
use of the N label sets up a 'computed constant' in which one constant is
determined from another. This prevents errors such as changing DDEL, to
represent a change to suppliers who can deliver more quickly, but forgetting
to change the numerical value of DWRMP.
d drmoo=(wms) desired raw material on order
d dwrmp=(week) desired number of weeks of raw material usage in
x the raw material pipeline
d eps3=(wms) difference between desired raw material on order and
x actual raw material on order
d switch1= (1) switch to test effects of introducing the raw materials
x manager's management information system
d tcrmp=(week) adjustment time on raw material in the pipeline
The amended model is on the disk as FIG7-4.COS.
The effects of implementing this fairly costly MIS are shown in Fig. 7.4.
The upper graph shows that the MIS does, indeed, bring the system under
control, in the sense that the explosive behaviour of Fig. 7.2A has been
replaced by sustained oscillations, but the behaviour of RMOR is worse
than that in Fig. 7.2B. The control of RMS is poorer and stock levels are
higher because WAP has not been changed from the base case.
When TCRMS is increased (Fig. 7.4B), the behaviour of the system with
the MIS becomes worse. The oscillations in RMOR are of greater ampli-
tude , as are those of RMS. This difference of behaviour between the two
The dom estic manufacturing company 205
250
225
200
17 5
15 0
125
50
25
2000
225
200
175
150
125
100
75
50
25
1--~2
lWWS/WEEK) NEW ORDER RATE
lWWS/WEEK) PROOUCTION RATE
~'RMOR lwws/WEEK) RAW WATERIAL OROER RATE
2000
halves of Fig. 7.4 drives home the essential insight that simply implementing
an MIS is unlikely to be effective in any system, not just DMC, unless one
carefully studies the system 's policies. Introducing the MIS has changed the
system, so it is intuitive that the old policies might not be good for the
changed system.
We conclude from this that implementing the MIS, with the existing
policies, is by no means as good as changing the policies. Of course, it is
possible that implementing the MIS and changing the policies might pro-
duce even better behaviour.
Parameter analysis
The range of behaviour already found suggests that some more experiments
are called for, but it might be as well to be a little more systematic than
simply trying a few at random, as we did in Fig. 7.2B. For these experiments
we shall switch off the MIS and not consider its parameters.
Apart from the parameters which specify the behaviour of NO, the DMC
model has seven constants:
• WAO: the number of weeks in advance which the customers place their
orders. This would be difficult to change without upsetting them.
• DDEL: the delivery delay on raw materials. Again, hard to change
without renegotiating the whole system of raw material contracts.
• WAP: the number of weeks of average production to be held in Raw
Material Stock.
• TAOR, TAPR: the two averaging times for New Orders and Production
Rate, respectively.
• TABL, TARMS: the two adjustment times for Backlog and Raw Ma-
terial discrepancies, respectively.
The last five parameters are entirely at the choice of DMC's managers and
can be changed freely. They are , however, of two distinct types.
• WAP acts as what is called a gain in control engineering. That is, it acts
to multiply the variations in APR when deriving DRMS. WAO is also a
gain.
• TAOR, TAPR, are delays involving the smoothing of information, as
was discussed in Chapter 4, p. 105.
• TARMS and TABL are parameters in control equations and, as ex-
plained on p. 102, they also act as delays.
It is a rule of thumb in control engineering that reducing gains and increas-
ing delays is likely to reduce instability. When that rule is applied to the
gains and delays in the model, using FIG7-4.COS on the disk, Fig. 7.5 is the
result.
In Fig. 7.5A, the stability of RMOR is very slightly better than Fig. 7.2B,
showing that the extra parameters, TABL and TAOR, have had a practi-
208 Policy experiments with system dynamics models
2000
225
200
175
150
125
100
75
50
25
It
IL_~~
TI ME (wEEK) SINUUTEO TINE
2000
'I'll--OBLOG
L 'BLOG (WHS)
(WNS)
ORDER BACKLOG
OESIRED BACKLOG
'~'RMS (WHS) RAW .... TERIAL STOCKS
L..·-DRMS (WHS) OESIREe RAw .... TERIAL STOCKS
Structural analysis
The preceding experiments with parameters only show that quite consider-
able improvements can be made to the quality of the system's performance,
and this encourages us to become more wide-ranging in our thinking.
Consider , for instance, the equation for Raw Material Order Rate ,
RMOR:
r rmor.kl=eps2.k/tarms+apr.k
The APR term exists in this model of the Raw Materials Manager's de-
cision-making because he wishes to ensure that he continues to match the
current level of usage, as well as correcting stock discrepancies. We
know, however, that the delivery delay on raw materials is 6 weeks, which
happens to be exactly how far ahead the customers order their washing
machines. It might, therefore, make sense for him to use AOR in his
equation so that he orders raw materials now for delivery 6 weeks hence,
which is just about when the orders now being received will be in pro-
duction . He does not do so, because the poor personal relations between
him and the Production Manager mean that order rate information is not
passed on. This may seem crazy, but is exactly the kind of thing which
happens in real systems and which can considerably complicate the task of
the analyst.
If, however, some more senior manager directed that the Raw Materials
2 At the risk of repetition, this case study is adapted, and somewhat simplified, from a
consultancy project. The company really did have the policies and probl ems described.
The domestic manufacturing company 211
Manager should have access to order rate information he could use the
equation:
r rmor.kl=eps2.k/tarms+aor.k
Intuitively, one would expect this to give an improved performance, but it
might be that a mixed policy would be even more satisfactory. Replacing
the existing equation for RMOR with:
r rmor.kl=eps2.k/tarms+(alpha*apr.k+(1-alpha)*aor.k)
will allow us to experiment conveniently with different options.
ALPHA is a weighting factor between two streams of information, and is
shown in Fig. 7.6. It is a structural parameter because, if the best perform-
ance is found when ALPHA=O, the dotted link from APR to RMOR could
be deleted and the thicker solid link from AOR to RMOR would be
retained, thus changing the structure. That would also imply that the firm's
management information structure had been fundamentally wrong; in the
real world, the Raw Materials Manager would have to switch to basing
order rate decisions on AOR and abandon APR, except for determining
DRMS.
If, on the other hand, the best performance is achieved when ALPHA =
0.5, then both links are required and, in the real world, the Raw Materials
Manager should use both information streams, giving them equal weight in
his decisions.
Of course , Switch 1 is also a structural parameter, but it can only have the
values of 1 and 0; the management information system which is the Raw
Materials Manager's 'pet theory' either exists or it does not. Switch 1 is said
to be a binary structural parameter. ALPHA, on the other hand , is a
continuous structural parameter, which can have any value from 0 to 1,
inclusive. Naturally, the combinations of ALPHA and SWITCH1 are all
valid: ALPHA not being 1 does not rule out SWITCH1 being set to 1 to
represent the combination of the changed information flows and the MIS3.
Testing the model with the changed equation for RMOR (see FIG7-
7.COS on the disk) produces the behaviour shown in Fig. 7.7. Because using
AOR in the RMOR equation is intuitively appealing, ALPHA is set to 0
and the MIS is turned off in Fig. 7.7A and on in Fig. 7.7B.
Comparing Fig. 7.7A with 7.5A, the structural change involving ALPHA
has had very little effect. The oscillations in RMOR are about as large, but
they are now slightly closer to matching those in PRo There has been no
detectable effect on the behaviour of RMS and BLOG compared with their
respective targets.
, ~- ' \
" : " ~ I .> . > .. \
, "
-=-', ' \
\
I " \ , ,I / / --------' U-- --_ I
I " , " - > ---' , \
I Y \ \ 1"_ I I
De..ec \ '"
I / / > ,," \ -- \
Bockbg .. A,.. " <, ..f
~ J
I __ \ P<oduc~n \ -, \
,I I
o~_ ~. lJ::
, ! ' ,-,', '''''l''"'. ', -,' \
' " , \ I
/ " \
' \"
t+
,, -:
::::::.= " I, ' I Switch 1 Raw Motenol
, ,~-, , , I on o.de,
, - " _" " - > -- Decreccrcv
,
- /
' "", \ \ I
,-
-_.,
-~-~~'
~ ---- , <,
I
.4.- EP'33
(WMS )
, ' , , ' I -, , " - A-
, I , , ' -- '... ,
I I -, -, " -,
I, / - (WMS)
St~ " ..
R&",,,.,,:,&:.:"
RMOR
~ I
I \ <, ~ ,."... e-.c, ,," (WMS/WH K) ~ <,
, , - .+" , -- -- . . ., J
"- '" nm. Ib Con.cl I
I \ ~+P,O~ehon -.:::c' "' .,.,AoIcDIttIG
raw /
, ' ....%.~ - /WEEI()
-A BlOG / Row Mo,..."
\ ___ (WMS) • AnNal Rot e + DDEL /
\ +
Boc~cl
O'd"'- / / (W'=~EK) .. --
-- /
/
NO mo .. C.u.c/
/'
_ onO.der
Row Mo'e, ie'· +
n /WEEI()
/ ~ RMOO
(WMS ) -
~;:;'w°,;: I
(WMS/WH K) '='.. = ~ --
Fig.7.6 A structural option for the DMC problem.
The domestic manufacturing company 213
250
225
200
175
150
125
100
75
50
25
it
IL-~2
TIME (wEEK) SIMlA.ATED TIME
2000
. 120 .
IIIL' TIME (WEEK) SI......ATED TIME
,'I: BlOG
--OBlOG
' ~ ' RMS
(WMS)
(WMS)
ORDER BACKLOG
OESIREO BACKLOG
(WMS) RAW MATERIAL STOCKS
l..-·-DRMS (WMS) OESIRED RAW MATERIAL STOCKS
225
200
175
150
125
100
75
50
25
It
IL-~2
TIME (WEEK) SIN\A.ATEO TINE
2000
1750
B - ALPHA=O WI TH MI S
Fig.7.7 Continued
The domestic manufacturing company 215
When Fig. 7.7B is compared with 7.5B, the addition of the MIS has
brought RMOR into practically perfect agreement with PR , though there
is, again, no visually detectable difference between the behaviour of RMS
versus DRMS and BLOG versus DBLOG between the two graphs. Once
more, the MIS seems to be hardly worth the cost.
Just because ALPHA seems to have had little effect on the system does
not invalidate the idea of changing structures, and it is worth looking
imaginatively at Fig. 7.6 to see what further changes suggest themselves. A
collection of possible changes is shown in Fig. 7.8, although that does not
exhaust all the options. For instance, the EPS1 and AOR policy for RMOR,
mentioned on p. 196, is not shown.
The changes involving the continuous structural parameters GAMMA
and DELTA are very similar to that involving ALPHA. In control engi-
neering terms, all three of these parameters involve feedforward. The effect
of the external driving force, NO, as measured by AOR, is transmitted
directly forward into the system. The corresponding effects on the
equations for DRMS and DRMOO are:
a drms.k=wap*(gamma*apr.k+(1-gamma)*aor.k)
and
a drmoo .k=dwrmp*(delta*apr.k+(1-delta)*aor.k)
Obviously, if SWITCH1=O, the value of DELTA has no effect on behav-
iour, as DRMOO is effectively neutralized.
Note that in FIG7-9.COS (and in FIG7 -7.COS), the equations involve,
for example,
a drms.k=wap*(gamma*apr.k + (one - gamma)*aor.k)
c one=1
d one=(1) the number 1
This is good practice for any system dynamics software package which
supports dimensional analysis (some do not) , as it defines the number 1
on the same basis as GAMMA. This allows the dimensional analysis soft-
ware to make a valid comparison between the two to ensure a
thorough check.
Assuming that Switch 1 and Switch 2, which will be described in a mo-
ment, are both zero, the parameter BET A will introduce a third feedback
loop into the system. It has the effect of linking PR to its own average ,
thereby introducing an element of damping into the system. The effect of
this should be to reduce the variations in PR , on the grounds that changing
production rates is usually a very expensive business.
Switch 2 has the effect of modifying PR according to the availability of
raw materials. If EPS2 is positive, raw materials are in fairly short supply,
so it might be a good idea to ease back on production to prevent the
problem getting any worse. If EPS2 is negative, raw materials are plentiful,
".,..----- ----- --- d __
.,/ 0.,., .......
.,/
---;;r-- . . . . ~~"..
»: ~" <, <,
200
175
150
125
100 -+-t+-_......
75
50
25
IIIiL 'SLOG
TIME (lfEEK) SIMULATED TINE
I. ....::.~~~§OG
(_) ORDER BACKLOG
(lflfS) DESIRED BACKLOG
(lfMS) RAlf lfATERIAL STOCKS
L.- ·-ORMS (lfNS) DESIRED RAil lfATERIAL STOCKS
225
200
175
150
125
1oo+t+-_...,.
75
50
25
2000
500
250 iI
I
o.I"""",,,----1.,..- 70. 130. 90 . 1100 . 1110. ~20 .
II J'Bb~8G
TIME (MEEK) SIMULATEO TIME
Fig.7.9 Continued
220 Policy experiments with system dynamics models
With the MIS, case B, the structural changes in Fig. 7.9 leave RMOR
practically indistinguishable from PR, and the control of RMS becomes
much improved, though there is a slightly greater deterioration in the
control of BLOG to its target of DBLOG. Whether the improved control of
RMS is worth the extra cost of the MIS is a question we cannot resolve. To
some extent, careful costing studies might show the answer , though it would
be hard to find convincing cost values for the slight degradation in BLOG
control.
Why, though , is there such a perfect agreement between PR and RMOR?
The reason is not far to seek. Basing RMOR on AOR instead of PR, and
ensuring that RMS does not go wildly out of control by keeping track of
the quantity within the delivery pipeline ought to give good control, and
does.
It should now be evident that there are a large number of solutions to the
problem of keeping DMC under control. Some are only fairly good, such as
Fig. 7.4, which showed the effects of simply buying an MIS and plugging it
in. All the others are much better than that. Reducing gains and increasing
delays (Fig. 7.5) gives a very good result , to which some of the structural
options add further improvements. The MIS added to the parameter and
structural options seems to add relatively little.
There are , however, other structural options in Fig. 7.8 which have not
yet been tried , and Fig. 7.10 shows yet one more , which is to damp RMOR
by taking into account its own average, ARMOR. If that is to be considered
in combination with the possible use of APR and/or AOR, an additional
parameter, KAPPA, is need ed. One way of writing the equation for
DRMOO would be:
a drmoo.k=dwrmp*(kappa*armor.k+(l-kappa)*
x (delta*apr.k+(l-delta)*aor.k)))
The reader should now see that a system dynamics model can contain very
rich policy analysis options. We have used DMC to illustrate this phenom-
enon, but that model is by no means unique. One of the skills of building
system dynamics models is to recognize the policy options they contain and
to be able to adapt the model to test the options which have been detected.
This is a skill which comes with practice, so the reader is urged to experi-
ment further with this model, trying some of the variations which have been
suggested, and others which can be discovered for oneself, such as adding
noise to NO.
It will also be evident that simply trying parameter and structural options
like this is rather a hit-and-miss process. One is using visual judgement of
the output to assess whether or not matters have improved, and one can get
trapped into an almost endless series of experiments in the hope that
something will be found . Paradoxically, this is an essential step on the way
- - - - - - - - - ---
o.•.,w....r.
- - oIlaw-=1l
<,
/ -- !=
/' / ~
f"; ?" - ~-~....
/' .......
/' -- - - - - - - --- \\ - - ........ <, /
A~~ /' --- ....... , <, ~" + /
rM>I / '/.. . ...... , - " \.,
MIlO
Av.._ //'
/'
/
-- --
- -
-- - - - - _ /
/'
--- - - ---~~ ~ .......
_.oIA_ <, ,
- - IC,
"
....... +
"'M '
,.
''''''''''edOOW
",
~
- - . Order - - ? _ _.. . . A__ <, DllMOO
" ....... ....... .... Malenclon
/ + - / / -/................ +
...... DOMed . '&-
- -=:::::::.. '\. =. .... \"'- _ +1f (W MS)
'"
'" / _ Mot",'" /WID) WNOO
~MS/WEEK)
~I I "" I
// I \ / / __ = _
, ,(WID)" '-'- " ' '\.
/ I \ Y // + (WMS) -, " Av",_ _ ' S wllcIJ J \
I / \
I
I
I \
A__
".~.. ....
I
/ \
\'"'" '"
/'
_ _____ , \
\ rv___ _ _
U;
I
\
\
- ' Ma l enal Ofd er
note \
I \ \ '" - _ _ I 11
I I'
M~ \ . r : r--_, . \ (w~~:EK)
+ I
f ,\ \
t / '" - :: \ " , /
f \ \ \ \ I
f ' \ \ I
1 r / ; '" "" /
/ +~ \ ":~/ I \ \ t
I """'ed \ Il<>t. I \ I
I --
oIc.~ " \\ / /'(W~"'' ' 4 IJ \\ II I
I \ A i" ' 2 l' + I I
: / ' \ -'I JI , s..,'fch "
~)" \~,/ ~~~'!""_
' / - II \ ' I Switch 1
...- _ -~"·"""'''' EPSr '''' J --- _....... \ J" I '+
/ oJ., \ : / / (WMS) '+_ + __ A_
'I __._ - ..,... , \ .•L, - / + __ .... I
' _+~.
•
,I / +,,,, _ 1 ..-
I a-. .. - +/ .. (WMS)"" , /' _ Mot..o /' .. (WMS/WEEK) " -
..... / \ \ I Stocke / ' /' I
'
I '''0 (WIll) I \\ ' , /
~ _ (WMS)
OMS __
.-..c _ /' /' "
The DMC model is a case in which one experiments with the parameters
and the structure in order to obtain good performance. The system is,
however, so heavily dominated by the external driving force, in that case the
incoming new orders, NO, that the overall mode of behaviour tends to
change in relatively fine detail, once the designer has cured the explosive
behaviour mode of the base case. There is, however, another class of model
in which the behaviour mode is determined entirely by the structure and
initial values, not by a continuous external driving force; the combat model
studied in Chapter 3 is such a case. In these undriven models, the behaviour
mode can change quite remarkably depending on variations in parameters
and initial values. These parameter changes usually correspond to invest-
ments which its managers might make in aspects of the system; we referred
to those aspects as 'pressure points' in Chapter 3.
......
-----------------------
" ...
""
20 .
/
---, /
/
"' . . . _........"
10 ..-rt---......
60 .
so. ---\
\
\
\
\
40 . \
\ ,
\
\
30.
i'7---------------
\
I'\,
20.4+-------4
\
\
,,
\ ,
10 . \
,
\
,
\
\ ,
TIME (HOUR) 5IM~TED TIME
(BLUE) BLUE RESERVES REMAINING
(RED) RED RESERVES REMAIHING
(1) SWITCH TO TRIgGER COMMITMENT OF BLUE RESERVES
A - BASE CASE
less, case D is an improvement over the base case, even though the behav-
iour mode has gone back to being the same as the base case's.
Since Case C is very favourable to Blue, and Case D is at least to his
comparative advantage, it is intuitively obvious that the two combined will
be even better than either in isolation. Figure 7.12E shows the phenomenon
226 Policy experiments with system dynamics models
60 .
50 .
40 .
30 .
60 .
50 .
40.
30.
,------------
I
I
40.
30 .
20.
---', "''''.,,----
10 . ' ..... - ........
60 .
50 .
40.
30 .
20 .. ++ -i
10 .
Fig.7.12 Continued
,,----------------------_.
20 .
---_
/ /
".... ....
,, .-
.- .-
10 ."'IT-~~ ...- - ........
2'1 60 .T]
1.7sj :1
J
50 . 1
1.~ 40.
I
I
I
1.2aJ
I
1
1. :30. r-----------
0.7~ I
20.++------1. I
o.!ij I
0.2~ 10 . I
I
o.J 0.=-+._...,.....,....
I *101· . TIME (HOUR) SIMULATED TIME
o.
!--RRES
I----FRTRIG
LSLRES (BLUE) BLUE RESl:RVES REMAINING
IRED) RED RESERVES REMAINING
(1) SWITCH TO TRIGGeR CO"'ITMENT OF BLUE RESERVES
---,
'-M"-~~
" ......- - ---'
60 .
50 .
40 .
30 .
20 .++- -i.
10 .
fore, alter the model so that, once he has started to commit reserves, he
commits them all. To do so we need to transform FIG7-12.COS into FIG7-
13.COS.
The change lies in one sector , shown below, with explanations following
the equations.
230 Policy experiments with system dynamics models
note
note amendments to Blue commander's decision on
note reserve commitments
oo~ =========================
note
note the original equation
note
note a frtrig.k =clip(l ,O,frat.k,bcafr)*wswitch.k
As stated, this is the original equation, for ease of comparison . It correctly
does what the Blue commander wanted to do, that is to commit reserves
when FRAT.K equals or exceeds BCAFR and the war has started. Its side
effect is that, if FRAT.K goes back below BCAFR, then reserve commit-
ment will stop, but will start again if FRAT.K goes back above BCAFR.
This pattern will be repeated whenever FRAT.K changes relative to
BCAFR.
What we require is to keep FRTRIG.K at the value of 1 once it has
changed from 0. Since this book aims to be as independent as possible of
any particular software package we shall solve the problem using only the
common system dynamics formats .
note
note revised equation using only stand ard System
note Dynamics equations
note
I frtrig.k =frtrig.j +dt*rcpul.jk
n frtrig=O
The key is to realize that FRTRIG must 'remember' that it has been
activated on the first occasion that reserves are committed. This 'memory'
°
requirement means that we must use a level equation in which the dummy
rate , RCPUL, will act as a PULSE to move FRTRIG.K from to 1 within
1 DT.
r rcpul.kl =clip(l/dt,O,frat.k,bcafr)
x *clip(l,O,O,frtrig.k)*wswitch.k
The first CLIP makes RCPUL equal to l/DT as soon as FRAT.K equals or
exceeds BCAFR. Of course , if FRAT.K stayed above BCAFR, then
RCPUL would be l/DT all the time, so FRTRIG would move from to 1
to 2 to 3, etc. with each DT for which FRAT.K equalled or exceeded
°
BCAFR. What effect would that have elsewhere in the model?
To prevent that effect, and to keep FRTRIG to its logically correct value,
the second CLIP permits only one PULSE, since it only produces the value
1 when 0, the third argument, is greater than or equal to FRTRIG. In other
words, it will only allow a change to FRTRIG when there has been no
previous change. The use of WSWITCH prevents any change until the war
has started.
Summary 231
d rcpul=(I/week) pulse to turn on blue commander's switch for
x commitment of reserves
As always, new variables must be defined .
°
The reader should run a small model , essentially consisting of only these
few equations, and with FRAT.K made to STEP from to 3, say, and study
what happens to FRTRIG with the two different policies.
note
note revised equation using COSMIC FLIP function
note
note a frtrig .k=flip(frat.k,O,bcafr,O)
Readers who have access to COSMIC can achieve the same effect more
simply by using the FLIP function, described in the COSMIC User Manual.
When this change is implemented in the model , and the model is run to
reproduce those cases in Fig. 7.12 in which FRTRIG was turned on and
then off by the old policy, the results shown in Fig. 7.13 are produced. In
case B, the overall outcome is not changed, the only difference is that
FRTRIG, once turned on, stays on. In case D, Blue lasts about 6 hours
longer and Red has 16700 survivors, rather than 22800. Case E now ends in
a complete Blue victory, with 17300 troops left. Notice , in the upper half of
case E, Red's reserves are still obligingly marching up and being promptly
destroyed, from TIME=31 until the last reserves arrive at about TIME=45.
This demonstrates the working of the non-negativity constraint on Red
losses.
Even in the original model, Blue 's policy can have strange effects. As
with the Raw Materials Manager in the DMC problem, the Blue com-
mander takes no account of the reserves moving forward , or of the Red
reserves, whom we shall assume he can see in the distance. Define two new
variables, BRER and RRER, for Blue and Red reserves en route, respec-
tively, write suitable level equations, and alter the equation for FRAT.K to:
a frat.k= (red .k+rrer.k)/(blue.k + brer.k+ beps)
and see what the effect is.
SUMMARY
This chapter has shown the immense range of design possibilities which are
usually to be found in system dynamics models. We examined two models,
one in which the behaviour arose from the system's response to an external
driving force and the other in which it derived from the interactions within
a completely closed system. In the first case, we experimented by changing
parameters and structures, in the second , only parameters were changed.
We used the term 'pressure points ' in that model to suggest that parameter
232 Policy experiments with system dynamics models
60 .
50. ---,,
,,
,,
40. ,,
,,
,
30 .
t\---------------
I '\,
,
I '\
I '\
I '\,
,
TIME (HOUR) SIMU.ATED TIME
50 .
40 .
30 .
1
I
1
20 . 1
1 //-----------',-- _
I /
I , ~/
10 .-t1-t-- ............ __ ........
I
1
I
o .~I-k---\,---,.,._-ln.-tt-I,rn-~6..._~",.,...~=____itrr__\1ro:_,1'r;..____I::
*10'1 . o.
iL
TIME (HOUR) SIMlkATED TINE
BLUE (BLUE) BLUE FORCES IN CONTACT WIlli RED
- -RED (REDI RED FORCES IN CONTACT WIlli BLUE
60 .
---,,
,,
,,
,,
,,
,
f\---------------
I '\
20 . # - - - - - \ \
I '\
I '\
I '\,
,
TIME (HOURI SIMl.LATED TINE
..... ""
""
""i'_--L-~=-u.v
30. 35 . ao.
J
'15 . So. 55 . so.
TIME (HOUR) SINlA.ATEO TINE
60 .
50 . --- ,
"" ,
"
40 . ""
" ""
" ""
"
I- ~- - - - - - - - - - - --
.-H-----~
I ''' ' ',"
""
"-,
""
""
""
""
TIME (HOUR) SINlA.ATEO TINE
Optimization in system
dynamics
INTRODUCTION
In the last two chapters, we built and experimented with several system
dynamics models. The problems in Appendix B call for more model con-
struction and exploration of model behaviour. The conclusion is that the
behaviour of a model can be changed quite remarkably, for better or worse,
by changes to parameters or pressure points. Usually , even more significant
variations in behaviour stem from changes to the model 's structure. The
drawback is, however, that there is always a nagging doubt that, had one
tried only one more experiment, something even better would have been
found. Unfortunately, there is always yet one more experiment, so the
process never stops .
It would, therefore, be highly desirable to have some automated way of
performing parameter variations,' up to a certain number, and reporting to
the analyst the best result found in that set of experiments. On the face of
it, that could be provided quite easily by writing software which would test
combinations of parameters and report the best result. In fact, that is not
what is needed, because the number of possible combinations and conceiv-
able numerical values of the parameters is usually colossal; in theory, it is
infinite. One needs, therefore, some sort of guided search of the parameters
to be considered and the numerical value each might have so as to seek out
the result which is most rewarding in terms of enhancing the system's
performance and not pursue blind alleys. Unfortunately, there is no perfect
way of achieving that, but the principle of dynamic optimization comes very
close to providing this subtle searching of the design possibilities of the
system. This chapter will discuss the theory of dynamic optimization, illus-
trated by a simple example; the next will apply it to some of the models
already developed.
It will be noticed that the first paragraph referred to 'experimentation'
and the second has mentioned 'design'. This is the distinction which was
1 Throughout this chapter, the term 'parameter' includes the structural parameters which were
discussed in Chapter 7.
The system response and the parameter plane 237
Figure 8.1 shows the first of the ideas we shall need to understand. The
diagram shows a two-dimensional picture of a three-dimensional object.
The two dimensions in the horizontal plane are labelled for two of the
parameters in a model. It is essential to realize that these may be ordinary
policy parameters, such as WAP in the washing machine model; they may
be structural parameters, such as ALPHA and its cousins in the same
model ; or they may be pressure points , such as BMDEL in the combat
model. Each parameter has a range within which it may lie, shown as, for
example, P1uPPER and P1LOwER. The initial, or base case, values are labelled
P1! and P21 on the parameter axes. When these two values are projected
into the 'parameter plane', following the dotted lines, they meet at Point A.
When the model is run with those values, the response is, we shall suppose,
rather poor, so a short line is drawn in the vertical direction to indicate that
poor response. Naturally, this idea of the model 's response at a point in the
parameter plane is valid whether there are 2 parameters, 22, or any other
number.' However, with 22 parameters one would need to draw a 23-
dimensional object on a two-dimensional sheet of paper, which is rather
difficult.
The third, vertical, axis is a measure of the quality of dynamic behaviour
which the model produces for any given combination of parameters. For the
moment, we shall simply label that scale as running from 'Bad' to 'Good'.
Later in this chapter we shall explain how 'bad' and 'good' can be
measured.
If the two parameters are now changed to P12 and P22 , a new point B is
defined which, we shall imagine, produces better performance and hence
qualifies for a rather longer arrow in the vertical direction.
2 If there are more than two parameters, the 'plane ' becomes a hyper-plane in n-dimensional
space. We shall stick to the simpler term of 'parameter plane '.
"0
Q
Q
e
~">$'~"
..
"0
..
<>,,~o"~
- - - - - -,~-.>
Plane ,
__
--_
t_ Response at
Point A
=
~
The parameter " , , :: Point A
, ,
p P2,
liraIneter 2
,I
\
Edge of Bose of
Response Surface
in the Parameter
Plane
HILL-CLIMBING OPTIMIZATION
The answer lies in the analogy of the blind man who is marooned on a
mountain and wishes to find his way to the top.' His strategy is to feel the
shape of the ground around the point where he is sitting (Point A) . Having
detected the direction in which the ground slopes up most steeply in that
vicinity, he takes a cautious step or two in that direction and then feels the
ground again. In this way, he hopes to find the top of the mountain, as
shown by the sequence of arrows moving up the surface of the hill from
Point A in Fig. 8.3. Unfortunately, the blind man 's strength eventually fails
him and he can go no further than 11. This is not even as high as ~ , so there
is no guarantee that the blind man will reach his goal, a , or even another,
lower, peak.
The idea of feeling one's way and taking steps in search of the top of the
hill corresponds in optimization software to iterations of the model. Each
iteration is a run of the model with a particular set of values of the collection
of parameters being searched. The first iteration uses the base case para-
meter values. After the model has run, the value of the objective function is
calculated as a measure of how good or bad the performance was. The trick
comes in 'remembering' which sets of parameter values gave good results
and using that information to predict how the set of values should be
changed to carry out the guided search for good values, and not wasting
effort examining parameter values which lead nowhere.
J A blind woman would be far more sensible and would try to find her way to the bottom, and
safety. She would, however, use the same principle.
240 Optimization in system dynamics
a Th
Path/of
e Steepest Ascent
I
,' "
1\ I "
... ' I
I
/\ , I
: J.l" ...' \ The Response Surfoce
'I \
\,I l'
L '\ . /
I "" T ,
'1/
I " ,
I ~ "
,' ' / '- Local Contours
I <>\"",~.. , / - . , - - for Responses
;
...e.'II\ ~\ ,
~ I 'xatAandB
',
~e. , -___ ~ \
.: ,'------- -:':1'" \
~ ~\, ,' - - - - \- Point B '-
\
Edge of Base of
Response Surface
In the Parameter
Plane
Computer software is not limited by the blind man's strength, so that any
number of iterations can be commanded. Even so, there is no guarantee of
finding the maximum of the response surface. However, numerical hill-
climbing algorithms are sophisticated and are capable of searching with
something close to the intelligence that the blind man would use.
Consider Fig. 8.4. The vertical axis is still the model's response, but the
horizontal axis should be imagined to be a 'cross-section' of the parameter
plane, representing varying combinations of the two parameters. The hill-
climbing search has started at Point A and followed a steep ridge until it
reached B. From there, a valley leads forward into the hills, and there is a
ridge to the left, but the locally steepest direction is towards C. On reaching
C, it becomes clear that it is a false peak, from which all directions lead
downwards. Since the man is not yet exhausted, he would remember C as
the best point so far discovered and, reasoning that he can always go back
to C, he accepts the loss of height and searches towards D. At that point, he
discovers a slowly rising path which emerges from behind peak C, as shown
by the faint line, and moves off to E and hence, we hope, to F. As soon as
any point is reached which is better than C, it will be remembered as the
point to which he can return if no better solution is found.
/
1/7'\
I
F
"
/
A new dIrection
/a pea
A t lee k
. ' I \, E C
/ J ~-_ /--_
/ I' I \ ..... - -:""7"'."._"'__'... . .-.D_
/ / \ I
I I , I
I / ~B
I / II
1 I 1 "-
I
/
I X
A I
I "A local ridge an the mountain
An oltemattve "-
'!rating paint ~
.
'l:l
ell
The starling pain!
1
\ \ '
250
25
I.'1: I
-,
-
r-:~~-
SCALE is equal to 46.7933 X 104 which is found by running the model with
SCALE=l and the base case parameters, observing the value ofINVPEN
at the end of the run, and calculating SCALE accordingly. In this instance,
it is evident that we wish to minimize OBJFUN, which is tantamount to the
blind man finding his way down the crater of a volcano (hopefully extinct)
by the method of steepest descent.
These changes are added to the model to give FIG8-5M.COS on the disk.
OPTIMIZATION EXPERIMENTS
When the optimization software is activated, one has to specify the par-
ameters to be searched and to state the upper and lower values of each one.
In this problem, there are four parameters, TAC, TCI, TICAS and
Optimization experiments 245
TEBLOG. TTCAS is a gain, the rest are delays. To start with, we allow all
four to be in the parameter plane to be searched. All the base case values
are 6, and, after careful discussion with the management of the company, to
see what kind of changes they might be prepared to tolerate, we allow them
all to lie in the range from 2 to 10. The software is instructed to do 30
iterations. Beyond that , the precise details of how COSMOS works need
not concern us; the results are what we are interested in.
The optimal values of the parameters are reported to be TAC= 10,
TCI=2, TTCAS=2 and TEBLOG=2. The value ofOBJFUN falls from 100
to 4.03. This reduction of practically 96% is by no means unusual. All the
parameters have been driven to their extreme points.
It is interesting to note that the gain, TTCAS, has been reduced, but that
only one of the delays, TAC, has been increased , while the other two delays
have been reduced. In Chapter 7 we stated that it is a rule of thumb in
control engineering that reducing gains and increasing delays is likely to
increase stability. It is indeed true that that is the rule of thumb, but it has
clearly not worked in this case. Blind adherence to such rules can be
seriously misleading.
It is usually not a good idea simply to throw all the parameters into the
optimizer and take the results on trust. To do so is to abandon thought
and rely on computation. In this case, we might feel that to increase TAC
too much might make the system too insensitive to the unpredictable
changes in CONSR, so let us try another optimization in which only TCI ,
TTCAS and TEBLOG are allowed to enter the parameter plane, with
the same ranges as before. The results are that all three are driven to their
lower value of 2 and OBJFUN is reduced to 5.268. On the face of it,
this is nothing like as good as the previous case, because OBJFUN is
about 30% larger. In fact, the visible differences are very slight, as shown
in Fig. 8.6 (FIG8-6.COS). The only difference between the two plots is
that INV reaches a maximum of 562 with four parameters and 581 with
three.
The optimization with three parameters has driven the value of TTCAS
to 2, which means that the firm is trying to operate with only 2 weeks of
stock cover. This is fine when demand is constant, but might be quite
insufficient for any noise in the demand pattern and provides little protec-
tion against another upsurge in CONSR. When it sees these results, man-
agement therefore feels that it has been a little rash in allowing TTCAS to
have a range from 2 to 10, and wishes the optimization to be done with TCI
and TEBLOG ranging from 2 to 10, but TTCAS in the range from 4 to 10.
The optimization produces all three parameters at the lower limit of their
ranges and OBJFUN reduced to 12.84. In management terms, the param-
eter values correspond to holding a prudent level of stock, but reacting
quickly to changes. The behaviour is shown in Fig. 8.6C, and is clearly not
as good as either cases A or B in Fig. 8.6. For instance, the maximum value
of INV is now 857.
246 Optimi zation in system dynamics
1500 Ill 200
1250~ 175
Ii: 150
1000!!:
"fil
,I:
l 125
750~ 100
!Ii
r-.
75
500~
ii I:I: 50 f \
\
250 -m 'II 25_ ''f',;:--_\~\,:---------------
Om 0 '- " , 60 ,
II' L"
' 1i
TIME (lIEEK) SIMU"ATED TIME
175
150
125
100
75 ~\
I \
50 ,
I
I
\
\
\
\
\
\
At this stage, and for this very simple model , optimization has now run its
course and management must choose, on criteria which it would probably
find hard to articulate, which of the results it prefers. If, of course, manag e-
ment can articulate its objectives more precisely, a fresh , and more subtle,
objecti ve function could be developed and the process repeated. We have,
however , covered enough of the theory and a demonstration of the practice
to serve the purposes of this chapter; more detail will be seen in the next.
For the moment, we must turn to some final observations on the concept of
opt imization .
Summary 247
1500 Ill 200
1250~ 175
l000ff,'I:
150
125
!I: 100
I
~\
\
750+H I \
!I:
I
I
\
,
,,
75 ,,
500tJ-j
,,
I'll,
,
50 ,,
,,
250+H
'I'
25
om
,'
0 L \
--~----------
ao , L50, I.:r-L-'L'L'h'L'
L ! ' k'T'T"
so , 10 , eo, 90 , 100 ,,10 ,120
II' L
, , 2 0 , ~O ,
TIME (MEEK) SIMULATED TIME
,130 ,,40 ,,50 ,' 60 ,
The concept that the top of the hill is sought by repeat edly running
the model makes it clear that the technique is optimization by repeated
simulation. However, the two oth er cases, with reduced numb ers of pa-
rameters and with different ranges should make it clear that the real und er-
lying theme is sim ulatio n by rep eated op timization . The model is opt imized
and something is learned. That leads to furth er optimization and more
learning , and so on. The power of the optimization calculation is to provide
a much more powerful guided search of the parameter space than could
possibly be achieved by ordin ary experimentation , but the principal aim is
still to experiment and to understand so that a better experiment can be
designed .
The idea of simple experimentation to see what the model might be
capable of is a fundam ent al precursor to optimization. One cannot devise
an intelligent objective function without first having 'played' with the
model , and an unint elligent objective function is worse than useless.
SUMMARY
for all its superficial attractiveness, is not a panacea and it does not guaran-
tee good analysis. There are, indeed, some limitations to the approach.
The first limitation is that the hill-climbing algorithm does not guarantee
an optimal solution. In practice, that matters less than might be thought
because most managed systems perform so badly that any improvement is
welcome and the differences between different optima are usually much
less than the objective function values might imply, as we saw in Figs. 8.6A
and B.
Secondly, the optimization technique does not, of itself, give any guidance
on the development of a good, subtle , objective function. A poor objective
function, such as minimizing inventory, might be truly disastrous.
The final weakness is that the thought of optimizing something is so
seductive that the narve analyst might stop thinking .
In practice, it is only the second and third limitations which are serious
and, provided one thinks , optimization is probably the most powerful devel-
opment in system dynamics since the field was first developed.
CHAPTER 9
Optimization in practice
INTRODUCTION
Having thought about the options which exist in the parameter plane , it is
time to turn our attention to constructing an objective function for DMC.
Let us start by using FIG9-3.COS on the disk. This contains all the options
we have already studied but, for the moment, they are turned off in order to
reproduce the base case behaviour. You may find it useful to review the
discussion of the DMC model in Chapter 7 to remind yourself of the effects
on the system of the various parameters and switches.
Criteria of performance
Figure 9.3 shows the base case performance, which we already
know to be rather lamentable. How, though, can we assess whether
A=:=~=d
1ot0ll Avemge
(WEEK)
--. ~~: w..t. at A ~.f~
Produclionin
:1NM~7Ww()
,/'" I I / / J:::SI~s
/" WAP
/ I \ Raee~~jol £ ,/ (WEEll
/ I \ Stocks
I I I \ "" _gPenod
A..._ _ lid. _ -+ DRMS <,
+ (WM SJ
\
I I \ ~ ",,,,/'
\
I I \ \ '" \
f , \ \ ,/ ,/
-- - --- \
I I \ \ ,/ /' -\"--
I I \ \ / /'
\ / '" \ -- .... <,
I I \ I '"
+y
\\ ,/
J . II Av..o ge ,/
I " -,
J D
... ed \ ProdJctlon \ -,
~~ \ ~~ I \
J DBl OG -- .... \ (WMS/W EEI() I \
I (WMS) -, \ A+ I \
I tI '\ \ , \
I / \ \ I ++ \
I I I -I \ I Row Mot6OOl \
_ ~ StOCk ~~Fncy - - - ... \
I I BoJ.og \ I /'
_ k . 01A ...._ Doscrepcncy \ I / (W MS) " '\ +\
I Otd«s . . 0 . _ + Y' J,~) -, \ I
I ~~ 1'/ \ \ ' I + \~Matetlal
Ord er Rate
I (MEIO I \ \ ' ROof Mateo'"
I \ \ , _St~~ks / Y' (w~~~EI()
I I \ \ I ~(wMS) rllJ»toConfICI
IlawMaletkll .....-
Dltc:er
-, . . ~:-PrJud~~ ~ (MEIO
+
\I (\ RWt
\ \ ~MS/WEEI()
I \ ... ROof Motend +
/ An"'ol Rate
\ Boddog at - / RMAR ....f-- -
\ + ~~ / (WMS/WEEI()
\ ~ (WMS) /
/
nme to COffeet
New Ofder Ord« 'ocklog
Jnflo wRate D/KHG"Y
NO
(WMS/WEEI() (WEEKI
225
200
50
25
70 .
TIME (WEEK) SIMULATED TIlE
1750
20. 30. !!lO . 50. 50. 70. Bo. boo ~oo . ~ 10 . ~20 .
TIME (WEEK) SIMULATED TIME
(OMS) ORDER BACKLOG
(WMS) DESIRED BACKLOG
11lMS) RAW MATERIAl. STOCKS
(WMS) DESIRED RAW MATERIAL STOCKS
A OF.K=(W1*PEN1.K+W2*PEN2.K+W3*PEN3.K+W4*PEN4.K)
As in Chapter 8, it will be neater if OF has some nice round value , such as
100, in the base case, so we introduce a scaling factor to achieve that and
have:
A OF.K=(W1*PEN1.K+ W2*PEN2.K + W3*PEN3.K + W4*PEN4.K)
X/SCALE
where the numerical value of SCALE is found as described in Chapter 8.
When these changes are added to FIG9-3.COS the result is FIG9-6.COS
which should be studied closely, not least to discover the numerical
values for the four weights, WI to W4. Note that all the new variables and
constants have been defined and the new variables which comprise the
objective function have been added to the output commands. Keeping up
with documentation as a model develops is essential good practice. Printing
out the values of new variables is also essential, as much experience shows
that relying on plotted graphs does not give enough information to enable
the modeller to be sure that the revised model is doing the right things for
the right reasons.
Study of the printout for the base case run shows that the penalty compo-
nents of the objective function have significantly different values. In fact,
PEN1 = 16.99 X 106, PEN2 = 50.581 X 104, PEN3 = 7.944 X 103 and PEN4
= 62.111 X 1Q4 at the end of the run , PEN1 actually being about 2000 times
as large as PEN3. Does this matter?
The answer is that it does not . The penalties measure correctly, and in the
correct units, what we have decided to be important in the behaviour of the
system and, if the penalty for raw material stocks has turned out to be very
large indeed, then that is how matters stand. To attempt to scale the penal-
ties so that they were all of the same numerical magnitude might look more
elegant, but would be to second-guess what we have carefully considered to
be the requirements for the system.' In any case, even apparently crude
objective functions tend to produce good results from a model.
Having developed an objective function , the next question is how to use
it. A good way to start is to identify what can be controlled in the system. In
this case, there are two control variables, PR and RMOR, which are, of
course , the domains of the two managers. (There is rarely such a neat
correspondence between control variables and management respon-
sibilities.) For each of the control variables, it is useful to draw up a policy
option diagram, POD. That for PR is shown in Fig. 9.4. This is intended to
show the options which affect PR or which could affect it, which is why it is
1 In the real case on which this textbook example is based a good deal of effort went into
deciding what the system should be achieving, though the insight into what it m ight be capable
of achieving had been generated by the preceding progr amme of experimenting, or playing,
with the model.
The DMC problem 257
called an option diagram. The solid lines show what affects PR in the base
case of the present system. If we ignore BET A for the moment, TABL,
WAO and TAOR are all parameters on the chain which leads to PRo WAO
and TABL are shown at a so-called Policy Level because they regulate the
daily operation of the fixed, currently chosen, control structure shown by
the solid lines.
The firm could, however, adopt a different control strategy of allowing
EPS2 to affect PR , and this is hinted at by the broken lines, to imply
parameters which can only come into play when SWITCH2 is 1. In such a
case, the dotted lines would have to become solid, and EPS2, DRMS and
RMS would move up into the policy level to indicate that TARMS and
1I
Production
Rate
Control PR
Variable
. - - - - - -..........., - - - - - - - - - j - - - - - - - - - r - - ,
1 1 I
_TABL
1 1 I
Backlog 1 I I
Discrepancy
1 I I
Ell 1 1 1
Policy
I I
I I I
Level I I 1
Desired Order 1 I 1
Backlog Backlog
DBLOG BLOG 1 I I
1 1 I
WAO I I I
" " . " • . " " . . . . ..• .. .. ". " " .. ". " t . " " " " . " . " " " t " " "I " "
SWITCH2~ I 1
' - - -TARMS 1 1
R~ 1 I
Mm~1 I I
Stock I 1
Dbcreponcy I
EPS2
I -p----,
1 " I1
---~---I ::
Strategy 1 I I
Level Desired R~ I 1
Row Material 1 I
Mscr~' Stock I 1
---r----
DRMS RMS I 1
1 I I
AveraQ8 J---WAP I
Order 1. Average I ?
Rate --I---pro~:Ion--
WAP are now policy parameters for this new strategy. In practice, the effort
of redrawing the diagram would not be worth it. In fact, once one has
understood the concept of a POD and had some practice, it may not be
worth the effort of drawing the diagram at all, except , perhaps, for the
benefit of a client; one simply does it in one's head. It is always a good
idea not to let the conventions of diagrams get in the way of doing the
analysis.
A further variation would be to allow GAMMA to be less than 1, which
opens up the options of to some extent basing DRMS on AOR as well as
the obvious, base case, usage of APR. Similarly, if BETA was allowed to be
less than 1, the dotted line at the right-hand side with 1-BETA pointing to
it would be brought into action.
The? at the extreme right-hand side of Fig. 9.4 suggests that there may be
other structural options not yet conceived of. We shall optimize the model
with the options identified ; the reader should experiment further.
The POD for RMOR is shown in Fig. 9.5, which is to be understood along
the same lines as Fig. 9.4. Note that WAP and TARMS are strategic, or
structural, parameters for PR because they only have an effect if SWITCH2
is 1. In Fig. 9.5, these same parameters are at the Policy Level, because
they apply to the base case. The opposite arguments apply to TABL and
WAO.
The external driving forces are shown as the Exogenous Level, with
TAOR and TAPR as the parameters. For PR , the true exogenous force is
NO . If, however, in Fig. 9.4 SWITCH2 is 1 and GAMMA is larger than 0,
the passive influences from PR to DRMS and hence to EPS2 and PR at the
top of the page would become active and dotted lines would become solid,
as shown in Fig. 9.5. PR has become an exogenous force for PR; in other
words, a new feedback loop has been brought into existence, and this is the
loop shown with emphasized lines in Fig. 9.2. Policy option diagrams are
often quite useful in suggesting feedback loops which one might not other-
wise have thought of.
The practical difference between the Policy and Strategy Levels is that
the policy parameters can usually be changed without too much fuss or
upset in the organization. Any change to a strategy parameter, on the other
hand, usually corresponds to changing someone's way of working, and
that is not always politically desirable in the real world. Fortunately, in
the world of the textbook we do not have to worry about such
considerations.
The first optimization we shall test is the policy level of allowing WAP,
TABL, TAOR, TAPR and TARMS to form the parameter plane. WAO is
excluded for the moment as it represents the basis of the relations between
DMC and its customers and is unlikely to be changed easily. DDEL is
similarly excluded as changing DDEL would involve a complete upheaval
in DMC's dealings with its suppliers; a distinctly non-trivial undertaking.
Each of the selected parameters is allowed to lie within a range from 2 to 10.
The DMC problem 259
Control
Variable
j Raw
Material
Order
Rate
RMOR
r-------- - ---------~-~---~
I Raw
I Material
I Stock
Policy
Level
: I ~T I
I or~ed M~I
I Mat.. ~01 Stock
I Stock RMS
I DRMS
I WAP
I
.. .. . . 1. - .
I SWITC H 1~
I , _TCRMP
I Raw Mateool
I on Order
~ t-c DlscE~ncy a
I I
I - ------,
I Raw ~ateool I
I on Orde< R~~I
Strategy I RMOO ce oroer
Level I DRMOO
I DWRMP---:
I I
I Average I Aver~ ?
1 __ ~:'------r--l- · ~'"'
~~:
NO
TAOR Pr"taf"tlon
PR
TAPR
Fig. 9.5 Policy option diagram for raw material order rate .
The precise details of the COSMOS opt imization procedure do not concern
us, though they are fully explained in the COSMOS manual.'
The result of this policy optimization is that, after some 30 iterations, the
values in Table 9.1 are produced.
This rather dramatic fall of more than 90% in the value of OF is mirrored
in the dynamic behaviour with these values, shown in Fig. 9.6A. Note that
the scale has been changed to allow the differences between successive
optimizations to be seen more clearly.
2 COSMOS supports two othe r optimizati on approach es, Base Vect or optimizat ion for iden -
tifying especially sen sitive par am et er s, and Simplification , which can be used to det ermine
which part s of a model ar e really important to its behaviour. They are fully describ ed in the
manu al but are not con sider ed in thi s textb ook as we aim to be as ind ependen t as possibl e of
spe cific softwa re .
260 Optimization in practice
Table 9.1 Results of first optimization
Figure 9.6A shows that control can be achieved by simple policy changes.
The fact that all the delay parameters, TABL, TAR, TAPR and TARMS,
have been increased in the parameter values shown in Table 9.1 suggests
that the change required is to react more slowly to discrepancies.
The reduction in W AP corresponds to stock targets being set to lower
values.
Four of the parameters have been driven to the rather arbitrary limits
chosen for them, and it may be that using wider limits would produce even
better results. The reader may wish to experiment, but, in practical studies,
one has to give close attention to changes which the people concerned
might be prepared to accept and not lose a good result by pushing them too
far in search of an even better one.
TAOR ends up with the rather strange value of 8.63.There is no particu-
lar significance to that number. How much difference in behaviour would
there be if it was rounded off to 10?
Having achieved a good result at the simple policy level, it is worth
seeking out the effects of policy and structural changes. The results in Table
9.2 are achieved, in which the parameters have been grouped to separate
policy parameters from their structural counterparts.
The objective function is reduced by about 30% and all the policy param-
eters are driven to their extrema, as are some of the structural ones. These
results require some thought to interpret.
That ALPHA and DELTA are driven to 0 implies that the information
structure in the base case is fundamentally misconceived, a point which the
reader should confirm by studying the influence diagram. BETA, however,
is only slightly reduced from the base case value, suggesting that the Pro-
duction Manager should continue to give most weight to Average Order
Rate, but that a little attention to Average Production Rate will also be
helpful.
GAMMA remains at 1.0, implying that it is rather important to keep
stock related to production.
There is, however, a deeper subtlety in these results, which is that the
beneficial effects of the structural changes are dependent on the policy
The DMC problem 261
200
175
150
125
l00+i-+-_u
75
50
25
1000
900
BOO
700
600 ++++-_-J
500
100 .
1 L 'BL OG
TIME
(M.S)
(MEEK) SI .....ATED nME
ORDER 8ACK~DG
1,'1 --DBLOG (M.S) DESIRED 8ACK~DG
' ~ ' R MS (MNS) RAM MATERIA~ STOCKS
L-'-DRMS (M.S) DESIRED RAM MATERIA~ STOCKS
changes, and vice versa. Put another way, it will be necessary to change
policies to get the best results from the reorganization of structure, and it
will be necessary to reorganize to get the best results from new policies.
This is a most fundamental insight into management theory, which helps to
explain why corporate reorganizations often fail and why policy changes
sometimes fail to have noticeable effects.
The dynamics of the second optimization are shown in Fig. 9.6B. Com-
pared with Fig. 9.6A, the control of Raw Material Stock is rather better and
that of Backlog is a little worse. Raw Material Order Rate is shifted in time
so that it is closer to the cycles in Production Rate. Close study of the
printed output shows that Production Rate oscillated between 84 and 119 in
Fig. 9.6A and between 86 and 118 in the second case. That difference is hard
to detect from the plotted graphs, so close study of printed output is always
useful in detecting these second-order effects.
It sometimes happens in real analysis that powerful interests or personal-
ities are simply unwilling to countenance changes, no matter how beneficial
those changes might be to the wider organization. To illustrate that concept,
the next optimization does not use TABL and DELTA and produces the
results shown in Table 9.3.
Surprisingly, this is actually slightly better than the previous case. Again,
the fundamental insight is that the policies and structures required are quite
different when some options are ruled out. The parameter plane and the
response surface have changed considerably, but optimization has found
the best that can be done in these different circumstances.
The graph in Fig. 9.6C is also significantly changed from Fig. 9.6B. The
control of Raw Material Stock is better, as is that of Backlog. The oscil-
lations in the two backlog variables are much steeper and match more
closely, and the amplitude of Production Rate is now from 81 to 121.
Studying the dynamics is an essential aspect of interpreting optimization
200
175
150
125
100+1-+---'-"
75
50
25
1000
900
BOO
700
»:
I
600 +ti+-_.F
500
400
300
200
100
I'I:--DBLOG
BLOG (WWS)
(WWS)
ORDER BACKLOG
DESIRED BACI<LOG
' ~ ' A MS (WMS) RAW MATERIAL STOCKS
L.'-OAMS (WWS) DESIRED RAW MATERIAL STOCKS
Param eter Final value Original value L ower limit Upper limit
output. The objective function value for this third case is better than it was
for the second, but whether the behaviour is really better might be a rather
moot point. The objective function should be understood for what it is: a
mathematical artefact to guide the optimization search, not an arbiter of
what is good and what is not. The ultimate choice of whether or not to
accept and implement results derived from optimization should be made by
reviewing the output carefully. In practical cases, reviewing the output
might make one decide that the components of the objective function and!
or their weighting factors did not adequately reflect the objectives
of the problem proprietors. For that to happen is usually good, as the
optimization has helped to clarify understanding, as was suggested in
Fig. 1.4.
Having looked at policies on their own, it might be illuminating to exam-
ine the optimization of structures in isolation, the results being shown in
Table 9.4.
The objective function is improved still further, and the pattern of earlier
results tends to be confirmed in that ALPHA and DELTA are forced to 0,
200
175
150
125
100 -1-:-+-._.1.:.
75
50
25
1000
BOO
500
L'
TI ME (WEEK) SIMULATED TIME
'II BLOG 1_' ORDER 8ACKL06
. _..:::: ~a§OG IWNS) DESIRED BACKLOll
1-) RAw MATERIAL STOCKS
l -'-ORMS (_I DESIRED RAW MATERIAL ST0Cl<8
GAMMA remains at 1 and BETA is still weighted towards the use of AOR
in the Production Rate decision. Interestingly, both SWITCH1 and
SWITCH2 reach their limits of 1, suggesting that the MIS should be bought
and that the raw material stock discrepancy should be used in the Produc-
tion Rate decision. As the MIS is expensive, it would be interesting to run
the model with the above parameters, apart from keeping SWITCH1 at 0,
to see how much difference there is. The dynamics of this solution are to be
seen in Fig. 9.6D, and it is now time for the reader to start assessing the
quality of that performance against earlier solutions.
The next set of results (Table 9.5) are obtained when all the policy and
structural parameters are used in the parameter plane.
There is a further improvement in the objective function and the pattern
of results is maintained. The dynamics appear in Fig. 9.6E.
Finally, we optimize the model with the addition of TCRMP to the
parameter plane. This is to drive home the idea that , if the MIS is im-
plemented when SWITCH 1 is 1 - a structural change - it is essential to
examine the policy parameter(s) which might enable the best to be
achieved with the changed structure. This gives results, shown in Table 9.6,
which are consistent with the patterns achieved earlier, in the sense that
most of the parameters are forced to their upper extrema. The exception is
TCRMP, which is forced to its lower limit. In essence this means that the
company should take a generally relaxed attitude to discrepancies, but,
having decided to buy the MIS, the attitude should be to use it aggressively
to manage the amounts in the pipeline. However , to enable those policies to
have their full effect, changes to information structures will be needed. At
the risk of repetition, this idea that policy and structure need to be harmo-
niously tuned is quite fundamental although , without the power of the
200
175
150
125
100 +r-+----"-
75
50
25
1000
900
BOO
100 .
L'
',"I BLOG
--OBLOG
TI ME
(OM9)
10MS)
(OEEK) SIMlLATED TIME
ORDER BACKLOG
DESIRED BACKLOG
' ~ ' RMS 10MS) RU MATERI4L STOCKS
' - '-DRMS (OM9) DESIRED RAO MATERI4L STOCKS
o - STRUCTURAL CHANGES
Fig. 9.6 Continued
200
175
150
125
100~-l-_J.:
75
50
25
1000
900
BOO
500
400
100 .
Param eter Final value Original value L ower limit Upper limit
optimizer to search the options, it would run the risk of remaining little
more than a pious intention.
The dynamics of this solution are shown in Fig. 9.6F. This is by far the
best value so far found for the objective function , but you should form your
own assessment of the dynamics shown in Fig. 9.6F relativ e to some of the
previous cases. In fact, we have reached a stage at which you should pause
and review all the opt imizations so far done for DMC.
175
150
125
100+1--!-_.Jv
75
50
25
1000
900
800
700
6004-++1---/
500
400
300
200
100
however, the crucial first step . We shall have much more to say about that
at the end of the chapter, the point at which we shall explain why simply
minimizing cost or maximizing profit are not usually suitable as
objectives.
• Having decided on the objectives, the next stage was to formulate a
measure of how well they are achieved: the objective function.
• Armed with the objective function, we next considered how to use it and
suggested the policy option diagram as a pictorial support to thinking
about the design options available . Again , we were led to those options
by the previous work of experimenting, or playing, with the model. It
should be clear by now that sensible optimization cannot take place with-
out prior experiments.
• Even with the objective function and the options the optimization pro-
ceeded in several stages; this is simulation by repeated optimization at
work! At each stage , the value of the objective function improved, but
the dynamic behaviour did not necessarily improve to the same extent
when it was studied by eye. Just as the eye enabled us to formulate the
objective function, the eye should evaluate its results. In practical studies,
visually evaluating optimization results often leads to an improved
objective function. This is no great burden, as optimization is so
computationally efficient in COSMOS that the extra cost is trivial. The
real point is, however, that the objective function is not the arbiter
of performance; that role belongs to human judgement after the
objective function has fulfilled its role of controlling the hill-climbing
computations.
This summary of the process does, however , beg the question of whether
optimization is really of value. Not to put too fine a point on it, is opti-
mization through several stages worth the effort and does optimization
produce better results than the experimentation which must necessarily
precede it? It is dangerous to generalize from a small sample , but we
shall discuss the question, using DMC as an example, in the next
section.
There are three bases on which we ought to weigh the value that opti-
mization adds to system dynamics. The first is whether the last optimization,
Fig. 9.6F,3 is genuinely better than the first (Fig. 9.6A). In other words, has
the study of policy, strategy and structural options taken us much further
than simply allowing the software to search the obvious parameters? The
second is whether the best optimization result is better than the 'best'
JThroughout this section , when we refer to Fig. such-and -such we mean the graph of the
dynamic behaviour and the optimizati on results which accompan y it.
272 Optimization in practice
This all seems very much like common sense, which is comforting. It is
typical of what has been found in numerous uses of optimization but,
just as hill-climbing optimization is based on a heuristic rule of thumb ,
different patterns of result are sometimes found . A truly talented, or very
lucky, experimenter may avoid getting stuck on a subordinate peak of
the response surface, which can sometimes happen with optimization.
Needless to say, a simple-minded objective function is likely to produce
simple-minded conclusions, a point we shall review at the end of this
chapter.
250
225 I
11
200
175
150
125
100-H __
::L~
25 I
75
50
25
o
- 25
- 50
-7 5
!-- EPS1
EPS 1
' BEST ' EXPERIMENTAL REst.LT FROM FIG 7 ,9
OPTIMAL RESUL.T FROM FIG 9 .6F
75
50
25
-25
-50
- 75
225
200
175
150
125
1oo-i-+_ _~
75
50
25
75
50
25
-25
-50
-75
-100
. - -1m ~ -70-:- !m:-lro. 50. 60. 70. 130 . 90. 1100. 1'10 . ~20.
I L TIME (IIIEEK) SIMULATED TIME
75
11
50
25
o
-25
-50
-75
-100
1100. 110. ~20.
TIME (MEEK) SIIU.ATED TIME
' BEST ' EXPERIMENTAL FESlI..T FROM FI8 7 ,g
SIMPLE OPTIMAL RESU,..T FROM FIG g.eA
CONSTRAINED OPTIMIZAnON
~
~ k~~
\ §§ I
\ §~ I
\ -&! ;/
\ 0
0.. 8 I
'~
{;;~
Q>"
I I
\
'J;;
lJ
g0 I
\ Q) If!; I
, g ~§ I
\ §
, 0 I
I
\ 't: /
, Q) I
,0-
c;
I
I I
i"'CS) \ 1/
%'
"6 \ I
I
0- II
t Origin of Response Slope
~hen there has been no
Investment
For convenience of reference, the influence diagram for the combat model
and its base case dynamics are shown in Figs. 9.10 and 9.11. Figure 9.10 also
emphasizes the 'pressure points'; parameters which could be changed to
alter the system performance, though usually only by spending money or
investing in some way. Obviously, all the parameters in the DMC problem
could be called pressure points, and one of them, SWITCH1, very definitely
involves spending money, but it is useful to reserve the term 'pressure point'
to emphasize in one 's mind that the problem is one of constrained
optimization.
As in the DMC case, the first step is to decide what the system, in this case
the Blue government, is trying to achieve. The base case dynamics show a
disastrous Blue defeat, with Blue's forces completely annihilated by
TIME=33. A simple objective would be for Blue to survive as long as
possible, but that implies an acceptance of eventual defeat. Further thought
leads to the notion that Blue 's forces should survive as much as possible,
which is tantamount to moving the dynamics of Blue Forces in Contact
- -- --
+
, -,
Forc e Raho .....
\ - - (Red / Blue)
,,
\ -- • t- \
\
\ ,,"
\ " ," I\ Il.dllo,.
\ '" @ _-- 01_
\ +/ / \
". ,,-,Man
\, .. I I
\ ~
rcece ac ne
I Triggat'
"" I
I
Tot al Red ..l
/ - Flnr.g Rate - ....
I \ I I ' \
I " " \ I / \
I \
\ I I \
I
I \ ~~ +
I \ Blue 1,05$
\ Rate
-c
1-
\
\
I \
/ \
/ \
/ .... --il- - ,
,,
I /
,,
I
I
'\
I I \
,
+ ,
I Blue Peserv es - Blue Reserv e 81ue in
B1ueRese rve- - . . Combat
Ramoining ...- - - Com m itm ent Rat e B • A mvoi Rote ~
\ ®+
\ • +", t I
.... / \
\ ~ ,,'" / I \
' I _ / "
\
\
\
, +
.... lo tal Blue
'-r-c:~ , ,, Fwing Rot e
,, ,r l
, ,
t-;
'''I/io/ F_,*
'-_
Foe.
~
,
,-
~
,t
,
,,
70101
- - - FoIc. - ~
50.
1
I
I
1
I
40 .'
I
1 _------------------ -
30 . : """"",,""---
1 "
20. 1 /
1 /
I ---', ///
10 . 1 ......... _ ........
I
1
1
o..Z-I-+r---l.-;..,..-J....-~k-l".....--I,,,,....___l,,,...:>__l,...___l,,.,.,_-l;,,.,--_t,.,.,.__6,__{,
111031 . O.
L~~~HE
TIME (HOUR) SIMIA.AlED TIME
1 .7~
TI
50·4---,,
1 .~ ,,
,,
1.2J 40. ,,
,,
1 ,
1'1 30.
1\---------------
.7~ 1\,
20 . * -\. \
.~ I \,
I '\
.2~
10 .
\,, I
J ,
0 '~-n-r-4rrr-~-l.:Jrr-'ll:n::---lor""'!=---\"'~=--b,.---l=--{'
O.
I 1110\' . TIME o.
!
(HOUR) 51WULAlEO TIME
With Red, BLUE,4 as far along the time axis as possible and as far up its
own axis as possible; maximizing the area under the curve, in fact. That
suggests a Blue Performance Index, BPI, as shown below. It is obvious that
BPI is something to be maximized, compared with INDEX in the DMC
case, which was something to be minimized. COSMOS can minimize or
maximize at the user's choice.
4 In this section it will be useful to remember the distinction that 'Blue' means one of the sides
in the conflict, while BLUE is the name of a variable in the model. Review FIG6-10 .COS on
the disk.
280 Optimization in practice
note
note sector for objective function
note ===============
note
I bpLk=bpLj+dt*blue.j**2
n bpi=O
In this case, there is no actual need to square BLUE.J to prevent it going
negative; the reason for doing so is partly to magnify the effect of
larger Blue forces surviving, and partly to get into the habit of using
squared values to avoid positive and negative effects cancelling each other.
Acquiring the habits of good practice is an important part of successful
modelling .
Alternatively, one might wish to base BPI simply on the numbers of Blue
who survive at the end of the conflict, disregarding the dynamics of BLUE
during the run . That would require:
a bpi.k = blue.k
In this case, there is no need for BPI to be a level, because we do not wish
to accumulate a memory of performance during the run, only to store the
value at the end of the iteration. The reader should experiment with this
alternative approach.
BPI is only part of the story, because it is obvious that, if Blue spends
enough money on increasing the size of its army, it is bound to reach a stage
where it will win. Unfortunately, Blue does not have endless money , and
the trick of constrained optimization is to subtract some very large number
from the performance index whenever the optimization search tries to use
a collection of parameters the cost of which would exceed the given budget.
In this case, Blue has a budget of $24000 (mythical money!), so we subtract
a huge penalty from BPI whenever that limit is exceeded:
a of.k = bpi.k/scale -1 Oe06*(max(O,cost - budget))
c budget=24000
c scale=20.5846e06
BPI is scaled to 100 for the base case.
Subtracting large penalties in this way is likely to make OF become large
and negative in some iterations, which is tantamount to the blind man
falling off a cliff. The software recovers from that misfortune, rather as
cartoon characters can reverse in mid-air. It can be quite entertaining to
watch the iterations!
How, though, are we to calculate COST?
The key idea is to understand that the software will search among the
chosen set of parameters. Thus, we might allow the initial value of Blue in
Contact With Red, IBLUE, to be in the parameter plane, in which case the
hill-climbing will vary that parameter as it seeks to maximize BPI. If
IBLUE is increased, money has to be spent. If IBLUE is decreased, money
Optimization of the combat model 281
is made available to spend on other things. We need therefore to freeze the
base case value of IBLUE, calling it, say, BIBLUE, so that the financial
consequences of any changes to BLUE can be recorded. This is shown in
italic type in the following equations:
note
note blue forces in combat
note
I blue.k=blue.j+dt*(brar.jk-blr.jk)
n blue=iblue
c iblue=10000
c biblue=10000
This allows us to calculate one component of the cost effects as:
n cost=(iblue- biblue)*costreg
c costreg=1.2
A new value for IBLUE is chosen at the start of each iteration, so the cost
will be fixed throughout that iteration and not vary during it. For that
reason, we can use a computed constant to calculate COST from the values
of other constants.
COSTREG [$/BMEN] is the cost of adding a soldier to Blue's standing
army or the saving if one is eliminated. In practical cases, great care has to
be devoted to ensuring that these costs are correctly calculated. We shall
assume, for simplicity, that the marginal cost and the marginal saving are
equal. Changing the equation to represent a case in which they are not
equal is an exercise in the problems in Appendix B.
FIG9-12.COS on the disk is set up to allow us to optimize with five of the
costly parameters, which requires a cost equation:
n cost=(iblue- biblue)*costreg + (iblres- biblres)*costres
x +(bbmdel-bmdel)*delcst+(bmcap-bbmcap)*capcst
x +(brmcap-rmcap)*rmccst
c costreg=1.2
c costres-su.S'
c delcst=5000
c capcst=6
c rmccst=9
Finally, we must choose some optimization ranges for the chosen pa-
rameters, as shown below.
5 For simplicity we shall assume that the reserve troops are less expensive than those manning
the frontier because it is easier to supply them with food when they are nearer their home
base. We shall, however, suppose that they are as effective as the frontier force. If one wished
to widen the scope of the model, one could assume, instead, that reserves are both less
expensive and less effective than regulars . The reader may care to tackle that as a modelling
project.
282 Optimization in practice
These two cases produce rather different results for the two parameter
sets, as shown in Table 9.7 and in Figs. 9.12A and 9.12B. In both cases, there
is a resounding Blue victory, Red ending up by marching obligingly on to
the battlefield to be destroyed by Blue's overwhelming firepower. In Fig.
9.l2A, BLUE's final strength is 30980 and in Fig. 9.12B it is 35940. The
commander's change of mind saves 5000 casualties!
The interesting insight is, however, in Table 9.7, showing final parameter
values. In both cases, IBLRES is driven to its maximum value, because
reserve troops are cheaper than the regulars who form the initial Blue Force
in Contact with Red. However, the second optimization encourages the
Blue commander to commit his reserves at an earlier stage , in which case it
also finds that it will pay him to have more regular troops available at the
beginning, even though he has less money to spend on reducing his move-
ment delay and increasing his movement capacity. In the first case, in which
he is unwilling to change his intentions, it pays him to reduce delay and
increase transport capacity so as to be more easily able to make use of his
increased number of reserves. At the risk of repetition, this is a very simple
model and the results are neither realistic nor typical of those produced by
more serious models.
It is important to try to explain optimization results by such verbal
reasoning, rather than simply reading off tables of numbers from the
optimizer printout.
Apart from explaining the results in verbal terms, the table repays a little
more scrutiny. The key point is that the results for the costly parameters are
different in the two cases of fixing and changing the free parameter. In policy
terms, this is a most fundamental insight, regardless of whether the problem
domain is military, corporate, or any other, strategy. The reason for the
difference is that the change ofpolicy is only fully effective ifthe distribution
of costly assets is changed. Correspondingly, redistributing assets only be-
comes effective ifpolicies are changed. Put another way, being flexible about
policies makes it possible to use assets to the greatest effect, while acquiring
the right assets makes it possible to adopt policies which will have the
greatest effect. This is, of course , remarkably obvious after one has thought
6°·~i
50 . 1
I
I
40 .
30.
20 .
10.
ao . as. 50. 5s . bo o
L
*1~ ·~1k-.-r-,.,.--l,;"""--"""""~'O.-~5.-,J31r ~ .
TIME (HOUR) SIMULATED TIME
!--REO
BLUE (BLUE) BLUE FORCES IN CONTACT NITH RED
(RED) RED FORCES IN CONTACT NITH BLUE
60 .
---,,
,,
\
\
\
\
\
\
\
30 ·-i+---'--~7--------------
\
\
\ ,,
\
\
\ ,
\
\
\
\
\ ,,
\
50.
40 .
30 .
20 .
10 .-...r--,--
60 .
- - -\
\
\
\
\
\
\
\
\
\
\
30'-i+---r--~_--------------
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
A MATTER OF PRIORITIES
the target was obvious, and in the other cases we had to create a target , but
the underlying theme was trying to make discrepancies vanish. For the
combat model, we attempted to maximize a measure of Blue's ability to
survive; we sought to get as far away from 0 as possible, that is we tried to
increase a discrepancy. In short , the nature of the problem calls for some
thought in creating an appropriate objective function and, to illustrate that
style of thought, in this section we shall examine a case in which we need to
account for two aspects of performance, the first being the extent to which
an actual value is below its target and the second being the duration for
which the actual falls below the target. Practical instances of this might be
the extent to which hospital beds or fire engines are not available to meet
possible emergency demands.
Consider Fig. 9.13 (FIG9-13.COS), which shows a variable called
ACTUAL falling below TARGET at TIME=20 and continuing to fall until
it reaches 60% of the target. After that nadir, ACTUAL recovers until it
exceeds TARGET again at TIME=50. The fact that two targets , EIGHTY
and SIXTY, are plotted is to suggest that greater failures to meet the target
are more serious than lesser ones and should be penalized more heavily. To
see how this can be handled , let us consider the following equations, the
definitions appearing, as usual, after the equations.
note
note target values
note
200
/
/
//
/
/
'- '' ' .
125
/
""'.
100-1+;+-_ _---.::'"':- ----,''_---------
.
-----------~~-----~------------------------
"'". / .
------~------------
. . . . . .
II L TIME (WEEK! SII4lUTED TIME
' 1: TARGET (UNIT) TARGET VALUE FOR VARAISLE
1 -- ~~GHTY (UNIT) 801 OF TARGET VALUE
c:::.: Ac~0XL ~nl :~~ ~=OF VARAISLE
Fig. 9.13 Objective function for time and area .
More complex objective functions 289
a target.k=itarg
c itarg=lOO
a eighty.k=0.8*target.k
a sixty.k=0.6*target.k
These are some simple equations to set up a target and its 60% and 80%
values. The approach works perfectly well with dynamic variables.
note
note actual value
note
a actual.k = base - ramp(down,dtime) + ramp(up,uptime)
c base=120
c down=2
c dtime=lO
c up=6
c uptime=40
Again, this is a simple driver for ACTUAL, with constants defined to allow
other cases to be tested. The model on the disk tests ACTUAL under a
range of cases and writing a small, simple, model such as this to test an
objective function is an essential element of good practice .
note
note time storage
note
I below.k=below.j+dt*clip(l ,O,target.j,actual.j+eps.j)
n below=O
a eps.k = 0.00001 *actual.k
First, we store the time which ACTUAL spends below TARGET. The
CLIP function produces the value 1 whenever TARGET is greater than
or equal to ACTUAL + EPS. EPS is a very small number and is used to
ensure that the CLIP does not produce the value 1 when ACTUAL is equal
to TARGET, because that would be a circumstance which we did not
wish to penalize. As with all variables and functions in system dynamics
models, the CLIP is evaluated every DT, so, for every occasion on which
ACTUAL is below TARGET, DT is added to BELOW, thus recording
the required total time spent below target. In the base case run , BELOW
has the value 29.75, so the value of BELOW is DT too small, as the actual
value of BELOW should be 30. The reason is that level variables always
take 1 DT to be brought up to date, but the error is so small as to be
negligible. It could be reduced by making DT smaller, but DT should be
chosen to suit the delays in the system, not to make an objective function
more 'precise'.
To compute an index of the extent to which ACTUAL falls below TAR-
GET, consider the following rather complicated expression.
290 Optimization in practice
note
note area storage
note
I area 1.k= area1.j+ (dt/dt )*nclip((target.j - actual.j)**2,0,target .j,actual.j
x +eps.j ,actual.j,eighty.j)
n area1=0
COSMIC's NCLIP function takes the form:
v = NCLIP(A,B,C,D,E ,F)
and gives V the value A if C~D and E?;F. In this case it produces the result
(TARGET.J-ACfUAL.J)**2 if TARGET is greater than or equal to
ACTUAL+EPS and ACTUAL is greater than or equal to EIGHTY.
In other words it calculates a penalty if ACTUAL is within 80% of the
target. The penalty is multiplied by DT/DT when added to AREAL This
ensures that the dimensions of AREAl are [UNIT**2], rather than
[UNIT**2*WEEK). There is nothing to stop one taking the square root of
the NCLIP , to give AREAl dimensions of [UNIT]; it is largely a matter of
choice and personal style.
It may seem strange to say, as we have on several occasions, that some-
thing is a matter of choice. The reader may expect there to be more of
'science' and 'the right answer' in a book on modelling. That would, how-
ever, be misleading. Modelling is much more an art than a science and the
great skill is to model just enough of the problem to get a model which
is well suited to its purpose, though the model must also be soundly
constructed.
The line of thought used in writing the equation for AREAl is also
applied, in FIG9-13.COS, to AREA2 and AREA3, which calculate,
respectively, penalties for being below EIGHTY but above SIXTY, and
below SIXTY. The equations should be studied carefully. The difference
is that these shortcomings are penalized more heavily by being raised
to the fourth and sixth powers, respectively. Again, there is no magic
to this. If one felt that being below EIGHTY was no more serious than
being above it, there would be no need to use the higher power. If one
felt that it was very much more serious, one might use an even higher
power.
Using higher powers to penalize worse performance would not be valid if
the discrepancies were calculated as proportions rather than as absolute
values of the target. In such a case a suitable approach might be to use
(ACTUAL.JITARGET.J)**2, with the fourth or higher power used when
the ratio exceeds, say, 1.2 and 1.4. The reader should rewrite the above
equations to test this.
Clearly, care must be taken in formulating suitable objective functions,
but the point is that objective functions can be created to meet any desired
criteria for deficiencies in behaviour.
More complex objective functions 291
a total.k = areal.k + area2 .k+ area3.k
note
note the objective function
note
a objfun.k = (belwt *below.k/scale1 + areawt*total.k/scale2)/(belwt
x +areawt)
The final objective function is now the sum of the area and duration penal-
ties, suitably weighted and scaled to make each equal to 100 in the base
case. The final division by BELWT plus AREAWT makes OBJFUN also
equal to 100.
The reader should study the model on the disk, noting that all variables
are printed out and that a series of test cases are used to verify that these
equations work properly.
note
note definitions
note
d actual=(unit) actual value of variable
d areal = (arbunit) penalty component if actual is less than target but
x more then 80% of target
d area2=(arbunit) penalty component if actual is less than 80% but
x more then 60% of target
d area3=(arbunit) penalty component if actual is less than 60% of
x target
d areawt=(l) weighting for relative importance of being below target
d base=(unit) base level for actual value
d below=(week) time spent below target value
d belwt=(l) weighting for relative importance of time spent below
x target value
d down=(unit/week) downward slope for actual value
d dt=(week) solution value
d dtime=(week) start time for slope down
d eighty=(unit) 80% of target value
d eps=(unit) small number to ensure correct comparisons between
x target and actual
d itarg=(unit) target to be achieved
d length=(week) simulated duration
d objfun=(arbunit) value of objective function to be minimized
d pltper=(week) plotting interval
d prtper=(week) printing interval
d scale1= (1) scaling factor for time spent below to ensure objective
x function = 100 for base case
292 Optimization in practice
computer. It has nothing do to do with the real system, though its numerical
value has to be chosen correctly.
Somewhat similar considerations apply to objective functions, in that
they are an act of the analyst's imagination and are required in order to get
the optimization software to run. Unlike DT, the objective function does
have something to do with the real system, because it penalizes undesirable
aspects of performance and rewards beneficial components.
It is, however , in the highest degree unlikely that, even with all the
thought and care a skilful analyst bestows on formulating an objective
function , it will completely capture the nuances and subtleties in the minds
of the system's proprietors about what does and does not constitute good
performance. In short, the objective function should not be accorded a
status it does not deserve as the final arbiter of policy and structural options;
that role belongs to human judgement of the dynamic behaviour those
'optimal' policies and structures produce. Put another way, the objective
function should not be taken too seriously. Indeed, one should be prepared
to abandon an objective function and create another if it triggers thinking
about different, and better, ways of gauging performance. An objective
function which does that will have served its purpose very well indeed
because the underlying value of optimization is to stimulate deeper thinking
about the problem than might otherwise have occurred.
NON-LINEAR OPTIMIZATION
In some cases, data are available about the historical dynamics of a prob-
lem, and some of the parameter values are uncertain. For instance, in the
DMC problem one might have data about New Orders over a two-year
period and the corr esponding records for Production Rate over the same
period. In such a case, one could set up two tables. That for NO would look
like:
a no.kl=tabhl(tno,time.k,0,24,1)
t tno=120,145,163 . ..
Incidentally, the same method could be used to set up the Blue target,
BTARG, mentioned above.
A similar table could be used for Recorded Production, RECPR. An
objective function could then be:
I pdiff.k= pdiff.j +dt *(pr.jk- recpr.j) **2
to minimize the difference between recorded production, RECPR, and
simulated production, PR , when parameters such as TAPR, TABL etc. are
allowed to enter the parameter plane . Care would have to be taken to get
the initial backlog and raw material stocks correctly set to data values and
to load up the delay in the raw material pipeline correctly, in that case
by disaggregating the internal levels of DELAY3, as was discussed in
Chapter 5.
The difficulty with this approach is that there may be more than one
series of data; perhaps Raw Material Order Rate records also exist. Does
one give more weight to matching the production data or the raw materials
records? How does one know that the data are correct? Some of the
parameters might be known with some confidence, in which case only those
which are uncertain should lie within the parameter plane .
In short, there is nothing wrong with fitting models to historical data,
though the problem is rarely as straightforward as might appear; the
author's experience is that there have very rarely been occasions when one
had enough confidence in the data to fit anything to them.
Above all, one must avoid thinking that one has proved , from historical
data, that the model is 'valid', let alone 'right'. The reader should pause to
review the comments made in Chapter 6 about the validation of models.
Fitting a model to data does give some added confidence , but it is only part
of a much deeper problem. One must also remember that system dynamics
models are intended for policy design, and one is less concern ed about what
296 Optimization in practice
the parameter values now are than with what they should be to get good
performance from the system. Most managed systems behave quite poorly,
and there may be little point in carefully using optimization to discover the
parameter values which give bad performance. It seems rather more con-
structive to use optimization to design policies and structures which give
good performance.
SUMMARY
In this chapter we have sought to expose the reader to some of the range of
powerful ideas in system dynamics optimization. We have discussed the
vital role played by experimentation to find the range of options which
might enter the optimization search and we have considered the formu-
lation of objective functions. The ideas were illustrated by two cases of the
different types of optimization. We laid great emphasis on simulation by
repeated optimization, showing that optimizing the same problem in differ-
ent ways could yield quite different results.
It is, however, absolutely essential to be clear in one's mind about what is
being done. The aim is not the optimization of a model, it is the design of
management policies and structures. Computations to search a parameter
plane are really attempts to search the 'management plane '.
A major point was the idea that optimization is very powerful but, like all
powerful tools, needs to be treated with care. Simply optimizing the obvious
parameters without much thought is likely to lead to unimpressive reSUlts,
no better than can be achieved by intelligent experiment. Optimization
after experiment usually, however, leads to considerable further gains in
performance.
In short , optimization is probably the most powerful development in
system dynamics since Forrester's original stroke of brilliance in inventing
the field. It is, however, neither a panacea nor a substitute for thought, and
the objective function should never be allowed to be the final arbiter of
system design; that role belongs to the judgement of analysts and managers,
and more to the latter than the former.
CHAPTER 10
Advanced modelling
I
I
I
I
I
I
I
I
I
Lower Limit LUM
----------,-------------
I
I
I
I
I
I
time
YearI Year2
• •
B1
\
PPSR for Yeor 2
~ f------------- ---
PPSR for Year 1
- - - - - - - - - - - - ---
A2
I
I B2
A1
\
• I
I
\
~
r--!-
I
FFT DMT DEl FFT DMT
3 10 12 15 22 TIME In Months
( DAR-DRR) _ - - - - - - ~e
- - - - NSlR- - - - -- - - -+~8
DIV- - __
.... ,
/ TAXR ..... ,
+..- '
.,
TAX _ _ _ "
~ '\ --- \+
\
,\ --~~RTP
'\
\
\
+1'
I
\
\
\ I \
ORR-IPR).... \ I \
" \ , I
'\ \ / ~
....
~ +\ 1 /
.... ~ , /
-:Tf:-/
(
CCf~
- / I
RC / I
+ / I
// /
SR- - - / /
/ .:
+,! _/
~-------------:f?
--- MBPR~
Fig. 10.3 An influence diagram for a set of accounts.
300 Advanced modelling
FullDesign Capacity
10
Threshold
.,,
\
\
Read iness Reac hes
Threshald and Plant
Is Regarded as
Having Reac hed
Readiness FullDesign Capacity
Builds up - - --.
~
/ Time
/
/
/
Plant Ordered
6000
11
I
I
5000 I
4000
3000
2000
1000
I
I
lIO .
L
CPBF
--BFPR
TIME IDAY) SIMULATED TIME
(TON) CUIfJUoTIVE PAOOUCTIDH FROM BLAST F~CE
(TDH/DAYI PAOOUCTIDH FROM BUST FURNACE
15 .,
I
12 ·sJ
I
lo·i, 35'
30.1'
,
7 . sJ
5·i, 25 .
r----' r----\ ,-----\ ,..-----,
2.&1 20 . I
I I
\ : I
:
I
'
I I
I ,
I
I ____ II " J L J I I\ I
~ \1
O.~ 15 .
I
-2 .&1
I 10 .
-5 .~
I
5.
-7 .sj
I
-10 .J . -1,"6-. -J,.,,---~-~r--',..---l:r...------1~0
0 'if-.- --lx-..,....-\orrr-J....,,- 20. 28. ~2. ~6 . .
TIME IDAY' SIMULATED TIME
!--------. INVBLF
L HTMBF IDAY) OU...Y VARIABLE FOR TIME RELINE STARTED
(DAY) INTERVAL FOR SAMPLING THE BLAST FURNACE
TRI AL OF MODEL
etc etc
1.5
g
Q
0
o
CD
c
~ A - -Curve
---C
~ 1.0
E Linefrom
g Equation 82
\
.gj \
a. \ I
~ I
~
c
0.5
'" I
I
I
~::J / Curve B
s
a. /
/
/
/
--
/
1.0 .. ------..- - - - --
a '--__~-------__:;::_;::.
0.5 1.0 1.5 2.0
SRAT Number of Shops Relaflve to Soturaflon Level
1,0
OL..-~=--- _
a STPS Stock per Shop
1.0
~ ~I.. __ TooManyCooks
./ ....uttIe Effect
fQ I
I
I
I
I
1.0
ARERActual to Required Employees per Shop
+ =\+ //
"",..-- ........
r "'-"--. ~~'fng
/ +"'Alrcratl Loss
/ MIssIon
\ I
/
+ Operational
_____ A1rcratlln ~
" C'-
Area --
'\I
Losses
Rate of
Entering +,. DutaIIon
~
Ope<atIonal Rate of _oI00nger
Area Leaving _ - - - Pe/fod
Oln&OONO o~~~
C
Alrcr~:""'h'" -- <, <, RETURN AlrJo:
, In Retum
+- Stage of
T M~~
/
I +~-
Alrcratl
_ Aircraft Available Retum
"~~~)Rate
Maintenance
~ _
Aircraftln
Maintenance +
Fig. 10.9 Influence diagram for detailed approach to aircraft sortie problem .
100
90
80
70
60
50
40
""
30
II
II
20 I I 1\
I \ / \ ......., _
10
~ -------------
L TIME (HOUR) SINlL'TED TIME
90
eo
70
60
50
40
30
20
10
c.
/J""",,,,,,,,,V',,V',,V',,V''''''.IV'.I''''''''A''\./,/\/J''\ I \ i\ r. r. I' t,
o . ~o . 20 . 30. ~o . 50. Bo. to.' ~o~ • bo ." \00 .
L TI ME (HOUR) SIMULATED TIME
90
eo
70
60
50
40
30
20
10
INTRODUCTION
1 Available from The System Dynamics Society, 40 Bedford Road , Lincoln, Massachusetts
01773, USA. A search of that bibliography will produce numerous reference s in addition to
those described here.
Some system dynamics history 307
and exogenous driving forces (for some models of this type, see Coyle
(1977)).
System dynamics, despite its origin in business management, was clearly
applicable to social problems, and this has proved to be a fertile area of
application.
In the late 1960s, American society was perceived to be in crisis and
Forrester took up the challenge by presenting a model of the dynamics of a
city.
Urban modelling was a strong theme in system dynamics for a few years.
Refinements of the urban model were developed and applied to particular
cities. Further publications were produced (see for example Alfeld (1975),
but the application of system dynamics to urban problems seems to have
fallen out of favour.
Unfortunately, that syndrome was repeated with the publication of
models of the future of the world system in the 1970s. Supported by
a group of concerned politicians and business leaders, The Club of
Rome, Forrester produced World Dynamics (Forrester, 1971), the model
being created during the flight from Boston to Rome! This was ac-
complished without the aid of laptop computers, perhaps suggesting that
the real skill in model development is thought, not dexterity with software.
The model extends to no more than four pages, including the definitions
and dimensions of the variables. A second phase of the work was the
WORLD2 model of Meadows et al. (1972). A full description of subsequent
work on WORLD3 appears in Meadows et aI., and their influence diagram
appears in Fig. 11.1 to indicate some of the characteristics of the world
models.
The diagram reflects only what its authors saw as the most significant
aspects of the model, so it is drawn without all the detailed conventions of
influence diagrams ' . To show the most striking assumptions, one being that
Industrial Output per Capita decreases Fertility, whereas, on the other
hand, total Pollution (not per capita) increases Mortality. Is this an incon-
sistency?
We do not aim to answer such questions, merely to show the reader how
the careful study of a diagram can raise them. If one's assessment is that the
diagram is correct, confidence in the model has been increased. If it is that
the model is not correct, the model does not become useless. Either one has
identified an area in which it can be improved or one has identified a
limitation which can be taken into account when the model's policy impli-
cations are evaluated. The reader should study the subsequent case studies
from this perspective. No model is 'right' in any absolute sense: the judge-
ment is whether it is right enough to be useful.
The widespread emphasis in the 1970s on environmental problems natu-
rally generated much further system dynamics work. An interesting exam-
2 Users of causal loop diagrams do not adopt the dotted and solid line conventions .
~P~aIi~
on~hsper
I. ) Yea, , +
Fi~~~ + t~+
-, Education. Heallh
+
FamilyPlc.-ming SelVices Food ~
Cultiva ted
Industrial + ~ + land
Agricuttural
Investment +
Oulpulper _
C",".
~ \ _~
7-
+ ~ Capita
__
D;:;~a~'fad +.. + Ca pit
~____
<: \ al + .
SelVice / +
+TaI ~Pollution
output
- + +
Nonrenewable
Resources
<:>. Industrial ~+
c a plt, _ n .
(
. of Industriol
.> ~e~ed~on
+
C~
'~-_m~ ~_ ......
..
+ I + of Ca pital
Investment
Rate
Fig.11.1 Influence (causal loop) diagram of structure of WORLD3 (afte r Meadows et al. (1974)).
The New Zealand forestry industry 309
Introduction
The economy of New Zealand is significantly dependent on the export of
timber in various forms. Large areas had been planted during the 1960s and
1970s which meant that there would be a large crop during the 1980s and
1990s. Continued planting would increase that crop. However, there were
risk factors, such as intensified competition in world markets. Conse-
quently, in the early 1980s there was a need to design planting and cutting
policies to cope with an uncertain future.
Dynamics Review, contact John Wiley & Sons Ltd, Baffins Lane , Chichester, West Sussex
P019 JUD, UK.
5 For a fuller discussion see Cavana and Coyle (1984).
310 The applications of system dynamics
Any model is a simplification of reality, and the art is to ensure that there is
nothing in the model which is not also in the real world and that the
significant parts of the real world are in the model. Some modellers try to
put as much as possible of the real world into their model. This leads
to models which are intractable and difficult to interpret. The key step is to
make some assumptions which are sensible for the problem and then to
make sure that those assumptions are faithfully adhered to.
For this model there are two main assumptions.
The first is that trees can be grouped into four categories:
• Young forests less than 10 years old, which are non-productive and
require attention for pruning and thinning.
• Immature forests (10-25 years old) which could be felled. However, New
Zealand's plantation forests have usually been managed to produce logs
from trees at least 25 years old, so the immature forests are treated as
non-productive. Altering the model to vary this assumption would make
an interesting project.
• Mature forests (25-40 years old) which contain wood that is at the
desirable age for clearfelling.
• Overmature forests (more than 40 years old) containing slow-growing
trees beyond the desirable age for clearfelling.
As a rule of thumb, the LENGTH for a model should be about two or three
times the longest delay. If trees are in the system for up to 40 years,
LENGTH will have to be about 100 years. This matches the reality that
forest management is a very long-term business.
The second assumption refers to the price of wood. If demand for wood
and the rate of felling are identical, the price is $10 per cubic metre. If the
The New Zealand forestry industry 311
output of wood is less than the demand the increase in price will be small.
If the output is greater than demand, the price will fall more sharply.
6The volume of young and immatur e trees need not be considered , as they are deemed not to
be capable of being harvested.
312 The applications of system dynamics
[,=
'"
11+ Idea
+ Cuffing - - - .. Recommended
_Y Rate
+ +t.,+
Cut
I
,
/ t",Wood '" - It + \ I
/ ",'" \ , I
/ / \ ", I
I / \ +
+ .. \ Vol""" \ + Volume of .... --~
,Tr~tet' ~~~
"FJ"'e<f
Desired .. t4- Cuffing
S~~
/Areoof
',:Jf ,....
e
+
<,
'
Rate <,
"
/ Foreol1 Total / . . . . .... .... , <, \
Stocked I ........ I d e a l " <,
I _- - Area ot I Oeorfeiling " " \
I / F",eol1 .. Rate ' \
I .. \ + I / ~+, \
I /
+1
,,\ "*'I
/ \ Volune '
Increment " ..
1.+ 1
\, I I" \ o.lay \.+ <, AVIlfage I
j. I"~ \ I .... - V~ _
+ll - I x> ' \ I Hectcre '\ J
Gap
I
I
I \',
I'....
\ I
\
\ I
-t
",/ /
I
I
I
I I "........ I -It /
'Area --~~--_......
\
\
Arec or
Young and •
lnYnature _
Transfer
rate
~ Overmature •
+ Trees _
Area
Oeartelling
__ Rate
.-+/
/
'" Rot~+
, /
Rote
1 -i +
t _ - - - .. Gop
+t / - + \ ~PIJr~e ~
- ....~:~~ \ /" Rate r~_
''''Acn~ng +.
\
I
Net La'ld
Puchose Rote
/ ~ :-/ '
- Land Available +
~ Purchceng
I
/
'" ",Y \ t",Foreofty /
~"''' '"
------------
I'imt....... ,. ",
Numerical data are from New Zealand Government statistics. The initial
value for the Average Planting Rate reflects the previous policy of planting
as much as possible. When the model starts , a more rational planting
policy is introduced, with consequences which we shall see in the model's
output.
The equations for profit and cash flow should be studied, as should
the sector headed 'performance indices'. The numerical values for con-
stants such as CWRFV have been found by running the model for the base
case and finding, in this case, the value of Cumulative Wood Removed,
CWR, at the end of the run. This is then used as a base value to assess
the effects of other policies. No amount of further explanation by the
author will help the reader to develop the practical skill of grasping what a
modeller has done; you will have to work these equations out for yourself.
The reader may wish to modify these performance indices, or to create
others .
Another indicator of good modelling practice is the long list of sensitivity
test experiments, suppressed by NOTE statements. The reader should reac-
tivate some of these and see what they do.
7 The reruns can, of course, be done inter actively on a PC, but they have been left in the model
for instructional purposes . Instructors on graduat e or undergraduate courses will be able to
develop some inter esting individual student projects or class assignments using this model, or
the others which appear elsewhere in the book .
314 The applications of system dynamics
the past policy of heavy planting. Even if high demand can be stimulated, a
period of depressed prices is inevitable and the distant consequences of
high demand are pretty unpalatable. Whatever happens, there are likely to
be heavy costs from the previous policy of intensive planting which may
well have serious knock-on consequences for the rest of the New Zealand
economy.
The model forecasts demand for wood 30 years hence", The three cases
examined so far assume that demand is forecast perfectly (study the model
at about line 23 to see how forecasting error can be modelled). Figure 11.3D
shows the effects of forecasting errors, the pattern tested being pessimism
when demand exceeds the actual felling rate, and vice versa. With the
medium demand scenario, this introduces cycles of behaviour. For instance,
the over-supply of wood during the 1990s causes managers to take a pessi-
mistic view of the future and the planting rate drops. The eventual short-
ages of wood cause planting rate to rise, and it is not until towards the end
of the run that the control policies restore stability.
Numerous policy experiments can be tested. Such as a rotation age of
37.5 years, and an alternative planting policy.
The performance indices mentioned earlier should be printed out and
tabulated against the various runs as a way of assessing other effects of
policy as well as what can be seen from the dynamic behaviour. (See also
Coyle, 1981a.)
Summary
This model illustrates the process of turning a policy problem into a policy
model and several aspects of modelling method. The reader should study
the equations, and run the model, carefully studying the output'.
What other assumptions have been made? What modelling
simplifications have been made? Are there any other policy options?
Draw an influence diagram at Levell to reflect the insights derived after
the model has been carefully studied. The reader who has access to opti-
mization software will be in a position to explore this model very deeply, on
the lines shown in Chapters 8 and 9.
Technically, this model is very classical system dynamics. It is essentially
continuous in that land, tree age groups and timber volume do not change
in sharp increments. We now turn to a policy problem for which those
assumptions would not be reasonable.
8 A map (p. 137) of the model will help immensely in tracing out these factors.
9 This remark may seem superfluous. The reader will just have to take the author's word for
it that he has seen many cases in which the modeller in question had done no more than glance
at a few graphs on the screen and had completely failed to see errors which became obvious
from even a cursory examination of the output and which undermined any credibility the
model might have had.
Developing Argentina's electricity capacity 315
Introduction
The purpose of system dynamics is the study of the evolution of a socio-
economic system through time and this often requires the modelling
of capacity expansion. National energy supply policies are clearly such a
problem (see also Naill (1977».
Argentina's energy policy in the late 1970s aimed to increase the use
of hydroelectric generation. This programme was to be implemented
over a long period, in the face of unpredictable changes in the price of
oil and geared to meeting an increasing demand for electricity (for
an interesting discussion of future prospects in Argentina, see Macrae
(1994».
Earlier system dynamics work on energy problems has often been based
on models in which capacity can be added in continuous quantities. Hydro-
electricity is, however , a case in which the generating capacity available
from places where dams and power plants can be built varies enormously
from one site to another.
In Argentina there are about 26 places at which hydroelectric power
stations could be built , but their potential output varies from a few hundred
to nearl y 20 000 GWh (GWh ) per year. The costs of development vary at
least as much and the time required to build a station will also range
between roughly 9 and about 12 years" . However, the output from the
stations will be a continuous flow of electricity which will produce continu-
ous flows of cash.
For credibilit y, each project must be treated individually, which requires
the modelling of wheth er or not to order a parti cular project at a given time
together with the continuous processes of the output of electricity and the
flows of cash as revenue and expenditure during construction. Such com-
plexity has often been assumed to be impossible within the framework of
system dynamics software packages, but work on modelling coal production
has suggested that the difficulties were not as severe as had been assumed
(see Equations for Systems, described in Appendix C).
The reader should now think through the justification for using system
dynamics for this problem.
Figure 11.4 shows some possible policies. If capacity can be added in effec-
tively continuous quantities, the idealized case in Fig. 11.4(a), projects will
already be in the pipeline and demand will be forecast for the construction
delay into the future , revealing a gap between Forecast Available Capacity ,
FAC, and Forecast Required capacity , FRe. Additional capacity can be
ordered now to be completed by the required time, thus eliminating
the gap. This process will roll indefinitely into the future and all should be
well.
The physical realities with projects taking either 9 or 12 years to build,
requires greater complexity . Figure 11.4(b) shows a policy of concentrating
on meeting demand. Forecasts are made for 9 and 12 years ahead. The 9-
year gap is filled first by choosing 9-year projects of the right size and
additional 12-year projects are also ordered to try to fill any remaining gap
at 12 years.
On the other hand, 12-year projects are likely to offer lower operating
costs, and Fig. 11.4(c) shows a cost-orientated policy of selecting 12-year
projects as far as possible and, as it were, filling in any 9-year corners with
9-year projects. Both of these policies depend on projects, or project com-
binations, of the right capacity being available , and, as we have pointed out ,
the projects vary considerably in their potential generating capacity.
~
k ~ Forecast
! -----
- -1- - - Available
I Capacity.
FAC. allowing
I for projects
I already in the
I pipeline
I
'-- . . l - _.... TIme
Now Now+CDEL
A The IdealisedCase
RevisedFAC FRC
ClJlVe wtth - _ ,
9-year projec11 , eman.......
12'Y"';;'"
.. J'
added ' A
gap
Strategy :F111 the 9 year .~ ...9;';;; I
gap and make up any ~
u
.. -l." gap _ , - FACwtth
12-year gap wtfh a u '*=--=-~-=-=-=_:-:_:::-:-=-.- -- - I- - I ~~~~reody
12-year project
If one Is available I I
I I
I I
'-- l.-.._---J... lime
Now NOw+9 Now+ 12
J
, +
, +
I
I
\ 1:/..ordertngRate~ Capacity
.
Medium Term
+
j
Hydro Capacity
Completto-i Rate
I I Hydro_ +
\ I Capacity Actual
\ 1 In Pipeline Hydro
\ I I Capacity
\ I I I
\ \ I I
Project Ordering I I
" Swnch \ I
I \ + \ ... Forecast Hydro " I
I \ + Capacity over· +
I \ Planning,Hortzon
I \ I
\ ' /
\\ ', ........ Future Gap -
/"
\ In Electrtcity . - -
\ ProJect Supply Required
~ +~.... Hydro + Ac tua l
PoRcy - - - - - C"8':~ity+- - - - - Eleetrtcity
Planning Demand
Hortzon
r cyisr.kl=cuyopsw.k*(cystandp.k/dt)
Project number 10 is now stored for 1 DT:
1 cycds.k=cycds.j +dt*(cyisr.jk-cyerase1.jk)
r cyerase1.kl=cycds.k/dt
which is just long enough for the capacity of Project 10 to be selected from
the project capacity catalogue, TPROCAP:
a cycsds.k=tabsq(tprocap,cycds.k,0,26,1)
TABSQ is a special form of table function which gives the effect of a square
table (see the COSMIC User Manual for more details). The 26 in TABSQ
is the total number of projects in Argentina.
If this approach of using a control which lasts for only 1 DT is not used,
the same project will be injected into the system over and over again.
Developing A rgentina's electricity capacity 319
SWItch
~---C uyo
system
L
Cuyo
Project
Counter
.>:
+ Cuyo standing
Tobie wIItI
Curo proi«;t
1+
Cuyo projec t +
+
Erasing
~~ Ind ic ator -------01 Code 1
ora.r sta rt ra te (CYERASE1)
~1~n ~l
Delay !+ +
Cuyo projec t
Cuyocode
project design ca pacity starting
to constructlon design stage
tran sition rate
L
Cuyo capacity
starting design
stag e rate
c:.~.
hydraulic
ptO/«:t
1 +
Cuyo capacity
ending design
+
1 Cuyo capacity
In design stage
copcx:IIIw stage rate
I I
+
Cuyo c apacity + Hydraulic capacity
c onstrucflon - - - - - - - " Installed
completion rate
The model
POWER1.COS. runs a reference scenar io in which tables are used to
define the proportion of electricity capacity from thermal and hydroelectr ic
~ :,!,
~~ A
"- -:---~~
=~~~ :;~~= :;f~~':
Activatlng the sWitch 0 1
the c k»esf combinahon ----to-
""OOP
---- -r Establilhing the ~
"-r-
bt~ the mnmum
1
Estot::*sNng the mrinum
.\
~\
dltfefence aftet einW'latTlg dIf'I~ art_ ermnarng df'fet8OCe otte, eln'WlOttng
Summary
This model and the underlying problem have been described in somewhat
less detail than the New Zealand case, mainly to stimulate you into investi-
gating the model for yourself.
Technically, it is very complicated and shows how it is possible to use the
concepts embedded in a sophisticated system dynamics software package to
go beyond simple continuous models.
12 System dynamics has been applied to the modelling of the growth of developing nat ions.
Saaed (1994) is an excellent example. For an earlier study, see Forr ester (1973).
322 The applications of system dynamics
'NormoI'
ElM:IrIcIty
1'rIc.
Debt
Wrltlen-down
Volueof
.i-> RO\ftO+
Assets
~
\-: 8ectrclty
~~j
~-.
1.Rate
~~~- Balance
These two models are very different and the reader should make a compari-
son between them. For instance, the New Zealand model is only about half
the size of its Argentinian cousin. Its equations are simple, whereas the
power problem is about the most complicated the author has ever worked
with.
. Is the Argentinian model 'better' because its techniques are more
elaborate? Is the New Zealand model 'better' because it is easier to under-
stand? It could be that the New Zealand model is 'worse ' because it
oversimplifies reality too much, or perhaps the Argentinian model is
'worse' because it has used overcomplicated techniques just to look
impressive.
Such comparisons are virtually meaningless. The only way of really judg-
An air traffic control system 323
ing a model is relative to its objectives" . Review what was said about the two
models and then try to evaluate them.
This problem (Fig. 11.11) is, at first sight, one of physical flow. The essence
is that the more aircraft there are in the zone relative to the ability of the
control system to handle them, the longer it will take for aircraft to get
through the zone (we have all been in an aircraft which is 'stacked'). In
practice, airlines negotiate with each other for landing slots, thus hoping to
ensure that aircraft can enter the zone when they can be accommodated.
The weather and problems at other airports ensure that the plans do not
always work out.
There are two pressure points in the system. Buying more ATC comput-
ers, radars and people will increase Work Capacity, but there may be no
point in doing so unless the Air Traffic Configuration is well designed. The
+/- sign on that link is to suggest that a given change to the configuration
may make matters worse or better, depending on what it is. Obviously, no
ATC planner aims to make matters worse by rearranging flight routes but
IJ These sections are derived from two Ph.D. theses, but describe only selected parts of those
studies . One should not attempt to compare the two dissertations, merely these two models.
------ .....
//
_.luOle ,/
S;:::::~~ ,/
-.;. /
• I
: I
~ I
Aircraft Requiring
Entry to ATC Zone
.-
Fig. 11.11 Overall influence diagram for an air traffic control zone .
Air Traffic Control
ConnQuration
(Pattern01Routes and
Spacing Rules)
I
I
I ,.....----- .........
I ~ <,
t +/- ,/ <,
Available /
<,
Loop B -,
~lace /
Loop A \
+ y II \ +
Aircraft Requiring I- - Rate of Entry ~ Aircraft In +- Rate of Leaving ~ _ Tr~nsit
Entry to ATC Zone
to ATC Zone ATC Zone ATCZone Tlr
+ t \ ...
:I \ Loop C /
I I \
I , I /
\ +..... '" /
\ Work Load for - - - - - .... /
\ Air Traffic Control /
/
\ I /
\ I ,.- /
, I ./
./
" - t .- .-
.... SpareATC
Work Capacity ------
+A
I
I
I
Worlc capacity
In Air TraffIc
Control Zone
The use of drugs has been studied by several system dynamics workers.
Homer (1993) developed a quantitative model of the dynamics of drug
usage but to do so requires assumptions about the effects of, say, the supply
of drugs on the rate at which people start to use them, Homer making
diligent efforts to fit his model to available data.
Figure 11.14 attempts to capture the initial and tentative thoughts on the
/ _- - --00 - - - - _ - +"1~6~~ - - - - - - -
" .... .... IqriSiTO§l
+. 1 " " ,,/
Pressureto 0.
Reduce or » <
,, I + .. '
SrooothDemond
I \ \ // " ."
- - - - - -{};E - - - - - - - - - Investmenlln
-,
I ' I +" -- I I AIC ....
....
I ' I Pe<eelv~SuppIy .c -,
I \ I 01 ATC5efVices ,v,
\ \ I I A+/_ + I
,,
+ \I _ "I I if \
Chotac:tetIItII _ _ . . £""- _ _ ./ I Ale
\\
A_
, __ - - _ _ - I WOf1tCcpodIy \
I
\ "".... I " I / I
\ "" I I I I
\ +/_ Demand,or ATC~_ I I I
\ ~C 5efVices , I /
\ II + I ,," I
I
\\ // _ _ ------ - - - - __ ' I // " I
\ I/""'" / ....... . . . . + t +/- ..... ""'- +/
'\, I ,/ ..... Ret e o f _ ..... _ AICChor ges ...
' . . Flights " " OtIetfI/gtft / - - Handling Fllghts- + -'" .......
- -c,
+ / " SCheduled ,
" ,/
I ' ....... - - - - - - - - - -
-- -+/_
........ PrIcing
-, PolIcy
/ " Av_eA..,_ .... ""-AIrer+~Requlrhg <,
I . JIm -,
lD I I \ " .-- G round HondI~ -,
\8 I \ / <,
,,
I \ /
\ , I \
' , -IJ I \ I _ Po soenge< - \
....... Inte nded + \ I /' Sottsfactlon" - ._-- -- \I
<, \\:lIumeo'... -9-_ ' I ~p .... <, ,,"
AHra1llc A - .... ' I " / I ,
/ " , , + 1+ / , / \ I
/ + ," • ~ + \ I
/ - - Passenger \ I
,. / ..... -....,NlJllbers - - - - - - - - - ... Dek:Jysto \ /
II ' I
Growth
ITr~1 /
~ / I
+~
~- ' I
-, + /'
I
_ _ _ _ _ _ _ __ .. Achievob6e ,/ It' E2 ,
\ \ .................... + AirUnEf /
/ ./ Prices ~- I \ . . . . - - - - - - - - "'c osts
/ I I \
I \ I ' ""
Number 01 \ I ' ....- - "
Airlines C ompe" ng \ I HandIIiIf1 -- "
+'\ \ I - -- "
'.... _ .......
" + +I
.. Air1tne" --
- __ 8 c --PrOttlObItty - --
- ------- --- ----
--------~--- - -----------
/, ,/'" - - - - - - - - - - ......-;.'.:::::: _ __ '\. _ _ _ _ 1'oIiee
,/ ..... _ ,. _..... \ ..... _ EtIec".,.,.." • _ _
,/ / -- -, S.. .tilyol
I / / ...... ::. ......~-----' , s.nt.ne••
I / + I + • ............ --..... "- + /
,
J I t PrOduct Range ...... <, ..... ..... " - ~----
, Dtug and Make!.ng '\ -, _ :::: 'Drug
I: "" " - - PrIC~ + • Enort \ ",:-y / - - Tratltoc.~efS+
l
I , / " " I / -, +
\ / \ , I / -,
\ I / \ , I / '\ ~+
\ \ / _ - - - \ - - - - - - 1__ I / " Returns
\ +~ t + _----- -, "1 ---_,_ I ' . _..... ,
\ Drug -related" _ , , ' I v- -; \ Recnsts ..... ~
'v Cnrne bv users + "I J I - _ ...... +" \ - - - - Eft"".
and TrOtflc kers '....... I I I .......... \ I
I " , I II ' ,\ I
I 1- I -, \ I /"
, \ .......... .:.
+'"++ -, , \ 1 /
, Non-users ..- t ~ransihon '\ I I - otnc kers
l ..... - " Rate • users -e Drug-related Derating
Cos ts
\ // \ -,t , \ _ + I'\ \ + deaths
+ 1-
\ , \ ' ~ +
\ I \ I' 1 \ /1
, / ' I ' / 1 I
\ ' / ' I - - - - - _/ I I
\ I )\ " , Eflecf,._d I I I
\ I '\ - - Anll-drup - I
\ \ E~g~~~~ -, . . . . ActionJl 1me I
I
, \ Actions -, , 1
', \ t ' , I I
,, \- / + . . . _- I ,
I ." I
< , - +. per~,::gr~OI /'./ -,- ---
5evooly of /
Problem /
/
t + /
\ /
/
\ ./
, ./
'\
<,
-_/
Fig.11.14 A tentative model of the drugs 'problem'.
The drugs 'problem' 329
problem. The essence of building this diagram was the entity/state/transi-
tion method once one recognizes that there are three entities (at least) : the
ordinary population who are , or are not , drug users, and who can be viewed
as moving between the two categories, the population of drug traffickers
and, of course, the physical flows of drug s.
There are many areas in the model where questions are posed rather than
answered. For instance, Homer argues that the price of drugs is determined
by the traffickers ' operating costs, rather than by more obvious forces of
supply and demand. Perhaps excess supplies of drug s (the Drug Stocks in
the diagram) stimulate traffickers to extend their product range . The influ-
ence of seizures of drugs on attempted inflow is shown by a + /- sign to
suggest that up to a certain point , seizures increase attempted inflow. Pre-
sumably , the intention of the enforcement agencies is to seize so much that
the sign turns negative and the trade becomes so unattractive that it dimin-
ishes. Perceptions by the non-using population that there is a problem may
be a driving force in increased efforts against the trade.
An ideal way to make progress on a problem as complex and uncertain as
this is by the study period method, involving discussions between interested
parties and examined in the next chapter.
It is often useful to simplify a model to its essence by moving up the cone
of diagrams . Figure 11.15 is a Levell interpretation. It suggests that the
perceived severity of the problem triggers efforts to address it while, at the
same time, other forces increase the drugs business. Two sorts of govern-
ment action are shown: those to ameliorate the problem by social and
educational means and those to destroy the value of the trade by preventive
.
Perceived +
---- ------:~~~ _ "
/
/
/ - ""
'" "
" '"
",/
I \\
I
I " I
I \
\ Drug -rela ted
I I \ / Deaths
+1 I I
Awareness Non.Jsers ~Transitlon
Rate ~ I __
Users -
ot Pro b le m
II _+t+ --- ,
, -,
11
II I
I I
I ,
\ \ Government I \ '\ Government
1 \ Social Policy I I \ + Preventive
' " + Instrumenfs and
\ ..... _ .. scoie ono /
"," \
\
'Va lue ' ot _
Business .. - - - - - P~~I:~d
and Punitive
I Effectiveness
\ I Effect iveness ot
\ o~~~es \ Trafficker / Resources
-, , Product Range '" /... Dep ioyed
- - and Mar1<eling .- - - -
4,"
~
"\ Strategies + I +
'
"" '""
\
' 'Government Strategic __ - - '"
<. '--~~s----- / /
/ /
-- - ---
Fig.11.15 The drugs 'problem' at level 1 in the cone of diagrams.
330 The applications of system dynamics
/' -
/
/
Negative I
Non-users +- _Tril~on _ _. . .
-/ +
/
./
--
Government 5fratfIQic __ -
Bala1JCfl artd _ _ _ - - - -
Public Attitudes
--- ---
Fig.11.16 Feedback loops at level 1 in the drugs 'problem'.
and punitive methods. The government must strike a balance between the
resources allocated to the two approaches.
The effects of these mechanisms are highlighted in Fig. 11.16, which
shows two of the loops. There are more and, armed with an understanding
of them , the reader may be able to make more sense of Fig. 11.14 . Certainly,
an attempt to improve Fig. 11.14 (which is not the same as making it more
detailed) would be a worthwhile project.
Universal Industries has expanded considerably over the last 10 years and
its staff are scattered over offices in the south-east of England. This causes
much inconvenience and makes it difficult to reorganize the activities and to
take advantage of modern technology such as the 'paperless' office. Ac-
cordingly, Universal intends to move all its staff to a single large office in
Shiretown in the English midlands.
The move will take a year to complete and there will be a need for
staff to commute from London to Shiretown and vice versa for meetings.
This effect will be largest when the transition is about half complete. While
the move is going on it will be difficult even to know where people
14 The case studies in this section and the next were provided by Jonathan M. Coyle. The
author has somewhat simplified them and adapted them to the style of the book.
A study of police force measures of performance 331
are (internal telephone directories are usually out of date before they are
printed). As the move progresses, more time will be lost in travel from
Shiretown to Universal's customers and suppliers who, by and large , are in
London.
While individuals are moving home and office, they are effectively un-
available for work. To that effect must be added the fact that there are a
number of people who do not want to move at all. They may be expected to
increase wastage from the London staff and to add to the time lost due to
illness. Naturally, wastage must be replaced, which will add to time lost in
recruitment and training.
In Fig. 11.17, the Work Profile represents a base load with fluctuations.
The Actual Work Output is based on the number of effective staff and a
normal working week, though the introduction of the 'paperless office' at
the new site will have the effect of increasing the work output.
A significant factor is the nature and extent of the departmental reorgani-
zation. This is shown with a ? sign (another example of being flexible with
the conventions of influence diagrams) to show that the effect on the ability
to locate people mayor may not be beneficial, and will depend on the
nature and timing of the reorganization.
The model is based on a very simple idea of it. 'Business effectiveness'
can be a very vague concept, in this case it has been represented as the
fraction of the work output which can be achieved against that which is
required. To that, of course, could be added the financial costs and benefits
of the move. The object is to come up with a Movement Plan to minimize
penalties and maximize paybacks.
I
/ I
I
\
-, - op e MO\llng
J + / ; ,.
New O ffic es
I I
,\
/ se ttllng ln / /' / \ \
I \ -, I
--' "
\ \ I
1 \ , ' /' / _ /' /1 \ \ I
<, ---/ »> /
\ '..... »>: _-- /' I \ \ I
II \ ..... + . + _ _ _ _ +/- /' I I I I
....... - - .. Tota l EHec tive..- - - - - - H L t /
I \ Normal Sta ff - - - - - - - C~~~u~~g ... I I I I
I ' Av_rog _ I~ _ - - BelWeen Offices I
-, WorIClng" I \' /' -' " + +/_ / I I
\ '- , W._k " " + ++ \" /' I ime to
I / ' TLocate /
ok' I I
\ <, ..... ....... Effective Nom inal \ ' /' I ...../..... Pe.Ple I I
\ - - - Working + Work Outp ut , < Commuting..... /
+~
.. Time per - - - - ~ (hours/week) \ / , nm_ _ ..... \ ? I I
\ /+We ek \ 1'- <, <, + »>: / \ / I
\ // \ r >; - - - - . Hour slost in _- /
Internal + / <; _ _ . ' II
\ \ / ' ,- _ _ - - Co mmunications + /'
\ +" ., - - -' , ok'
I
Extra Trove'
\ Act ua l - - - -.... + Hours l ost Time 10 I
- Wol1< .... - - - - - - .... ln O the r .. - - - - - Cus/ome"
\ _ -", Ou tput ..:::. _
~ _ ./ Tra ve l + ond$up~~n
I
-, ....... ftom New Olfice /
........ + Tim e l ost _ - ---- \ \ --- -.::: ---- ---- /
- -. t~~~~~nt - \
/
-, -.. -.... Hours lost /
t o Illness ...-_ Peop le MOVing /'
- W~~~~~'t /'
,-, +
Mo"e
~~
PropClllton of "'-. ...
~--------+!--- c';:'~~~tlan
C_R~\.. ~p=~
~ \ +
\ arne
":~~..[ .
. / v~'=-
++t~
~~~~~~
Fig.11.18 Overview of police performance (crime occurrence and prevention).
334 The applications of system dynamics
diagram and solid lines show what has been added. Factors which might
appear to be parameters in one diagram will be variables in the next. The
true parameters will be shown in bold italic type in the last diagram, Fig.
11.21.
Figure 11.18 represents the first element of the diagram.
Volume of Crime represents a function of the number of active criminals
in the population, the number of crimes each criminal could commit if
there were no police, and the time between actual crimes. It attempts
to capture the idea that, since a car thief's 'productivity', in crimes per
month, may well be higher than someone attempting to commit a complex
fraud. However, the Perceived Volume of Crime is a function of the
Proportion of Crimes Reported as well as of the actual value. This means
that the complex fraud described above might be seen by the public to be
more significant or worrying than car crime if a higher proportion of fraud
cases than car crimes were to be reported. In the late 1980s this was indeed
the case, though, in the early 1990s, car crime has higher visibility than
fraud.
Perceived Volume of Crime causes an increase in demand for resources
to be allocated to Police Visibility (police officers on foot patrol, as opposed
to less visible car patrols) and also decreases Public Reassurance. In this
way, increases in the Proportion of Crimes Reported have two effects:
Figure 11.19 expands the previous diagram to cover crime detection and the
Crown Prosecution Service (CPS). It suggests that increases in Perceived
Volume of Crime and decreases in Public Reassurance will also cause more
resources to be allocated to Criminal Identification. After a delay, the Time
to Prosecute, which is the time taken to prepare a case, and is constrained
by the Capacity of the CPS, this will increase Successful Prosecutions which
increase Public Reassurance about crime, thus forming a large and signifi-
cant negative feedback loop, running from Police Visibility via Response
Time to the volume of crime variables. The Proportion of Crimes Reported,
as well as affecting Perceived Volume of Crime , may also cause a decrease
in the Time to Identify Criminals and so increase the rate at which they are
identified. The Time to Identify Criminals is also a function of the Probabil-
ity of Arrest, which may increase as the Number of Crimes Reported rises.
Decreasing Police Response Time should increase the Probability of Arrest
and so enhance Public Reassurance. Unfortunately, Police Response Time
,_..... ~r::~r~~
of hIonn Procu. + ...O lrrl ll')Q!:> = -- - - - - - - - - - - P,OlxJb "11' _ <, <,
".~~t ct A"."
-, /
C flfl W\OIS + I
/
/ - - ' ......
-, ~ .+
I
I ~_ I ~pon,~
'"~
P.:.ob<:e
----- " '\ +
I?elu rnwgto --.... Nurnl::>efof OfCn
Acito' me'(
'''~"", / \ P,o ;<,mlty ot
I l ln~
I -'\ Between +
PC~Uflo,on/J
.~" e:i\m:c" I I -, ~ .-/ C """, ,", ,
( <,
/ I ". ~ ./ / +t <, ' ... .....
c..... -
~1lson ~ \ , . > I ( "
CC po<. li't' CoparcIPy \ '..... .:« J ... ...... .......
u,,,~a,:, / \ - - - - -- - -- I <, H flCM::tl,CY C:'
\, CUrT~ P!tJvel) l()n
C IIITlJr O IS
ffl:lolToOVl:!d fl o m
Popucmo ....
-I
h"" lo
PIO$tK:v1e
' ......\
\ -
......
t
+
<, ........
"~~~
OI C(~ed-
""" ......- --
I t t '\ , " ~
- - - - - - ---~ -- -
,D
II ('"
'\ \
T,n,el :)
bll corr *.l
used tc
Cllm",
.. ., / _- 9 - _ " "
C llrnr. a l +
:J \-.. . . ' , . ...... ...... .... / ./ ' '"
+ •_ _
t - ioe ntsc c tc n - - Pec otded <, , < , 1/ Publoc ;'-/ /
+ C IIIT\l:t --- ' Polic e l~eouulallCe ~
.... Vl!lbttr"r'
~ Sl-C(;e'Aru-
_ Prosecuncn s +
~ + +t "', _....... / // +~-
\L \ E ff~r::ZIOI I , ...... - "
Idenfll ic a hon 1
t I
I
I
I
Eftl(· le nc.yof
Pe sce l/ os.lblllty
~----, .- - --------
Fig.11.19 Overvi ew of pol ice performance (crime detect ion and the criminal justice system).
336 The applications of system dynamics
15 You will be wasting your time in studying this diagram unless you are also finding and
assessing the effects of these loops.
Tlne fo - _
Ide n h!'t4 - -- - - - -
+ CllIT\II"ICIls I'oIwtIIaI -- -
oI:='~" ,'fI \ ~ <,
- ProlxJl.>l~"" - ,
1/ I \ IN' ~ + " r AUtnt ..-- . /
_. - -::;-:::::._ - - -,
I / _,- - -4 _ , , ... .... . . .
- I / I \ + .+ - - _ _ _ - - - - - - - - _ -: ~~!>d
,. / \ c fuo l l,lQ1urne _
Cllnl ~ts -+ / I \ I ofQmu / _ _ +Iimtl \
' Ift.tlutn ng 10 - - - _ _ .. N~er o r I , ~ .. + ,/ TITlt:'J ,-
/ Popu bh on Actve Crrnnals \ I t -" " "" Batween + ,/ \
\
+~ \ \ / \....... .... /' ..... ./ O lml t5 ....... ..... /
\
I
/ +. I
-..
/ <, - _L __ - ( I \. .... _ _ _ _ ..... ,/ +
t <, ....... ,/
\
- I I I I ....=.., \ \ \ " -- - - - .: " I / .... \
",:'0 lD I ....... \ \ \ ' .... » > I / \
5~~~~ I I I ~ ~~1On OI \ ' , - - - - I / ..... Ethc ....nc.:y o l \
, .. + I / I Cnm65 Report~ \ '~ + - - -- _ _ 1__ I CurTIeP ev en tlOn \
I \ I ,/ / - ,, \ -, -.. Pe rc OlYed _ - - - I - 1- _ + \
I \ I II - I .... ,. ~::: .... .... / I .... .... \
I ' - "~~";'';'''''I~Gm p,~o;;::,~. \ - + I t +\ ........ .... I I2l I I
k>pu1o,]11On \ \ 1\ \. . . . . ..... + ,/ I I
' 4+ I \. I -, "' Cmn6 / I
\ \ 1 \ ,, \ \. Preven tion I
I I \ -, +1 \ ' +t I I
I \ .... ~ljJ \ ' \ I I
\ I I \ I \ " \ I I
\ I I \ I \ <, , I ~ _ - 9 -_
" I / " cm,""':- , ', I 1/
\ \ / '\lII + _-- - ldentlflC01lOn - - _ ....
'r~~~ttd ' ., . . - ...... ....... ..... I I
\. \ ,/ ..f)- - - t+ + Pohce
\ - / - --
- - _ ";:VISibtllty
Succ"",.t .. - - - - I +
+
' ...._ ~'058C I.Jhons + \
t., _-,
1+ \. Elficl6ncy ol + 1 <, _ _ _ _ _ / /
J 1"oIIt»:~ -- CfNToIl'lOl '" I \
ftht*:~ Id en !lfl.::otc n I
II "'--..c. /+ I / \}
I 1
I I
I ~
I + Pc Ic e • Poec e
£~v~.ity
:I u~ ~~ , ~I~ - + +
\ + -------
\, .- - - - "'i + _ siOi; ~'n tOi'c~ • T __
\ \. -, fhttPollco
"b"''''''' '_ - .-/
"
--- - - -- -- - -- - - - - - - -- --------- -- -
Fig.ll.20 Ov erview of police performance (community relations and police moral e, behaviour and training).
338 The applications of system dynamics
Against the Police will increase if there is an imbalance between the ethnic
or gender mix of the force and its local population. This variable will also
cause a decrease in the Proportion of Crimes Reported, which has already
been identified as a significant variable. Other factors which affect the
number of complaints against the police include Adherence by Police to
Statement of Common Purpose and Values (which presumably could be
increased by further police training) and the number of criminals identified
(thus the police could be victims of their own success in some circum-
stances). Finally, falls in Public Reassurance could lead to increases in the
number of complaints against the police.
The analysis of influence diagrams is sometimes helped by laying Venn
diagrams over them to emphasize sectors of a model and to identify sector
interactions. Figure 11.21 does this for some of the measures of effective-
ness proposed by the Audit Commission (1992). Each sector is identified by
a name in bold Roman type and an arrow to the boundary of the sector.
It can be seen from Fig. 11.21 that there is considerable overlap between
some of the measures of effectiveness. For example, those connected with
complaints against the police are completely overlapped by other measures.
This may be a desirable feature in that measures which overlap can provide
checks on, or alternative insights into, other measures.
The diagram addresses the issue of the quality of service provided by the
police in a number of indirect ways. However, the value of using complaints
against the police as a measure of quality is that the volume of complaints
could increase as the police become more 'successful '. For instance, an
increase in the number of criminals identified could in itself lead to a
corresponding increase in complaints.
The feedback loops that deal with crime prevention, criminal identifica-
tion and police visibility are all affected by how 'efficient ' the police are at
that particular task. In other words, the Time Between Crimes is affected
not only by the volume of resources allocated to crime prevention but also
by the Efficiency of Crime Prevention. This logic can of course be applied
in reverse; if it was possible to measure the Time Between Crimes (perhaps
by interviewing known criminals at the time of arrest or conviction) and the
level of resources allocated to crime prevention, the analyst would start to
gain insights into the efficiency of a particular police force in the role of
crime prevention.
In summary, the diagrams illustrate how the technique could be used to
structure debate about, and research into, this issue, perhaps through the
medium of the study periods discussed in Chapter 12.
work by Hall (1976) on the collapse of the magazine The Saturday Evening
Post. Apart from its business interest, this case shows the power of a small
model and the use of other management science techniques, in this case
regression analysis, in a system dynamics model.
Introduction
This section uses the open literature to describe the work which has been
done and to suggest reasons why system dynamics has been a useful tool for
defence analysis.
Coyle (1981b) shows many of the ideas which have emerged in this body
of work. It was suggested by General Sir John Hackett's hypothetical
scenario , The Third World War (Hackett et al., 1978). The model proved to
be surprisingly easy to develop and to 'fit' to Hackett's data. When the
initial conditions are changed, the model also fits a different scenario
(Bidwell et al., 1978).
The model has 300 variables and requires a few seconds to run on a PC,
whereas some combat simulations consist of 200000 lines of code, and
require major effort to run . This difference in size and tractability will be
explored later.
WW3.COS can be run to produce Hackett's scenario of war after a
period of warning and Bidwell's scenario of a surprise attack.
Qualitative analysis of influence diagrams has been very useful in the
defence arena. A paper written before the Falklands War analysed the
problems of sea control over a group of islands (Coyle, 1983).
Qualitative modelling was further applied (Coyle, 1984) to the relation-
ships between East and West in the context of the balance of interest
between Northern and Southern nations which had been suggested by the
report of the Brandt Commission, mainly with the intention of posing
research questions. Influence diagrams have also been used to model coun-
ter-insurgency warfare (Coyle, 1985). The main insight was that the govern-
ment forces should emphasize preventing insurgents from forming parties
large enough to attack sources of government power, combined with a
policy of controlling the availability of supplies to them.
Wolstenholme (1986) describes a quantitative model of a Red force
attacking a Blue defender; an extension of system dynamics modelling from
strategic problems to more detailed analyses of Blue's fire discipline and
Red 's attack tactics. He comments that:
In general the role of system dynamics [is to create] initial insights into
problems prior to detailed conventional modelling. This is .. . an im-
portant role.
System dynamics applied to defence analysis 341
16 This model has some apparent dimensional inconsistencies: for instance CACE is
the total number of aircraft available and is the sum of bombers and lighters. Dimensional
validity is a vital ingredient of a successful model, but it should be used flexibly where
exceptional circum stances arise. The author, who has a lot of experience in modelling, spent
many hours carefully studying the printed output to make sure the model was working
correctl y.
342 The applications of system dynamics
SUMMARY
This chapter has explored the application of system dynamics to real prob-
lems. The aim has been to stimulate the reader's insight into the capabilities
of the discipline and to show how problems of great complexity can dealt
with. The reader will get most value from the chapter by running the
models, studying their output, becoming familiar with how the y work, and
then experimenting with them . Optimization will deepen understanding
even more.
The examples , and the instance cited in the system dynamics bibliogra-
phy (see footnote 1 in this chapter) cover such an enormous range of topics
that it is hard to identify problems to which system dynamics cannot be
applied. That is not the same as saying that system dynamics should be
applied to those problems, and, in the final chapter we shall consider some
criteria for assessing the circumstances in which system dynamics might be
an appropriate methodology.
REFERENCES
Clark, R (1986a) Operating and support costs of the US Navy: some analytic facts,
Budgeting for Sustainability, Military Applications Section, Operations Re-
search Society of America.
Clark, R.H. (1993) The dynamics of force reduction and reconstitution, Defence
Analysis, 9(1), 51-68.
Clark, T. (1986b) A management systems analysis of the arms transfer process,
Decision Sciences, 17(4), Fall.
Coyle, J.M. and Richardson, H.D. (1993) A recreation of the Gulf War using the
CARCO system dynamics model, presented at International Symposium
on Military Operational Analysis, Royal Military College of Science,
Shrivenham. (Copy available from Coyle at HVR Consulting Services,
Selborne House, Mill Lane, Alton , Hampshire GU34 2QJ, UK.)
Coyle, R.G. (1977) Management System Dynamics, John Wiley & Sons, Chichester.
Coyle, R.G. (1981a) Modelling the future of mining groups, Transactions of the
Institution of Mining and Metallurgy, 90, April , A81-A88 .
Coyle, RG. (1981b) The dynamics of the Third World War, Journal of the Opera-
tional Research Society, 32, 755-65 .
Coyle, R.G . (1983) Who rules the waves - a case study in system description ,
Journal of the Operational Research Society, 34(9), 885-98.
Coyle, RG. (1984) East and West and North and South: a preliminary model,
Futures, December, 594-609.
Coyle, RG. (1985) A system description of counter-insurgency warfare, Policy
Sciences, 18, 55-78.
Coyle, RG. (1987) A model for assessing the work processing capabilities of mili-
tary command and control systems, European Journal of Operational Research,
28,27-43.
Coyle, RG. (1992a) A system dynamics model of aircraft carrier survivability,
System Dynamics Review, 8(3), Fall, 193-212.
Coyle, R.G. (1992b) The optimization of defence expenditure, European Journal of
Operational Research, 56, 304-18.
Coyle, R.G. and Gardiner, P.A. (1991) A system dynamics model of submarine
operations and maintenance schedules, Journal of the Operational Research
Society, 42(6), 453-62.
Coyle, R.G. and Rego, J.e. (1982) Modelling the discrete ordering of hydro-electric
projects - the Argentinian case, Dynamica, 8(1), Summer.
Forrester, J.W. (1961) Industrial Dynamics, MIT Press.
Forrester, J.W. (1969) Urban Dynamics, MIT Press.
Forrester, J.W. (1971) World Dynamics, Wright-Allen Press.
Forrester, N. (1973) The Life Cycle of Economic Development, Wright-Allen Press.
Hackett, J. et al. (1978) The Third World War, Sidgwick & Jackson, London.
Hall, R.I. (1976) A system pathology of an organization: the rise and fall of the old
Saturday Evening Post, Administrative Science Quarterly, 21, June .
Homer, J. (1993) A system dynamics model of national cocaine prevalence ', System
Dynamics Review, 9(1), Winter, 49-78.
Macrae, H. (1994) The World in 2020, HarperColiins, London.
Meadows, D.H. et at. (1972) The Limits to Growth, Potomac Associates.
Meadows, D.L. et al. (1974) Dynamics of Growth in a Finite World , Wright-Allen
Press.
Naill, RF. (1977) Managing the Energy Transition, Ballinger Publishing Company.
Roberts, E.B. (ed.) (1978) Managerial Applications of System Dynamics, Wright-
Allen Press/MIT Press.
Saaed, K. (1994) Development Planning and Policy Design, Avebury Press.
Wolstenholme, E.F. (1986) Defence operational analysis using system dynamics,
European Journal of Operational Research, 34,10-18.
References 345
Wolstenholme, E.F. and Al-Alusi, A.-S. (1987) System dynamics and heuristic
optimization in defence analysis, System Dynamics Review, 3(2) , Summer.
Wolstenholme, E.F., Gavine, A., Watts , K. and Henderson, S. (1992) The design,
application and evaluation of a system dynamics based methodology for the
assessment of computerised information systems , European Journal of Infor-
mation Systems, 1(5) , 341-50 .
CHAPTER 12
INTRODUCTION
We have followed a long and hard road to study the principles, techniques
and applications of system dynamics and have now reached the stage of
trying to draw the threads together. Accordingly, this chapter restates the
essence of system dynamics, and discusses problems of applying it in prac-
tice. That leads to some considerations of the assessment of the quality of
models. Approaches to the teaching of the subject are explored and some
further reading is suggested. Finally, the author indulges himself with some
personal comments.
Many aspects of system dynamics have been described in this book. The
techniques of influence diagrams and examples of their use were studied.
The principles of simulation were explained. Modelling techniques and the
formulation of models have been explored and the depths of optimization
were plumbed. In the preceding chapter we tried to bring all those topics
together in a survey of the applications of system dynamics, including some
rather detailed case study models. Those topics are all very well and the
reader will have expended much effort in mastering the material, but what
is the essence of it all?
To see the essence, recall that an aircraft flying from, say, London to
Hong Kong does so almost entirely under automatic control. During the
flight, the aircraft's weight changes considerably as fuel is used, it flies over
high mountains and is exposed to head and side winds which are largely
unpredictable. This standard of performance is achieved safely and eco-
nomically every day, and practically regardless of the weather, because the
designers of feedback control systems for large aircraft and many other
engineering systems know their business. They are helped considerably
by having access to a large body of accepted and tested theory of, say,
aerodynamics and some powerful mathematical methods of control system
design.
Socio-economic systems must also be, so to speak, piloted through time,
and we know from the practical experience of daily life that they are all too
The essence of system dynamics 347
frequently far from successful in that enterprise. The most dramatic exam-
ples are the decay of cities, the changes in social behaviour, the cycles of
economic expansion and recession and the rise and fall of nations. Less
dramatic cases are the growth and decline of business firms and the daily
efforts of managers to meet targets for production, to recruit staff or to
complete projects on time and to cost. Many other instances have been
mentioned in the book; even more will occur to the reader.
The essential aim of system dynamics is to achieve in socio-economic
systems the standards of controllability and dynamic behaviour which are
commonplace in engineering systems. The decades of work in system dy-
namics which were summarized all too briefly in Chapter 11 offer ample
evidence that these targets are achievable in a very wide range of socio-
economic systems. The paradigm, or fundamental point of view, is that
dynamic behaviour is produced by feedback mechanisms and that the qual-
ity of the design of the policies which regulate those mechanisms and the
structure of their interactions are the factors which produce good or bad
performance.
To be sure, the system dynamicist dealing with a managed system faces
more difficult problems than the control engineer. The first is often a lack of
any accepted theory of the problem in question. The saving grace is that all
socio-economic systems contain physical flows of something, and getting
the physics right is the key step to understanding a problem and getting a
good model. The injunction to think physics was emphasized when we
discussed influence diagrams , and the principle of physical flow is, perhaps,
the nearest thing system dynamics has to a general theory for structuring
and understanding problems.
Further difficulties arise because socio-economic systems usually contain
significant non-linearities, are often larger than engineering problems and
cannot be subjected to laboratory testing under controlled conditions. Even
more than that, socio-economic systems may well involve positive feedback
loops, or badly behaved negative loops, capable of driving the system far
outside the normal operating range within which an engineering system can
be made to remain .
Even further, socio-economic systems cannot always be represented as
objects which are separate from the environment that causes the shocks. A
Boeing 747 does not create the headwind with which its automatic pilot
must cope; a business firm, on the other hand, may very well create or
destroy the demand for its products to which it is trying to react. One
consequence is that system dynamics models of socio-economic systems
quite frequently produce counter-intuitive behaviour, in which the result of
a policy or structural change is different from, or even opposite to, what
logic might initially have predicted. Thinking more deeply, with the aid of
the insights from the feedback structure, should reveal the reason for the
counter-intuitive response, and that ought to enrich one's understanding of
the policy problem the model represents.
348 Summary and conclusion
IN WHAT CIRCUMSTANCES?
1 The author's research interest at the time of writing is, in collaboration with Professor
Piatelli of the Italian National Research Council, a study of the growth of sea power in the
Classical Greek city states. On the face of it, this is an abstract problem, though one which may
have considerable implications for modern politics and defence str ategy. Who might the clients
be for such work ?
350 Summary and conclusion
2 The author is very well aware that there is a good deal more to LP than that and that there
are integer and non-linear programming methods.
System dynamics in practice 351
rather than them having the feeling that they are detached, or divorced,
from progress and that they will have to leave it to the analyst to come back
later and tell them the answer . That is never going to lead to accepted
results.
Diagram development is best done with a whiteboard and room to walk
around. The group dynamics are such that people will wish to argue, debate,
think and physically stand back and look at what has been done. A good
practical trick is to use the kind of whiteboard that makes a print of what
has been drawn before it is amended too much, or the use of a Polaroid
camera. Using graphical software too soon is bad practice, as it is hard for
more than about two or three people to see what is on the screen, only a
small part of the diagram can be seen at any time, the person controlling the
mouse may come to dominate the thinking and the rest of the group are
likely to lose interest. Software which projects onto a large screen is usually
not helpful because the person running the program cannot be involved in
the discussion and may be perceived as being too much in charge of the
debate, and there is the risk of delays as the diagrams are built and proj-
ected. The essence is to keep everyone involved and active.
An important aspect of a good project is to feed results back as they
arise. Again, one of the attributes of system dynamics techniques is their
rapidity; initial results , whether from a diagram or a model, can often
emerge within days or even hours and showing the client what is happening
is a good way of keeping up his or her interest. This is especially important
in academic work. A given project may lead to a paper based on the
diagram, comment on which may be helpful in revising the diagram and
improving the subsequent model , and it also establishes the project as an
accepted part of the scenery, so to speak. When final results are produced,
they are less of a surprise to the academic community and hence may be
more likely to be taken seriously, rather than being 'butchered with con-
summate skill' (p. 309, footnote 3).
This ability to produce early results quickly has a more profound implica-
tion. It is a truism of analysis that the first model of a problem is always
wrong, usually because the client's need for it has not been properly iden-
tified or the client has been inadequately educated as to what his or her
needs are. Being able to produce an initial model from a few hours or days
of effort means that so little time, money and personal prestige have been
invested that one can abandon the initial model and try again with the
benefit of the improved understanding. Any method which requires person-
months of effort before any results emerge will produce models which are,
psychologically and politically, almost impossible to amend, even if they
profoundly miss the point of the problem.
Sufficient has been said in earlier chapters about the importance of not
making the simulation model over-complicated, and we have also explained
that there is nothing in most of the software packages to prevent one from
352 Summary and conclusion
3 The author once led a study period at which a rather tasty chicken dish was served at lunch
on the first day, but not on the second. When the part icipants complet ed their appraisal forms,
the only improvement suggested was that chicken should be served on both days. There spoke
some happy customers!
4 This depends heavily on the capabilit ies of different software packages .
Assessing the quality of a system dynamics model 353
not save 1000 words - it may well require them. Secondly, presentation of
the equations requires some thought. A full listing of a model is not always
helpful , and documented printout of the most significant equations, sup-
ported by a few sentences of explanation, may be more appropriate. It
convinces clients of the quality of the work, without overwhelming
them with detail. Finally, the recommendations for policy or structural
change need to be handled with care. It is often a good idea to present the
results in such a way as to show clients two or three things about the system
which they already knew or suspected as well as the novel insights and
recommendations which have emerged.
The essence of good system dynamics practice is to bear in mind that the
model represents a policy problem for a client and it is the policy which is
the object of study, not the model.
Simplicity: Has the real world been simplified to just the right extent ? This
is rarely a technical matter and often has much more to do with showing
a particular interest group that 'their' part of the problem has been
included. The difficulty is that it can lead to intractable models. The real
subtlety is that the model must be simple enough to be tractable while
ranging widely enough to contain the possible solutions to the problem
and to ensure creativity. The reader might like to review the case studies
in Chapter 11 to see how well they meet this test, bearing in mind that
case studies in management education are never intended to show exam-
ples of good or bad practice; they are intended to make the student think.
Redundancy: Can parts of the model be removed without affecting its
behaviour" This does not necessarily mean that the model has not been
simplified enough . It often means that aspects of the problem which
everyone knew to be important are not significant. In the psychology and
politics of studies, this may cause some part s of the client group to heave
a sigh of relief when they can prove that the problem was not their fault.
On the other hand it may upset them deeply to discover that they are not
as important as they thought they were. Careful handling will be called
for, and it is as well to discover this kind of result early enough for
precautions to be taken .
Transparency : Are the model's assumptions, simplifications and equations
well understood by analyst and sponsor? If not, the analyst is working
blind and the sponsor has to take the results on trust. Study periods
should have ensured that the model and its results are the shared prop-
erty of analyst and client.
Flexibility: Can the model deal with new inputs and parameter values?
Generality: Can the model represent other problems, perhaps when param-
eter values are changed ? It is often poor practice to try to make a model
too general. The value of a model depends fundamentally on how well it
is suited to its purpose and a general model may be trying to satisfy too
many purposes . System dynamics models are typically quick and cheap to
develop and it is generally better to develop a new model for a new
purpose.
Sensitivity: How severely does it react to changes to input data, parameters
or initial conditions? Testing a model under extreme conditions is an
essential step to verifying that it is technically correct.
Soundness: Does it satisfy technical criteria such as dimensional consist-
ency, accuracy of mass balances, correct use of DT and legitimate use of
rate-dependent rates? In other words, within the framework of the as-
sumptions and simplifications, does it do the same things as the real
system and for the same reasons ?
5 The COSMOS optim ization software includes a simplification technique designed to show
which parts of a model can be switched off without degrading the final value of the objective
function by more than X%.
Teaching system dynamics 355
System dynamics is difficult to teach ; at any rate the author has found it to
be so, despite many years of trying. To be sure, the basic techniques of
influence diagrams and simulation are easily understood, and most students
have no difficulty in following models developed during class periods, run-
ning them and doing policy experiments and optimization. The difficulty
arises when they subsequently try to tackle a problem of their own, without
guidance. Forrester has always argued that to become a good system
dynamicist one must spend a period of apprenticeship with an experienced
practitioner but , while this works well for the student who can spend a year
or more on a higher degree , it is a counsel of perfection, as most students
cannot do that.
One of the purposes of textbooks such as this, and especially the prob-
lems and cases it contains, is to provide students with synthetic experience
and reference material to help them over this hurdle. The essence of the
teaching problem is, however, the same as the difficulty in practising system
dynamics, discussed earlier, which is that one has to start with a blank piece
of paper, and many people find that to be very hard. The only thing the
instructor can do is to be aware of the problem and to try to frame the
teaching to deal with it. The purpose of this section is to try to pass on some
experience and suggestions to those who may wish to embark on their own
teaching of system dynamics.
Although helping students to develop a deep understanding of system
dynamics is difficult, it is easy to construct a course of lectures and practice
to give at least initial competence in the discipline. What follows is an
outline of a one-week intensive course intended to start at about 11 a.m. on
Monday and finish at lunchtime on Friday, a common pattern for short
courses . Students are expected to undertake evening reading.
356 Summary and conclusion
6 At the end of the course, the students, who are usually experienced modellers , complete a
'happiness sheet' in which they rate each topic according to the technical level at which it was
presented (too low, about right, too high) and the time spent (too long, about right, too short).
The course is normally given a practically perfect score.
Time Monday Tuesday Wednesday Thursday Friday
14:10 Develop IDs for Load, debug and Advanced aspects Running of the Optional modelling
15:00 production model run production of SO modelling I combat model practical
and combat model model
15:10
16:00
16:10 Influence diagramming Policy design in System dynam ics Optimization of the
17:00 problems production model case study I: combat model
qualitative analysis
17:10 Influence diagram Experiments with Modelling practical Modelling pract ical
18:00 work production model
FURTHER READING
Any book reflects its author's prejudices and experience , and a subject,
especially one as subtle as system dynamics, can only be deeply understood,
as opposed to technically grasped , by reading of other work and the absorp-
tion of other views and prejudices. This section outlines some suggestions,
in chronological order of publication.
The author first read Forrester's masterpiece, Industrial Dynamics
(Forrester, 1961) about 30 years ago and he still re-reads it from time to
time, always to his profit. Since system dynamics was established, numerous
authors have written texts on the subject.
Richardson and Pugh's Introduction to System Dynamics Modeling
with DYNAMO (Richardson and Pugh, 1981) is a good example of this
literature. It provides a number of examples of simple models and is,
to some extent, a supplement to the DYNAMO User Manual (Pugh
did a great service to system dynamics by developing the original
software).
Roberts et al. (1983) cover the techniques of using the DYNAMO soft-
ware and offer a wide range of examples, most of the models being rather
simple.
The common themes to both these books are that only DYNAMO is
mentioned and that nearly all of the models they contain are completely
Finally, on a personal note 359
closed in that the dynamics arise solely from the structure of the model , its
parameter values and initial conditions, and not from any exogenous influ-
ences. This might be termed the American school of system dynamics , as all
the authors were for a long time associated with Forrester's group at MIT.
The view adopted in this book is that both closed and driven systems exist
(the combat model and DMC are, respectively, examples) and that one
needs to know how to deal with both.
Both books are now some 12 years old and a more recent offering is
Wolstenholme's System Enquiry (Wolstenholme, 1990). The examples it
contains are from business, coal mining and defence analysis.
A useful comparison of system dynamics and event-based simulation is
provided by Pidd (1992).
Finally, the System Dynamics Society's journal, System Dynamics Review
(see p. 309, footnote 4) provides an invaluable picture of current work in
the field.
book has been a rewarding chance to draw together thoughts which have
been developing during the 15 years since my first book on system dynamics
(Coyle , 1977).
My final word is that I hope that the hard work you have put in to
studying this book will help you to enjoy system dynamics as much as I do .
REFERENCES
INTRODUCTION
System dynamics models can be written, with some effort , using spread-
sheet packages or general-purpose languages such as FORTRAN but there
are several commercially-available software products specifically for system
dynamics modelling. The author has, however , seen some remarkably good
system dynamics models written, laboriously, in FORTRAN and some
quite unbelievably bad models written, very easily, using some of the pack-
ages described here. In general, good quality system dynamics is more to do
with intelligent and diligently careful use of the package one has available ,
and less to do with having any particular one, though the packages differ
substantially in the tools they provide.
This book was written using those parts of COSMIC which are consistent
with traditional formats for system dynamics models, but COSMIC has
many other features, as have the other packages . In an attempt to be fully
comprehensive, this Appendix provides a brief summary of the available
packag es.
The Appendix falls into thr ee parts . The first is an outline of the historical
pedigree of the different packag es, indicating the degre es of consistency
and difference between them.
The second part is composed of summaries of the capabilities of the
several packages , provided by the companies concerned. The author has
eliminated qualitative assertions , such as that Software X is 'easy to use' so
as to provide a factual summary, though the author accepts no responsibil-
ity for the accuracy of the information.
Finally, the author offers his own suggestions, based on many years
experience of doing system dynamics, of some factors to be considered
when selecting a software package.
HISTORICAL PEDIGREE
Optimisation DYNAMO
methods ,/ (1960)
derived from .,/ ,/
numer ical -
mathematics DYSMAP
I '\ ,/ (1970)
I '\~ .//
I COSMIC
I and
COSMOS STELLA/
I (1984) iTHINK
I (19 \ \
I
~ \
VENSIM
(1990) \
185)
POWERSIM
1 ( 1992)
+
Thepresent day
The solid vertical lines show that the package is still available, but does not
show the several stages of development that each has gone through. For
instance, the DYNAMO which was available in 1960 bears little relation-
ship to what is now produced, DYNAMO, DYSMAP2 and COSMIC,
though originally developed for mainframe computers, all now exist in PC
versions.
The dotted lines indicate that one package is very similar in operation
and syntax to its 'predecessor' , though not, of course, plagiarised from it.
For instance, ithink and Powersim are both based on Forrester's flow
diagrams . It should be understood, however , that although Package Y may
be 'descended from' Package X it is very likely to contain features which
Package X did not have and, of course , since the evolutionary split X itself
may have acquired facilities which Y does not possess. Indeed, in some
cases, facilities which were new to the 'descendant' have since appeared in
the 'predecessor'.
In short, the only reliable guide to what a given package does , and does
not, support is careful reading of the relevant manual and , where possible,
close comparison with other manuals . Even better is to use the packages or,
failing that, to talk to users.
The three groups of packages are very different from each other. The
DYNAMO/DYSMAP/COSMIC evolution is derived from the concept of
writing equations using a text editor, though COSMIC also has a graphical
modelling support system. The STELLAIPowersim line is geared to the use
of symbolic icons for drawing level/rate diagrams, from which some of the
equations are written automatically. Vensim is rather different from both
Supplier summaries of the packages 363
these groups, being derived from the text editor approach but also support-
ing icon-based modelling.
Introduction
The following paragraphs were provided by the software suppliers. The
descriptions are in alphabetical order of the product name. All the product
names and italicized features are trade marks of the respective suppliers
and all trade marks are acknowledged.
To emphasise that this is what the suppliers chose to say about their own
products, in response to the author's invitation, the text is shown in quota-
tion marks.
I The ithink software also exists as STELLA II, which is marketed to academic institutions.
366 Appendix A : System dynamics software packages
Introduction
The newcomer to system dynamics will need software support and, as
we have seen, there is a fairly wide choice. Even the established practitioner
Factors in selecting a package 367
of system dynamics can find it useful to have more than one package
available. The price differences between packages are not large and, in any
case, the price is trivial relative to the power they confer. How is one to
choose?
In this section, we shall attempt a summary of the features typically found
in system dynamics software , working from the available information, but
reasoning from first principles. Where it is necessary to mention particular
packages by name , alphabetical order is used.
The views expressed are very much the author's opinions. They are based
on much experience of system dynamics, but others might disagree with his
views. Recall also, that all the packages are undergoing continual develop-
ment so, if software X is criticized for lacking feature Z it may well be that
Z will appear in X in due course. If software X is mentioned as having
facility Z, it is simply to illustrate the argument and does not necessarily
imply that other packages do not have an equivalent of Z.
In general, a system dynamics software package needs to be assessed
according to
• its basis in fundamental system dynamics theory;
• the ease with which it can be used;
• the support it gives to model building;
• the extent to which models can be documented and explained to a
sponsor;
• the facilities it has for debugging a model ;
• the ease of making experiments and producing output;
• the scope of its facilities for policy design.
Speed of running a model is nice to have but the critical feature is the
support of thought, not the crunching of numbers.
Fundamental theory
All the packages except one are based on the fundamental Level, Rate and
Auxiliary variables which were discussed in Chapter 4, especially Figure
4.2. The exception is Vensim which only recognizes Level and Auxiliary
variables in its text editor, though allowing icons for rates in its graphical
tool.
DYNAMO, DYSMAP2 and COSMIC identify different types of
variable by initial letters in the equations, such as L, R and A. ithink
and Powersim identify them from the icon used to draw that diagram; using
a box symbol will create a level variable. Vensim identifies variables by
the form of the equation defining the variable and optionally allows the
use of icons and built-in typographical conventions to highlight variable
names; the name for a constant, for instance, will be displayed in UPPER
CASE.
368 Appendix A: System dynamics software packages
Ease of use
DYNAMO and DYSMAP2 depend on models being typed into a file from
a text editor. COSMIC, ithink, Powersim, and Vensim have Graphic User
Interfaces (GUI) which allow one to draw diagrams on the screen as a
precursor to equation writing. In all cases, a mouse is used to link the
appropriate symbols into diagrams . Powersim and Vensim also provide
'causal loop diagrams' (see page 43).
The advantage of drawing a diagram on the screen is considerable; the
assumed influence of one variable on another is abundantly clear, as it is in
an Influence Diagram. In both cases, however, the form of the influence is
not clear. The disadvantage with ithink and Powersim is that the diagram
must correspond exactly and in every detail with the equations which are to
be created, because, in those packages, the GUI is the portal to the creation
of equations. If the model is to become larger , so must the diagram . If the
model is to have very complicated logic, then the diagram must have a very
complicated structure, though Powersim's array feature can reduce diagram
complexity and ithink's space compression object allows complexity to be
shown or hidden as required.
COSMIC and Vensim, on the other hand , while supporting GUIs
(though the two are very different), allow one also to enter equations using
a text editor. This allows the user to take advantage of the distinction
between Level 3 and Level 4 in the cone of Influence Diagrams in Figure
2.16. Level 3 is drawn to show the main features of the problem. Level 4
need not necessarily be drawn, as it is implicit in the equations, and the
connection between the two levels is carried in the analyst's mind or can be
inferred from the code if needed.
All the GUIs will, to some extent, write some of the equations automati-
cally, and it is sometimes believed that these packages 'write the model
automatically'. This, however, is not the case. The most that happens is that
the Level equations are written automatically, but the Rate and Auxiliary
equation still have to be created by the user. Creating initial conditions for
levels must also be done by the user. This can be an important part of
modelling and it is worth checking how much flexibility a given package
offers.
In the author's opinion, heavy reliance on a graphical user interface
can sometimes lead the modeller into very bad habits . It is simply too
tempting to rush ahead with putting equations together and then looking
at graphs on the screen rather than carefully checking that the equations
are correct and do the same things as the real system and for the same
reasons.
In summary , all the packages are easy to use, once one has mastered the
appropriate procedures, though the beauty of a GUI is, perhaps, very much
in the eye of the beholder. What to one person might seem elegant and
powerful may be over-complicated and confusing to another.
Factors in selecting a package 369
Support to modelling
A package will support modelling by the extent and diversity of its built-in
functions. For example, delays are a common and significant feature of
dynamic problems so a system dynamics package which did not support
functions for modelling delays would be next to useless. In fact, all the
packages do have greater or lesser numbers of various forms of delay
function. COSMIC has 7 versions of delay functions; ithink has special
functions called 'Conveyors, Queues and Ovens ', which produce discrete,
event-orientated delay processes, though a standard DELAY3 would have
to be written as a sub-model.
In general, however, all the packages are fairly comprehensively
equipped with standard functions though, before selecting a package , the
reader should check exactly what functions a given package does and does
not support.
Model documentation
The process of describing what a model does, what it contains and how it
works is called 'documentation'. It is vitally important to the production of
good models as it enables both the creator of the model and the customers
for it (whether they be fee-paying clients or the academic community) to
understand the model. Without understanding, the model will not be ac-
cepted as a basis for management action or scholarly progress and will
therefore be a waste of effort. The quality of a software package is, there-
fore, more profoundly affected by the extent to which this vital process is
supported than by the elegance and sophistication of its GUI.
The original DYNAMO concept provided for 'maps' of the connections
between all the variables and for documentation of the equations. This
concept was followed almost exactly in COSMIC (DYSMAP2 and Vensim
achieve a corresponding effect in a different way) and has been illustrated
in this book whenever individual equations have been discussed. All the
variables in an equation are defined and any constants used in the equation
are searched for and shown, together with their definitions, even though the
constant may be scores or hundreds of lines away from the equation being
documented. See, for example , page 116. The other three packages have
similar features.
SUMMARY
All of the packages are very impressive and required much effort to de-
velop, but, before selecting one, try to probe into what facilities it actually
has. A few criteria are given below.
The essential distinction is between the COSMIC/DYSMAP21
DYNAMO grouping, which offer the traditional ability to produce
extensive output on paper for debugging and documentation, as well as
differing degrees of graphical capability, and the ithinklPowersim/
Vensim concepts which are rather more heavily geared to the use of
372 Appendix A : System dynamics software packages
screen graphics for building and running models, though they can pro-
duce differing degrees of paper-based output. Some people like the idea
that the model's diagram (though not its equations) can be seen on the
screen, though, in practice, for even a moderately sized model, only a
small portion will be visible on the screen at anyone time.
All the packages are reasonably well equipped with built-in functions
but they are by no manner of means identically equipped . Exactly what
functions does the package support and exactly what do they do? How
cumbersome and time-consuming would it be to have to write one 's way
round a missing feature?
All the packages have to translate the model into another language .
Some packages interpret the model into , say, C, which is quite quick but
produces a model which runs relatively slowly. Other packages have an
option to compile into , perhaps, C or FORTRAN, which takes a few
seconds but produces models which run much faster than interpreted
models, which will be important if many runs are to be made or optimi-
zation searches are to be done . Is the cost of the interpretation or compi-
lation software , and a valid licence, included in the price? If not, which
compiler is recommended, and can it be guaranteed always to work
efficiently, especially regardless of the size of the model?
Some suppliers will provide a demonstration disk which will give some
insight into the product. A much better source is the manual for the pack-
age and it would be reasonable to ask the supplier to sell an inspection copy,
deducting the cost from a subsequent purchase (it would be unreasonable
to expect suppliers to give free copies of expensive publications to people
who only might buy the software) . Studying the manual before making a
commitment may save a lot of subsequent grief and the cost of buying a few
manuals would, in the long run , be trivial.
When studying a manual do not simply browse quickly through it to see
what features the product supports and what it does not , though that is the
first important test. The second test is to read at least parts of the manual
carefully to see if what is described is clearly described in a style you feel
comfortable with. Writing manuals (and books) is very difficult and it is
hard for authors to find a style which will appeal to everyone. In other
words, try to assess whether you will be able to understand the package in
quest ion well enough to use it effectively . Search for warnings about things
the software does not do; you also need to be able to use the software
correctly. The third test is to see if the manual is self-contained in the sense
that, if you understand the principles and techniques of system dynamics,
you will be able to understand the manual without any additional
knowledge. A package which required knowledge which is not in books
such as this or in its manual would be very difficult to use effectively and
correctly.
Nothing in the foregoing paragraph implies that software vendors are
Summary 373
INTRODUCTION
PROBLEMS
Chapter 1
Problem 1
Write notes to explain to another person the purpose of system dynamics
and the type of problem which it does, and does not, address.
Chapter 2
Problem 2
In a manufacturing company, the inventory of parts is depleted by con-
sumption . Consumption is determined by exogenous factors. Inventory is
replenished by the production of new parts.
The rate of ordering new parts is determined by the difference between
desired and actual parts inventory , with the rate of ordering being such as
Problems 375
to correct the discrepancy over TCI weeks. The desired inventory is the
consumption rate, averaged over a period of TAC weeks, and multiplied by
the number of weeks for which average consumption is to be covered by
inventory, TTCAS. The rate of ordering new parts is also influenced by the
average consumption rate itself.
The rate of ordering new parts feeds into a parts manufacturing backlog
and the manufacturing department set the production rate so as to elimi-
nate the backlog in TEBLOG weeks.
Using the list extension method to get started, draw an influence diagram
for this problem.
Problem 3
Oil companies import large amounts of crude oil into Europe by means of
a fleet of oil tankers. Most companies own some tankers, but the great part
of their needs is met by chartering vessels on the open market. A charter
usually lasts for between 3 and 5 years, during which time the chartered ship
fetches cargoes, mainly from the Middle East producers, as required by the
company.
The demand for refined products varies with the business cycle and is
strongly seasonal. Demand is met from refined stocks, which are replen-
ished by refinery production. Producing a ton of refined products requires
more than a ton of crude oil. For simplicity, assume that target product
stocks are constant. The rate of production in the refinery is planned to
correct any discrepancies between target and actual product stocks and to
match current average consumption.
Assuming , again, that target crude stocks are constant, the company
determines its required rate of inflow of crude oil so as to correct the crude
stock discrepancy over a suitable time period and to make up for current
average consumption of crude oil. The amount of oil which the tanker fleet
can carry at anyone time is measured in deadweight tons (DWT), and the
required shipping capacity is determined by the rate at which crude oil
should be flowing into the refineries.
Tankers are chartered so as to correct the discrepancy between the
required and actual carrying capacities over a suitable period.
Using the entity/state/transition method, produce an influence diagram.
Chapter 3
Problem 4
In the United Kingdom, a building society is a finance company which
specializes in accepting deposits from savers and providing mortgages to
house buyers. The following is a very simplified description of the mecha-
nisms operating in large building societies.
376 Appendix B: System dynamics problems and solutions
Problem 5
(a) Find some negative feedback loops in the solution to Problem 4 and
explain how they affect the dynamics of a building society.
(b) Repeat (a) for a positive feedback loop.
Chapter 4
Problem 6
Using your own words, explain the differences between level, rate and
auxiliary variables.
Problem 7
Write notes to explain in your own words, starting from the basic principles
of dynamic simulation, why the equations in system dynamics models can
be written in any order.
Problems 377
Chapter 5
Many of the following problems ask you to formulate equations. Always
run a simple model to test your equations and, within the limitations of
your package, thoroughly test the model by printing out all variables, and
plotting graphs of a selected set of variables. If possible, check the dimen-
sions of your equations by software; failing that , do it by hand. Ensure that
your equations do the same thing as the real system and for the same
reasons.
Problem 8
This problem is designed to give some practice in writing some very simple
equations; in some cases a few equations may be needed. Do not neglect it;
much experience shows that one of the greatest hurdles to overcome is
writing one's own equations for the first time.
Write equations for the following:
(a) Consumption Rate starts at 100 units per week and increases to 150 at
the start of week 15. It falls back to 25 units per week at week 25.
(b) Order Backlog is increased by the Rate of Receipt of New Orders and
is depleted by the Rate of Starting Production. The rate of Starting
Production is the Order Backlog divided by a time constant called the
Backlog Elimination Time.
(c) Average Consumption is the Consumption rate averaged over a period
called the Consumption Averaging Time, which is 6 weeks.
(d) The Production Start Rate depends on the difference between Desired
Stock and Actual Stock, with the discrepancy being eliminated over a
Stock Correction Time of 8 weeks.
(e) Production Completion Rate is a third-order delay of Production Start
Rate, the delay being 6 weeks. How would the equations be altered if it
was decided that a sixth-order delay of the same total duration was a
better model of this process?
Chapter 6
Problem 9
Using the Consumption Rate equation from Problem 8(a), write a complete
working model for Problem 2. Set TEBLOG, TAC, TTCAS and TCI all to
6 and use a time unit of weeks.
Problem 10
Develop a working model for the tanker chartering system in Problem 3.
Assume that product consumption has a base value of 10 X 106 tons per
378 Appendix B: System dynamics problems and solutions
month and oscillates with an amplitude of 1 x 1()6 tons per month. Target
Product Stocks are 30 X 106 • Making a ton of refined product requires 1.2
tons of crude oil so Target Crude Stocks are set accordingly. The value of
CONVF is 0.4266 and all time constants are 3 months. The duration of
tanker charters can reasonably be modelled as a third-order delay with an
average magnitude of 48 months.
Chapter 7
No particular problems are set for this chapter. You already have numerous
models to work with and you should attempt to experiment with some of
them, as suggested in the chapter.
Chapter 8
Problem 11
Write an essay explaining in your own words the principles of system
dynamics optimization, considering carefully the limitations and advan-
tages of the approach.
Chapter 9
You will be able to do some of these problems even if you do not have
access to optimization software.
Problem 12
Amend the equation for COST in the combat model optimization (p. 281)
to allow for different marginal costs of adding and subtracting resources.
Problem 13
Making whatever assumptions you wish about the marginal costs of increas-
ing and decreasing assets, optimize the model again .
Problem 14
Modify the objective function for the simple combat optimization to allow
for two constraints: money and manpower.
Problem 15
Optimize the simple combat model to achieve the minimum cost for a given
level of performance. Assume that the aim is for Blue to have a certain
number of men surviving at the end of the combat.
Problems 379
Chapter 10
Problem 16
Amend the equations for discrete production planning to allow for produc-
tion to change only at certain intervals.
Problem 17
Chapter 10 referred to the problem of making samples happen at variable
intervals , though the example given there used only two possible values of
the sampling interval. Write and test a model which takes as input a sine
wave with a base value of 100 units, an amplitude of 30 units and a period
of 25 weeks. The sampling interval has a base value of 2 weeks but varies
with random noise between 1 and 3 weeks. Such techniques are required
when one is testing the sensitivity of a system to random effects.
A technical hint is that the standard SAMPLE function takes a sample at
intervals of INTV weeks. When each sample is taken, the value of INTV at
that time is stored and a count is kept against TIME to determine when the
next sample is due. This is true whether INTV is, as usual, a constant or, as
required in this problem, a variable .
A second hint is that INTV, or whatever you choose to call the sampling
interval, must be treated as a level to act as memory for the sampling
process.
This is a nasty little problem which is intended to give disciplined practice
in thinking in terms of time as well as developing a useful technique. The
reader will gain no benefit at all by simply looking at the solution, and the
only way to approach it is to write and test equations, observing very
carefully indeed exactly what happens to the variables every DT in the run .
It your software does not make it easy to have printed output it is unlikely
that you will solve the problem correctly.
Problem 18
The bidirectional multiplier has the form:
a desfam .k= table(ttdfam,avinc.k,argl ,arg2,arg3)
d desfam = (children/family) desired family size
d avinc=($/year/family) average family income
d ttdfam=(children/family) table of value for desfam as affected by
x average family income
and ARG1, ARG2 and ARG3 are numerical arguments for the range and
step size in TTDFAM.
This formulation has been used in some system dynamics models of
economic development models to make families have fewer children as
380 Appendix B: System dynamics problems and solutions
their income increases, but it makes family size increase again if they
subsequently become poorer.
Amend the equations to ensure that, once family size has fallen due to
increased income, it will not subsequently increase, no matter how far
incomes subsequently fall.
Problem 19
Amend the air sorties model to allow for raids to take place every 2 hours
or as soon as aircraft are available and thereafter every two hours.
Problem 20
Formulate a model for the pharmaceutical company problem shown in Fig.
3.12. Assume the following numerical datal:
Average Cost of Product Research 61 $/product
Delay in Product Research 20 months
Shelf Life of a Developed Product 10 months
Delay in Product Introductions 10 months
Average Cost of Product Introduction 560 $/product
Lifetime of a Product at Market 20 months
Disposable Revenue per Product:
60 $/month at age 8 months or less
37 $/month at age 10 months
20 $/month at age 12 months or more.
Company policies are to:
• adjust product research effort over 6 months
• adjust discrepancies in products at market over 3 months
• as the average product age rises above 10 months there is a slight bias
towards allocating money to product introductions and conversely if
average product age is less than 10 months
This problem will require the use of many of the techniques covered in the
book, particularly multipliers, discussed in Chapter 5 and considered in
detail in Chapter 10. The problem is also typical of real cases in that not all
of the policies are explicitly identified.
To derive initial conditions, assume that the flows of products in the firm
are balanced at 15 products per month.
One major difficulty is the development of a formula for Average Prod-
uct Age, AP A. One approach is
APA=PY/PAM
1The data are completely fictitious and the problem is heavily adapted from a real case.
Assume all monetary values to be in tens of thousands .
Solutions 381
Chapter 11
Problem 21
Choosing a problem in which you are interested, carefully identify who you
think might be the clients for a study of it. Draw an influence diagram of the
main features of the problem. Explain how you would apply system dynam-
ics to it, indicating what you would anticipate to be the most difficult aspects
of developing a quantitative model. What would you expect the qualitative
and quantitative models to tell you about the problem that you did not
already know?
Chapter U
Problem 22
Explain the main stages of the system dynamics methodology, drawing your
own diagrams to explain the points you make .
Problem 23
Summarize the limitations and strengths of system dynamics as an approach
to understanding complex managed systems.
SOLUTIONS
Solution 2
This problem is intended to give some practice in basic influence diagram
techniques. The solution in Fig. S.2 is fairly straightforward, provided one
2 COSMI C has the option of plottin g a line to mark the zero point on an axis, which will make
it obviou s if a variable has gone negative.
382 Appendix B: System dynamics problems and solutions
~ Coroumpl\on
+ Inventory - C~N5n
olP"'"
uv
Bacldog
Ellmlnalfon
Time
TEBLOG , Consumption
' \ AvP:~g
\ ~C
Produefton /
~e .......+
, /
/
, +t ~
" I Average
\ I Consumption
\ I Weeksot rate
\ I ~~ /"AVCO~
1 I In Invenloty I
11 TTCAS I \
I 1 \ I \
I I \ I
I I \ I I
, I \ I I
\ 1
/
/ I\I ~o.ir~
Inventory
I
,
/ I DtlW,
Parts
Monulacturlng
//
/ \
\
\
II" I
/
Invenloty
1 ~ \Y~'~>/
\ Rateol - - _ ..... ..... ..... "'"
Corr~t1on ... ~~ .... ---
TCI RQNP +
carefully parsed the narrative. Check your solution against this to make
sure you correctly used solid and dotted lines, that your signs are right and
that parameters have been properly identified.
Solution 3
This is rather more difficult than the previous problem. The first trick is
to recognize that there are three entities, refined oil, crude oil and oil
tankers. The first two involve only simple levels, the third is a delayed flow.
The solution appears in Fig. 5.3.
The second key to this problem is to recognize the need for a conversion
factor between the amount of carrying capacity in the tanker fleet, meas-
ured in DWT, and the rate at which oil should, and does, flow in, measured
in Crude Tons/Month. Using round figures, the return trip between Europe
Prod uc t
+ ConSlftlP tion
_ _ _ _ -.. _.
- -- ~~ ~~~~f + ~~;t
(Pl ON/ MONTH) PSTOCK~ Aqustmen
(PTON) ,/ rima t
I " PSAT
I \ " " (MONTH)
\ , "
\ -. Pf~fi~c~n ¥ ,/
\ " + Rate Refin8d to
\ -, /,'" RPQ C I'Ude
\ ....... ...... _ .,, """ (Pl O N/ M ONTH) Conversion
, Target - . Product ,.. + 1 \ ./ Ratio
, Product stock ",. /' ,/ RCCR
" Stocks - - - - . DIscrepancy I \ ,/ ,. lC rON/PTO NJ
...... + Ave ra g e TPS + PSDIS / \ ;'
...... _ Prod uc t (p TON) (PION) / \ ,/ ,..,
JIooC~tlon / / ~+ . :
.. A PCR - - _ " Crude stcce . /
/' /' (Pl O N / M O NTH) - _ _ _ - ." C onsum ption AvafKagng
Time for
--- --- C rude
Averagi ng ,.. /' " (CTO~JS~NTH) ..... Consu mp tion
TIme ;' " rACe
TAPe " (MONTH)
(M ON TH) , /
, I
\ I
\ I
\ I
+. tI
Avofoge
Ac tual _ _ _ + C rud e Oil C rude O U
Consum ption
- Shf:>pln g;",,, -
COpaClty - - .(ClON/MONTH)
Ar~gA~f9 ;- - - - --- - - - ----- - - - - - - . . +1 C rud e Rate
A SC ... Stocks A C CR
~ (OWl) " " + C STOCK (CTON/ MONTH)
Charter
Completion ..... " (CTON)
\ 1
I
~~~
(OWl/ M ONTH)
+\' " "',
" "
\
\
I
I
+ "" "SlIpping to \ Crude I
" 0 1 Innow '\. Stoc k
" '\. conV~~JoctOl -, _ -;'DjSc~sg~ncv I
, IIC TON/M~H}!D·· - ~ .~ . _ • ..
I
' WI J Targ et I
C rude
" -, Stoc ks I
-, TCS I
,,,
(CTON) /
/
Tankef '\ "" " /
ChCJrtemg +
+ _/ _/ "
Rote ,, _ ~ " _ R~~~:" .- _
TC R
_ .. (OWl / MO NTH) _ __Sh~;g + " Re quire d - OIIR~~~W "';
SGA P ... - - - - _ Shlpplng + _- - RC SIR .. _ C rude
As:J/tsr:2.?t:.e _- - - - - C[)Wl) - - - - - - c o o c cnv .... - (CTON/ MO NTH) $lode
SGA T RSC - _ _ Aet'~~en t
(MONTH) (OWl)
CSAT
(MONTH)
and the Middle East takes 2 months, so a ship of, say, 250000 DWT brings
in 250000 tons of crude oil every other month. Averaging over many
ships, the rate of inflow of crude oil is half the tonnage on charter. The exact
figure is 004266, so it is clearly important whether one multiplies or divides
by that number, so we have shown + and - signs on the links from that
parameter.
Solution 4
This problem is very much more difficult than problems 2 and 3. One of the
main sources of difficulty is the terminology. The 'rate' of interest is not
the same thing as a rate variable in system dynamics. To add to the confu-
sion, phrases such as 'the level of interest rates' are used and sound like
nonsense to a system dynamics ear . In fact, what is meant is the 'average
interest rate'.
The solution is shown in Fig. SA. As always, the main trick is to 'think
physics' and identify the flows in and out of the pool of funds currently held
by the society. After, that, it is a matter of mapping the influences that those
flows exert and which are exerted on them . Thus, the Rate of Inflow of New
Deposits is the Normal Rate, scaled up or down, according to whether the
society's deposit rate is, on average, higher or lower than general deposit
interest rates .
A similar idea is used for the Actual Rate of Lending. The Current
Demand for Mortgage Lending is the Normal Demand, modified by the
effects of the Mortgage Rate. The smaller of that demand and the potential
supply from the society gives the actual rate of lending.
The parameter for the duration of a standard mortgage was not men-
tioned in the narrative, but is clearly necessary.
The most interesting idea is that the society bases its Desirable Level of
Funds on the Normal Rate of Lending , which is a variable in the general
economy and which might be rather hard to determine, rather than
on the Current Demand, which could probably be measured reasonably
accurately .
Solution 5
Figure S.5A shows four negative loops. The numbering is arbitrary and it is
not implied that Loop 1 is the most significant. The reader should work out
where these loops share common paths .
Loop 1 is negative and acts to raise the deposit rate to correct a shortage
of funds. Loop 2 inevitably reinforces whatever Loop 1 does, so that if, for
example, deposit rates are raised to bring in more cash, the mortgage rate
also rises, bringing in yet more money as mortgagees pay more interest.
When society funds are low, Loop 3 ensures that less lending takes place,
while Loop 4, eventually, reduces demand for mortgages.
-- ------------ ----
--
GenefCII LfNeI
cr Decost
Interes t Rates
Gl O IR
~/Y£AR)
NormalRate
ot Irtlowof
N"'1.g~"'
(£/YEAR)
Qoteof Inflow
ot Mort~K¥M IntBl'9$t
(;'IV!AR)
+/ ' t+
/' /
// /
/
/
/'
/'
,,
- / / /
-- ---
Fig. 8.4 The building society problem .
-------------- ~~gr;o
-- / Disaepondes
/
--- --
/
, ....Building Society
/
Deposit Rate General Level
/ orceoosn
O...oble (,%~~R) ~ _ ROti.O.otG.en.",01 + _ InterestRates
/ .. levol of • - - - - - . . Interest Rates to .. .....
- - - -... Furds...... I I BuIlding SocIety GlO<R
I
I
, .-- ,/
- - OlOF
(~
......
............ +
.r>: /
/
I
I Deposit Rate
RGTBR
rr./YEARJ
It could well be that these four effects over-compensate for the shortage
of funds, at which point they will act so as to reduce excessive funds. One
suspects that, since the delays in the system are relatively long, the effect
may be to reinforce any cyclical effects, such as the business cycle, in the
exogenous inputs .
Figure S.5B shows a positive loop which acts to reinforce shortages or
surpluses of funds. Whenever rates rise because funds are low, more inter-
est has to be paid to depositors, thus driving funds further down. The
society hopes that this will be more than compensated for by the influx of
new funds through Loop 1, and the other negative effects in the system.
This positive loop shows how very careful one has to be in formulating
models. Does all the cash in the society belong to depositors, or is some
of it 'profit' due to the mortgage rate being higher than the deposit rate ?
It may be that the cash funds in the society are less than the amount
belonging to depositors because their funds have been lent out as
mortgages . Legally, all the assets of the society belong to its members, but
both borrowers and depositors are members, and assets may be more than
the funds on deposit. Care would be needed in building a quantitative
model!
Are there any more positive loops?
Solution 8
(a)
CONSR.KL= BASE +STEP(STEP1,STPTM1)-STEP(STEP2,STPTM2)
C BASE=100
C STEP1=50
C STPTM1=15
C STEP2 = -125
C STPTM2=25
D CONSR=(UNIT/WEEK) CONSUMPTION RATE
D BASE=(UNIT/WEEK) BASE VALUE FOR CONSUMPTION
D STEP1=(UNITS/WEEK) HEIGHT OF FIRST STEP
D STPTM1=(WEEK) TIME OF FIRST STEP
D STEP2=(UNITS/WEEK) HEIGHT OF SECOND STEP
D STPTM2=(WEEK) TIME OF SECOND STEP
In general, is better practice , if slightly more effort, to define all constants
explicitly than to write:
R CONSR.KL=100+STEP(50,15)+ .. .
The explicit form allows more flexibility for model experiments and ensures
that all factors have been defined in words, which allows their dimensions to
be more thoroughly checked .
------ ------------- -' - ~~o
/ Disaepondes
/
, /
Building Sociefy
Deo<able ~~~ate _ General lwei
" or Oeoost
+ level of .. ('I./YEAR) ~ - - - __ ~ - Gen.
Ratio. ct ef ol + _
_ - - - - . M.nds .... Interest Rate6 to A - Int erest Rates
GlOiR
/ / -' -
- OlOf < , I / Build;ng SOciefy l'Yo/VEAIl)
, (Q ................ .. funds I ~B~ote
,
... ,. .llIsctepancV I (I)
... ... I FlJjSC LoopS ,
,, / I ( Posilive ) + ...
/
, /
,, / " - .. ~ \+
No<mal Demand Period
I ot ,.. (fIV£AR)
:IOFLOWJ of Interest Rates
AverogeRatio
,, tor Mortgage Cover / AROIR
ReQUted / (I)
, Pf1ICOV I '
,· ~=l
(£/YEAR) 1YfAR) ..
\ I Deposit",,' ,
I " \ I AWH'~g ',
,,, ,,
\ \ DRAf - - _ ~ -
\ - - - - - - - _ _ ' ,_ (YEAR) - -,.. Interest Rate
It +, -, - , ENect O'l Fu>ds
,, +
~" tnnON
··,,
, LJT8nt Demand P,,=~~e -, _$:~+ ,/ I~?>FR
. . . ------_C...'0( Mort00Ql9
·,
~~ ", (~ - (~ "
--
I .. .. ,, '
·,,
I
,..
Average
(£/YEAR)
,,
,,
~ I
"- '
, AMI? , I
"" ~~ ~~
otN8W~ts
l'Yo/VEAR) I
,
..,
+,~ , I ,: (J:8.rl) -:,
, I
.,
, ,, ,,
I " , 8on'OW6t1 ' I Duatlon of ......
~ , A IJfJfOfino I a Stondard "-
.. No<mal ~e
~ ,' ::m : ~ -,
otWlowct
,,
\ ,' (YEAR) : lYE.AR) .... "-
." ,. , N"'N~
++ . . ... ~ (£!YEAR)
+~ I' .. AduOI Rate Rate of Cq::lIta
Building Sode!y +·ct~~ R~ Rate c:A rtIow
Mort~~e. ~~~e of Mort~[rrtere5t
('t./YEAlll Deposit Rate (£/YEAIl)
./~ ,.
",, T ...
... '"
MHELD - - - - - -
\"~~d£7' + II:)
- ' ,
Solution 9
The solution appears on the disk as S9.COS, though the base case behav-
iour in the upper half of Fig. S.9 should be studied first. Clearly, something
is very wrong, as the backlog of parts, PMBLOG, becomes negative at
about TIME=35, and a negative backlog is clearly ludicrous. The reason is
that non-negativity constraints were not built in, and the system's policies
are not able to handle the extreme shock of the drop from a consumption
rate of 150 parts/week to 25.
Again, this illustrates how very careful one has to be with models. It
might well have been decided that the only variables of interest were
CONSR and INV, so if PMBLOG had not been plotted the graphs of those
two variables would look plausible. It is only when one studies the printed
output that errors such as this can be found.
The reader should experiment to find a value of STEP2 which does not
cause negative PMBLOG. That will be the value which is the limit of the
robustness of the stated policies.
Turning to the model itself, none of the equations should present any
difficulty. Note that all variables are to be printed. The equation for PR is
set up, for explanatory purposes, to allow one to switch between the stated
production policy and one which includes a non-negativity constraint.
When the model is run with the latter, the graph in the lower half of Fig. S.9
is produced. If, of course, STEP2 is such that a correct response is obtained,
it does not matter whether MODSW is 0 or l.
Study of the printed values shows that INV and PMBLOG settle at a
value of 125 at the end of the run. Is that correct?
Solution 10
Most of the equations in SlO.COS are fairly straightforward, providing
one works carefully. A good example of the mistakes one can make in
Solutions 391
modelling is that, in developing this model, the author made the typing
errors:
L ASC.K=ASC.J + DT*(TCRJK -CSCR.JK)
N ASC=IASC
N IASC=ACCR*CONVF
Compare with the model to find the correct equations. In both cases the
error was found by COSMIC's dimensional analysis software . It could
have been found by hand checking, though that would have been more
laborious .
Note the inclusion of a mass balance check for tankers chartered and
develop similar check equations for refined products and crude oil. When
the model is run, the value of TCHECK is about 200, which is near enough
to zero when it is realized that cumulative charters amount to some 450 X
106 DWT over the 200 month length of the simulation.
Is 200 months too long? Probably. The period of the oscillation in con-
sumption is 51 months, so a LENGTH of about 100 or 150 should be
enough to show the main dynamics.
The behaviour in Fig. S.lO is for two cases; the base case in the main
model and an alternative of charter durations of only 12 months and the
company attempting to close its shipping gap over 12 months instead of 3.
This is obviously wrong again, as CSTOCK goes negative, reaching a mini-
mum of about -8 X 106 tons.
The reader should try to work out why this happens before reading the
next paragraph. Close study of the graphs, comparing the times at which
peaks and troughs occur, will help.
The reason for the erroneous behaviour is that large amounts of shipping
reach the end of their charters during the first few months of the run. The
company's slower reaction to placing new charters means that shipping
does not reach its peaks until about 10 months after the peaks in the base
case; the oscillations in tanker capacity have been shifted in phase relative
to those in refined stocks (and therefore relative to those in crude stock
consumption) . For this reason, the oscillations in crude stock are much
larger than in the base case and the slower chartering means that the large
fall in crude stocks in the early months is never made up. When SGAT is
left at 3 months, with the shorter charters, the behaviour becomes accept-
able.
Clearly, negative crude stocks should not happen, and it is tempting to
add a non-negativity constraint of the type:
A IPRK=PSDIS.K/PSAT+APCRK
R RPRKL= MIN(IPRK,CSTOCK.K!DT)
D IPR=(PTON/MONTH) INDICATED PRODUCTION RATE
IPR is the rate at which production should take place and RPR will be that
rate or the available stock, whichever is less.
392 Appendix B: System dynamics problems and solutions
Solution 12
For the men, the required change is:
n cost=max(O,iblue- biblue)*upcost+max(O,biblue-iblue)*downcost
If the value of IBLUE chosen in a given iteration exceeds the value,
BIBLUE, from the base case, then the first MAX will operate, and vice
versa. The extension to the rest of the equation is obvious.
Solution 14
This is a relatively trivial problem.
The original objective function was:
a of.k= bpi.k/scale-lOe06*max(0,cost- budget)
Simply add another term :
-lOe06*max(0,men -menlim)
where MEN is the total of IBLUE and IBLRES, parameters which will be
varied in the optimization search, and MENLIM is the total number of men
available.
If there are two manpower limits, those available for the regular force
and those available for reserves, the penalty terms become:
-10e06*max(0,iblue-reglim) -lOe06*max(0,iblres-reslim)
This simple approach can be extended indefinitely; the scope of optimiza-
tion is restricted only by the analyst's insight!
Solution 15
The technique is to define a target to be achieved, such as Blue having
20000 men left at the end of the battle. The objective function then
becomes:
a of.k=cosH 10e06*max(O,tblue- blue.k)
c tblue=20000
The equation for COST will need to be changed so that it is now of the
form:
n cost=iblue*costreg+iblres*costres
and so forth , as all we are concerned with is the minimum cost of a given
Solutions 393
Solution 16
This is very straightforward. Instead of using:
r pr.kl = opr.k +pchan*int((dpr.k - opr.k +0.5*pchan)/pchan)
we write:
a dum.k= opr.k + pchan *int((dpr.k-opr.k+ 0.5*pchan)/pchan)
so that DUM can be printed out as a check that the equations are working
properly and then use:
r pr.kl=sample(dum.k,prodper,dum.k)
d prodper=(week) interval at which production planning decisions
x are made
Solution 17
* Figure s.l7 variable sampling times
note
note file named s17.cos
note
394 Appendix B: System dynamics problems and solutions
Solution 18
It is not possible to write, as one might in FORTRAN, C or Pascal,
a desfam.k=min(desfam.k,tabhl (. . .»
as that requires DESFAM to depend on itself, which prevents the package
sorting the equations into the correct computational sequence.
A possible solution is to store the previous value of DESFAM:
I odesfam.k =odesfam.j+ (dt/dt) (desfam.j-odesfam.j)
d odesfam=(children/family) value of desfam one dt previously
and then to use:
a desfam.k =min(odesfam.k,table( . . .»
Solution 19
* Figure s.19 revised aircraft sortie model
note
note file named s19.cos
note
Most of the model is unchanged from FIG10-11.COS, so only the new
equations need to be explained .
note
note launch rate
note
note the policy switch, POLSW, allows us to change from
note one decision rule to another
note
c polsw=1
To demonstrate the difference between the old policies and the new, a
policy switch is introduced.
Solutions 397
r launch.kl = polsw*clip(sgroup/dt,O,acavail.k,sgroup)
x *pulse(l,wstart,abintvl.k) + (l-polsw)
x *pulse(clip(sgroup/dt,O,acavail.k,sgroup),wstart ,stsint)
The first two lines are the new policy of launching every two hours or as
soon as the required number of aircraft become available . The CLIP tests
for aircraft availability and the PULSE sends a series of Is to allow the
CLIP to work (or not). The frequency of the Is is shown below and is either
the standard interval, STSINT, of 2 hours, or DT, which has the effect of a
continued monitoring of aircraft availability when there were too few to
launch at the last two hour point.
The third and fourth lines are the old policy from Chapter 10.
a abintvl.k= clip(stsint,dt,acavail.k,sgroup )
c stsint=2
The launch interval, ABINTVL, is either 2 hours when aircraft are avail-
able or a continuous check every DT if they are not.
c sgroup=40
The groups have been set to 40 in order to get some clear comparisons
between the two policies. The reader should, of course, experiment with
other group sizes.
note
note record time at which launches took place
note
I ltime.k= ltime.j + (dt/dt)( time.j -ltime.j)*clip(l ,O,launch.jk,sgroup)
n Itime=O
An equation to record the times at which launches took place.
note
note model control and output
note
c dt=O.015625
c length=40
c pltper=O.125 for precision plots
With such a small value of DT, PLTPER must be chosen by experiment to
get reasonable graphs . Run the model with PLTPER=l and observe the
difference in apparent behaviour. This is yet another demonstration of the
inability to debug a model properly from the plotted graphs.
print 8)abintvl,ltime
The new variables are added to the print commands for debugging.
plot acavail= a,oparea = b(O,100)/ltime=c(O,50)
The launch time variable , LTIME, is added to the plots.
398 Appendix B: System dynamics problems and solutions
Solution 20
* Figure s.20 the pharmaceutical company model
note
note file s20.cos
note
note research and product availability
note =================
note
a rrsr.k = ((dpafm.k -pafm.k)/prat+ apir.k) *acpr
The aim is to bring Products Available for Marketing up to a target level
and to replace products being introduced, the effect being expressed as a
desired rate of spending.
c acpr=61
c prat=6
a aspr .k=max(O,drflow.k-aspi.k)
Solutions 399
Actual spending may be less than the desired level. The model makes no
provision for the spending of accumulated balances, an area which the
reader may wish to explore.
note
note product research starts and completions
note
r prsr.kl=aspr.k/acpr
r prcr.kl=delay3(prsr.jk,dres)
note
note products available for marketing
note
1 pafm.k=pafm.j+dt*(prcr.jk- rspi.jk- par.jk)
n pafm=base *dres
c base=15
The pool of Products Available for Marketing is initialized to the base flow
of 15 products per month.
c dres=20
a dpafm.k=apir.k*dres
The target for Products Available for Marketing.
r par.kl = pafm.k/sl
c sl=lO
Products are lost due to the shelf life effect.
note
note product introductions
note ===========
note
a rrspi.k= ((apwr.k*dlife- pam.k )/mpat + apwr.k)*acpi
c mpat=3
A similar concept to that use for Products Available for Marketing.
a aspLk=min((pafm.k/dt)*acpi,min(l,rsr.k*pisf.k)*drflow.k)
The Actual Spending may be increased by a factor affected by Average
Product Age, PISF (see below).
r rspi.kl=aspi.k/acpi
n rspi=base
r rcpi.kl=delay3(rspi.jk,dintro)
c dintro=lO
c acpi=560
1 apir.k =apir.j + (dt/tapi)(rcpi.jk - apir.j)
n apir=rcpi
c tapi=2
400 Appendix B: System dynamics problems and solutions
COSMIC supporting
documentation and software
INTRODUCTION
TRAINING
CONSULTANCY
DOCUMENTATION
All prices for COSMIC and COSMOS include a licence for Prospero FOR-
TRANI, and one copy of the User Manual for each licence. COSMIC and
COSMOS are supplied on 3.5"disks as one integrated package . The licence
fee covers both packages and the royalty we pay to Prospera Software.
Payment may be made in any convertible currency, plus 5% for orders from
outside the UK. Order by official purchase order, or cheque, adding postage
and packing as specified below.
UK orders for software are subject to value added tax (VAT) ; the current
prices (1995) are shown below. The amount should be added to cheque
purchases and a VAT receipt will be sent with the software. Orders from
outside the United Kingdom are not subject to VAT. Multiple copy prices
apply only to orders placed within 90 days of the first order.
Standard licence
First copy £800 (£931.25 including VA 'f2)
Next four copies £500 each (£578.75)
Subsequent copies £350 each (£402.50)
1 Supplied by Prospero Software Ltd, 190Castelnau, London SW13 9DH , UK; telephone 0181
741 8531. The licence covers only those part s of Prospero FORTRAN that are necessary for
COSMIC and COSMOS. A full FORTRAN package is not supplied and there is no FOR-
TRAN manual.
2 Prices allow for the fact that VAT is not charged on documentation.
406 Appendix C: COSMIC supporting documentation and software
sold to any other person and will not be used in the student's subsequent
employment.
DOCUMENTAnON PRICES
The Introductory Guide is free . The User Manual is £50, which will be
deducted from any software purchase made within three months. Equations
for Systems and System Dynamics Problems cost £50 each. VAT is not
charged on documentation.
Postage and Packing for each licence or book are £5 within Europe, £15 in
the rest of the world.
GENERAL
Specification and prices may change without notice. We reserve the right to
decline orders for software and documentation from competitors. For infor-
mation or orders please contact:
INTRODUCTION
The model and influence diagram files on the disk are in compressed for-
mat. To load them, insert the disk in drive A:and type
A:LOAD
408 Appendix D: Using the disk
and press enter. This will create a directory called DIAGS as a subdirectory
of C:. The compressed file of diagrams and the decompression software will
be copied into that directory and the files will then be decompressed after
which the compressed file and the decompression software wil be deleted
from the subdirectory. Similarly, the models will be decompressed into a
subdirectory called MODELS. Finally, the text of Chapter 10 will be copied
into a subdirectory called CHAP10 and will exist as CHAPlO.DOC and
CHAP10.TXT. If you do not wish to use these directory names, you can
amend LOAD. BAT on the disk as you wish. If you are not fully conversant
with DOS get someone to help you.
Users of COSMIC will have to split the models up into groups of not
more than 14 and copy them into directories under the COSMIC main
directory.
Index
Users of COSMIC should replace the exponent **2 in the objective functions
on pages 243, 254, 255 (three occurrences), 280 and 393 with INT(2) and
make the corresponding changes in the models on the disk (FIG8-5M.COS,
FIG9-6.COS and FIG9-12.COS - there is no model on the disk for Problem
15). Users of other packages should consult their manual. Depending on the
package, an execution error may occur with X**N if X is negative and N is
treated as a real number. COSMIC avoids the problem because its INT
function converts real numbers to integers. An alternative approach is to use
the absolute value of X: ABS(X)**N. If the package does not support
exponents, just use ABS(X). If in doubt, try your package and see what
happens, or contact its supplier.