Ticket #1728: testBill.mos
File testBill.mos, 427 bytes (added by , 13 years ago) |
---|
Line | |
---|---|
1 | loadString(" |
2 | model simple4 |
3 | type modetype = enumeration(on, off); |
4 | modetype mode(start = modetype.off); |
5 | Real v(start = 0); |
6 | algorithm |
7 | when (v > 0.5) then |
8 | mode := modetype.on; |
9 | elsewhen (v <= 0.5) then |
10 | mode := modetype.off; |
11 | end when; |
12 | equation |
13 | if (mode == modetype.off) then |
14 | v = time * 1.1; |
15 | else |
16 | v = time * 1.1 + 40; |
17 | end if; |
18 | end simple4; |
19 | "); |
20 | simulate(simple4, outputFormat="csv"); |