[Avida-SVN] r1161 - in branches/coopcomm/source: actions main

dknoester at myxo.css.msu.edu dknoester at myxo.css.msu.edu
Fri Dec 29 15:06:29 PST 2006


Author: dknoester
Date: 2006-12-29 18:06:29 -0500 (Fri, 29 Dec 2006)
New Revision: 1161

Modified:
   branches/coopcomm/source/actions/PopulationActions.cc
   branches/coopcomm/source/main/cStats.cc
Log:
Memory usage bugfix, ratcheting fitness bugfix.

Modified: branches/coopcomm/source/actions/PopulationActions.cc
===================================================================
--- branches/coopcomm/source/actions/PopulationActions.cc	2006-12-29 19:56:13 UTC (rev 1160)
+++ branches/coopcomm/source/actions/PopulationActions.cc	2006-12-29 23:06:29 UTC (rev 1161)
@@ -1040,7 +1040,8 @@
     }
         
     // Square it so that there's always a huge benefit to getting just one more.
-    return pow(vt.second.m_maxVote + m_previousLeaders.size()*100, 2);
+    return pow(vt.second.m_maxVote + 
+               m_previousLeaders.size()*m_world->GetPopulation().GetDemeSize(), 2);
   }  
   
   std::vector<int> m_previousLeaders; //!< The list of previous leaders.

Modified: branches/coopcomm/source/main/cStats.cc
===================================================================
--- branches/coopcomm/source/main/cStats.cc	2006-12-29 19:56:13 UTC (rev 1160)
+++ branches/coopcomm/source/main/cStats.cc	2006-12-29 23:06:29 UTC (rev 1161)
@@ -1011,8 +1011,9 @@
   m_lazyMessageLog = true;
   if(m_lazyLogging) {
     PrintMessageLog(filename);
-    m_lazyLogging = false;
   }
+  m_messagesByDeme.clear();
+  m_lazyLogging = false;
 }
 
 




More information about the Avida-cvs mailing list