Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add examples from the spec #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions xmile-v1.0-cs01-examples/arrays.xmile
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--

XML Interchange Language for System Dynamics (XMILE) Version 1.0
OASIS Committee Specification 01
29 October 2014
Copyright (c) OASIS Open 2014. All rights reserved.
Source: http://docs.oasis-open.org/xmile/xmile/v1.0/cs01/examples/
-->
<xmile version="1.0" xmlns="http://docs.oasis-open.org/xmile/ns/XMILE/v1.0">

<header>
<options>
<uses_arrays max_dimensions="2" invalid_index_value="NaN"/>
</options>
<product version="1.0" lang="en">Acme Constructor</product>
<vendor>Acme Software</vendor>
<created>2014-05-10</created>
<name>Arrays</name>
<caption>
This model is used to validate simple array syntax.
</caption>
</header>

<sim_specs>
<start>0</start>
<stop>10</stop>
<dt>1.0</dt>
</sim_specs>

<dimensions>
<dim name="products" size="3" />
<dim name="regions">
<elem name="north" />
<elem name="south" />
</dim>
</dimensions>

<model>
<variables>
<aux name="single dim var apply to all">
<dimensions>
<dim name="products" />
</dimensions>
<eqn>20</eqn>
</aux>
<aux name="multi dim var apply to all">
<dimensions>
<dim name="products" />
<dim name="regions" />
</dimensions>
<eqn>20</eqn>
</aux>
<aux name="single dim var non apply to all">
<dimensions>
<dim name="products" />
</dimensions>
<element subscript="1">
<eqn>20</eqn>
</element>
<element subscript="2">
<eqn>20</eqn>
</element>
<element subscript="3">
<eqn>20</eqn>
</element>
</aux>

<aux name="graphical not_apply_to_all">
<dimensions>
<dim name="products" />
</dimensions>
<element subscript="1">
<gf>
<xscale min="1" max="9" />
<ypts>0,50,25</ypts> <!-- implied y scale from 0-50 -->
</gf>
</element>
<element subscript="2">
<gf>
<xscale min="1" max="9" />
<yscale min="0" max="100" />
<ypts>90,10,50</ypts>
</gf>
</element>
<element subscript="3">
<gf>
<xscale min="1" max="9" />
<yscale min="0" max="100" />
<ypts>90,10,50</ypts>
</gf>
</element>
<eqn>TIME</eqn>
</aux>

</variables>
</model>
</xmile>
287 changes: 287 additions & 0 deletions xmile-v1.0-cs01-examples/corporate-growth.xmile
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--

