diff options
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; } |