]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - w.test5.dl
GITOLITE.txt
[pub/jan/ewbs-dlv.git] / w.test5.dl
1 % testing a windmill
2 % too much wind
3 % In case c_max > i1 > 0, it produces energy, so op = i1.
4 % The windmill can only generate power if the wind speed iw is between 5 and 40 (including these values).
5
6 windmill(w).
7
8 % define max capacity
9 c_max(w,15).
10
11 % define control i1 to 5KW (we request 5KW)
12 c(w,i1,5).
13
14 % define control iw to 50 windspeed
15 c(w,iw,50).
16
17 % test definition.
18 % expecting i1 to be 5
19 expect_c(w,i1,5).
20
21 % expecting iw to be 50
22 expect_c(w,iw,50).
23
24 % and therefore we shall produce 0KW
25 expect_p(w,op,0).
26
27