# Advanced Techniques in System Dynamics

Document Sample

```					               Advanced Techniques in System Dynamics

Session 3 Solution Notes

Notes
The solutions here are based on the solution set for assignment 2. Yours will likely have
been somewhat different.
Important: You will see in the solution that RC_COMPARE is never used and
RC_COMPARE_CHECK is used only once. The COMPARE function, while it is has
some natural appeal, is actually not all that practical because it requires the existence of
an up to date base run and also doesn’t always work that well when you move around RC
START TIME. For the most part RC STEP and RC STEP CHECK seem to suffice with
the odd RC RAMP CHECK to handle integration.
Problem Set 3: Reality Check
For this assignment you will need to use the three models world.mdl, raz020.mdl and
raz050.mdl. The world model is documented in Jay Forrester’s book World Dynamics,
though you need not study the model in detail to do this assignment.
In this assignment you are being asked to write Vensim Reality Check statements. Please
use explicit Test Inputs and please name each Reality Check variable RC … and each
Test Input variable TI …
1. (40 points) Using Jay Forrester’s World Dynamics model (world.mdl) translate each
of the following English sentences into a Reality Check statement and put that
statement into the model.
   If there are no people then no new capital will be produced.
   If natural resources disappear deaths will increase and the material standard of
living will decrease, at least for a time.
   If more natural resources are discovered the material standard of living will
increase.
   Higher pollution will increase the death rate.
   More capital will increase the material standard of living.
   More capital will increase pollution.
   Faster pollution absorption will increase the material standard of living.
The model WorldCheck.mdl contains all the statements. They all appear in the final
view.
<Population>                                 RC no people means
TI no people
no c apital produc tion                 <c apital
investment>
TI no res ource
<Natural                                     RC no resource
<deaths>
TI more resource
RC more resourc e                    RC Duration
better living
<Pollution>          TI more pollution        RC more pollution                <material standard
more death                        of living>
<Capital>
TI more capital           RC more capital
better life
RC START TIME
<pollution           TI fast pollution          RC more capital
absorption
time>                absorption                more pollution                   <Pollution>
RC fast pollution
absorption better living
standard

There is nothing elegant about presentation. The nature of Reality Check statements is
that they don’t really look very good on the diagrams.
They statements are provided below Test Input statement followed by the Constraint
statement. One of the Test Input statements (TI More Capital) is repeated – the model
requires only a single definition. It is common to use a single test input in multiple
constraint equations.
In order to test all the statements without causing a floating point error it was necessary to
change the equation for capital ratio to be
Capital ratio = ZIDZ(capital,Population)

It is pretty common to put changes like this in place since many Reality Check statements
do involve putting things to zero. The use of ZIDZ instead of XIDZ is pretty arbitrary for
this statement. Conceptually XIDZ would probably have been a better choice.
      If there are no people then no new capital will be produced.
TI no people:TEST INPUT: Population =RC STEP(Population, 0)
RC no people means no capital production
:THE CONDITION: TI no people:IMPLIES:
capital investment <= RC STEP CHECK(0,
capital investment,0)

This is the only categorical statement included here and the only one that does not use
Duration to stop the checking.
      If natural resources disappear deaths will increase and the material standard of
living will decrease, at least for a time.
TI no resource:TEST INPUT:
Natural Resources = RC STEP(Natural Resources,0)
RC no resource death and bad life:THE CONDITION:
TI no resource:IMPLIES:material standard of living <=
RC STEP CHECK(0, material standard of living,0.7,
RC START TIME,RC Duration) :AND:
deaths >= RC STEP CHECK(0,deaths,1.25,
RC START TIME,RC Duration)

In this Constraint we have made use of an :AND: statement to join two concepts and we
have also use RC Duration (set equal to 5 years) to allow the checking to stop after this
time. Note that when using RC Duration we also need to use RC START TIME
explicitly because that is when we want the checking to start. (If we left off the last 2
arguments the checking would start at RC START TIME anyway).
   If more natural resources are discovered the material standard of living will
increase.
TI more resource:TEST INPUT:
Natural Resources=RC STEP(Natural Resources,2)
RC more resource better living:THE CONDITION:
TI more resource:IMPLIES:material standard of living
>= RC STEP CHECK(0,material standard of living,1.1,
RC START TIME,RC Duration)

Again the improvement in standard of living does not need to continue through the entire
simulation.
   Higher pollution will increase the death rate.
TI more pollution:TEST INPUT:
Pollution = RC STEP(Pollution,2)
RC more pollution more death:THE CONDITION:
TI more pollution:IMPLIES:deaths >=
RC STEP CHECK(0,deaths,1.05,RC START TIME,
RC Duration)
   More capital will increase the material standard of living.
TI more capital:TEST INPUT:Capital = RC STEP(Capital,2)
RC more capital better life:THE CONDITION:
TI more capital:IMPLIES:material standard of living >=
RC STEP CHECK(0,material standard of living,1.2,
RC START TIME,RC Duration)
   More capital will increase pollution.
TI more capital:TEST INPUT:Capital = RC STEP(Capital,2)
RC more capital more pollution:THE CONDITION:
TI more capital:IMPLIES:Pollution >=
RC RAMP CHECK(0,Pollution,1.2,RC Duration,
RC START TIME,RC Duration)

Here we use a RAMP on the check side because pollution needs to accumulate.
   Faster pollution absorption will increase the material standard of living.
TI fast pollution absorption:TEST INPUT:
pollution absorption time =
RC STEP(pollution absorption time,0.5)
RC fast pollution absorption better living standard
:THE CONDITION: TI fast pollution absorption:IMPLIES:
material standard of living >= RC RAMP CHECK
(0,material standard of living,1.01,
RC Duration,RC START TIME,RC Duration)

2. (40 points) Translate the 10 Reality Check concepts from all the questions in the last
assignment into proper Vensim Reality Check statements. You should try to use
explicit Test Inputs. You should be able to write the statements in one model and cut
and paste them to the other model. Test all your Reality Check statements on both
models. Are there any surprises?
Note that in cases where you need to add something to be able to test a Reality Check
Statement add it as a constant and do not connect it to anything. If you have to do this it
almost certainly means the model will fail the check. That is OK.
The solution models are saved as raz020check.mdl and raz050check.msl. It is easies to
first add the statements to raz050, then add the necessary constants to raz020 and copy
and past the entire Reality Check view from raz050 to raz020. For each model a view
named Added Not Connect and a view named Reality Check are included.
Statement: When everyone is a customer we will get no more new customers.
TI no potential customers:TEST INPUT:
Potential Customers = RC STEP(Potential Customers,0)
TI Customer to Market Size:TEST INPUT:
Customers = RC STEP(Market Size,1)
RC no more new customers:THE CONDITION:
TI Customer to Market Size :AND:
TI no potential customers:IMPLIES:new customers
<= RC STEP CHECK(0, new customers, 0)

For this test to make sense we can’t just put customers to market size or potential
customers to 0 we need to do both. This actually means that we need to put structure
around the Test Input and that is unfortunate. Having to change both these things requires
knowledge of model structure and makes this particular Reality Check more model
specific than most.
Statement: If there are no customers sales will stay small.
TI no customers:TEST INPUT:
Customers = RC STEP(Customers,0)
RC no customers low sales:THE CONDITION:
TI no customers:IMPLIES:sales <=
RC STEP CHECK(0,Market Size,0.1)

The test input is easy – no need to change equations. The result we are looking for is
small sales relative to the market size. This one does not expire – we want sales to stay
small. We can’t use small relative to sales because at the beginning, sales are small
anyway.
Statement: If the razor is unbelievably expensive and very low quality sales will be very
near or equal to zero.
TI Quality is low:TEST INPUT:
razor quality = RC STEP(razor quality, 0.0001)
TI Price is high:TEST INPUT:
Razor Price = RC STEP(Razor Price,1000)
RC low quality high price few sales:THE CONDITION:
TI Price is high :AND: TI Quality is low:IMPLIES:
sales <= RC STEP CHECK(0,sales,0.01,
RC START TIME,RC DURATION)

Again there are two different Test Input conditions for this Constraint. Note the use of
RC DURATION – the ratio of sales later in the simulation to earlier can easily be 1E6 in
a model like this. In this case the model might fail the reality check even though all the
right structure was in place.
Statement: The introduction of a copycat razor by a competitor will decrease sales, at
least temporarily.
TI Copycat available:TEST INPUT:
supply of copycat razors = RC STEP(1e+006,1)
RC copycats hurt sales short run:THE CONDITION:
TI Copycat available:IMPLIES:
sales <= RC STEP CHECK(0,sales,0.99,
RC START TIME,RC DURATION)

Two things to note. First the Test Input equation has a number in RC STEP – this is
because the old supply is 0 and 0 * anything is still 0. So we need to use a number.
Second the decease in sales required is quite modest (1%). This is because we are only
checking for a connection – not a strong connection.
Statement: Increased advertising will yield increased sales.
RC more ads more sales:THE CONDITION:
RC STEP CHECK(0,sales,1.01,
RC START TIME,RC DURATION)
Again a fairly small step in sales is required. And again we check only for a short time
since sales tend to go down a lot over time anyway.
Statement: Reducing fixed costs will increase profit, at least in the short run.
TI Lower fixed costs:TEST INPUT:
Fixed cost = RC STEP(Fixed cost,-20)
RC lower cost more profit:THE CONDITION:
TI Lower fixed costs:IMPLIES:
profit >= RC STEP CHECK(0,profit,1.1,
RC START TIME,RC DURATION)

Fixed costs are actually pretty small in the scheme of things, so we make the change quite
extreme (making fixed costs very negative) to be sure we will see the impact. Note that
without this the test is weak because the change in profit from period to period is very big
and swamps +- 1% changes that might be specified here.
Statement: The bigger the market the bigger the sales.
TI Market Size Increases:TEST INPUT:
Potential Customers = RC STEP(Potential Customers,1.1)
RC bigger market more sales:THE CONDITION:
TI Market Size Increases:IMPLIES:
sales >= RC STEP CHECK(0, sales, 1.05,
RC START TIME,RC DURATION)

For this statement we again need to understand a bit about model structure to implement
it correctly. If we were just to change Market Size it would fail because this would just
decrease the fraction. However, changing Potential Customers changes market size and
keeps the fraction logic sound. If the model had been formulated with Potential
Customers = Market Size – customers this would not have been necessary.
Statement: The higher the obsolescence the lower is the drop in sales that results from
market saturation.
This statement is actually very difficult to implement because it talks about the strength
or a relationship between a variable at two different times. Therefore to implement it we
need some way to capture this and I have added the additional variables:
max sales realized= SAMPLE IF TRUE(
sales > max sales realized, sales, sales)
sales ratio=XIDZ(sales,max sales realized,1)

And defined the Reality Check equation using this:
TI more obsolescence:TEST INPUT:
obsolescence time = RC STEP(obsolescence time,0.5)
RC more obsolescence less dropoff:THE CONDITION:
TI more obsolescence:IMPLIES:
sales ratio >=RC COMPARE CHECK('base.vdf',
sales ratio, 0, 1.1,4.9 )

Note that the comparison is not made till very late in the simulation. The complexity
required to enter this Reality Check is very high and it suggest it is not very good. This is
probably true – it is more of an assertion about behavior based on model learning than
anything else.
Statement: Lower sales will decrease revenue.
TI lower razor sales:TEST INPUT:
sales = RC STEP(sales,0.5)
RC lower sales lower revenue:THE CONDITION:
TI lower razor sales:IMPLIES:
total revenue <= RC STEP CHECK(0,total revenue,0.9,
RC START TIME,RC DURATION)

Note that the statement was ambiguous about razor or blade sales – so I did just razor.
Statement: If there are no razors, then there will be no blade sales.
TI no customers:TEST INPUT:
Customers = RC STEP(Customers,0)
RC no razors no blades:THE CONDITION:
TI no customers:IMPLIES:
razor blade demand <= RC STEP CHECK(0,

The Test Input was the one we used before. We don’t explicitly track the stock of razors
in use so customers has to serve to take away razors.
Conclusions:
One important difference of the explicit use of Reality Check statements is that we make
changes part way through a simulation instead of changing something at the beginning.
This is important since changing constants changes the initialization process and gives a
different result than changing things part way in. For the most part, however, the
behavior to behavior statements are not about initial conditions- since these don’t really
exist in life.
An important learning was that the statement about obsolescence was probably not very
fundamental.
An ancillary discovery was that placeholder constants should not be 0 as 0 >= 0*1.1
always and this allows the model to pass Constraints it really shouldn’t. Better to use 1
as a placeholder value.
3. (10 points) Excluding the Reality Check Statements compare the two models in
question two where you have added in the necessary variables to test all the Reality
Check statements. Is the inclusion of extra constants just to be able to accommodate such
Because of the fact that the constants were added to a view called “Added not
Connected” they don’t really do much for model development except to serve as
placeholders for things that should be connected. If we look at this view for
raz020Check it is:
supply of c opyc at
razors
profit

razor quality

Razor Price
demand
spending
total revenue
Fixed c ost

obsoles cence time
Advertising points us at advertising, the profit and cost point us at accounting and the
and when combined with the Reality Check statements including these variables it can
also give us some hints around structure.
Discussion Question.
4. (10 points) What are the advantages of using formal Reality Check statements over
modifications to model structure? What are the disadvantages?
Some improved back and forth – though things still do not read much like a conversation.
The common point that entering Reality Check statements takes a long time is a very
good one. We have, on any given problem we are attacking a limited amount of time. So
it is important that we use the time as wisely as possible. Thinking about Reality Checks
is definitely a cost effective way of coming to grips with the domain of the model.
Actually implementing the checks needs more scrutiny. If you are embarking upon a one-
time problem solving exercise than it probably better spending the time mucking with the
model, the data and the people you need to convince. If the project is long and many
model revisions are expected then at least some up front work is justified.

One thing to point out is that equation reordering is not a disadvantage of formal Reality
Check statements. It is a consequence of the way the underlying behavioral relationships
are articulated. To say this a different way: if you were to try to alter model structure to
test the statement the same reordering would occur. Is this reordering results in a
simultaneous equation then there is some flaw - perhaps in the specification of the
constraint, perhaps in the model proper. The disadvantage in the formal statements is that
this flaw is very difficult to unravel (as opposed to just difficult in model structure is
altered).

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 6 posted: 7/30/2012 language: pages: 10
How are you planning on using Docstoc?