From 5cac3b9152ce470432b04609c245151500ab7479 Mon Sep 17 00:00:00 2001 From: someone Date: Tue, 5 Jun 2012 02:57:16 +0200 Subject: [PATCH] switching --- s.dl | 13 +++++++++++-- s.test2.dl | 2 +- s.test3.dl | 2 +- s.test4.dl | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/s.dl b/s.dl index ed9965d..9c3a7ba 100644 --- a/s.dl +++ b/s.dl @@ -1,8 +1,17 @@ % switching definition. % system inactive -p(C,o1,O1) :- not ab(C), switching(C), c(C,i4,0), c(C,i6,I6), O1 = 0, O2 = I6, #int(O1), #int(O2). -p(C,o2,O2) :- not ab(C), switching(C), c(C,i4,0), c(C,i6,I6), O1 = 0, O2 = I6, #int(O1), #int(O2). +p(C,o1,OP) :- not ab(C), switching(C), c(C,i4,0), c(C,i6,I6), OP = 0, #int(OP). +p(C,o2,OP) :- not ab(C), switching(C), c(C,i4,0), c(C,i6,I6), OP = I6, #int(OP). + +% system accumilation mode +p(C,o1,OP) :- not ab(C), switching(C), c(C,i4,1), c(C,i1,I1), c(C,i2,I2), c(C,i3,I3), c(C,i6,I6), OP = 0, #int(OP). +p(C,o2,OP) :- not ab(C), switching(C), c(C,i4,1), c(C,i1,I1), c(C,i2,I2), c(C,i3,I3), c(C,i6,I6), T1 = I1 + I2, T2 = I3 + I6, OP = T1 + T2, #int(OP). + +% system charge mode +%p(C,o1,O1) :- not ab(C), switching(C), c(C,i4,2), c(C,i1,I1), c(C,i2,I2), c(C,i3,I3), c(C,i5,I5), c(C,i6,I6), O1 = 0, #int(O1). + + % over MAX discharge % not charge but powered charger input diff --git a/s.test2.dl b/s.test2.dl index bebc97a..bab5e89 100644 --- a/s.test2.dl +++ b/s.test2.dl @@ -1,6 +1,6 @@ % testing a switching center % 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. +% In case i4 = 1, the system accumulates all incoming energy from the plants (i1, i2, and i3) and from i6 and assigns the sum to o2. Again, o1 = 0 as the pumped-storage hydropower plant psh should not receive energy. switching(s). diff --git a/s.test3.dl b/s.test3.dl index f9dae23..e161c94 100644 --- a/s.test3.dl +++ b/s.test3.dl @@ -1,6 +1,6 @@ % testing a switching center % 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. +% 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. switching(s). diff --git a/s.test4.dl b/s.test4.dl index a1e1783..84d33de 100644 --- a/s.test4.dl +++ b/s.test4.dl @@ -1,6 +1,6 @@ % testing a switching center % 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. +% 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. switching(s). -- 2.43.0