]> git.somenet.org - pub/jan/ewbs-dlv.git/blob - w.test4.dl
19:43:01 <astra> was unabhängig davon: w_charge ist afaik w_charge/1 nicht w_charge/2
[pub/jan/ewbs-dlv.git] / w.test4.dl
1 % testing a windmill
2 % no 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 0 windspeed
15 c(w,iw,0).
16
17 % test definition.
18 % expecting i1 to be 5
19 expect_c(w,i1,5).
20
21 % expecting iw to be 0
22 expect_c(w,iw,0).
23
24 % and therefore we shall produce 0KW
25 expect_p(w,op,0).
26
27