diff options
author | Constantin Riß <constantin.riss@dre.de> | 2010-02-06 00:19:05 +0100 |
---|---|---|
committer | Constantin Riß <constantin.riss@dre.de> | 2010-02-06 00:19:05 +0100 |
commit | abcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8 (patch) | |
tree | 41107cece5c8cf38d78b6001af2b0f9b4845a399 /House.cpp | |
parent | 7fdd05d8c937fab5816267f49a53dcf1f70c6a33 (diff) | |
download | c3d-abcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8.tar c3d-abcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8.zip |
....................................
Diffstat (limited to 'House.cpp')
-rw-r--r-- | House.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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; } |