Ticket #1728: testBill.mos

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