From 5ff7cc7586e6865ed23a358ef67deecb61a381ef Mon Sep 17 00:00:00 2001 From: someone Date: Tue, 5 Jun 2012 02:15:07 +0200 Subject: [PATCH] switching --- s.test1.dl | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ s.test2.dl | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ s.test3.dl | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ s.test4.dl | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ s.test5.dl | 0 5 files changed, 196 insertions(+) delete mode 100644 s.test5.dl diff --git a/s.test1.dl b/s.test1.dl index e69de29..b195e3f 100644 --- a/s.test1.dl +++ b/s.test1.dl @@ -0,0 +1,49 @@ +% 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). + diff --git a/s.test2.dl b/s.test2.dl index e69de29..dc3bd6b 100644 --- a/s.test2.dl +++ b/s.test2.dl @@ -0,0 +1,49 @@ +% 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). + diff --git a/s.test3.dl b/s.test3.dl index e69de29..0137681 100644 --- a/s.test3.dl +++ b/s.test3.dl @@ -0,0 +1,49 @@ +% 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). + diff --git a/s.test4.dl b/s.test4.dl index e69de29..69822f0 100644 --- a/s.test4.dl +++ b/s.test4.dl @@ -0,0 +1,49 @@ +% 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). + diff --git a/s.test5.dl b/s.test5.dl deleted file mode 100644 index e69de29..0000000 -- 2.43.0