]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.test4.dl
psh updates
[pub/jan/ewbs-dlv.git] / psh.test4.dl
1 % testing a pumpspeicherkraftwerk
2 % not charge but powered charger input.
3 % In case i1 not charge but i2 > 0, or i1 = charge and is = full, the station just redirects the power of i2 to op. If it generates power, it simply adds this power to the redirected one from i2.
4
5 storage_plant(psh).
6
7 % define max capacity
8 c_max(psh,20).
9
10 % define max charging power
11 charge_max(psh,30).
12
13 % define control i1 to 5KW
14 c(psh,i1,5).
15
16 % define control i2 to 5KW
17 c(psh,i2,5).
18
19 % define control is to empty
20 c(psh,is,empty).
21
22 % test definition.
23 % expecting i1 to be 5
24 expect_c(psh,i1,5).
25
26 % expecting i2 to be 5
27 expect_c(psh,i2,5).
28
29 % expecting is to be empty
30 expect_c(psh,is,empty).
31
32 % and therefore we shall produce 10KW
33 expect_p(psh,op,10).
34