XML Interchange Language for System Dynamics (XMILE) Version 1.0
OASIS Committee Specification 01
29 October 2014
Copyright (c) OASIS Open 2014. All rights reserved.
Source: http://docs.oasis-open.org/xmile/xmile/v1.0/cs01/examples/
-->
<xmile version="1.0" xmlns="http://docs.oasis-open.org/xmile/ns/XMILE/v1.0" xmlns:isee="http://iseesystems.com/XMILE">
<header>
<options namespace="std, isee" />
<name>CorpGrowth</name>
<uuid>f7921add-36a7-4fa9-a651-4b3dfaee6d64</uuid>
<vendor>isee systems, inc.</vendor>
<product version="10.0.5" lang="en">STELLA</product>
</header>
<style font_family="Arial" font_size="8">
<stock color="blue" font_color="blue" />
<flow color="blue" font_color="blue" />
<aux color="blue" font_color="blue" />
<module color="blue" font_color="blue" />
<connector color="#FF007F" />
</style>
<sim_specs method="Euler" time_units="Months">
<start>0</start>
<stop>100</stop>
<dt>0.125</dt>
</sim_specs>
<model>
<variables>
<stock name="Sales\nForce">
<eqn>10</eqn>
<inflow>net_hires</inflow>
<non_negative />
<units>people</units>
</stock>
<flow name="net_hires">
<eqn>(indicated_sales_force - Sales_Force)/sales_force_adjustment_time</eqn>
<units>person/mo</units>
</flow>
<aux name="sales_force\nadjustment_time">
<eqn>20</eqn>
<units>months</units>
</aux>
<aux name="indicated\nsales_force">
<eqn>budget/sales_person_salary</eqn>
<units>people</units>
</aux>
<aux name="budget">
<eqn>orders_booked * revenue_to_sales</eqn>
<units>$/Month</units>
</aux>
<aux name="revenue\nto_sales">
<eqn>10</eqn>
<units>$/SKU</units>
</aux>
<aux name="sales_person\nsalary">
<eqn>2000</eqn>
<units>$/Person-Month</units>
</aux>
<aux name="orders\nbooked">
<eqn>Sales_Force * sale_effectiveness</eqn>
<units>SKU/Month</units>
</aux>
<aux name="sale\neffectiveness">
<eqn>normal_sales_effectiveness * effect_of__delivery_delay_recognized</eqn>
<units>SKU/Person-Month</units>
</aux>
<aux name="normal\nsales_effectiveness">
<eqn>350</eqn>
<units>SKU/Person-Month</units>
</aux>
<aux name="effect_of__delivery_delay_recognized">
<eqn>Delivery_Delay_Recognized/normal_delivery_delay_recognized</eqn>
<gf>
<xscale min="0" max="3" />
<yscale min="0.3" max="1.15" />
<ypts>1.15,1.1,1,0.75,0.5,0.35,0.3</ypts>
</gf>
<units>Unitless</units>
</aux>
<aux name="normal_delivery\ndelay_recognized">
<eqn>2</eqn>
<units>months</units>
</aux>
<stock name="Delivery\nDelay\nRecognized">
<eqn>2</eqn>
<inflow>change_in_delivery_delay_recognized</inflow>
<non_negative />
<units>months</units>
</stock>
<flow name="change_in\ndelivery_delay\nrecognized">
<eqn>(delivery_delay_impending - Delivery_Delay_Recognized) / time_for_delivery_delay_recognition</eqn>
</flow>
<aux name="time_for\ndelivery_delay\nrecognition">
<eqn>5</eqn>
<units>months</units>
</aux>
<aux name="delivery\ndelay_impending">
<eqn>Backlog / delivery_rate</eqn>
<units>months</units>
</aux>
<stock name="Backlog">
<eqn>8000</eqn>
<inflow>orders_entered</inflow>
<outflow>orders_completed</outflow>
<non_negative />
<units>SKU</units>
</stock>
<flow name="orders\nentered">
<eqn>orders_booked</eqn>
<non_negative />
<units>sku/mo</units>
</flow>
<flow name="orders\ncompleted">
<eqn>delivery_rate</eqn>
<non_negative />
<units>sku/mo</units>
</flow>
<aux name="effect_of_backlog\non_delivery_rate">
<eqn>Backlog / normal_backlog</eqn>
<gf>
<yscale min="0" max="10" />
<xpts>0.9,1,1.7,2.3,3.5,6.3,10,20</xpts>
<ypts>0,1,3.5,4.3,5,5.6,6,6.5</ypts>
</gf>
<units>Unitless</units>
</aux>
<aux name="normal\nbacklog">
<eqn>8000</eqn>
<units>SKU</units>
</aux>
<aux name="delivery\nrate">
<eqn>normal_delivery_rate * effect_of_backlog_on_delivery_rate</eqn>
<units>SKU/Month</units>
</aux>
<aux name="normal\ndelivery_rate">
<eqn>4000</eqn>
<units>SKU/Month</units>
</aux>
</variables>
<views>
<view width="1152" height="1502" zoom="139.8">
<stock name="Delivery\nDelay\nRecognized" x="457" y="122" label_side="center" width="45" height="35" />
<stock name="Sales\nForce" x="125" y="129" label_side="center" width="45" height="35" />
<stock name="Backlog" x="381" y="289" label_side="center" width="45" height="35" />
<flow name="net_hires" x="57" y="128" width="18" height="18">
<pts>
<pt x="12" y="128" />
<pt x="103" y="128" />
</pts>
</flow>
<flow name="change_in\ndelivery_delay\nrecognized" x="518" y="118" width="18" height="18">
<pts>
<pt x="557" y="118" />
<pt x="479" y="118" />
</pts>
</flow>
<flow name="orders\nentered" x="313" y="285" width="18" height="18">
<pts>
<pt x="267" y="285" />
<pt x="359" y="285" />
</pts>
</flow>
<flow name="orders\ncompleted" x="463" y="285" width="18" height="18">
<pts>
<pt x="403" y="285" />
<pt x="524" y="285" />
</pts>
</flow>
<aux name="sales_force\nadjustment_time" x="33" y="209" width="18" height="18" />
<aux name="indicated\nsales_force" x="137" y="227" width="18" height="18" />
<aux name="budget" x="226" y="195" width="18" height="18" />
<aux name="revenue\nto_sales" x="221" y="254" width="18" height="18" />
<aux name="sales_person\nsalary" x="82" y="297" width="18" height="18" />
<aux name="orders\nbooked" x="253" y="125" label_side="left" width="18" height="18" />
<aux name="sale\neffectiveness" x="287" y="68" label_angle="295" width="18" height="18" />
<aux name="normal\nsales_effectiveness" x="341" y="110" width="18" height="18" />
<aux name="effect_of__delivery_delay_recognized" x="368" y="35" width="18" height="18" />
<aux name="normal_delivery\ndelay_recognized" x="226" y="34" width="18" height="18" />
<aux name="time_for\ndelivery_delay\nrecognition" x="575" y="52" label_side="right" width="18" height="18" />
<aux name="delivery\ndelay_impending" x="585" y="165" label_side="right" label_angle="41" width="18" height="18" />
<aux name="effect_of_backlog\non_delivery_rate" x="437" y="213" width="18" height="18" />
<aux name="normal\nbacklog" x="354" y="187" width="18" height="18" />
<aux name="delivery\nrate" x="518" y="213" width="18" height="18" />
<aux name="normal\ndelivery_rate" x="575" y="250" width="18" height="18" />
<connector x="229" y="249" uid="0">
<from>revenue_to_sales</from>
<to>budget</to>
</connector>
<connector x="469" y="105" uid="1">
<from>Delivery_Delay_Recognized</from>
<to>change_in_delivery_delay_recognized</to>
</connector>
<connector x="253" y="134" uid="2">
<from>orders_booked</from>
<to>orders_entered</to>
</connector>
<connector x="250" y="133" uid="3">
<from>orders_booked</from>
<to>budget</to>
</connector>
<connector x="585" y="156" uid="4">
<from>delivery_delay_impending</from>
<to>change_in_delivery_delay_recognized</to>
</connector>
<connector x="279" y="72" uid="5">
<from>sale_effectiveness</from>
<to>orders_booked</to>
</connector>
<connector x="359" y="35" uid="6">
<from>effect_of__delivery_delay_recognized</from>
<to>sale_effectiveness</to>
</connector>
<connector x="147" y="112" uid="7">
<from>Sales_Force</from>
<to>orders_booked</to>
</connector>
<connector x="511" y="217" uid="8">
<from>delivery_rate</from>
<to>orders_completed</to>
</connector>
<connector x="219" y="201" uid="9">
<from>budget</from>
<to>indicated_sales_force</to>
</connector>
<connector x="338" y="102" uid="10">
<from>normal_sales_effectiveness</from>
<to>sale_effectiveness</to>
</connector>
<connector x="136" y="218" uid="11">
<from>indicated_sales_force</from>
<to>net_hires</to>
</connector>
<connector x="450" y="106" uid="12">
<from>Delivery_Delay_Recognized</from>
<to>effect_of__delivery_delay_recognized</to>
</connector>
<connector x="523" y="207" uid="13">
<from>delivery_rate</from>
<to>delivery_delay_impending</to>
</connector>
<connector x="81" y="288" uid="14">
<from>sales_person_salary</from>
<to>indicated_sales_force</to>
</connector>
<connector x="108" y="112" uid="15">
<from>Sales_Force</from>
<to>net_hires</to>
</connector>
<connector x="379" y="272" uid="16">
<from>Backlog</from>
<to>effect_of_backlog_on_delivery_rate</to>
</connector>
<connector x="393" y="306" uid="17">
<from>Backlog</from>
<to>delivery_delay_impending</to>
</connector>
<connector x="362" y="191" uid="18">
<from>normal_backlog</from>
<to>effect_of_backlog_on_delivery_rate</to>
</connector>
<connector x="567" y="245" uid="19">
<from>normal_delivery_rate</from>
<to>delivery_rate</to>
</connector>
<connector x="569" y="59" uid="20">
<from>time_for_delivery_delay_recognition</from>
<to>change_in_delivery_delay_recognized</to>
</connector>
<connector x="233" y="30" uid="21">
<from>normal_delivery_delay_recognized</from>
<to>effect_of__delivery_delay_recognized</to>
</connector>
<connector x="30" y="201" uid="22">
<from>sales_force_adjustment_time</from>
<to>net_hires</to>
</connector>
<connector x="446" y="213" uid="23">
<from>effect_of_backlog_on_delivery_rate</from>
<to>delivery_rate</to>
</connector>
</view>
</views>
</model>
</xmile>
Loading