Text Based SD software

This forum contains all archives from the SD Mailing list (go to http://www.systemdynamics.org/forum/ for more information). This is here as a read-only resource, please post any SD related questions to the SD Discussion forum.
Locked
"geoff coyle"
Senior Member
Posts: 94
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by "geoff coyle" »

Dear All,

A reply to Petrides, which may be of general interest.

What an interesting comment though I suppose that I am biased as I directed
the development of DYSMAP (Dysmap2 is a version developed by Salford
University under the direction of Brian Dangerfield) and I enhanced DYSMAP
to turn it into COSMIC.

Before I answer his excellent points, youll have to bear with me for a bit
of history.

Most folk do not realise that Jay had THREE brilliant insights when he
originated SD: that control theory ideas could be applied to socio-economic
systems; that simulation was the right approach; that EFFECTIVE simulation
required a clear syntax, the ability to understand the model and the
necessity of detailed checking of the output. That was beautifully expressed
in DYNAMO by Jack Pugh who, for my money, is one of the unsung giants of SD.

When we started to develop DYSMAP in 1972 we set out to be as compatible as
possible with DYNAMO (the only reason we developed it at all was that
DYNAMO, at that time, only ran on IBM computers, so DYSMAP was the first
machine-portable software). One addition which we made was software for
dimensional analysis, in 1975! DYSMAP and COSMIC now, of course, run on PCs
under Windows with all sorts of facilities such as very easy parameter
changes and re-runs. COSMIC also has optimisation, which we implemented in
about 1978, some 20 years in advance of anyone else. Im not sure Id call
this software ancient, Classical is nearer the mark. My book has a
comparative review of ancient and modern software.

The colossal strengths of the DYNAMO/DYSMAP/COSMIC structure are as follows:

FIRST, the equations are typed in (and, contrary to belief, ithink et al do
NOT write the equations, apart from the levels, you still have to enter the
most of the equations manually or by mouse but only after icons have been
drawn on the screen). The DYNAMO-type text file allows the equations to be
entered in any order that one wishes and that order should be the one you
understand most easily. That order is always maintained so the model is VERY
easy to check. We have to remember that the model is the equations, it is
not the stock/flow diagram!!! By contrast, I recently reviewed a model
written in one of the modern packages. All the levels were at the
beginning in alphabetical order, then we had all the auxiliaries (that
software does not distinguish between rates and auxiliaries) and finally all
the parameters and tables. It was not a very big model but I had great
trouble making any kind of sense of it. Its author kept trying to make me
look at the screen diagram and could not understand that it is the equations
which drive the dynamics, not the diagram.

SECOND, the equations can be printed out, on paper, in a properly documented
form so that they are easy to review and to explain.

THIRD, and perhaps most important, the DYNAMO-type structure allows one, in
fact encourages one, to create simple, clear tables of model output so that
one can check that the output is what should be emerging. It is absolutely
impossible to verify a models arithmetical correctness by looking at graphs
on a screen, though I see many people trying to do that. For instance, one
of the equations in the model Ive just mentioned was producing a value of
0.34 when the real answer should have been about 100. In short, that model
had an error of a factor of 300 which its author had simply not seen. You
might say that she was incompetent but I have seen this type of error time
and time again. Modern software does create tables which, personally, I find
hard to read, but I have seen many people who either do not know that the
facility exists or do not bother to use it.

Petrides actually says all this at much less length and he is right. Where
he is wrong is in suggesting that the equations can be written automatically
from the icons. Modelling is a thought process and cannot be automated in
that way (there is, I think, a rather neat trick for doing it another way
but I am not a good enough programmer to write it).

I really hope that the vendors of the modern software do not jump all over
me and say that their product does all these things (still less reach for
their lawyers over matters of history and opinion). Of course, ithink,
Powersim and Vensim calculate correctly from what they are given and, in the
hands of an expert, allow good models to be built. I just think that they
make it rather harder for the novice to get started than DYNAMO did and I
also see far too many rubbish models built (thrown together) by people who
think that they understand SD because they have half read a software manual
and not spent the time to CHECK their models. However, what do I know about
SD?

Geoff
From: "geoff coyle" <
geoff.coyle@btinternet.com>
"geoff coyle"
Senior Member
Posts: 94
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by "geoff coyle" »

Not sure that I agree with Bills argument. The need seems to me to be for
SIMPLICITY and CLARITY, which is what the text-based softwares provide.
Bills mention of code development tools is, to my, somewhat off the mark as
the task is to model, not to write code.

Someone mentioned icons on the screen and ? when an equation has not yet
been written. I knew that and Ive used it but it really does make a simple
task into a complex and laborious one, at least to my way of thinking. In
DYNAMO and the other text-based modelling tools, one types an equation and
can add notes and documentation in the file. Thats all.

In an iconic package, one has to:

Place an icon on the screen,

Connect it to other icons,

With anything but the very simplest model, fiddle about with the icons and
connectors to get a diagram which does not look like a plate of spaghetti in
a bad temper,

Type in most of the equations, or create them by using a mouse.

By my count that is five tasks, some laborious and unproductive, when a
single simple one is all that is needed.

I wont rehearse the arguments about preservation of equation order and ease
of detailed checking. I will, though, mention that since I retired about
four years ago (and very early it was) I have reviewed a considerable number
of models from many sources. With some exceptions, they were replete with
errors. Rate-dependent rates abound (I wonder how many people who call
themselves SD modellers know why that is a fundamental SD error).
Dimensional errors flourish. Even simple arithmetical errors occur quite
frequently. One instance is a model (mess is nearer the mark) which is
supposed to represent a type of production in which waste occurs. Its output
showed that there was, say, 75% of good product but with 0% waste. Were
that to be possible, Id like to have shares in that company. It is not, so
I shudder to think of the quality of advice being tendered to that client. I
could write reams of similar examples.

At the risk of being thought old-fashioned, Id rather see us going back to
some old and well-founded ideas as opposed to seeking more software
complexity.

Geoff Coyle
From: "geoff coyle" <
geoff.coyle@btinternet.com>
Jennifer Andersen
Newbie
Posts: 1
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by Jennifer Andersen »

Please allow me to clarify some information regarding Powersim software
capabilities. Most responding to this query are still using Powersim
Constructor, I believe, and Powersim (the company) has now released Powersim
Studio Enterprise 2001. While I believe the people referring to "Powersim"
are correct with regards to Constructor, Studio addresses many of the points
made thus far.

>From Geoff Coyle:
The colossal strengths of the DYNAMO/DYSMAP/COSMIC structure are as follows:

FIRST, the equations are typed in (and, contrary to belief, ithink et al do
NOT write the equations, apart from the levels, you still have to enter the
most of the equations manually or by mouse but only after icons have been
drawn on the screen). The DYNAMO-type text file allows the equations to be
entered in any order that one wishes...

Studios equations view can be toggled on or off and it allows for
simultaneous viewing of the diagram sheets and the equations. Variables can
be added in the equations view and one can define them by typing the
definitions. It is not necessary to draw the icons on the screen first.
Equations can also be entered in any order. Variables can then be dropped
into one or more diagram sheets (organized like Excels worksheets, in tabs
across the bottom of the diagram window). In this way Studio highlights what
is actually "the model." Using the diagram sheets, one can create different
views of the same model depending on the intended audience. Variables can
appear in all or none of the diagram sheets and can appear with or without
links between them, because the model is, after all, the equations. DELETING
a variable from one sheet, however, deletes it from the equations and hence
the model. EXCLUDING a variable, on the other hand, removes it from that
sheet only.

The diagram sheets also address Tom Fiddamans point:
Also, a hyperlinked text listing is a great way to browse a model
thats too big to fit in a single view.

The sheets do exactly that, allowing one to split up the model into many
views. Studio also has hyperlinks which can connect sheets, link to a mail
program, an internet page or a file.

Tom Fiddaman also wrote:
Even in the absence of standards, text formats are useful. Its vastly
easier to change all instances of "meters/second" to "miles/hour" in a
model using text search & replace than by manual editing of one equation at
a time.

Studios unit-checking capabilities allow one to change units of levels and
constants, and then the rest of the model will be updated to reflect the
change. This is because units are defined either in a local model or
globally for all models in a project. Studios files are designated *.sip
for Simulation Project, meaning more than one model can be contained in a
file. Further, unit-checking, while it can be turned off, helps the modeler
think through the modeling process.

Bill Braun wrote:
As Geoff guessed, when one drops an SD object on the desktop using
Powersim, it is an "empty vessel". In fact, right at creation time the
object contains a question mark to indicate that it does not contain an
equation. Further, the model cannot be run with any object that has a
question mark (i.e., no equation.)

Studio allows the model to be run even though one or more variables are
undefined. The program calculates all equations it can and generates
whatever behavior results from what is defined.

Also from Tom Fiddaman:
What I find
more useful is the ability (e.g. in Vensim) to manually construct a diagram
from an existing equation listing, with some assistance from the software.

One can accomplish this in Studio as well. As mentioned earlier, variables
can be dragged from the equations list and dropped onto one or more diagram
sheets. Hash marks appear inside the variables when variables in the same
sheet are linked in their equations but not in the diagram. Going the other
way, if a variable is not used in another variables equation, but is linked
to it in the diagram, a hash mark appears over the link symbol. Studio also
has "find" functionality that enables one to find variables in all sheets
based on name, a variable used to define another, or a problematic
(undefined) variable of another.

Studio has many more features that may be of general interest, but I feel
continuing now would be to toot our horn a little too loudly. At the same
time, it is worth repeating Geoff Coyles opinion that there are a lot of
messes out there and simply relying on more software complexity will not by
itself correct this. We have seen models created even by well-respected SD
people which have needed some "correcting" when converted to the Studio
environment with unit-checking on. It is still easy to make bad SD models
despite the many exciting developments in software.

Jennifer Andersen
Consultant
Powersim AS, Norway
jennifer.andersen@powersim.no
Tom Fiddaman
Senior Member
Posts: 55
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by Tom Fiddaman »

One of the problems with translators is that writing them requires
understanding the language on each end. Because there isnt a lot of call
for model reuse (another topic worth discussing) there isnt much
commercial incentive for developers to get together or learn one anothers
nitty gritty details. The situation might be better if there were a neutral
ground - a sort of model XML - so that at least one end of the translation
could rely on an stable open standard.

Even in the absence of standards, text formats are useful. Its vastly
easier to change all instances of "meters/second" to "miles/hour" in a
model using text search & replace than by manual editing of one equation at
a time. Also, a hyperlinked text listing is a great way to browse a model
thats too big to fit in a single view. For an example, see
http://www.people.hbs.edu
oliva
esearch/service/documentation.html

Personally, I think manual translation is a great way to get to know and
debug a model, so the current Babel situation doesnt bother me much.

Tom

****************************************************
Thomas Fiddaman, Ph.D.
Ventana Systems http://www.vensim.com
8105 SE Nelson Road Tel (253) 851-0124
Olalla, WA 98359 Fax (253) 851-0125
Tom@Vensim.com http://home.earthlink.net/~tomfid
****************************************************
Bill Braun
Senior Member
Posts: 73
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by Bill Braun »

As Geoff guessed, when one drops an SD object on the desktop using
Powersim, it is an "empty vessel". In fact, right at creation time the
object contains a question mark to indicate that it does not contain an
equation. Further, the model cannot be run with any object that has a
question mark (i.e., no equation.)

Objects are double-clicked where upon an equation can be entered. Powersim
also has an Equations View. It distinguishes flows from auxiliaries and the
equations can be sorted in a variety of way. Equations can be edited from
either the Diagram View of the Equation View.

Bill Braun
From: Bill Braun <medprac@hlthsys.com>
Bill Harris
Senior Member
Posts: 75
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by Bill Harris »

Tom Fiddaman
Senior Member
Posts: 55
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by Tom Fiddaman »

At 09:58 AM 12/6/2001 -0500, you wrote:
>Lazaros Petrides asks for text-based SD software that does "an automatic
>translation of flow diagrams into dynamo code and vice-versa."

The real obstacle to literal translation from flow diagrams into equations
is that a causal loop or stock-flow diagram contains only a tiny fraction
of the information you need to make a model that really works. What I find
more useful is the ability (e.g. in Vensim) to manually construct a diagram
from an existing equation listing, with some assistance from the software.

Going the other way, I suspect that the problem of converting an equation
listing into a useful diagram is computationally intractable. However,
there are some interesting graph theoretic approaches to extracting
feedback loops, trees of influence, etc. from an equation structure.
Articles in past conference proceedings by Jim Burns, Rogelio Oliva, and
Christian Kampmann have all tackled bits of this problem.

Tom

****************************************************
Thomas Fiddaman, Ph.D.
Ventana Systems http://www.vensim.com
8105 SE Nelson Road Tel (253) 851-0124
Olalla, WA 98359 Fax (253) 851-0125
Tom@Vensim.com http://home.earthlink.net/~tomfid
****************************************************
Bob L Eberlein
Junior Member
Posts: 3
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by Bob L Eberlein »

Having come out of MIT in the 80s and grown up on DYNAMO it has been
interesting to watch new generations of modelers adapt to new tools.
There is some value to forcing people to suffer through direct equation
writing and there is also value in forcing people to think hard about what
they want to accomplish with a single simulation run. But that value
needs to be weighed against the accessibility of the tools and the speed
with which things can be done. Ironically, the weak links is still the
effort required to gain a solid conceptual understanding of what the
modeling is all about.

It is also true that there are useful organizing principles around the
ordering and presentation of equations, and that is the reason that
Vensim maintains equation order even when switching between the iconic
and textual model representations. However, as much as I worried about
getting this right, as far as I can tell very few people actually consider
it important. I suspect this is a largely left brain
ight brain thing with
most people feeling much more comfortable with the organizational principles
imparted by a diagram.

I amd pretty agnostic on iconic/textual issue (and on the Causal Loop/
Stock-Flow debate which is closely related). But I do think that Geoff
points out a legitimate problem of having the focus go to asthetics to
the detriment of good quality results. Getting things to look nice is
very important for communication and persuasion but giving good answers
is also important. There needs to be a balance of effort here and I
would side with Geoff in encouraging people to put more of the effort
into the technical side.


Bob Eberlein
bob@vensim.com
"Jim Hines"
Senior Member
Posts: 88
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by "Jim Hines" »

A slight clarification of Bill Harris statement about Vensims equations
and views.

Vensims views and equations are **always** synchronized. A new variable
created in the equation editor will "magically" appear on any view that has
equations that directly use the new variable. (The variable wont appear
automatically on views that dont use the new variable -- which seems to
make sense).

FWIW, creating a new view in Vensim from equations is pretty fast -- Vensim
helps, even if it doesnt completely automate the task. Completely
automatic layout would be nice -- but not high on my wish list.

Jim Hines
jhines@mit.edu
"John Gunkler"
Member
Posts: 31
Joined: Fri Mar 29, 2002 3:39 am

Text Based SD software

Post by "John Gunkler" »

Okay, Ill risk humiliation by responding in favor of graphics-based SD
software. Geoff Coyles complaints, ending with "By my count that is
five tasks, some laborious and unproductive, when a single simple one is
all that is needed." sound a lot like Andy Rooney complaining about
having to make the transition from high-button shoes to laced ones.
"The ends of the laces can come off. Theyre called aglets -- must
future generations of shoe-tiers learn that term? And do you do right
over left first or left over right? With buttons its so simple. Each
button works just like the others."

To the five steps: Place an icon on the screen? That seems quite
productive of clarity and the ability to communicate what the model
is about. Connecting icons, e.g., an auxiliary to a rate? I find
that clients (whether theyre capable of creating an SD model or not)
find it quite useful to be able to see such connections. Fiddle
with the diagram to make it clear? Didnt the very first models
published by Jay Forrester come with diagrams that had to be "fiddled"
with? Did Dr. Forrester find it a waste of time to make them easy to
follow? Type in the equations? Sounds just like writing a DYNAMO
model to me.

And Im not sure what Geoff is talking about when he mentions
rate-dependent rates -- STELLA/ithink and most other packages wont let
you run a model with "circular" rate references.

If creating a software program that gets the numbers right were the
whole task, I would have more sympathy with these complaints. But, I
submit, that is far from the case. That would be like a physician
forming a correct diagnosis and then not telling the patient about it
nor implementing any treatment.

I do find DYNAMO equations to be "simple" in much the same way that the
original DOS software interface was "simple" -- with a blank screen and
"C:>" flashing in the upper left corner. Simple but daunting. The
Xerox PARC/Apple graphical interface, now universally adopted by
Microsoft in Windows OSs, has opened the use of computers to nearly
everyone. Do all these new users become ace programmers? Of course not
-- but why should they? There are other benefits from computer use than
learning to program.

That said, Ill admit that there are improvements needed in
graphics-based SD software to address some of Geoffs concerns. I was
pleased that the latest versions of STELLA/ithink finally have the
capability of doing dimension checking -- but its still awkward, is not
very smart about alternate ways of naming the same dimension, and
because its so difficult and is treated as an afterthought the software
encourages modelers not to include dimensions. But I dont see the
connection between the use of graphics-based software and the kinds of
errors Geoff is seeing. DYNAMO modelers can make arithmetic errors,
too, cant they?

John
From: "John Gunkler" <
jgunkler@sprintmail.com>
Locked