[Avida-cvs] [avida-svn] r928 - in development: documentation source/actions source/analyze source/drivers source/main

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Tue Sep 5 19:42:32 PDT 2006


Author: brysonda
Date: 2006-09-05 22:42:32 -0400 (Tue, 05 Sep 2006)
New Revision: 928

Modified:
   development/documentation/actions.html
   development/documentation/analyze.html
   development/source/actions/LandscapeActions.cc
   development/source/actions/PrintActions.cc
   development/source/analyze/cAnalyze.cc
   development/source/analyze/cAnalyze.h
   development/source/analyze/cAnalyzeJobQueue.cc
   development/source/drivers/cDefaultRunDriver.cc
   development/source/main/cPopulation.cc
   development/source/main/cWorld.h
Log:
Merged analyze mode and global verbosity settings.  Created convenience accessors for Verbosity in cWorld.  Moved VERBOSE command into SetVerbose action so that an event could be used to adjust the verbosity setting.   Updated documentation to reflect the change.

Modified: development/documentation/actions.html
===================================================================
--- development/documentation/actions.html	2006-09-05 22:21:54 UTC (rev 927)
+++ development/documentation/actions.html	2006-09-06 02:42:32 UTC (rev 928)
@@ -148,6 +148,7 @@
       <br /><a href="#SetReactionValue">SetReactionValue</a>
       <br /><a href="#SetReactionValueMult">SetReactionValueMult</a>
       <br /><a href="#SetResource">SetResource</a>
+      <br /><a href="#SetVerbose">SetVerbose</a>
       <br /><a href="#SeverGridCol">SeverGridCol</a>
       <br /><a href="#SeverGridRow">SeverGridRow</a>
       <br /><a href="#TestDominant">TestDominant</a>
@@ -588,6 +589,19 @@
   Print out the grid of organisms who received merit.
   </p>
 </li>
+<li>
+  <strong><a name="SetVerbose">SetVerbose</a></strong>
+  [<span class="cmdarg">string verbosity=''</span>]
+  
+  <p>
+  Change the level of output verbosity.  Verbose messages will print all
+  of the details of what is happening to the screen.  Minimal messages
+  will only briefly state the process being run.  Verbose messages are
+  recommended if you're in interactive analysis mode. When no arguments
+  are supplied, action will toggle between NORMAL and ON.
+  <br />Levels: SILENT, NORMAL, ON, DETAILS, DEBUG
+  </p>
+</li>
 </ul>
 
 

Modified: development/documentation/analyze.html
===================================================================
--- development/documentation/analyze.html	2006-09-05 22:21:54 UTC (rev 927)
+++ development/documentation/analyze.html	2006-09-06 02:42:32 UTC (rev 928)
@@ -152,14 +152,6 @@
 </p>
 
 <dl>
-<dt><strong>VERBOSE [string level='ON']</strong></dt>
-<dd>
-  Change the level of output verbosity.  Verbose messages will print all
-  of the details of what is happening to the screen.  Minimal messages
-  will only briefly state the process being run.  Verbose messages are
-  recommended if you're in interactive mode.
-  <br />Levels: SILENT, NORMAL, ON, DETAILS
-</dd>
 <dt><strong>SYSTEM [<span class="cmdarg">command</span>]</strong></dt>
 <dd>
   Run the command listed on the command line.  This is particularly

Modified: development/source/actions/LandscapeActions.cc
===================================================================
--- development/source/actions/LandscapeActions.cc	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/actions/LandscapeActions.cc	2006-09-06 02:42:32 UTC (rev 928)
@@ -70,11 +70,11 @@
     
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Performing landscape analysis on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Performing landscape analysis...");
       }
 
@@ -85,7 +85,7 @@
         depths.Push(genotype->GetDepth());
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Performing landscape analysis...");
 
       cGenotype* genotype = m_world->GetClassificationManager().GetBestGenotype();
@@ -161,11 +161,11 @@
   void Process(cAvidaContext& ctx)
   {    
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Precalculating landscape for batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Precalculating landscape...");
       }
       
@@ -211,11 +211,11 @@
     cLandscape* land = NULL;
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Full Landscaping batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Full Landscapping...");
       }
 
@@ -232,7 +232,7 @@
       }
       jobqueue.Execute();
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Full Landscaping...");
       
       land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
@@ -283,11 +283,11 @@
     cLandscape* land = NULL;
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Deletion Landscaping batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Deletion Landscapping...");
       }
 
@@ -304,7 +304,7 @@
       }
       jobqueue.Execute();
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Deletion Landscaping...");
       
       land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
@@ -354,11 +354,11 @@
     cLandscape* land = NULL;
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Insertion Landscaping batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Insertion Landscapping...");
       }
 
@@ -375,7 +375,7 @@
       }
       jobqueue.Execute();
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Insertion Landscaping...");
       
       land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
@@ -420,11 +420,11 @@
     std::ofstream& outfile = m_world->GetDataFileOFStream(m_filename);
 
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Predicting W Landscape on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Predicting W Landscape...");
       }
       
@@ -435,7 +435,7 @@
         land.PredictWProcess(ctx, outfile);
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Predicting W Landscape...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -470,11 +470,11 @@
     std::ofstream& outfile = m_world->GetDataFileOFStream(m_filename);
 
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Predicting Nu Landscape on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Predicting Nu Landscape...");
       }
       
@@ -485,7 +485,7 @@
         land.PredictWProcess(ctx, outfile);
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Predicting Nu Landscape...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -525,11 +525,11 @@
     cLandscape* land = NULL;
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Random Landscaping batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Random Landscapping...");
       }
 
