-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path5.2.7.unit_checking_piecewise_2.cellml
More file actions
73 lines (73 loc) · 2.16 KB
/
5.2.7.unit_checking_piecewise_2.cellml
File metadata and controls
73 lines (73 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="UTF-8"?>
<!-- CellML Test Suite. https://github.com/MichaelClerx/cellml-validation -->
<!-- CellML 1.0, 5.2.7: Unit checking: piecewise with different unit branches.
This should probably not be allowed. -->
<model name="unit_checking_piecewise_2"
xmlns="http://www.cellml.org/cellml/1.0#"
xmlns:cellml="http://www.cellml.org/cellml/1.0#">
<units name="m_per_s">
<unit units="meter" />
<unit units="second" exponent="-1" />
</units>
<units name="mm">
<unit units="meter" prefix="milli" />
</units>
<units name="ms">
<unit units="second" prefix="milli" />
</units>
<component name="A">
<variable name="x" units="dimensionless" initial_value="0" />
<variable name="y" units="m_per_s" />
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<ci>y</ci>
<apply>
<divide />
<piecewise>
<piece>
<cn cellml:units="meter">123</cn>
<apply>
<eq />
<ci>x</ci>
<cn cellml:units="dimensionless">0</cn>
</apply>
</piece>
<piece>
<cn cellml:units="mm">456</cn>
<apply>
<eq />
<ci>x</ci>
<cn cellml:units="dimensionless">1</cn>
</apply>
</piece>
<otherwise>
<cn cellml:units="meter">0</cn>
</otherwise>
</piecewise>
<piecewise>
<piece>
<cn cellml:units="second">2</cn>
<apply>
<eq />
<ci>x</ci>
<cn cellml:units="dimensionless">0</cn>
</apply>
</piece>
<piece>
<cn cellml:units="ms">4</cn>
<apply>
<eq />
<ci>x</ci>
<cn cellml:units="dimensionless">1</cn>
</apply>
</piece>
<otherwise>
<cn cellml:units="second">0</cn>
</otherwise>
</piecewise>
</apply>
</apply>
</math>
</component>
</model>