From 4227eac6f93267cb013b7d36ad251411b20a5bef Mon Sep 17 00:00:00 2001
From: someone <jan@jvales.net>
Date: Tue, 5 Jun 2012 00:14:03 +0200
Subject: [PATCH] windmill updates

---
 w.test1.dl | 10 +++++++---
 w.test2.dl |  9 ++++++---
 w.test3.dl | 29 ++++++++++++++++-------------
 w.test4.dl | 29 +++++++++++++++++------------
 w.test5.dl | 13 +++++++++----
 5 files changed, 55 insertions(+), 35 deletions(-)

diff --git a/w.test1.dl b/w.test1.dl
index bbb69e8..b069286 100644
--- a/w.test1.dl
+++ b/w.test1.dl
@@ -1,16 +1,20 @@
-% testing a wind-plant: make something.
+% testing a windmill
+% normal
+% In case c_max > i1 > 0, it produces energy, so op = i1.
+% The windmill can only generate power if the wind speed iw is between 5 and 40 (including these values).
+
 windmill(w).
 
 % define max capacity
 c_max(w,15).
 
-% define control i1 to 5KW (we request 5 KW)
+% define control i1 to 5KW (we request 5KW)
 c(w,i1,5).
 
 % define control iw to 10 windspeed
 c(w,iw,10).
 
-% we test.
+% test definition.
 % expecting i1 to be 5
 expect_c(w,i1,5).
 
diff --git a/w.test2.dl b/w.test2.dl
index 9b0436b..1f8ff50 100644
--- a/w.test2.dl
+++ b/w.test2.dl
@@ -1,16 +1,19 @@
-% testing a wind-plant: nothing requested.
+% testing a windwindmill
+% noop
+% In case i1 = 0, it does not produce energy and therefore op = 0.
+
 windmill(w).
 
 % define max capacity
 c_max(w,15).
 
-% define control i1 to 0KW (we request 0 KW)
+% define control i1 to 0KW (we request 0KW)
 c(w,i1,0).
 
 % define control iw to 10 windspeed
 c(w,iw,10).
 
-% we test.
+% test definition.
 % expecting i1 to be 0
 expect_c(w,i1,0).
 
diff --git a/w.test3.dl b/w.test3.dl
index 777d70f..299477c 100644
--- a/w.test3.dl
+++ b/w.test3.dl
@@ -1,23 +1,26 @@
-% testing a wind-plant: no wind
+% testing a windmill
+% over MAX
+% In case i1 > c_max, it generates an amount of energy equal to its maximal capacity c_max, so op = c_max.
+% The windmill can only generate power if the wind speed iw is between 5 and 40 (including these values).
+
 windmill(w).
 
 % define max capacity
 c_max(w,15).
 
-% define control i1 to 5KW (we request 5 KW)
-c(w,i1,5).
-
-% define control iw to 0 windspeed
-c(w,iw,0).
+% define control i1 to 25KW (we request 25KW)
+c(w,i1,25).
 
-% we test.
-% expecting i1 to be 5
-expect_c(w,i1,5).
+% define control iw to 10 windspeed
+c(w,iw,10).
 
-% expecting iw to be 0
-expect_c(w,iw,0).
+% test definition.
+% expecting i1 to be 25
+expect_c(w,i1,25).
 
-% and therefore we shall produce 0KW
-expect_p(w,op,0).
+% expecting iw to be 10
+expect_c(w,iw,10).
 
+% and therefore we shall produce 15KW
+expect_p(w,op,15).
 
diff --git a/w.test4.dl b/w.test4.dl
index 77c7152..38cf61a 100644
--- a/w.test4.dl
+++ b/w.test4.dl
@@ -1,22 +1,27 @@
-% testing a wind-plant:requested too much
+% testing a windmill
+% no wind
+% In case c_max > i1 > 0, it produces energy, so op = i1.
+% The windmill can only generate power if the wind speed iw is between 5 and 40 (including these values).
+
 windmill(w).
 
 % define max capacity
 c_max(w,15).
 
-% define control i1 to 25KW (we request 25 KW)
-c(w,i1,25).
+% define control i1 to 5KW (we request 5KW)
+c(w,i1,5).
+
+% define control iw to 0 windspeed
+c(w,iw,0).
 
-% define control iw to 10 windspeed
-c(w,iw,10).
+% test definition.
+% expecting i1 to be 5
+expect_c(w,i1,5).
 
-% we test.
-% expecting i1 to be 25
-expect_c(w,i1,25).
+% expecting iw to be 0
+expect_c(w,iw,0).
 
-% expecting iw to be 10
-expect_c(w,iw,10).
+% and therefore we shall produce 0KW
+expect_p(w,op,0).
 
-% and therefore we shall produce 15KW (as MAX is 15)
-expect_p(w,op,15).
 
diff --git a/w.test5.dl b/w.test5.dl
index 4e4a6b5..3de474d 100644
--- a/w.test5.dl
+++ b/w.test5.dl
@@ -1,22 +1,27 @@
-% testing a wind-plant: too much wind
+% testing a windmill
+% too much wind
+% In case c_max > i1 > 0, it produces energy, so op = i1.
+% The windmill can only generate power if the wind speed iw is between 5 and 40 (including these values).
+
 windmill(w).
 
 % define max capacity
 c_max(w,15).
 
-% define control i1 to 5KW (we request 5 KW)
+% define control i1 to 5KW (we request 5KW)
 c(w,i1,5).
 
 % define control iw to 50 windspeed
 c(w,iw,50).
 
-% we test.
+% test definition.
 % expecting i1 to be 5
 expect_c(w,i1,5).
 
-% expecting iw to be 10
+% expecting iw to be 50
 expect_c(w,iw,50).
 
 % and therefore we shall produce 0KW
 expect_p(w,op,0).
 
+
-- 
2.43.0