@@ -547,7 +547,7 @@
       }
       jobqueue.Execute();
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Random Landscaping...");
 
       land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
@@ -596,11 +596,11 @@
     cLandscape* land = NULL;
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Sample Landscaping batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Sample Landscapping...");
       }
 
@@ -617,7 +617,7 @@
       }
       jobqueue.Execute();
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Sample Landscaping...");
 
       land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
@@ -661,11 +661,11 @@
     std::ofstream& outfile = m_world->GetDataFileOFStream(m_filename);
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Calculating Hill Climb on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Calculating Hill Climb...");
       }
       
@@ -676,7 +676,7 @@
         land.HillClimb(ctx, outfile);
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Calculating Hill Climb...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -711,11 +711,11 @@
     std::ofstream& outfile = m_world->GetDataFileOFStream(m_filename);
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Calculating Hill Climb on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Calculating Hill Climb...");
       }
       
@@ -726,7 +726,7 @@
         land.HillClimb_Neut(ctx, outfile);
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Calculating Hill Climb...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -761,11 +761,11 @@
     std::ofstream& outfile = m_world->GetDataFileOFStream(m_filename);
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Calculating Hill Climb on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Calculating Hill Climb...");
       }
       
@@ -776,7 +776,7 @@
         land.HillClimb_Rand(ctx, outfile);
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Calculating Hill Climb...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -823,11 +823,11 @@
     cInstSet& inst_set = m_world->GetHardwareManager().GetInstSet();
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Calculating Mutational Neighborhood for batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Calculating Mutational Neighborhood...");
       }
 
@@ -841,7 +841,7 @@
       }
       jobqueue.Execute();
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Calculating Mutational Neighborhood...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -895,11 +895,11 @@
     std::ofstream& outfile = m_world->GetDataFileOFStream(filename);
     
     if (ctx.GetAnalyzeMode()) {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cString msg("Pair Testing Landscape on batch ");
         msg += cStringUtil::Convert(m_world->GetAnalyze().GetCurrentBatchID());
         m_world->GetDriver().NotifyComment(msg);
-      } else if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+      } else if (m_world->GetVerbosity() > VERBOSE_SILENT) {
         m_world->GetDriver().NotifyComment("Pair Testing Landscape...");
       }
       
@@ -911,7 +911,7 @@
         else land.TestAllPairs(ctx, outfile);
       }
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Pair Testing Landscape...");
       
       const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
@@ -983,7 +983,7 @@
     if (ctx.GetAnalyzeMode()) {
       m_world->GetDriver().NotifyWarning("AnalyzePopulation not currently supported in Analyze Mode.");
     } else {
-      if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+      if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
         m_world->GetDriver().NotifyComment("Analyzing Population...");
 
       const int update = m_world->GetStats().GetUpdate();

Modified: development/source/actions/PrintActions.cc
===================================================================
--- development/source/actions/PrintActions.cc	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/actions/PrintActions.cc	2006-09-06 02:42:32 UTC (rev 928)
@@ -1378,7 +1378,49 @@
 };
 
 
+class cActionSetVerbose : public cAction
+{
+private:
+  cString m_verbose;
+  
+public:
+  cActionSetVerbose(cWorld* world, const cString& args) : cAction(world, args), m_verbose("")
+  {
+    cString largs(args);
+    if (largs.GetSize()) m_verbose = largs.PopWord();
+    m_verbose.ToUpper();
+  }
+  static const cString GetDescription() { return "Arguments: [string verbosity='']"; }
+  void Process(cAvidaContext& ctx)
+  {
+    // If no arguments are given, assume a basic toggle.
+    // Otherwise, read in the argument to decide the new mode.
+    if (m_verbose.GetSize() == 0 && m_world->GetVerbosity() <= VERBOSE_NORMAL) {
+      m_world->SetVerbosity(VERBOSE_ON);
+    } else if (m_verbose.GetSize() == 0 && m_world->GetVerbosity() >= VERBOSE_ON) {
+      m_world->SetVerbosity(VERBOSE_NORMAL);
+    } else if (m_verbose == "SILENT") m_world->SetVerbosity(VERBOSE_SILENT);
+    else if (m_verbose == "QUIET") m_world->SetVerbosity(VERBOSE_NORMAL);
+    else if (m_verbose == "OFF") m_world->SetVerbosity(VERBOSE_NORMAL);
+    else if (m_verbose == "ON") m_world->SetVerbosity(VERBOSE_ON);
+    else if (m_verbose == "DETAILS") m_world->SetVerbosity(VERBOSE_DETAILS);
+    else if (m_verbose == "HIGH") m_world->SetVerbosity(VERBOSE_DETAILS);
+    
+    // Print out new verbose level (nothing for silent!)
+    if (m_world->GetVerbosity() == VERBOSE_NORMAL) {
+      cout << "Verbose QUIET: Using minimal log messages..." << endl;
+    } else if (m_world->GetVerbosity() == VERBOSE_ON) {
+      cout << "Verbose ON: Using verbose log messages..." << endl;
+    } else if (m_world->GetVerbosity() == VERBOSE_DETAILS) {
+      cout << "Verbose DETAILS: Using detailed log messages..." << endl;
+    }    
+  
+  }
+};
 
