[Avida-SVN] r2439 - development/source/main

barrick at myxo.css.msu.edu barrick at myxo.css.msu.edu
Sat Mar 8 12:14:43 PST 2008


Author: barrick
Date: 2008-03-08 15:14:43 -0500 (Sat, 08 Mar 2008)
New Revision: 2439

Modified:
   development/source/main/cDeme.h
   development/source/main/cReactionResult.cc
Log:
Corrected how deme merit is assigned, so that it works the same as for a single organism.

Modified: development/source/main/cDeme.h
===================================================================
--- development/source/main/cDeme.h	2008-03-08 14:50:24 UTC (rev 2438)
+++ development/source/main/cDeme.h	2008-03-08 20:14:43 UTC (rev 2439)
@@ -110,7 +110,7 @@
   //! Update this deme's merit from the given source; merit will be applied to organisms now.
   void UpdateDemeMerit(cDeme& source);
   //! Update the heritable merit; will be applied to this deme and it's offspring upon replication.
-  void UpdateHeritableDemeMerit(double value) { _next_merit += value; }
+  void UpdateHeritableDemeMerit(double value) { _next_merit = value; }
   //! Retrieve this deme's current merit; to be applied to organisms living in this deme now.
   const cMerit& GetDemeMerit() const { return _current_merit; }
   //! Retrieve this deme's heritable merit.

Modified: development/source/main/cReactionResult.cc
===================================================================
--- development/source/main/cReactionResult.cc	2008-03-08 14:50:24 UTC (rev 2438)
+++ development/source/main/cReactionResult.cc	2008-03-08 20:14:43 UTC (rev 2439)
@@ -149,7 +149,7 @@
 {
   ActivateReaction();
   active_deme_reaction = true;
-  deme_mult_bonus += value;
+  deme_mult_bonus *= value;
 }
 
 void cReactionResult::AddInst(int id)




More information about the Avida-cvs mailing list