]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - c.test2.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / c.test2.dl
1 % testing a control center
2 % normal operation: windmill + pumpspeicherkraftwerk
3 % In case that L cur < L demand, the control station uses plants with the following priority with respect to their maximal capacity C x with x 2 fpsh; w; fg:
4 %   1. windmill w,
5 %   2. pumped-storage hydropower plant psh, and
6 %   3. fossil-fuel power station f.
7 % The pumped-storage hydropower plant psh can only be used if its storage (indicated via the input i3) is not empty.
8 % The windmill w can only be used under certain circumstances; namely, when the wind speed (which is received on input i4) is between 5 and 40.
9
10 % our plant's max values
11 c_max(f,60). c_max(w,15). c_max(psh,20). w_charge(30).
12
13 control(c).
14
15 % define control i1/L_cur to 10KW
16 c(c,i1,10).
17
18 % define control i2/L_demand to 40KW
19 c(c,i2,40).
20
21 % define control i3/Sstorage to half_full
22 c(c,i3,half_full).
23
24 % define control i4/Swind to 10
25 c(c,i4,10).
26
27
28 % test definition.
29 % expecting i1 to be 10
30 expect_c(c,i1,10).
31
32 % expecting i2 to be 40
33 expect_c(c,i2,40).
34
35 % expecting i3 to be half_full
36 expect_c(c,i3,half_full).
37
38 % expecting i4 to be 10
39 expect_c(c,i4,10).
40
41 % and request 15KW
42 expect_c(c,o1,15).
43
44 % and request 15KW
45 expect_c(c,o2,15).
46
47 % and request 0KW
48 expect_c(c,o3,0).
49
50 % do we enable the switching station?
51 expect_c(c,o4,1).
52
53 % and we charge out pumpspeicherkraftwerk with 0KW
54 expect_c(c,o5,0).
55