Skip to content

Commit 21aab02

Browse files
authored
Add XMILE test for case insensitive treatment of logical operators. (#93)
1 parent 6a3f4e7 commit 21aab02

File tree

2 files changed

+102
-8
lines changed

2 files changed

+102
-8
lines changed

tests/logicals/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ This model tests the `AND`, `OR`, and `NOT` logicals.
1111
Contributions
1212
-------------
1313

14-
| Component | Author | Contact | Date | Software Version |
15-
|:------------------------------ |:--------------- |:-------------------------- |:------- |:----------------------- |
16-
| test_logicals.mdl | James Houghton | james.p.houghton@gmail.com | 8/28/15 | Vensim DSS 6.3 for Mac |
17-
| output_vensim63dss.csv | James Houghton | james.p.houghton@gmail.com | 8/28/15 | Vensim DSS 6.3 for Mac |
18-
| test_logicals.stmx | Bobby Powers | bobbypowers@gmail.com | 8/29/15 | Stella 10.0.6 for Win |
19-
| output.csv | Bobby Powers | bobbypowers@gmail.com | 8/29/15 | Stella 10.0.6 for Win |
20-
| test_logicals.xmile | Bobby Powers | bobbypowers@gmail.com | 8/29/15 | xmileconv v0.1.0 |
21-
| test_logicals.xmile | Alexey Mulyukin | alexprey@yandex.ru | 4/10/17 | Fix definition |
14+
| Component | Author | Contact | Date | Software Version |
15+
|:----------------------------------- |:--------------- |:-------------------------- |:------- |:----------------------- |
16+
| test_logicals.mdl | James Houghton | james.p.houghton@gmail.com | 8/28/15 | Vensim DSS 6.3 for Mac |
17+
| output_vensim63dss.csv | James Houghton | james.p.houghton@gmail.com | 8/28/15 | Vensim DSS 6.3 for Mac |
18+
| test_logicals.stmx | Bobby Powers | bobbypowers@gmail.com | 8/29/15 | Stella 10.0.6 for Win |
19+
| output.csv | Bobby Powers | bobbypowers@gmail.com | 8/29/15 | Stella 10.0.6 for Win |
20+
| test_logicals.xmile | Bobby Powers | bobbypowers@gmail.com | 8/29/15 | xmileconv v0.1.0 |
21+
| test_logicals.xmile | Alexey Mulyukin | alexprey@yandex.ru | 4/10/17 | Fix definition |
22+
| test_logicals_caseinsensitive.xmile | Ben Slavin | ben@benslavin.com | 2/26/25 | N/A |
2223

2324
TODO
2425
----
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<xmile xmlns="http://docs.oasis-open.org/xmile/ns/XMILE/v1.0" version="1.0">
2+
<isee:prefs show_module_prefix="true" layer="model"/>
3+
<header>
4+
<options namespace="std"/>
5+
<vendor>Ventana Systems, xmutil</vendor>
6+
<product lang="en">Vensim, xmutil</product>
7+
</header>
8+
<sim_specs isee:simulation_delay="0" method="Euler" time_units="Months">
9+
<start>0</start>
10+
<stop>1</stop>
11+
<dt>1</dt>
12+
</sim_specs>
13+
<dimensions/>
14+
<model>
15+
<variables>
16+
<aux name="TIME STEP">
17+
<doc> The time step for the simulation.</doc>
18+
<eqn>1</eqn>
19+
<units>Minute</units>
20+
</aux>
21+
<aux name="INITIAL TIME">
22+
<doc> The initial time for the simulation.</doc>
23+
<eqn>0</eqn>
24+
<units>Minute</units>
25+
</aux>
26+
<aux name="FINAL TIME">
27+
<doc> The final time for the simulation.</doc>
28+
<eqn>1</eqn>
29+
<units>Minute</units>
30+
</aux>
31+
<aux name="NOT output">
32+
<doc> Test the :NOT: operator. Should yield 1.</doc>
33+
<eqn>( IF NoT false_input THEN 1 ELSE 0 )</eqn>
34+
</aux>
35+
<aux name="false input">
36+
<eqn>0</eqn>
37+
</aux>
38+
<aux name="true input">
39+
<eqn>1</eqn>
40+
</aux>
41+
<aux name="AND output">
42+
<doc> Test the :AND: Operator. Should Yield 0</doc>
43+
<eqn>( IF true_input AnD false_input THEN 1 ELSE 0 )</eqn>
44+
</aux>
45+
<aux name="SAVEPER">
46+
<doc> The frequency with which output is stored.</doc>
47+
<eqn>TIME_STEP</eqn>
48+
<units>Minute</units>
49+
</aux>
50+
<aux name="OR output">
51+
<doc> Test the :OR: Operator, should yield 1</doc>
52+
<eqn>( IF true_input oR false_input THEN 1 ELSE 0 )</eqn>
53+
</aux>
54+
</variables>
55+
<views>
56+
<view>
57+
<aux name="OR_output" x="357" y="101"/>
58+
<aux name="AND_output" x="357" y="158"/>
59+
<aux name="true_input" x="213" y="100"/>
60+
<aux name="false_input" x="211" y="156"/>
61+
<connector uid="5" angle="-0.3978809618345937">
62+
<from>true_input</from>
63+
<to>OR_output</to>
64+
</connector>
65+
<connector uid="6" angle="20.642010315637219">
66+
<from>false_input</from>
67+
<to>OR_output</to>
68+
</connector>
69+
<connector uid="7" angle="-21.938480467706491">
70+
<from>true_input</from>
71+
<to>AND_output</to>
72+
</connector>
73+
<connector uid="8" angle="-0.78482460299188894">
74+
<from>false_input</from>
75+
<to>AND_output</to>
76+
</connector>
77+
<aux name="NOT_output" x="352" y="217"/>
78+
<connector uid="10" angle="-23.394472757361548">
79+
<from>false_input</from>
80+
<to>NOT_output</to>
81+
</connector>
82+
<connector uid="31" angle="90">
83+
<from>TIME_STEP</from>
84+
<to>SAVEPER</to>
85+
</connector>
86+
<aux name="SAVEPER" x="100" y="133"/>
87+
<aux name="FINAL_TIME" x="100" y="133"/>
88+
<aux name="INITIAL_TIME" x="100" y="133"/>
89+
<aux name="TIME_STEP" x="100" y="133"/>
90+
</view>
91+
</views>
92+
</model>
93+
</xmile>

0 commit comments

Comments
 (0)