]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - s.dl
switching tests updatet
[pub/jan/ewbs-dlv.git] / s.dl
1 % switching definition.
2
3 % system inactive
4 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).
5 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).
6
7 % over MAX discharge
8 % not charge but powered charger input
9 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2), not c(C,is,empty), not c(C,i1,charge), c_max(C,MAX), I1 > MAX, OP = MAX + I2, #int(OP).
10
11 % noop
12 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,0), c(C,i2,0), OP = 0, #int(OP).
13
14 % charge but full
15 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), c(C,is,full), OP = I2, #int(OP).
16
17 % over MAX charge
18 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), charge_max(C,CMAX), not c(C,is,full), I2 > CMAX, OP = I2 - CMAX, #int(OP).
19
20 % charge
21 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,charge), c(C,i2,I2), charge_max(C,CMAX), not c(C,is,full), I2 <= CMAX, OP = 0, #int(OP).
22
23 % normal discharge but empty
24 % not charge but powered charger input
25 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i2,I2), c(C,is,empty), not c(C,i1,charge), OP = I2, #int(OP).
26