summaryrefslogtreecommitdiffstats
path: root/House.cpp
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-02-06 00:19:05 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-02-06 00:19:05 +0100
commitabcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8 (patch)
tree41107cece5c8cf38d78b6001af2b0f9b4845a399 /House.cpp
parent7fdd05d8c937fab5816267f49a53dcf1f70c6a33 (diff)
downloadc3d-abcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8.tar
c3d-abcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8.zip
....................................
Diffstat (limited to 'House.cpp')
-rw-r--r--House.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/House.cpp b/House.cpp
index fb0f848..bf1724c 100644
--- a/House.cpp
+++ b/House.cpp
@@ -13,6 +13,7 @@ House::House(float inittemp0, int earthx0, int earthy0, int earthz0, float colle
calcefficiency();
calctemp();
calcneededenergy();
+ collectorstatus = TRANSVERSAL;
}
void House::calcefficiency() {
@@ -461,26 +462,26 @@ void House::calccollectoroutput(int day, int time, int month) {
}
void House::calcprobeinput(int day, int time, int month) {
- static float E;
+ /*static float E;
calccollectoroutput(day, time, month);
if(time == 0) E = neededenergy[month][time];
if(E>=collectoroutput && collectoroutput>0) {E -= collectoroutput; collectoroutput=0;}
- else if(E<collectoroutput && collectoroutput>0) {collectoroutput -= E; E=0;}
-
- if(E==0) probeinput = collectoroutput;
- else probeinput = 0;
+ else if(E<collectoroutput && collectoroutput>0) {collectoroutput -= E; E=0;}*/
+ calccollectoroutput(day, time, month);
+ std::cout << collectoroutput << std::endl;
+ collectoroutput-=neededenergy[month][time];
}
void House::controller(){
- static int day=0, time=0, month=0;
+ static int day=90, time=0, month=0;
calcprobeinput(day, time, month);
temp.setprobetemp(collectortemp);
- temp.setinput(probeinput);
+ temp.setinput(collectoroutput);
temp.calcTemp();
++time;
if(time > 23){
- //std::cerr << day << std::endl;
+// std::cerr << day << " " << temp.getaverage() << std::endl;
time = 0;
++day;
}