]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.dl
psh updates
[pub/jan/ewbs-dlv.git] / psh.dl
1 % pumpspeicherkraftwerk definition.
2
3 % if i1 > 0 and not empty produce / reditect i2.
4 p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2), not c(C,is,empty), c_max(C,MAX), I1 > 0, MAX >= I1, OP = I1 + I2, #int(OP).
5 p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2), not c(C,is,empty) ,c_max(C,MAX), I1 > MAX, OP = MAX + I2, #int(OP).
6
7 % noop
8 p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,0), c(C,i2,0), OP = 0, #int(OP).
9
10 % not charge but powered charger input
11 p(C,op,OP) :- not ab(C), storage_plant(C), not c(C,i1,I1), c(C,i2,I2), not c(C,i1,charge), I2 > 0, I1 > 0, OP = I1 + I2, #int(OP).
12
13
14
15 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,0), c(C,i2,I2),OP = I2, #int(OP).
16 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2),c_max(C,MAX), I1 > 0, MAX >= I1, OP = I1 + I2, #int(OP).
17
18 %psh_empty(C) :- storage_plant(C), -c(C,is,full), -c(C,is,half_full).
19 %psh_not_full(C) :- storage_plant(C), c(C,is,empty) | c(C,is,half_full).
20
21 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), c(C,i2,I2),OP = I1 + I2.
22 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,iw,IW), IW > 40, OP = 0.
23 %p(C,op,OP) :- not ab(C), storage_plant(C), c(C,i1,I1), psh_empty(C), I1 == 0, OP = 0.
24
25
26