+
+
+
 void RegisterPrintActions(cActionLibrary* action_lib)
 {
   // Stats Out Files
@@ -1435,6 +1477,10 @@
   action_lib->Register<cActionDumpTaskGrid>("DumpTaskGrid");
   action_lib->Register<cActionDumpDonorGrid>("DumpDonorGrid");
   action_lib->Register<cActionDumpReceiverGrid>("DumpReceiverGrid");
+  
+  // Print Settings
+  action_lib->Register<cActionSetVerbose>("SetVerbose");
+  
 
 
   // @DMB - The following actions are DEPRECATED aliases - These will be removed in 2.7.
@@ -1487,4 +1533,6 @@
   action_lib->Register<cActionDumpTaskGrid>("dump_task_grid");
   action_lib->Register<cActionDumpDonorGrid>("dump_donor_grid");
   action_lib->Register<cActionDumpReceiverGrid>("dump_receiver_grid");
+
+  action_lib->Register<cActionSetVerbose>("VERBOSE");
 }

Modified: development/source/analyze/cAnalyze.cc
===================================================================
--- development/source/analyze/cAnalyze.cc	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/analyze/cAnalyze.cc	2006-09-06 02:42:32 UTC (rev 928)
@@ -56,6 +56,8 @@
 #  include "win32_mkdir_hack.hh"
 #endif
 
+#include "defs.h"
+
 extern "C" {
 #include <errno.h>
 #include <sys/stat.h>
@@ -69,7 +71,6 @@
 , inst_set(world->GetHardwareManager().GetInstSet())
 , m_ctx(world->GetDefaultContext())
 , m_jobqueue(world)
-, verbose(world->GetConfig().VERBOSITY.Get())
 , interactive_depth(0)
 {
   
@@ -282,7 +283,7 @@
     << endl;
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Loading in " << num_steps
     << " detail files from update " << start_UD
     << " to update " << stop_UD
@@ -964,7 +965,7 @@
     exit(1);
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Loading file of type: " << filetype << endl;
   }
   
@@ -1019,7 +1020,7 @@
   // If no arguments are passed in, just find max num_cpus.
   if (cur_string.GetSize() == 0) cur_string = "num_cpus";
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Reducing batch " << cur_batch << " to genotypes: ";
   }
   
@@ -1027,7 +1028,7 @@
   tListPlus<cAnalyzeGenotype> found_list;
   while (cur_string.CountNumWords() > 0) {
     cString gen_desc(cur_string.PopWord());
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << gen_desc << " ";
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << gen_desc << " ";
     
     // Determine by lin_type which genotype were are tracking...
     cAnalyzeGenotype * found_gen = PopGenotype(gen_desc, cur_batch);
@@ -1061,7 +1062,7 @@
     return;
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Reducing batch " << cur_batch << " to organisms: " << endl;
   }
   
@@ -1073,7 +1074,7 @@
   
   while (cur_string.CountNumWords() > 0) {
     cString org_desc(cur_string.PopWord());
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << org_desc << " ";
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << org_desc << " ";
     
     // Determine by org_desc which genotype were are tracking...
     if (org_desc == "random") {
@@ -1130,7 +1131,7 @@
   cString lin_type = "num_cpus";
   if (cur_string.CountNumWords() > 0) lin_type = cur_string.PopWord();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Reducing batch " << cur_batch
     << " to " << lin_type << " lineage " << endl;
   } else cout << "Performing lineage scan..." << endl;
@@ -1183,7 +1184,7 @@
     batch[cur_batch].List().PushRear(found_list.Pop());
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  Lineage has " << total_kept << " genotypes; "
     << total_removed << " were removed." << endl;
   }
@@ -1210,7 +1211,7 @@
   cString parent_method = "rec_region_size";
   if (cur_string.CountNumWords() > 0) parent_method = cur_string.PopWord();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Reducing batch " << cur_batch
     << " to " << lin_type << " sexual lineage " 
     << " using " << parent_method << " criteria." << endl;
@@ -1338,7 +1339,7 @@
     batch[cur_batch].List().PushRear(found_list.Pop());
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  Sexual lineage has " << total_kept << " genotypes; "
     << total_removed << " were removed." << endl;
   }
@@ -1357,7 +1358,7 @@
   
   cString clade_type( cur_string.PopWord() );
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Reducing batch " << cur_batch
     << " to clade " << clade_type << "." << endl;
   } else cout << "Performing clade scan..." << endl;
@@ -1411,7 +1412,7 @@
     batch[cur_batch].List().PushRear(found_list.Pop());
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  Clade has " << total_kept << " genotypes; "
     << total_removed << " were removed." << endl;
   }
@@ -1431,7 +1432,7 @@
     test_viable = cur_string.PopWord().AsDouble();
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Sampling " << fraction << " organisms from batch "
     << cur_batch << "." << endl;
   }
@@ -1498,7 +1499,7 @@
   }
   
   int num_genotypes = batch[cur_batch].List().GetSize();
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  Removed " << org_count - new_org_count
     << " organisms (" << init_genotypes - num_genotypes
     << " genotypes); " << new_org_count
@@ -1522,7 +1523,7 @@
     test_viable = cur_string.PopWord().AsDouble();
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Sampling " << fraction << " genotypes from batch "
     << cur_batch << "." << endl;
   }
@@ -1541,7 +1542,7 @@
   }
   
   int num_genotypes = batch[cur_batch].List().GetSize();
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  Removed " << init_genotypes - num_genotypes
     << " genotypes; " << num_genotypes << " remaining."
     << endl;
