+% testing a switching centerk
+% system inactive
+% In case i4 = 0, the system is inactive and the incoming energy i6 is redirected to o2. Furthermore, o1 = 0 as the pumped-storage hydropower plant psh should not receive energy.
+
+switching(s).
+
+% define control i1 to 1KW
+c(psh,i1,1).
+
+% define control i2 to 2KW
+c(psh,i2,2).
+
+% define control i3 to 3KW
+c(psh,i3,3).
+
+% define control i4 to 0
+c(psh,i4,0).
+
+% define control i5 to 0KW
+c(psh,i5,0).
+
+% define control i6 to 10KW
+c(psh,i6,10).
+
+% test definition.
+% expecting i1 to be 1
+expect_c(psh,i1,1).
+
+% expecting i2 to be 2
+expect_c(psh,i2,2).
+
+% expecting i3 to be 3
+expect_c(psh,i3,3).
+
+% expecting i4 to be 0
+expect_c(psh,i4,0).
+
+% expecting i5 to be 0
+expect_c(psh,i5,0).
+
+% expecting i6 to be 10
+expect_c(psh,i6,10).
+
+% and therefore we shall charge with 0KW
+expect_p(psh,o1,0).
+
+% and return 10KW
+expect_p(psh,o2,10).
+
+% testing a switching centerk
+% system accumilation mode
+% In case i4 = 0, the system is inactive and the incoming energy i6 is redirected to o2. Furthermore, o1 = 0 as the pumped-storage hydropower plant psh should not receive energy.
+
+switching(s).
+
+% define control i1 to 10KW
+c(psh,i1,10).
+
+% define control i2 to 20KW
+c(psh,i2,20).
+
+% define control i3 to 30KW
+c(psh,i3,30).
+
+% define control i4 to 1
+c(psh,i4,1).
+
+% define control i5 to 0KW
+c(psh,i5,0).
+
+% define control i6 to 10KW
+c(psh,i6,10).
+
+% test definition.
+% expecting i1 to be 10
+expect_c(psh,i1,10).
+
+% expecting i2 to be 20
+expect_c(psh,i2,20).
+
+% expecting i3 to be 30
+expect_c(psh,i3,30).
+
+% expecting i4 to be 1
+expect_c(psh,i4,1).
+
+% expecting i5 to be 0
+expect_c(psh,i5,0).
+
+% expecting i6 to be 10
+expect_c(psh,i6,10).
+
+% and therefore we shall charge with 0KW
+expect_p(psh,o1,0).
+
+% and return 70KW
+expect_p(psh,o2,70).
+
+% testing a switching centerk
+% system charge mode
+% In case i4 = 0, the system is inactive and the incoming energy i6 is redirected to o2. Furthermore, o1 = 0 as the pumped-storage hydropower plant psh should not receive energy.
+
+switching(s).
+
+% define control i1 to 1KW
+c(psh,i1,1).
+
+% define control i2 to 2KW
+c(psh,i2,2).
+
+% define control i3 to 3KW
+c(psh,i3,3).
+
+% define control i4 to 2
+c(psh,i4,2).
+
+% define control i5 to 5KW
+c(psh,i5,5).
+
+% define control i6 to 10KW
+c(psh,i6,10).
+
+% test definition.
+% expecting i1 to be 1
+expect_c(psh,i1,1).
+
+% expecting i2 to be 2
+expect_c(psh,i2,2).
+
+% expecting i3 to be 3
+expect_c(psh,i3,3).
+
+% expecting i4 to be 2
+expect_c(psh,i4,2).
+
+% expecting i5 to be 5
+expect_c(psh,i5,5).
+
+% expecting i6 to be 10
+expect_c(psh,i6,10).
+
+% and therefore we shall charge with 5KW
+expect_p(psh,o1,5).
+
+% and return 5KW
+expect_p(psh,o2,5).
+
+% testing a switching centerk
+% system charge mode over MAX
+% In case i4 = 0, the system is inactive and the incoming energy i6 is redirected to o2. Furthermore, o1 = 0 as the pumped-storage hydropower plant psh should not receive energy.
+
+switching(s).
+
+% define control i1 to 1KW
+c(psh,i1,1).
+
+% define control i2 to 2KW
+c(psh,i2,2).
+
+% define control i3 to 3KW
+c(psh,i3,3).
+
+% define control i4 to 2
+c(psh,i4,2).
+
+% define control i5 to 15KW
+c(psh,i5,15).
+
+% define control i6 to 10KW
+c(psh,i6,10).
+
+% test definition.
+% expecting i1 to be 1
+expect_c(psh,i1,1).
+
+% expecting i2 to be 2
+expect_c(psh,i2,2).
+
+% expecting i3 to be 3
+expect_c(psh,i3,3).
+
+% expecting i4 to be 2
+expect_c(psh,i4,2).
+
+% expecting i5 to be 15
+expect_c(psh,i5,15).
+
+% expecting i6 to be 10
+expect_c(psh,i6,10).
+
+% and therefore we shall charge with 10KW
+expect_p(psh,o1,10).
+
+% and return 5KW
+expect_p(psh,o2,0).
+