[Avida-SVN] r1350 - trunk/source/main

baerb at myxo.css.msu.edu baerb at myxo.css.msu.edu
Tue Feb 20 10:48:42 PST 2007


Author: baerb
Date: 2007-02-20 13:48:42 -0500 (Tue, 20 Feb 2007)
New Revision: 1350

Modified:
   trunk/source/main/cEnvironment.cc
   trunk/source/main/cResourceCount.cc
   trunk/source/main/cWorld.cc
Log:

Mostly whitespace changes and comments.  Needed to trip buildbot



Modified: trunk/source/main/cEnvironment.cc
===================================================================
--- trunk/source/main/cEnvironment.cc	2007-02-20 18:04:53 UTC (rev 1349)
+++ trunk/source/main/cEnvironment.cc	2007-02-20 18:48:42 UTC (rev 1350)
@@ -669,7 +669,7 @@
     if (task_quality == 0.0) continue;
     
     // Examine requisites on this reaction
-    if (TestRequisites(cur_reaction->GetRequisites(), task_cnt, reaction_count) == false) {
+    if (TestRequisites(cur_reaction->GetRequisites(), task_cnt, reaction_count)         == false) {
       continue;
     }
     
@@ -680,7 +680,6 @@
     DoProcesses(ctx, cur_reaction->GetProcesses(), resource_count, task_quality, task_cnt, result);
     
     // Mark this reaction as occuring...
-    result.MarkReaction(cur_reaction->GetID());
   }  
   
   return result.GetActive();

Modified: trunk/source/main/cResourceCount.cc
===================================================================
--- trunk/source/main/cResourceCount.cc	2007-02-20 18:04:53 UTC (rev 1349)
+++ trunk/source/main/cResourceCount.cc	2007-02-20 18:48:42 UTC (rev 1350)
@@ -22,8 +22,8 @@
 const double cResourceCount::EPSILON (1.0e-15);
 const int cResourceCount::PRECALC_DISTANCE(100);
 
-
-void FlowMatter(cSpatialCountElem &elem1, cSpatialCountElem &elem2, double inxdiffuse, 
+void FlowMatter(cSpatialCountElem &elem1, cSpatialCountElem &elem2, 
+                double inxdiffuse, 
                 double inydiffuse, double inxgravity, double inygravity,
                 int xdist, int ydist, double dist) {
 
@@ -278,6 +278,8 @@
   return curr_spatial_res_cnt;
 }
 
+// Change the amount of all the global resources //
+
 void cResourceCount::Modify(const tArray<double> & res_change)
 {
   assert(resource_count.GetSize() == res_change.GetSize());
@@ -288,6 +290,7 @@
   }
 }
 
+// Change amount of a particular (id) gloabl resource //
 
 void cResourceCount::Modify(int id, double change)
 {
@@ -297,10 +300,14 @@
   assert(resource_count[id] >= 0.0);
 }
 
+// Modify Resources for a particular cell //
+
 void cResourceCount::ModifyCell(const tArray<double> & res_change, int cell_id)
 {
   assert(resource_count.GetSize() == res_change.GetSize());
 
+  // For all the resouces check if they are global or spatial //
+
   for (int i = 0; i < resource_count.GetSize(); i++) {
     if (geometry[i] == nGeometry::GLOBAL) {
       resource_count[i] += res_change[i];

Modified: trunk/source/main/cWorld.cc
===================================================================
--- trunk/source/main/cWorld.cc	2007-02-20 18:04:53 UTC (rev 1349)
+++ trunk/source/main/cWorld.cc	2007-02-20 18:48:42 UTC (rev 1350)
@@ -5,6 +5,7 @@
  *  Created by David on 10/18/05.
  *  Copyright 2005-2006 Michigan State University. All rights reserved.
  *
+ *
  */
 
 #include "cWorld.h"




More information about the Avida-cvs mailing list