]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - c.test4.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / c.test4.dl
1 % testing a control center
2 % normal operation: windfail + pumpspeicherkraftwerk + fuel plant
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: min + max wind hardcoded (5-40)
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 60KW
19 c(c,i2,60).
20
21 % define control i3/Sstorage to half_full
22 c(c,i3,half_full).
23
24 % define control i4/Swind to 50
25 c(c,i4,50).
26
27
28 % test definition.
29 % expecting i1 to be 10
30 expect_c(c,i1,10).
31
32 % expecting i2 to be 60
33 expect_c(c,i2,60).
34
35 % expecting i3 to be half_full
36 expect_c(c,i3,half_full).
37
38 % expecting i4 to be 50
39 expect_c(c,i4,50).
40
41 % and request 20KW
42 expect_c(c,o1,20).
43
44 % and request 0KW
45 expect_c(c,o2,0).
46
47 % and request 30KW
48 expect_c(c,o3,30).
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