]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - c.test1.dl
c + s tests
[pub/jan/ewbs-dlv.git] / c.test1.dl
1 % testing a control center
2 % normal operation: windmill only
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 types
11 caloric_plant(f). windmill(w). storage_plant(psh).
12
13 % our plant's max values
14 c_max(f,60). c_max(w,15). c_max(psh,20). charge_max(psh,30).
15
16 control(c).
17
18 % define control i1/L_cur to 0KW
19 c(s,i1,0).
20
21 % define control i2/L_demand to 10KW
22 c(s,i2,10).
23
24 % define control i3/Sstorage to half_full
25 c(s,i3,half_full).
26
27 % define control i4/Swind to 10
28 c(s,i4,10).
29
30
31 % test definition.
32 % expecting i1 to be 0
33 expect_c(s,i1,0).
34
35 % expecting i2 to be 10
36 expect_c(s,i2,10).
37
38 % expecting i3 to be half_full
39 expect_c(s,i3,half_full).
40
41 % expecting i4 to be 10
42 expect_c(s,i4,10).
43
44 % and request 10KW
45 expect_p(s,o1,10).
46
47 % and request 0KW
48 expect_p(s,o2,0).
49
50 % and request 0KW
51 expect_p(s,o3,0).
52
53 % do we enable the switching station?
54 expect_p(s,o4,1).
55
56 % and we charge out pumpspeicherkraftwerk with 0KW
57 expect_p(s,o5,0).
58