1 % testing a switching center
3 % In case i4 = 2, the system should store power in the hydropower plant psh with the energy mains supply. Therefore, 01 = i5 and o2 = i6 - i5. This is of course only possible if i6 >= i5; if this is not the case, it redirects as much energy as available to the storage plant, so o1 = i6 and o2 = 0.
7 % define control i1 to 1KW
10 % define control i2 to 2KW
13 % define control i3 to 3KW
16 % define control i4 to 2
19 % define control i5 to 5KW
22 % define control i6 to 10KW
26 % expecting i1 to be 1
29 % expecting i2 to be 2
32 % expecting i3 to be 3
35 % expecting i4 to be 2
38 % expecting i5 to be 5
41 % expecting i6 to be 10
44 % and therefore we shall charge with 5KW