From abcf04bac0fe9b7b8358af6ed4e2f11d9bbb0fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20Ri=C3=9F?= Date: Sat, 6 Feb 2010 00:19:05 +0100 Subject: .................................... --- House.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'House.cpp') 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(E0) {collectoroutput -= E; E=0;} - - if(E==0) probeinput = collectoroutput; - else probeinput = 0; + else if(E0) {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; } -- cgit v1.2.3