[Avida-cvs] [avida-svn] r880 - in development: documentation/content/using source/analyze source/tools

ofria at myxo.css.msu.edu ofria at myxo.css.msu.edu
Mon Aug 21 10:52:36 PDT 2006


Author: ofria
Date: 2006-08-21 13:52:36 -0400 (Mon, 21 Aug 2006)
New Revision: 880

Modified:
   development/documentation/content/using/analyze_mode.html
   development/source/analyze/cAnalyze.cc
   development/source/tools/cFile.cc
Log:
Minor fixes to cAnalyze.
Updates to analyze documentation.


Modified: development/documentation/content/using/analyze_mode.html
===================================================================
--- development/documentation/content/using/analyze_mode.html	2006-08-21 16:20:57 UTC (rev 879)
+++ development/documentation/content/using/analyze_mode.html	2006-08-21 17:52:36 UTC (rev 880)
@@ -18,7 +18,7 @@
 This analysis language is basically a simple programming language.  The
 structure of a program involves loading in genotypes in one or more
 "batches", and then either manipulating single batches, or doing comparisons
-between batches.  Currently there can be up to 300 batches of genotypes, but
+between batches.  Currently there can be up to 2000 batches of genotypes, but
 we will eventually remove this limit.
 
 <p>
@@ -40,17 +40,12 @@
         from avida.  These consist of lots of organismal information inside
         of comments, and then the full genome of the organism with one
         instruction per line.
-<tr><td><b>LOAD_BASE_DUMP [<font color="#0000AA">filename</font>]</b><br>
-	Load in a basic dump file from avida.  Each line contains a genotype
-        sequence, but little additional information.
-<tr><td><b>LOAD_DETAIL_DUMP [<font color="#0000AA">filename</font>]</b><br>
-	Load in a detail file.  These are similar to the basic dump files,
-        but contain a lot more information on each line.  These files are
-        saved from avida typically beginning with the word "detail" or
-        "historic".
 <tr><td><b>LOAD [<font color="#0000AA">filename</font>]</b><br>
-	Load in a file. This command LOAD_BASE_DUMP and LOAD_DETAIL_DUMP 
-	by automatically recognizing the type of the file being loaded. 
+    Load in a file that contains a list of genotypes, one-per-line with
+    additional informaiton about those genotypes. Avida now includes a header
+    on such files indicating the values containted in each column.  As such,
+    this command supercedes the now-depricated "LOAD_BASE_DUMP" and
+    "LOAD_DETAIL_DUMP", and can handle those file types.
 <tr><td><b>LOAD_SEQUENCE [<font color="#0000AA">sequence</font>]</b><br>
 	Load in a user-provided sequence as the genotype.  Avida has a
         symbol associated with each instruction; this command is simply

Modified: development/source/analyze/cAnalyze.cc
===================================================================
--- development/source/analyze/cAnalyze.cc	2006-08-21 16:20:57 UTC (rev 879)
+++ development/source/analyze/cAnalyze.cc	2006-08-21 17:52:36 UTC (rev 880)
@@ -953,7 +953,9 @@
   input_file.Load();
   input_file.ReadHeader();
   input_file.Compress();
-  input_file.Close();
+  if (input_file.Close() == false) {
+    cerr << "Error: Failed to Close file!" << endl;
+  }
   
   const cString filetype = input_file.GetFiletype();
   if (filetype != "population_data" &&  // Depricated
@@ -6986,7 +6988,7 @@
 
 void cAnalyze::PrintDebug(cString cur_string)
 {
-  cerr << "Debug Args: " << cur_string << endl;
+  cerr << "::: " << cur_string << endl;
 }
 
 void cAnalyze::CommandVerbose(cString cur_string)
@@ -7296,6 +7298,7 @@
   while (init_file.GetLineNum() < init_file.GetNumLines()) {
     cString cur_string = init_file.GetNextLine();
     cString command = cur_string.PopWord();
+    command.ToUpper();
     
     cAnalyzeCommand* cur_command;
     cAnalyzeCommandDefBase* command_def = FindAnalyzeCommandDef(command);
@@ -7771,6 +7774,7 @@
   AddLibraryDef("ECHO", &cAnalyze::PrintDebug);
   AddLibraryDef("VERBOSE", &cAnalyze::CommandVerbose);
   AddLibraryDef("INCLUDE", &cAnalyze::IncludeFile);
+  AddLibraryDef("RUN", &cAnalyze::IncludeFile);
   AddLibraryDef("SYSTEM", &cAnalyze::CommandSystem);
   AddLibraryDef("INTERACTIVE", &cAnalyze::CommandInteractive);
   

Modified: development/source/tools/cFile.cc
===================================================================
--- development/source/tools/cFile.cc	2006-08-21 16:20:57 UTC (rev 879)
+++ development/source/tools/cFile.cc	2006-08-21 17:52:36 UTC (rev 880)
@@ -2,8 +2,8 @@
  *  cFile.cc
  *  Avida
  *
- *  Created by David on 12/7/05.
- *  Copyright 2005-2006 Michigan State University. All rights reserved.
+ *  Called "file.cc" prior to 12/7/05.
+ *  Copyright 1999-2006 Michigan State University. All rights reserved.
  *  Copyright 1993-2003 California Institute of Technology
  *
  */




More information about the Avida-cvs mailing list