@@ -1583,7 +1584,7 @@
   BatchRecalculate("");
 
   if (type == "task") {
-    if (verbose >= nAnalyze::VERBOSE_ON)
+    if (m_world->GetVerbosity() >= VERBOSE_ON)
       cout << "Truncating batch " << cur_batch << " based on task " << arg_i << " emergence..." << endl;
     else 
       cout << "Truncating lineage..." << endl;
@@ -1608,7 +1609,7 @@
 
 void cAnalyze::CommandPrint(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Printing batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Printing batch " << cur_batch << endl;
   else cout << "Printing organisms..." << endl;
   
   cString directory = PopDirectory(cur_string, "archive/");
@@ -1627,13 +1628,13 @@
     }
     
     cTestUtil::PrintGenome(m_world, genotype->GetGenome(), filename);
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "Printing: " << filename << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Printing: " << filename << endl;
   }
 }
 
 void cAnalyze::CommandTrace(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Tracing batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Tracing batch " << cur_batch << endl;
   else cout << "Tracing organisms..." << endl;
   
   int words = cur_string.CountNumWords();
@@ -1675,7 +1676,7 @@
     
     testcpu->TestGenome(m_ctx, test_info, genotype->GetGenome());
     
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "  Tracing: " << filename << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  Tracing: " << filename << endl;
     m_world->GetDataFileManager().Remove(filename);
   }
   
