ANNOUNCE Interact XML and DTD samples

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
Anastassios Perdicoulis tasso ut
Junior Member
Posts: 7
Joined: Fri Mar 29, 2002 3:39 am

ANNOUNCE Interact XML and DTD samples

Post by Anastassios Perdicoulis tasso ut »

Posted by Anastassios Perdicoulis <tasso@utad.pt>
Dear friends,

The Interact project website (http://home.utad.pt/~tasso/interact)
already features two sample files: an XML input/output file, and its
accompanying DTD.

I would like to ask for your feedback, please: comments, questions,
ideas, suggestions, etc.

Cheers,
Tasso

-- Anastassios Perdicoulis http://home.utad.pt/~tasso mailto:tasso@utad.pt Posted by Anastassios Perdicoulis <tasso@utad.pt>
posting date Thu, 10 Feb 2005 11:38:50 +0000
Magne Myrtveit magne myrtveit.co
Junior Member
Posts: 2
Joined: Fri Mar 29, 2002 3:39 am

ANNOUNCE Interact XML and DTD samples

Post by Magne Myrtveit magne myrtveit.co »

Posted by ""Magne Myrtveit"" <magne@myrtveit.com>
Hello!

Great that you are woring on an XML specification.
Here are some comments based on your sample:

1) Objects:
I suggest that you define the following object types:

variable
type
unit
submodel
component

Variable is obvious.

Type is used to define array dimensions.
Types are also used to determine the datatype of values (expressions).
Predefined types are real, integer, logical, text. Possibly also complex and
fuzzy.
Types should be possible to define as lists (enumerations), such as north,
south, east, west.

An implicit array dimension is the time dimension of your simulation.
You have put it in the group <simulation>.
I suggest that you define it as a predefined type 'horizon'.
An exmaple of a valid horizon is this:
<object>
<name>horizon</name>
<type>type</type>
<formula>date(2005) to date(2020) step 1 year</formula>
</object>

An unit object makes i possible to define custom units.
SI units should be predefined.

Submodel and component are used for creating hiearchy and re-usable
structures.

2) Languages
I suggest that you add a language tag (at the system level) for your model,
identifying the native language of the identifiers.
Use the ISO-standard with two-letter acronyms for each language, e.g. en
(English), nn (Nynorsk).
Allow for translation tables (multiple language versions per object).

3) Stocks
I suggest that you put the entire definition into <formula>...</formul>, and
that you use a format that allows the parser to identify the initial and
each flow. Here is my proposal:
<formula>
<stock>initial</stock>
<inflow>expression</inflow>
...
<outflow>expression</outflow>
...
</formula>
Hence, you can have zero or more inflows or outflows, in addition to the
inital value of the stock.
The reason I use <stock> here is that if there are no flows, we still may
want to see the variable as a stock.

4) Variable types
Only one. Let the <formula> section determine particularities.

5) Units of expressions
Let units be part of the <formula>. There is no need for a separate <unit>
section of an <object>.

I did not fully understand <sim points> and <iteration values>.

Why not rename <comments> to <documentation>. [Specification of what the
object does]
And add an extra <remark>. [Something to be aware of, for example regarding
bugs or limiations]

Well, that's it for now.

Good luck on your work!

Regards,
MagnePosted by ""Magne Myrtveit"" <magne@myrtveit.com>
posting date Thu, 10 Feb 2005 14:53:14 +0100
John Gunkler jgunkler sprintmail
Member
Posts: 30
Joined: Fri Mar 29, 2002 3:39 am

ANNOUNCE Interact XML and DTD samples

Post by John Gunkler jgunkler sprintmail »

Posted by ""John Gunkler"" <jgunkler@sprintmail.com>
I'm no XML coding expert, but shouldn't both the <iteration_values> and the
<sim_points> be computed from other data already provided, rather than
having to be entered directly?

Posted by ""John Gunkler"" <jgunkler@sprintmail.com>
posting date Thu, 10 Feb 2005 09:33:29 -0600
Bill Harris bill_harris facilita
Junior Member
Posts: 19
Joined: Fri Mar 29, 2002 3:39 am

ANNOUNCE Interact XML and DTD samples

Post by Bill Harris bill_harris facilita »

Posted by Bill Harris <bill_harris@facilitatedsystems.com>
Tasso,

Thanks for getting this going!


>> I would like to ask for your feedback, please: comments, questions,
>> ideas, suggestions, etc.


Take my comments as from a relative novice at xml and all the associated
technology.

The <about/> tag seems related to the <bookinfo/> tag from DocBook.
What about making it the same except calling it <modelinfo/>?

