]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.test8.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / psh.test8.dl
1 % testing a pumpspeicherkraftwerk
2 % normal discharge but empty
3 % In case c_max > i1 > 0 and is not empty, it produces energy, so op = i1.
4 % The storage plant can only generate power if it is not empty (is not empty).
5
6 storage_plant(psh).
7
8 % define max capacity
9 c_max(psh,20).
10
11 % define max charging power
12 w_charge(30).
13
14 % define control i1 to 5KW (we request 5KW)
15 c(psh,i1,5).
16
17 % define control i2 to 0KW (we are not charging)
18 p(psh,i2,0).
19
20 % define control is to empty
21 c(psh,is,empty).
22
23 % test definition.
24 % expecting i1 to be 5
25 expect_c(psh,i1,5).
26
27 % expecting i2 to be 0
28 expect_p(psh,i2,0).
29
30 % expecting is to be empty
31 expect_c(psh,is,empty).
32
33 % and therefore we shall produce 0KW
34 expect_p(psh,op,0).
35