[Avida-SVN] r1878 - branches/uml/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Tue Jul 31 16:19:30 PDT 2007


Author: hjg
Date: 2007-07-31 19:19:30 -0400 (Tue, 31 Jul 2007)
New Revision: 1878

Modified:
   branches/uml/source/main/cStats.cc
   branches/uml/source/main/cStats.h
   branches/uml/source/main/cTaskLib.cc
Log:
Added stats to track scenarios 5 & 6, which were developed for the robot navigation model. 



Modified: branches/uml/source/main/cStats.cc
===================================================================
--- branches/uml/source/main/cStats.cc	2007-07-31 23:08:19 UTC (rev 1877)
+++ branches/uml/source/main/cStats.cc	2007-07-31 23:19:30 UTC (rev 1878)
@@ -1024,6 +1024,9 @@
 	df.Write( m_N2Attempt.Sum(), "total number of spin N2 attempts" );
 	df.Write( m_N2Passed.Sum(), "total number of spin N2 passes" );
 	df.Write( m_N1andN2Passed.Sum(), "total number of spin N1 & N2 passes");
+	df.Write( m_scenario5.Sum(), "total number of scenario 5 all transitions");
+	df.Write( m_scenario6.Sum(), "total number of scenario 5 all transitions");
+
 	
 	av_number_of_states.Clear();
 	av_number_of_trans.Clear();
@@ -1045,6 +1048,8 @@
   m_W1Passed.Clear();
   m_W2Passed.Clear();
   m_N1andN2Passed.Clear();
+  m_scenario5.Clear();
+  m_scenario6.Clear();
 
 
 df.Endl();

Modified: branches/uml/source/main/cStats.h
===================================================================
--- branches/uml/source/main/cStats.h	2007-07-31 23:08:19 UTC (rev 1877)
+++ branches/uml/source/main/cStats.h	2007-07-31 23:19:30 UTC (rev 1878)
@@ -269,6 +269,8 @@
   cDoubleSum m_W2Attempt;
   cDoubleSum m_W2Passed;
   cDoubleSum m_N1andN2Passed;
+  cDoubleSum m_scenario5;
+  cDoubleSum m_scenario6;
 
 
 
@@ -651,6 +653,9 @@
   void W2Attempt() { m_W2Attempt.Add(1); }
   void W2Passed() { m_W2Passed.Add(1); }
   void N1andN2Passed() { m_N1andN2Passed.Add(1); } 
+  void scenario5Complete() { m_scenario5.Add(1); } 
+  void scenario6Complete() { m_scenario6.Add(1); } 
+    
   
 };
 

Modified: branches/uml/source/main/cTaskLib.cc
===================================================================
--- branches/uml/source/main/cTaskLib.cc	2007-07-31 23:08:19 UTC (rev 1877)
+++ branches/uml/source/main/cTaskLib.cc	2007-07-31 23:19:30 UTC (rev 1878)
@@ -3135,6 +3135,11 @@
 		bonus = org->getParentBonus("scenario5"); 
 	}
 	
+	// Track in stats.
+	if (bonus == 7) { 
+		m_world->GetStats().scenario5Complete();
+	}
+	
 	// Set bonus info for current model
 	org->getUMLModel()->setBonusInfo("scenario5", bonus);		
 	
@@ -3165,6 +3170,11 @@
 		bonus = org->getParentBonus("scenario6"); 
 	}
 	
+	// Track in stats.
+	if (bonus == 5) { 
+		m_world->GetStats().scenario6Complete();
+	}
+	
 	// Set bonus info for current model
 	org->getUMLModel()->setBonusInfo("scenario6", bonus);		
 	




More information about the Avida-cvs mailing list