Even if you only do SD modeling with this today, what about somehow
making that explicit so that others can perhaps augment it with other
modeling paradigms? I'm not quite sure how to suggest that. You could
change <model/> to <sdmodel/>, but that would seem to restrict a file to
one type of model or another or at least to limit their interconnection.
Lifting a lesson from Paul Fishwick's multimodeling, I could see someday
someone linking from a finite state machine to one of several different
SD models, for example, so I'm thinking of ways to represent their
interconnection. He may have some ideas, too.

You'll need a way to represent nonlinearities. I wonder if we're best
served with the DYNAMO formulation we've had (it has served well for
quite a few years) or if some other approach might be more general and
useful.


>> The Interact project website (http://home.utad.pt/~tasso/interact)
>> already features two sample files: an XML input/output file, and its
>> accompanying DTD.


At the end of the day, what about using trang to generate a RelaxNG
schema from the DTD? Schemas look a bit easier to work with, and
nxml-mode (a really useful tool so far) seems to work with schemas, not
dtds.

My initial thoughts, at least.

Bill
- --
Bill Harris 3217 102nd Place SE
Facilitated Systems Everett, WA 98208 USA
http://facilitatedsystems.com/ phone: +1 425 337-5541
Posted by Bill Harris <bill_harris@facilitatedsystems.com>
posting date Fri, 11 Feb 2005 18:41:32 -0800
Anastassios Perdicoulis tasso ut
Junior Member
Posts: 7
Joined: Fri Mar 29, 2002 3:39 am

ANNOUNCE Interact XML and DTD samples

Post by Anastassios Perdicoulis tasso ut »

Posted by Anastassios Perdicoulis <tasso@utad.pt>
Hi!

The XML contains both input and output data (that's why it's called an
""I/O file""). These shall be marked in a future version of the DTD and
its documentation. The data groups you are indicating are both output
sets.

Thanks for checking this out!
Cheers,
TassoPosted by Anastassios Perdicoulis <tasso@utad.pt>
posting date Mon, 14 Feb 2005 14:55:18 +0000
Anastassios Perdicoulis tasso ut
Junior Member
Posts: 7
Joined: Fri Mar 29, 2002 3:39 am

ANNOUNCE Interact XML and DTD samples

Post by Anastassios Perdicoulis tasso ut »

Posted by Anastassios Perdicoulis <tasso@utad.pt>
Dear Bill, hi!

Many thanks for your comments - once again!


>> The <about/> tag seems related to the <bookinfo/> tag from DocBook.
>> What about making it the same except calling it <modelinfo/>?


The root tag is <system />, so this <about /> is really about the
system. I'd be more inclined to call it <meta /> or <preamble />,
perhaps.


>> Even if you only do SD modeling with this today, what about somehow
>> making that explicit so that others can perhaps augment it with other
>> modeling paradigms? I'm not quite sure how to suggest that. You could
>> change <model/> to <sdmodel/>, but that would seem to restrict a file to
>> one type of model or another or at least to limit their interconnection.
>> Lifting a lesson from Paul Fishwick's multimodeling, I could see someday
>> someone linking from a finite state machine to one of several different
>> SD models, for example, so I'm thinking of ways to represent their
>> interconnection. He may have some ideas, too.


So far, the only assumption in Interact has been that the <model /> is
made, or exists, within the (context of a) <system />. If the system
declaration does not restrict the connections with other modelling
efforts, I should think the possibilities are still open.

Maybe Paul has something to say about this?

>> You'll need a way to represent nonlinearities. I wonder if we're best
>> served with the DYNAMO formulation we've had (it has served well for
>> quite a few years) or if some other approach might be more general and
>> useful.


At the moment I'm investigating the options that Java offers in its math
package. Even better than that, I'm getting ideas from Maple. Would you
or Paul have any suggestions?

>> At the end of the day, what about using trang to generate a RelaxNG
>> schema from the DTD? Schemas look a bit easier to work with, and
>> nxml-mode (a really useful tool so far) seems to work with schemas, not
>> dtds.


>From what I've read and thought about, DTD is the better option among
the two - at least for Interact. A DTD with rich comments is not as
repulsive as the sample I've put together ;) I'll do that in the near
future, and then extract DTDDoc out of that, which is rather appealing.

Once again, many thanks for your help!
Tasso

-- Anastassios Perdicoulis http://home.utad.pt/~tasso mailto:tasso@utad.pt
Posted by Anastassios Perdicoulis <tasso@utad.pt>
posting date Wed, 16 Feb 2005 11:08:02 +0000
Locked