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

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Fri May 2 06:29:54 PDT 2008


Author: hjg
Date: 2008-05-02 09:29:54 -0400 (Fri, 02 May 2008)
New Revision: 2575

Modified:
   branches/uml/source/main/cTaskLib.cc
   branches/uml/source/main/cUMLModel.cc
Log:


Modified: branches/uml/source/main/cTaskLib.cc
===================================================================
--- branches/uml/source/main/cTaskLib.cc	2008-05-02 02:47:15 UTC (rev 2574)
+++ branches/uml/source/main/cTaskLib.cc	2008-05-02 13:29:54 UTC (rev 2575)
@@ -3140,7 +3140,7 @@
 	strstrm2 << neverclaimFile << "." << m_world->GetStats().GetUpdate() << "." << ctx.getOrganism()->GetID();
 	// print the relevant information about the scenarios
 //	std::string temp_str = neverclaimFile + "." + m_world->GetStats().GetUpdate() + "."; // + ctx.getOrganism()->GetID();
-	ctx.getOrganism()->getUMLModel()->printScenarioUtility(strstrm.str().c_str());
+	ctx.getOrganism()->getUMLModel()->printScenarioUtility(strstrm2.str().c_str());
 			
 	return 1.0;
 }

Modified: branches/uml/source/main/cUMLModel.cc
===================================================================
--- branches/uml/source/main/cUMLModel.cc	2008-05-02 02:47:15 UTC (rev 2574)
+++ branches/uml/source/main/cUMLModel.cc	2008-05-02 13:29:54 UTC (rev 2575)
@@ -568,7 +568,7 @@
 void cUMLModel::printScenarioUtility(std::string s)
 {
 	std::ofstream outfile;
-	outfile.open ("scenario-utility", std::ios_base::app);
+	outfile.open ("scenario-utility.csv", std::ios_base::app);
 	assert(outfile.is_open());
 	
 	// compute utilities. 
@@ -586,9 +586,13 @@
 		}
 	}
 	
-	outfile << s << " " << ft << " " << ee << " " << ac << std::endl;
+	outfile << s << ", " << ft << ", " << ee << ", " << ac << ", ";
 	
-	
+	for (unsigned int i=0; i< scenario_completion.size(); i++) { 
+		outfile << scenario_completion[i] << ", ";
+	}	
+	outfile << std::endl;
+	outfile.close();
 }
 
 




More information about the Avida-cvs mailing list