]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.test2.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / psh.test2.dl
1 % testing a pumpspeicherkraftwerk
2 % over MAX discharge
3 % In case i1 > c_max and is not empty, it generates an amount of energy equal to its maximal capacity c_max, so op = c_max.
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 25KW (we request 25KW)
15 c(psh,i1,25).
16
17 % define control i2 to 0KW (we are not charging)
18 p(psh,i2,0).
19
20 % define control is to full
21 c(psh,is,full).
22
23 % test definition.
24 % expecting i1 to be 25
25 expect_c(psh,i1,25).
26
27 % expecting i2 to be 0
28 expect_p(psh,i2,0).
29
30 % expecting is to be full
31 expect_c(psh,is,full).
32
33 % and therefore we shall produce 20KW
34 expect_p(psh,op,20).
35