@@ -1684,7 +1685,7 @@
 
 void cAnalyze::CommandPrintTasks(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Printing tasks in batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Printing tasks in batch " << cur_batch << endl;
   else cout << "Printing tasks..." << endl;
   
   // Load in the variables...
@@ -1705,7 +1706,7 @@
 
 void cAnalyze::CommandDetail(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Detailing batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Detailing batch " << cur_batch << endl;
   else cout << "Detailing..." << endl;
   
   // Load in the variables...
@@ -1740,7 +1741,7 @@
 
 void cAnalyze::CommandDetailTimeline(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Detailing batch "
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Detailing batch "
     << cur_batch << " based on time" << endl;
   else cout << "Detailing..." << endl;
   
@@ -1752,7 +1753,7 @@
   if (cur_string.GetSize() != 0) time_step = cur_string.PopWord().AsInt();
   if (cur_string.GetSize() != 0) max_time = cur_string.PopWord().AsInt();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  Time step = " << time_step << endl
     << "  Max time = " << max_time << endl;
   }
@@ -1844,7 +1845,7 @@
   
   int cur_time = 0;
   while (cur_genotype != NULL && cur_time <= max_time) {
-    if (verbose >= nAnalyze::VERBOSE_DETAILS) {
+    if (m_world->GetVerbosity() >= VERBOSE_DETAILS) {
       cout << "Detailing genotype " << cur_genotype->GetID()
            << " at depth " << cur_genotype->GetDepth()
            << endl;
@@ -1940,7 +1941,7 @@
 
 void cAnalyze::CommandDetailAverage(cString cur_string) 
 { 
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Average detailing batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Average detailing batch " << cur_batch << endl;
   else cout << "Detailing..." << endl;
   
   // Load in the variables...
@@ -1975,7 +1976,7 @@
   if (cur_string.GetSize() != 0) keyword = cur_string.PopWord();
   if (cur_string.GetSize() != 0) filename = cur_string.PopWord();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Detailing batches for " << keyword << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Detailing batches for " << keyword << endl;
   else cout << "Detailing Batches..." << endl;
   
   // Scan the functions list for the keyword we need...
@@ -2243,7 +2244,7 @@
 
 void cAnalyze::CommandHistogram(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Histogram batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Histogram batch " << cur_batch << endl;
   else cout << "Histograming..." << endl;
   
   // Load in the variables...
@@ -2417,7 +2418,7 @@
 
 void cAnalyze::CommandPrintPhenotypes(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Printing phenotypes in batch "
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Printing phenotypes in batch "
     << cur_batch << endl;
   else cout << "Printing phenotypes..." << endl;
   
@@ -2504,7 +2505,7 @@
 // Print various diversity metrics from the current batch of genotypes...
 void cAnalyze::CommandPrintDiversity(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Printing diversity data for batch "
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Printing diversity data for batch "
     << cur_batch << endl;
   else cout << "Printing diversity data..." << endl;
   
@@ -3431,7 +3432,7 @@
 //@ MRR @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 void cAnalyze::CommandPairwiseEntropy(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON)
+  if (m_world->GetVerbosity() >= VERBOSE_ON)
     cout << "Finding pairwise entropy on batch " << cur_batch << endl;
   else
     cout << "Finding pairwise entropy..." << endl;
@@ -3439,10 +3440,10 @@
   cout << "@MRR-> This command is being tested!" << endl;
 
   cString directory = PopDirectory(cur_string, "pairwise_data/");
-  if (verbose >= nAnalyze::VERBOSE_ON)
+  if (m_world->GetVerbosity() >= VERBOSE_ON)
     cout << "\tUsing directory: " << directory << endl;
   double mu = cur_string.PopWord().AsDouble();
-  if (verbose >= nAnalyze::VERBOSE_ON)
+  if (m_world->GetVerbosity() >= VERBOSE_ON)
     cout << "\tUsing mu=" << mu << endl;
 
   tListIterator<cAnalyzeGenotype> batch_it(batch[cur_batch].List());
@@ -3454,7 +3455,7 @@
   { 
     cString genName = genotype->GetName();
 
-    if (verbose >= nAnalyze::VERBOSE_ON)
+    if (m_world->GetVerbosity() >= VERBOSE_ON)
       cout << "\t...on genotype " << genName << endl;
 
     cString filename;
@@ -3463,7 +3464,7 @@
 
     // @DMB -- ofstream& fp = m_world->GetDataFileOFStream(filename);
 
-    if (verbose >= nAnalyze::VERBOSE_ON)
+    if (m_world->GetVerbosity() >= VERBOSE_ON)
 	cout << "\t\t...with filename:  " << filename << endl;
 
     cout << "# Pairwise Entropy Information" << endl;
@@ -3499,7 +3500,7 @@
 
 void cAnalyze::AnalyzeEpistasis(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Epistasis on " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Epistasis on " << cur_batch << endl;
   else cout << "Calculating epistasis values..." << endl;
   
   // Load in the variables...
@@ -3730,7 +3731,7 @@
   if (cur_string.GetSize() > 0) del_mut_prob = cur_string.PopWord().AsDouble();
   if (cur_string.GetSize() > 0) count_threshold = cur_string.PopWord().AsInt();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "...using:"
     << " filename='" << filename << "'"
     << " num_tests=" << num_tests
@@ -4022,7 +4023,7 @@
   tListIterator<cAnalyzeGenotype> batch_it(batch[cur_batch].List());
   cAnalyzeGenotype * genotype = NULL;
   while ((genotype = batch_it.Next()) != NULL) {
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "  Knockout: " << genotype->GetName() << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  Knockout: " << genotype->GetName() << endl;
     
     // Calculate the stats for the genotype we're working with...
     genotype->Recalculate(m_ctx, m_testcpu);
@@ -4133,7 +4134,7 @@
 
 void cAnalyze::CommandFitnessMatrix(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Calculating fitness matrix for batch " << cur_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Calculating fitness matrix for batch " << cur_batch << endl;
   else cout << "Calculating fitness matrix..." << endl;
   
   cout << "Warning: considering only first genotype of the batch!" << endl;
@@ -4220,7 +4221,7 @@
   const int num_cols = output_list.GetSize();
   
   // Give some information in verbose mode.
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  outputing as ";
     if (print_mode == 1) cout << "boolean ";
     if (file_type == FILE_TYPE_TEXT) {
@@ -4247,7 +4248,7 @@
   tListIterator<cAnalyzeGenotype> batch_it(batch[cur_batch].List());
   cAnalyzeGenotype * genotype = NULL;
   while ((genotype = batch_it.Next()) != NULL) {
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "  Mapping " << genotype->GetName() << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  Mapping " << genotype->GetName() << endl;
     
     // Construct this filename...
     cString filename;
@@ -4493,7 +4494,7 @@
   const int num_cols = output_list.GetSize();
   
   // Give some information in verbose mode.
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  outputing as ";
     if (print_mode == 1) cout << "boolean ";
     cout << "text files." << endl;
@@ -4578,7 +4579,7 @@
     
     int num_cpus = genotype->GetNumCPUs();
     
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "  Mapping " << genotype->GetName() << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  Mapping " << genotype->GetName() << endl;
     
     // Calculate the stats for the genotype we're working with...
     genotype->Recalculate(m_ctx, m_testcpu);
@@ -5001,7 +5002,7 @@
   if (arg_list.PopString("html") != "") file_type = FILE_TYPE_HTML;
   
   // Give some information in verbose mode.
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "  outputing as ";
     if (file_type == FILE_TYPE_TEXT) cout << "text files." << endl;
     else cout << "HTML files." << endl;
@@ -5014,7 +5015,7 @@
   tListIterator<cAnalyzeGenotype> batch_it(batch[cur_batch].List());
   cAnalyzeGenotype * genotype = NULL;
   while ((genotype = batch_it.Next()) != NULL) {
-    if (verbose >= nAnalyze::VERBOSE_ON) {
+    if (m_world->GetVerbosity() >= VERBOSE_ON) {
       cout << "  Creating mutation map for " << genotype->GetName() << endl;
     }
     
@@ -5309,7 +5310,7 @@
     int tmp = batch1;  batch1 = batch2;  batch2 = tmp;
   }
   
-  if (verbose <= nAnalyze::VERBOSE_NORMAL) {
+  if (m_world->GetVerbosity() <= VERBOSE_NORMAL) {
     cout << "Calculating Hamming Distance... ";
     cout.flush();
   } else {
@@ -5376,7 +5377,7 @@
     int tmp = batch1;  batch1 = batch2;  batch2 = tmp;
   }
   
-  if (verbose <= nAnalyze::VERBOSE_NORMAL) {
+  if (m_world->GetVerbosity() <= VERBOSE_NORMAL) {
     cout << "Calculating Levenstein Distance... ";
     cout.flush();
   } else {
@@ -5443,7 +5444,7 @@
     int tmp = batch1;  batch1 = batch2;  batch2 = tmp;
   }
   
-  if (verbose <= nAnalyze::VERBOSE_NORMAL) cout << "Calculating Species Distance... " << endl;
+  if (m_world->GetVerbosity() <= VERBOSE_NORMAL) cout << "Calculating Species Distance... " << endl;
   else cout << "Calculating Species Distance between batch "
     << batch1 << " and " << batch2 << endl;
   
@@ -5564,7 +5565,7 @@
     int tmp = batch1;  batch1 = batch2;  batch2 = tmp;
   }
   
-  if (verbose <= nAnalyze::VERBOSE_NORMAL) cout << "Creating recombinants...  " << endl;
+  if (m_world->GetVerbosity() <= VERBOSE_NORMAL) cout << "Creating recombinants...  " << endl;
   else cout << "Creating recombinants between batch "
     << batch1 << " and " << batch2 << endl;
   
@@ -5658,7 +5659,7 @@
   
   cout << "Aligning sequences..." << endl;
   
-  if (batch[cur_batch].IsLineage() == false && verbose >= nAnalyze::VERBOSE_ON) {
+  if (batch[cur_batch].IsLineage() == false && m_world->GetVerbosity() >= VERBOSE_ON) {
     cerr << "  Warning: sequences may not be a consecutive lineage."
     << endl;
   }
@@ -5779,7 +5780,7 @@
   
   while ((child_genotype = batch_it.Next()) != NULL) {
     
-    if (verbose >= nAnalyze::VERBOSE_ON) {
+    if (m_world->GetVerbosity() >= VERBOSE_ON) {
       cout << "Analyze new information for " << child_genotype->GetName() << endl;
     }
     
@@ -5967,7 +5968,7 @@
     for (grid_side = 5; grid_side < 100; grid_side += 5) {
       if (grid_side * grid_side >= max_count) break;
     }
-    if (verbose >= nAnalyze::VERBOSE_ON) {
+    if (m_world->GetVerbosity() >= VERBOSE_ON) {
       cout << "...assuming population size "
       << grid_side << "x" << grid_side << "." << endl;
     }
@@ -6080,7 +6081,7 @@
   
   // Count the number of diffs between the two strings we're interested in.
   const int total_diffs = cStringUtil::Distance(first_seq, last_seq);
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "  " << total_diffs << " mutations being tested." << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  " << total_diffs << " mutations being tested." << endl;
   
   // Locate each difference.
   int * mut_positions = new int[total_diffs];
@@ -6204,7 +6205,7 @@
 
 void cAnalyze::AnalyzeInstructions(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Analyzing Instructions in batch " << cur_batch << endl;
   }
   else cout << "Analyzeing Instructions..." << endl;
@@ -6344,7 +6345,7 @@
 
 void cAnalyze::AnalyzeInstPop(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Analyzing Instructions in batch " << cur_batch << endl;
   }
   else cout << "Analyzeing Instructions..." << endl;
@@ -6402,7 +6403,7 @@
 
 void cAnalyze::AnalyzeBranching(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Analyzing branching patterns in batch " << cur_batch << endl;
   }
   else cout << "Analyzeing Branches..." << endl;
@@ -6420,13 +6421,13 @@
 
 void cAnalyze::AnalyzeMutationTraceback(cString cur_string)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Analyzing mutation traceback in batch " << cur_batch << endl;
   }
   else cout << "Analyzing mutation traceback..." << endl;
   
   // This works best on lineages, so warn if we don't have one.
-  if (batch[cur_batch].IsLineage() == false && verbose >= nAnalyze::VERBOSE_ON) {
+  if (batch[cur_batch].IsLineage() == false && m_world->GetVerbosity() >= VERBOSE_ON) {
     cerr << "  Warning: trying to traceback mutations outside of lineage."
     << endl;
   }
@@ -6571,7 +6572,7 @@
   ofstream& lineage_fp = m_world->GetDataFileOFStream(lineage_filename);
   
   while ((genotype = batch_it.Next()) != NULL) {
-    if (verbose >= nAnalyze::VERBOSE_ON) {
+    if (m_world->GetVerbosity() >= VERBOSE_ON) {
       cout << "  Analyzing complexity for " << genotype->GetName() << endl;
     }
     
@@ -6682,7 +6683,7 @@
     // where i is the batchFrequency
     for(int count=0; genotype != NULL && count < batchFrequency - 1; count++) {
       genotype = batch_it.Next();
-      if(genotype != NULL && verbose >= nAnalyze::VERBOSE_ON) {
+      if(genotype != NULL && m_world->GetVerbosity() >= VERBOSE_ON) {
         cout << "Skipping: " << genotype->GetName() << endl;
       }
     }
@@ -6777,7 +6778,7 @@
   cout << "Printing helpfiles in: " << cur_string << endl;
   
   cHelpManager help_control;
-  if (verbose >= nAnalyze::VERBOSE_ON) help_control.SetVerbose();
+  if (m_world->GetVerbosity() >= VERBOSE_ON) help_control.SetVerbose();
   while (cur_string.GetSize() > 0) {
     help_control.LoadFile(cur_string.PopWord());
   }
@@ -6800,7 +6801,7 @@
   cString & cur_variable = GetVariable(var);
   cur_variable = cur_string.PopWord();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Setting " << var << " to " << cur_variable << endl;
   }
 }
@@ -6811,7 +6812,7 @@
   if (cur_string.CountNumWords() > 0) {
     next_batch = cur_string.PopWord().AsInt();
   }
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Setting current batch to " << next_batch << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Setting current batch to " << next_batch << endl;
   if (next_batch >= MAX_BATCHES) {
     cerr << "  Error: max batches is " << MAX_BATCHES << endl;
     exit(1);
@@ -6823,7 +6824,7 @@
 void cAnalyze::BatchName(cString cur_string)
 {
   if (cur_string.CountNumWords() == 0) {
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "  Warning: No name given in NAME_BATCH!" << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  Warning: No name given in NAME_BATCH!" << endl;
     return;
   }
   
@@ -6833,11 +6834,11 @@
 void cAnalyze::BatchTag(cString cur_string)
 {
   if (cur_string.CountNumWords() == 0) {
-    if (verbose >= nAnalyze::VERBOSE_ON) cout << "  Warning: No tag given in TAG_BATCH!" << endl;
+    if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "  Warning: No tag given in TAG_BATCH!" << endl;
     return;
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Tagging batch " << cur_batch
     << " with tag '" << cur_string << "'" << endl;
   }
@@ -6855,7 +6856,7 @@
   int batch_id = cur_batch;
   if (cur_string.CountNumWords() > 0) batch_id = cur_string.PopWord().AsInt();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Purging batch " << batch_id << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Purging batch " << batch_id << endl;
   
   while (batch[batch_id].List().GetSize() > 0) {
     delete batch[batch_id].List().Pop();
@@ -6876,7 +6877,7 @@
   int batch_to = cur_batch;
   if (cur_string.GetSize() > 0) batch_to = cur_string.PopWord().AsInt();
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Duplicating from batch " << batch_from << " to batch " << batch_to << "." << endl;
   }
   
@@ -6910,11 +6911,11 @@
   cTestCPU* testcpu = m_world->GetHardwareManager().CreateTestCPU();
   testcpu->SetUseResources(useResources);
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Running batch " << cur_batch << " through test CPUs..." << endl;
   } else cout << "Running through test CPUs..." << endl;
   
-  if (verbose >= nAnalyze::VERBOSE_ON && batch[cur_batch].IsLineage() == false) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON && batch[cur_batch].IsLineage() == false) {
     cerr << "  Warning: batch may not be a linege; "
     << "parent and ancestor distances may not be correct" << endl;
   }
@@ -6951,7 +6952,7 @@
 
 void cAnalyze::BatchRename(cString cur_string)
 {
-  if (verbose <= nAnalyze::VERBOSE_NORMAL) cout << "Renaming organisms..." << endl;
+  if (m_world->GetVerbosity() <= VERBOSE_NORMAL) cout << "Renaming organisms..." << endl;
   else cout << "Renaming organisms in batch " << cur_batch << endl;
   
   // If a number is given with rename, start at that number...
@@ -6991,35 +6992,6 @@
   cerr << "::: " << cur_string << endl;
 }
 
-void cAnalyze::CommandVerbose(cString cur_string)
-{
-  cur_string.ToUpper();
-  
-  // If no arguments are given, assume a basic toggle.
-  if (cur_string.GetSize() == 0 && verbose <= nAnalyze::VERBOSE_NORMAL) {
-    verbose = nAnalyze::VERBOSE_ON;
-  }
-  else if (cur_string.GetSize() == 0 && verbose >= nAnalyze::VERBOSE_ON) {
-    verbose = nAnalyze::VERBOSE_NORMAL;
-  }
-  
-  // Otherwise, read in the argument to decide the new mode.
-  else if (cur_string == "SILENT") verbose = nAnalyze::VERBOSE_SILENT;
-  else if (cur_string == "QUIET") verbose = nAnalyze::VERBOSE_NORMAL;
-  else if (cur_string == "OFF") verbose = nAnalyze::VERBOSE_NORMAL;
-  else if (cur_string == "ON") verbose = nAnalyze::VERBOSE_ON;
-  else if (cur_string == "DETAILS") verbose = nAnalyze::VERBOSE_DETAILS;
-  else if (cur_string == "HIGH") verbose = nAnalyze::VERBOSE_DETAILS;
-  // Print out new verbose level (nothing for silent!)
-  if (verbose == nAnalyze::VERBOSE_NORMAL) {
-    cout << "Verbose QUIET: Using minimal log messages..." << endl;
-  } else if (verbose == nAnalyze::VERBOSE_ON) {
-    cout << "Verbose ON: Using verbose log messages..." << endl;
-  } else if (verbose == nAnalyze::VERBOSE_DETAILS) {
-    cout << "Verbose DETAILS: Using detailed log messages..." << endl;
-  }
-}
-
 void cAnalyze::IncludeFile(cString cur_string)
 {
   while (cur_string.GetSize() > 0) {
@@ -7069,7 +7041,7 @@
     exit(1);
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Creating function: " << fun_name << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Creating function: " << fun_name << endl;
   
   // Create the new function...
   cAnalyzeFunction * new_function = new cAnalyzeFunction(fun_name);
@@ -7083,7 +7055,7 @@
 
 bool cAnalyze::FunctionRun(const cString & fun_name, cString args)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Running function: " << fun_name << endl;
     // << " with args: " << args << endl;
   }
@@ -7141,7 +7113,7 @@
 void cAnalyze::CommandForeach(cString cur_string,
                               tList<cAnalyzeCommand> & clist)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Initiating Foreach loop..." << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Initiating Foreach loop..." << endl;
   
   cString var = cur_string.PopWord();
   int num_args = cur_string.CountNumWords();
@@ -7151,13 +7123,13 @@
   for (int i = 0; i < num_args; i++) {
     cur_variable = cur_string.PopWord();
     
-    if (verbose >= nAnalyze::VERBOSE_ON) {
+    if (m_world->GetVerbosity() >= VERBOSE_ON) {
       cout << "Foreach: setting " << var << " to " << cur_variable << endl;
     }
     ProcessCommands(clist);
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Ending Foreach on " << var << endl;
   }
 }
@@ -7166,7 +7138,7 @@
 void cAnalyze::CommandForRange(cString cur_string,
                                tList<cAnalyzeCommand> & clist)
 {
-  if (verbose >= nAnalyze::VERBOSE_ON) cout << "Initiating FORRANGE loop..." << endl;
+  if (m_world->GetVerbosity() >= VERBOSE_ON) cout << "Initiating FORRANGE loop..." << endl;
   
   int num_args = cur_string.CountNumWords();
   if (num_args < 3) {
@@ -7190,7 +7162,7 @@
     for (int i = (int) min_val; i <= (int) max_val; i += (int) step_val) {
       cur_variable.Set("%d", i);
       
-      if (verbose >= nAnalyze::VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cout << "FORRANGE: setting " << var << " to " << cur_variable << endl;
       }
       ProcessCommands(clist);
@@ -7199,14 +7171,14 @@
     for (double i = min_val; i <= max_val; i += step_val) {
       cur_variable.Set("%f", i);
       
-      if (verbose >= nAnalyze::VERBOSE_ON) {
+      if (m_world->GetVerbosity() >= VERBOSE_ON) {
         cout << "FORRANGE: setting " << var << " to " << cur_variable << endl;
       }
       ProcessCommands(clist);
     }
   }
   
-  if (verbose >= nAnalyze::VERBOSE_ON) {
+  if (m_world->GetVerbosity() >= VERBOSE_ON) {
     cout << "Ending FORRANGE on " << var << endl;
   }
 }
@@ -7772,7 +7744,6 @@
   AddLibraryDef("STATUS", &cAnalyze::PrintStatus);
   AddLibraryDef("DEBUG", &cAnalyze::PrintDebug);
   AddLibraryDef("ECHO", &cAnalyze::PrintDebug);
-  AddLibraryDef("VERBOSE", &cAnalyze::CommandVerbose);
   AddLibraryDef("INCLUDE", &cAnalyze::IncludeFile);
   AddLibraryDef("RUN", &cAnalyze::IncludeFile);
   AddLibraryDef("SYSTEM", &cAnalyze::CommandSystem);

Modified: development/source/analyze/cAnalyze.h
===================================================================
--- development/source/analyze/cAnalyze.h	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/analyze/cAnalyze.h	2006-09-06 02:42:32 UTC (rev 928)
@@ -40,34 +40,19 @@
 
 const int MAX_BATCHES = 2000;
 
-namespace nAnalyze {
-  const int VERBOSE_SILENT  = 0;  // No output at all
-  const int VERBOSE_NORMAL   = 1;  // Notification at start of commands.
-  const int VERBOSE_ON      = 2;  // Verbose output, detailing progress
-  const int VERBOSE_DETAILS = 3;  // High level of details, as available.
-}
-
-// cAnalyze            : The master analyze object.
-
-class cGenotypeBatch; // array
-template <class T> class tList; // aggregate
 class cAnalyzeCommand;
 class cAnalyzeFunction;
 class cAnalyzeCommandDefBase;
-class cString; // aggregate
 template <class T> class tDataEntryBase;
 class cInstSet;
-class cRandom; // aggregate
-class cString; // aggregate
 class cAnalyzeGenotype;
 class cInitFile;
-class cStringList; // aggregate
 template <class T> class tDataEntryCommand;
-template <class T> class tListIterator;
 class cEnvironment;
 class cTestCPU;
 class cWorld;
 
+
 class cAnalyze
 {
 private:
@@ -91,7 +76,6 @@
   // is a pair of the update and a vector of the resource concentrations
   std::vector<std::pair<int, std::vector<double> > > resources;
 
-  int verbose;            // How much information to print?
   int interactive_depth;  // How nested are we if in interactive mode?
 
   tList< tDataEntryBase<cAnalyzeGenotype> > genotype_data_list;
@@ -234,7 +218,6 @@
   void BatchRename(cString cur_string);
   void PrintStatus(cString cur_string);
   void PrintDebug(cString cur_string);
-  void CommandVerbose(cString cur_string);
   void IncludeFile(cString cur_string);
   void CommandSystem(cString cur_string);
   void CommandInteractive(cString cur_string);

Modified: development/source/analyze/cAnalyzeJobQueue.cc
===================================================================
--- development/source/analyze/cAnalyzeJobQueue.cc	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/analyze/cAnalyzeJobQueue.cc	2006-09-06 02:42:32 UTC (rev 928)
@@ -83,7 +83,7 @@
 
 void cAnalyzeJobQueue::Start()
 {
-  if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+  if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
     m_world->GetDriver().NotifyComment("waking worker threads...");
 
   pthread_cond_broadcast(&m_cond);
@@ -92,7 +92,7 @@
 
 void cAnalyzeJobQueue::Execute()
 {
-  if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+  if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
     m_world->GetDriver().NotifyComment("waking worker threads...");
 
   pthread_cond_broadcast(&m_cond);
@@ -104,6 +104,6 @@
   }
   pthread_mutex_unlock(&m_mutex);
 
-  if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
+  if (m_world->GetVerbosity() >= VERBOSE_DETAILS)
     m_world->GetDriver().NotifyComment("job queue complete");
 }

Modified: development/source/drivers/cDefaultRunDriver.cc
===================================================================
--- development/source/drivers/cDefaultRunDriver.cc	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/drivers/cDefaultRunDriver.cc	2006-09-06 02:42:32 UTC (rev 928)
@@ -96,7 +96,7 @@
     
     
     // No viewer; print out status for this update....
-    if (m_world->GetConfig().VERBOSITY.Get() > VERBOSE_SILENT) {
+    if (m_world->GetVerbosity() > VERBOSE_SILENT) {
       cout.setf(ios::left);
       cout.setf(ios::showpoint);
       cout << "UD: " << setw(6) << stats.GetUpdate() << "  "

Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/main/cPopulation.cc	2006-09-06 02:42:32 UTC (rev 928)
@@ -64,7 +64,7 @@
   const int num_cells = world_x * world_y;
 
   // Print out world details
-  if (world->GetConfig().VERBOSITY.Get() > VERBOSE_NORMAL) {
+  if (world->GetVerbosity() > VERBOSE_NORMAL) {
     cout << "Building world " << world_x << "x" << world_y << " = " << num_cells << " organisms." << endl;
     if (geometry == nGeometry::GRID) {
       cout << "Geometry: Bounded grid" << endl;

Modified: development/source/main/cWorld.h
===================================================================
--- development/source/main/cWorld.h	2006-09-05 22:21:54 UTC (rev 927)
+++ development/source/main/cWorld.h	2006-09-06 02:42:32 UTC (rev 928)
@@ -99,6 +99,8 @@
   int GetNumTasks();
   int GetNumReactions();
   int GetNumResources();
+  inline int GetVerbosity() { return m_conf->VERBOSITY.Get(); }
+  inline void SetVerbosity(int v) { m_conf->VERBOSITY.Set(v); }
 
   // @DMB - Inherited from cAvidaDriver heritage
   void GetEvents();




More information about the Avida-cvs mailing list