]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.test2.dl
windmill updates
[pub/jan/ewbs-dlv.git] / psh.test2.dl
1 % testing a pumpspeicherkraftwerk: discharge but empty
2 storage_plant(psh).
3
4 % define max capacity
5 c_max(psh,20).
6
7 % define max charging power
8 charge_max(psh,30).
9
10 % define control i1 to 5KW (we request 5 KW)
11 c(psh,i1,5).
12
13 % define control i2 to 0KW (we are not getting energy to store)
14 c(psh,i2,0).
15
16 % define control is to empty
17 c(psh,is,empty).
18
19 % we test.
20 % expecting i1 to be 5
21 expect_c(psh,i1,5).
22
23 % expecting i2 to be 0
24 expect_c(psh,i2,0).
25
26 % expecting is to be empty
27 expect_c(psh,is,empty).
28
29 % and therefore we shall produce 0KW
30 expect_p(psh,op,0).
31