OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xmile message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [xmile] modules


Hi Will,

<of> and <to> are obsolete and were removed, but the spec was never updated.  of and to created a strange situation where the information necessary to initialize the modules is stored in multiple locations, and creates confusing dependency issues.  The connect tags listed inside a module instantiation are a better way to solve the problem - they are effectively dependency injection through constructor parameters.

It is possible I got some of the details wrong - this happened a while ago.  I'm confident someone will speak up if so :)

yours,
Bobby


On Sat, May 31, 2014 at 4:19 PM, Will Glass-Husain <wglass@forio.com> wrote:
Hi,

(apologies for the series of emails -- hopefully not many more).

Regarding modules.  The spec references <of> and <to>.   I can't figure out where these are inserted.   Can anyone explain?

When I make a submodel in iThink, I get something like the following.  (removing display/interface tags).

<?xml version="1.0" encoding="utf-8" ?>
<xmile version="1.0" level="3" xmlns="http://www.systemdynamics.org/XMILE" xmlns:isee="http://iseesystems.com/XMILE">
  <model>
    <module name="Module_1">
      <connect to="price" from=".basePrice" />
      <connect to=".profit" from="revenue" />
    </module>
    <aux name="basePrice">
      <eqn>10</eqn>
    </aux>
    <aux name="profit" access="input">
    </aux>
  </model>
  <model name="Module_1">
    <aux name="price" access="input">
      <eqn>1000</eqn>
    </aux>
    <aux name="revenue" access="output">
      <eqn>price * 10</eqn>
    </aux>
  </model>
</xmile>

This makes sense to me and is captured in the draft xsd file I have.  But (syntactically) where would <of> and <to> go?

best,
WILL






--
William Glass-Husain   /forio  |  +1 (415) 440 7500 x89  |  forio.com




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]