]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - psh.test7.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / psh.test7.dl
1 % testing a pumpspeicherkraftwerk
2 % charge
3 % In case it holds that i1 = charge, its storages are not full (is not full), and it receives energy (w_charge > i2 > 0), it does not produce energy and therefore op = 0.
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 5KW
17 p(psh,i2,5).
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 5
27 expect_p(psh,i2,5).
28
29 % expecting is to be empty
30 expect_c(psh,is,empty).
31
32 % and therefore we shall produce 0KW
33 expect_p(psh,op,0).
34