]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.test6.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / psh.test6.dl
1 % testing a pumpspeicherkraftwerk
2 % over MAX charge
3 % In case i1 = charge, its storages are not full (is not full), and it receives energy (i2 > w_charge), it redirects the excessive energy back to the switching station, so op = i2 - w_charge.
4
5 storage_plant(psh).
6
7 % define max capacity
8 c_max(psh,20).
9
10 % define max charging power
11 w_charge(30).
12
13 % define control i1 to charge
14 c(psh,i1,charge).
15
16 % define control i2 to 35KW
17 p(psh,i2,35).
18
19 % define control is to empty
20 c(psh,is,empty).
21
22 % test definition.
23 % expecting i1 to be charge
24 expect_c(psh,i1,charge).
25
26 % expecting i2 to be 35
27 expect_p(psh,i2,35).
28
29 % expecting is to be empty
30 expect_c(psh,is,empty).
31
32 % and therefore we shall produce 5KW
33 expect_p(psh,op,5).
34