[Avida-SVN] r1885 - in branches/energy_dev: source/main tests tests/energy_deme_level_res tests/energy_deme_level_res/config tests/energy_deme_level_res/expected tests/energy_deme_level_res/expected/data

beckma24 at myxo.css.msu.edu beckma24 at myxo.css.msu.edu
Thu Aug 2 06:57:12 PDT 2007


Author: beckma24
Date: 2007-08-02 09:57:12 -0400 (Thu, 02 Aug 2007)
New Revision: 1885

Added:
   branches/energy_dev/tests/energy_deme_level_res/
   branches/energy_dev/tests/energy_deme_level_res/config/
   branches/energy_dev/tests/energy_deme_level_res/config/avida.cfg
   branches/energy_dev/tests/energy_deme_level_res/config/echo40.org
   branches/energy_dev/tests/energy_deme_level_res/config/environment-5tasks.cfg
   branches/energy_dev/tests/energy_deme_level_res/config/events-ConstResource.cfg
   branches/energy_dev/tests/energy_deme_level_res/config/instset-TEST.cfg
   branches/energy_dev/tests/energy_deme_level_res/expected/
   branches/energy_dev/tests/energy_deme_level_res/expected/data/
   branches/energy_dev/tests/energy_deme_level_res/expected/data/average.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/count.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_donor.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_fitness.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_gest_time.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-0.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-1.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_lifetime_fitness.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_merit.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_mut_rates.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_receiver.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_resources.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_0.m
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_1.m
   branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_task.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/dominant.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction_histogram.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/resource.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/sleep.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/stats.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks_exe.dat
   branches/energy_dev/tests/energy_deme_level_res/expected/data/time.dat
   branches/energy_dev/tests/energy_deme_level_res/test_list
Modified:
   branches/energy_dev/source/main/cDeme.h
   branches/energy_dev/source/main/cPopulation.cc
   branches/energy_dev/source/main/cPopulation.h
   branches/energy_dev/source/main/cResourceCount.cc
   branches/energy_dev/source/main/cResourceCount.h
   branches/energy_dev/source/main/cSpatialResCount.cc
Log:
deme-level spacial resources now work and reported stats are correct

Modified: branches/energy_dev/source/main/cDeme.h
===================================================================
--- branches/energy_dev/source/main/cDeme.h	2007-08-02 13:46:18 UTC (rev 1884)
+++ branches/energy_dev/source/main/cDeme.h	2007-08-02 13:57:12 UTC (rev 1885)
@@ -94,6 +94,8 @@
   void ResizeSpatialGrids(const int in_x, const int in_y) { deme_resource_count.ResizeSpatialGrids(in_x, in_y); }
   void ModifyDemeResCount(const tArray<double> & res_change, const int absolute_cell_id);
   void SetupDemeRes(int id, cResource * res, int verbosity);
+  void UpdateDemeRes() { deme_resource_count.GetResources(); }
+  void Update(double time_step) { deme_resource_count.Update(time_step); }
 };
 
 #endif

Modified: branches/energy_dev/source/main/cPopulation.cc
===================================================================
--- branches/energy_dev/source/main/cPopulation.cc	2007-08-02 13:46:18 UTC (rev 1884)
+++ branches/energy_dev/source/main/cPopulation.cc	2007-08-02 13:57:12 UTC (rev 1885)
@@ -1578,16 +1578,15 @@
     }
     df_inst.Endl();
     
+    GetDeme(deme_id).UpdateDemeRes();
     cResourceCount res = GetDeme(deme_id).GetDemeResourceCount();
     for(int j = 0; j < res.GetSize(); j++) {
-      //comment.Set(cStringUtil::Stringf("Deme %d Resources %d", deme_id, res.GetResName(j)));
       const char * tmp = res.GetResName(j);
-      df_resources.Write(res.Get(j), cStringUtil::Stringf("Deme %d Resources %s", deme_id, tmp)); //comment);
+      df_resources.Write(res.Get(j), cStringUtil::Stringf("Deme %d Resource %s", deme_id, tmp)); //comment);
       
       if ((res.GetResourcesGeometry())[j] != nGeometry::GLOBAL) {
-        PrintDemeSpatialResData(res, j);
+        PrintDemeSpatialResData(res, j, deme_id);
       }
-
     }
   } 
   
@@ -1604,17 +1603,14 @@
   df_resources.Endl();
 }
 
-
-void cPopulation::PrintDemeSpatialResData( cResourceCount res, const int i)
-{
-
-  // Write spatial data to a file that can easily be read into Matlab
-
-  cString tmpfilename = "deme_spacial_resource_";
-  tmpfilename +=  res.GetResName(i) + ".m";
+// Write spatial data to a file that can easily be read into Matlab
+void cPopulation::PrintDemeSpatialResData( cResourceCount res, const int i, const int deme_id){
+  const char* tmpResName = res.GetResName(i);
+  cString tmpfilename = cStringUtil::Stringf( "deme_spacial_resource_%s_%i.m", tmpResName, deme_id );
+//  tmpfilename +=  res.GetResName(i) + ".m";
   cDataFile& df = m_world->GetDataFile(tmpfilename);
-  cString UpdateStr = cStringUtil::Stringf( "deme_%07i_", i ) + res.GetResName(i) + 
-                      cStringUtil::Stringf( "%07i", m_world->GetStats().GetUpdate() ) + " = [ ...";
+  cString UpdateStr = cStringUtil::Stringf( "deme_%07i_", deme_id ) + res.GetResName(i) + 
+                      cStringUtil::Stringf( "_%07i", m_world->GetStats().GetUpdate() ) + " = [ ...";
 
   df.WriteRaw(UpdateStr);
 
@@ -1819,9 +1815,12 @@
   if (cur_org->GetPhenotype().GetToDelete() == true) {
     delete cur_org;
   }
-   m_world->GetStats().IncExecuted();
- resource_count.Update(step_size);
- }
+  m_world->GetStats().IncExecuted();
+  resource_count.Update(step_size);
+  for(int i = 0; i < GetNumDemes(); i++) {
+    GetDeme(i).Update(step_size);
+  }
+}
 
 
 void cPopulation::UpdateOrganismStats()
@@ -1992,6 +1991,12 @@
   stats.SetResources(resource_count.GetResources());
   stats.SetSpatialRes(resource_count.GetSpatialRes());
   stats.SetResourcesGeometry(resource_count.GetResourcesGeometry());
+  
+  //TODO: update deme resource  (what calls DoOutput)
+  
+  for(int i = 0; i < GetNumDemes(); i++) {
+    GetDeme(i).UpdateDemeRes();
+  }
 }
 
 

Modified: branches/energy_dev/source/main/cPopulation.h
===================================================================
--- branches/energy_dev/source/main/cPopulation.h	2007-08-02 13:46:18 UTC (rev 1884)
+++ branches/energy_dev/source/main/cPopulation.h	2007-08-02 13:57:12 UTC (rev 1885)
@@ -180,7 +180,7 @@
   void CopyDeme(int deme1_id, int deme2_id);
   void SpawnDeme(int deme1_id, int deme2_id=-1);
   void PrintDemeStats();
-  void PrintDemeSpatialResData( cResourceCount res, const int i);
+  void PrintDemeSpatialResData( cResourceCount res, const int i, const int deme_id);
   
   // Print donation stats
   void PrintDonationStats();

Modified: branches/energy_dev/source/main/cResourceCount.cc
===================================================================
--- branches/energy_dev/source/main/cResourceCount.cc	2007-08-02 13:46:18 UTC (rev 1884)
+++ branches/energy_dev/source/main/cResourceCount.cc	2007-08-02 13:57:12 UTC (rev 1885)
@@ -373,12 +373,25 @@
   }
 }
 
+double cResourceCount::Get(int id) const
+{
+  assert(id < resource_count.GetSize());
+  if(geometry[id] == nGeometry::GLOBAL) {
+    return resource_count[id];
+  } //else return spacial resource sum
+  return spatial_resource_count[id].SumAll();
+}
 
 void cResourceCount::Set(int id, double new_level)
 {
   assert(id < resource_count.GetSize());
-
-  resource_count[id] = new_level;
+  if(geometry[id] == nGeometry::GLOBAL) {
+    resource_count[id] = new_level;
+  } else {
+    for(int i = 0; i < spatial_resource_count[id].GetSize(); i++) {
+      spatial_resource_count[id].SetCellAmount(i, new_level/spatial_resource_count[id].GetSize());
+    }
+  }
 }
 
 void cResourceCount::ResizeSpatialGrids(int in_x, int in_y)

Modified: branches/energy_dev/source/main/cResourceCount.h
===================================================================
--- branches/energy_dev/source/main/cResourceCount.h	2007-08-02 13:46:18 UTC (rev 1884)
+++ branches/energy_dev/source/main/cResourceCount.h	2007-08-02 13:57:12 UTC (rev 1885)
@@ -97,11 +97,7 @@
   void Modify(int id, double change);
   void ModifyCell(const tArray<double> & res_change, int cell_id);
   void Set(int id, double new_level);
-  double Get(int id) const
-  {
-    assert(id < resource_count.GetSize());
-    return resource_count[id];
-  }
+  double Get(int id) const;
   void ResizeSpatialGrids(int in_x, int in_y);
   cSpatialResCount GetSpatialResource(int id) { return spatial_resource_count[id]; }
   void ReinitializeResources();

Modified: branches/energy_dev/source/main/cSpatialResCount.cc
===================================================================
--- branches/energy_dev/source/main/cSpatialResCount.cc	2007-08-02 13:46:18 UTC (rev 1884)
+++ branches/energy_dev/source/main/cSpatialResCount.cc	2007-08-02 13:57:12 UTC (rev 1885)
@@ -231,9 +231,11 @@
 
 /* Set the rate variable for one element using the array index */
 
-void cSpatialResCount::Rate(int x, double ratein) const { 
+void cSpatialResCount::Rate(int x, double ratein) const {
   if (x >= 0 && x < grid.GetSize()) {
     grid[x].Rate(ratein);
+  } else {
+    assert(false); // x not valid id
   }
 }
 
@@ -242,6 +244,8 @@
 void cSpatialResCount::Rate(int x, int y, double ratein) const { 
   if (x >= 0 && x < world_x && y>= 0 && y < world_y) {
     grid[y * world_x + x].Rate(ratein);
+  } else {
+    assert(false); // x or y not valid id
   }
 }
 
@@ -251,6 +255,8 @@
 void cSpatialResCount::State(int x) { 
   if (x >= 0 && x < grid.GetSize()) {
     grid[x].State();
+  } else {
+    assert(false); // x not valid id
   }
 }
 
@@ -260,6 +266,8 @@
 void cSpatialResCount::State(int x, int y) { 
   if (x >= 0 && x < world_x && y >= 0 && y < world_y) {
     grid[y*world_x + x].State();
+  } else {
+    assert(false); // x or y not valid id
   }
 }
 

Added: branches/energy_dev/tests/energy_deme_level_res/config/avida.cfg
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/config/avida.cfg	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/config/avida.cfg	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,233 @@
+#############################################################################
+# This file includes all the basic run-time defines for Avida.
+# For more information, see doc/config.html
+#############################################################################
+
+VERSION_ID 2.7.0   # Do not change this value.
+
+### GENERAL_GROUP ###
+# General Settings
+ANALYZE_MODE 0  # 0 = Disabled
+                # 1 = Enabled
+                # 2 = Interactive
+VIEW_MODE 1     # Initial viewer screen
+CLONE_FILE -    # Clone file to load
+VERBOSITY 4     # Control output verbosity
+
+### ARCH_GROUP ###
+# Architecture Variables
+WORLD_X 10        # Width of the Avida world
+WORLD_Y 20        # Height of the Avida world
+WORLD_GEOMETRY 2  # 1 = Bounded Grid
+                  # 2 = Torus
+NUM_DEMES 2       # Number of independed groups in the population; 0=off
+RANDOM_SEED 7     # Random number seed (0 for based on time)
+HARDWARE_TYPE 0   # 0 = Original CPUs
+                  # 1 = New SMT CPUs
+                  # 2 = Transitional SMT
+
+### CONFIG_FILE_GROUP ###
+# Configuration Files
+DATA_DIR data                       # Directory in which config files are found
+INST_SET instset-TEST.cfg           # File containing instruction set
+EVENT_FILE events-ConstResource.cfg # File containing list of events during run
+ANALYZE_FILE analyze.cfg            # File used for analysis mode
+ENVIRONMENT_FILE environment-5tasks.cfg    # File that describes the environment
+START_CREATURE echo40.org           # Organism to seed the soup
+
+### REPRODUCTION_GROUP ###
+# Birth and Death
+BIRTH_METHOD 0           # Which organism should be replaced on birth?
+                         # 0 = Random organism in neighborhood
+                         # 1 = Oldest in neighborhood
+                         # 2 = Largest Age/Merit in neighborhood
+                         # 3 = None (use only empty cells in neighborhood)
+                         # 4 = Random from population (Mass Action)
+                         # 5 = Oldest in entire population
+                         # 6 = Random within deme
+                         # 7 = Organism faced by parent
+                         # 8 = Next grid cell (id+1)
+                         # 9= Largest energy used in entire population
+                         # 10= Largest energy used in neighborhood
+PREFER_EMPTY 1           # Give empty cells preference in offsping placement?
+DEATH_METHOD 0           # 0 = Never die of old age.
+                         # 1 = Die when inst executed = AGE_LIMIT (+deviation)
+                         # 2 = Die when inst executed = length*AGE_LIMIT (+dev)
+AGE_LIMIT 20             # Modifies DEATH_METHOD
+AGE_DEVIATION 0          # Creates a distribution around AGE_LIMIT
+ALLOC_METHOD 0           # (Orignal CPU Only)
+                         # 0 = Allocated space is set to default instruction.
+                         # 1 = Set to section of dead genome (Necrophilia)
+                         # 2 = Allocated space is set to random instruction.
+DIVIDE_METHOD 1          # 0 = Divide leaves state of mother untouched.
+                         # 1 = Divide resets state of mother
+                         #     (after the divide, we have 2 children)
+                         # 2 = Divide resets state of current thread only
+                         #     (does not touch possible parasite threads)
+GENERATION_INC_METHOD 1  # 0 = Only the generation of the child is
+                         #     increased on divide.
+                         # 1 = Both the generation of the mother and child are
+                         #     increased on divide (good with DIVIDE_METHOD 1).
+
+### RECOMBINATION_GROUP ###
+# Sexual Recombination and Modularity
+RECOMBINATION_PROB 1.0  # probability of recombination in div-sex
+MAX_BIRTH_WAIT_TIME -1  # Updates incipiant orgs can wait for crossover
+MODULE_NUM 0            # number of modules in the genome
+CONT_REC_REGS 1         # are (modular) recombination regions continuous
+CORESPOND_REC_REGS 1    # are (modular) recombination regions swapped randomly
+                        #  or with corresponding positions?
+TWO_FOLD_COST_SEX 0     # 1 = only one recombined offspring is born.
+                        # 2 = both offspring are born
+SAME_LENGTH_SEX 0       # 0 = recombine with any genome
+                        # 1 = only recombine w/ same length
+
+### DIVIDE_GROUP ###
+# Divide Restrictions
+CHILD_SIZE_RANGE 2.0  # Maximal differential between child and parent sizes.
+MIN_COPIED_LINES 0.5  # Code fraction which must be copied before divide.
+MIN_EXE_LINES 0.5     # Code fraction which must be executed before divide.
+REQUIRE_ALLOCATE 1    # (Original CPU Only) Require allocate before divide?
+REQUIRED_TASK -1      # Task ID required for successful divide.
+IMMUNITY_TASK -1      # Task providing immunity from the required task.
+REQUIRED_REACTION -1  # Reaction ID required for successful divide.
+REQUIRED_BONUS 0      # The bonus that an organism must accumulate to divide.
+
+### MUTATION_GROUP ###
+# Mutations
+POINT_MUT_PROB 0.0    # Mutation rate (per-location per update)
+COPY_MUT_PROB 0.0075  # Mutation rate (per copy)
+INS_MUT_PROB 0.0      # Insertion rate (per site, applied on divide)
+DEL_MUT_PROB 0.0      # Deletion rate (per site, applied on divide)
+DIV_MUT_PROB 0.0      # Mutation rate (per site, applied on divide)
+DIVIDE_MUT_PROB 0.0   # Mutation rate (per divide)
+DIVIDE_INS_PROB 0.05  # Insertion rate (per divide)
+DIVIDE_DEL_PROB 0.05  # Deletion rate (per divide)
+PARENT_MUT_PROB 0.0   # Per-site, in parent, on divide
+SPECIAL_MUT_LINE -1   # If this is >= 0, ONLY this line is mutated
+INJECT_INS_PROB 0.0   # Insertion rate (per site, applied on inject)
+INJECT_DEL_PROB 0.0   # Deletion rate (per site, applied on inject)
+INJECT_MUT_PROB 0.0   # Mutation rate (per site, applied on inject)
+META_COPY_MUT 0.0     # Prob. of copy mutation rate changing (per gen)
+META_STD_DEV 0.0      # Standard deviation of meta mutation size.
+MUT_RATE_SOURCE 1     # 1 = Mutation rates determined by environment.
+                      # 2 = Mutation rates inherited from parent.
+
+### REVERSION_GROUP ###
+# Mutation Reversion
+# These slow down avida a lot, and should be set to 0.0 normally.
+REVERT_FATAL 0.0           # Should any mutations be reverted on birth?
+REVERT_DETRIMENTAL 0.0     #   0.0 to 1.0; Probability of reversion.
+REVERT_NEUTRAL 0.0         # 
+REVERT_BENEFICIAL 0.0      # 
+STERILIZE_FATAL 0.0        # Should any mutations clear (kill) the organism?
+STERILIZE_DETRIMENTAL 0.0  # 
+STERILIZE_NEUTRAL 0.0      # 
+STERILIZE_BENEFICIAL 0.0   # 
+FAIL_IMPLICIT 0            # Should copies that failed *not* due to mutations
+                           # be eliminated?
+NEUTRAL_MAX 0.0            # The percent benifical change from parent fitness to be considered neutral.
+NEUTRAL_MIN 0.0            # The percent deleterious change from parent fitness to be considered neutral.
+
+### TIME_GROUP ###
+# Time Slicing
+AVE_TIME_SLICE 30        # Ave number of insts per org per update
+SLICING_METHOD 1         # 0 = CONSTANT: all organisms get default...
+                         # 1 = PROBABILISTIC: Run _prob_ proportional to merit.
+                         # 2 = INTEGRATED: Perfectly integrated deterministic.
+BASE_MERIT_METHOD 4      # 0 = Constant (merit independent of size)
+                         # 1 = Merit proportional to copied size
+                         # 2 = Merit prop. to executed size
+                         # 3 = Merit prop. to full size
+                         # 4 = Merit prop. to min of executed or copied size
+                         # 5 = Merit prop. to sqrt of the minimum size
+BASE_CONST_MERIT 100     # Base merit when BASE_MERIT_METHOD set to 0
+DEFAULT_BONUS 1.0        # Initial bonus before any tasks
+MERIT_DEFAULT_BONUS 0    # Scale the merit of an offspring by the default bonus
+                         # rather than the accumulated bonus of the parent?
+MAX_CPU_THREADS 1        # Number of Threads a CPU can spawn
+THREAD_SLICING_METHOD 0  # Formula for and organism's thread slicing
+                         #   (num_threads-1) * THREAD_SLICING_METHOD + 1
+                         # 0 = One thread executed per time slice.
+                         # 1 = All threads executed each time slice.
+MAX_LABEL_EXE_SIZE 1     # Max nops marked as executed when labels are used
+DONATE_SIZE 5.0          # Amount of merit donated with 'donate' command
+DONATE_MULT 10.0         # Multiple of merit given that the target receives.
+MAX_DONATE_KIN_DIST -1   # Limit on distance of relation for donate; -1=no max
+MAX_DONATE_EDIT_DIST -1  # Limit on edit distance for donate; -1=no max
+MAX_DONATES 1000000      # Limit on number of donates organisms are allowed.
+
+### GENEOLOGY_GROUP ###
+# Geneology
+TRACK_MAIN_LINEAGE 1  # Keep all ancestors of the active population?
+                      # 0=no, 1=yes, 2=yes,w/sexual population
+THRESHOLD 3           # Number of organisms in a genotype needed for it
+                      #   to be considered viable.
+GENOTYPE_PRINT 0      # 0/1 (off/on) Print out all threshold genotypes?
+GENOTYPE_PRINT_DOM 0  # Print out a genotype if it stays dominant for
+                      #   this many updates. (0 = off)
+SPECIES_THRESHOLD 2   # max failure count for organisms to be same species
+SPECIES_RECORDING 0   # 1 = full, 2 = limited search (parent only)
+SPECIES_PRINT 0       # 0/1 (off/on) Print out all species?
+TEST_CPU_TIME_MOD 20  # Time allocated in test CPUs (multiple of length)
+
+### LOG_GROUP ###
+# Log Files
+LOG_CREATURES 0  # 0/1 (off/on) toggle to print file.
+LOG_GENOTYPES 0  # 0 = off, 1 = print ALL, 2 = print threshold ONLY.
+LOG_THRESHOLD 0  # 0/1 (off/on) toggle to print file.
+LOG_SPECIES 0    # 0/1 (off/on) toggle to print file.
+
+### LINEAGE_GROUP ###
+# Lineage
+# NOTE: This should probably be called "Clade"
+# This one can slow down avida a lot. It is used to get an idea of how
+# often an advantageous mutation arises, and where it goes afterwards.
+# Lineage creation options are.  Works only when LOG_LINEAGES is set to 1.
+#   0 = manual creation (on inject, use successive integers as lineage labels).
+#   1 = when a child's (potential) fitness is higher than that of its parent.
+#   2 = when a child's (potential) fitness is higher than max in population.
+#   3 = when a child's (potential) fitness is higher than max in dom. lineage
+# *and* the child is in the dominant lineage, or (2)
+#   4 = when a child's (potential) fitness is higher than max in dom. lineage
+# (and that of its own lineage)
+#   5 = same as child's (potential) fitness is higher than that of the
+#       currently dominant organism, and also than that of any organism
+#       currently in the same lineage.
+#   6 = when a child's (potential) fitness is higher than any organism
+#       currently in the same lineage.
+#   7 = when a child's (potential) fitness is higher than that of any
+#       organism in its line of descent
+LOG_LINEAGES 0             # 
+LINEAGE_CREATION_METHOD 0  # 
+
+### ORGANISM_NETWORK_GROUP ###
+# Organism Network Communication
+NET_ENABLED 0      # Enable Network Communication Support
+NET_DROP_PROB 0.0  # Message drop rate
+NET_MUT_PROB 0.0   # Message corruption probability
+NET_MUT_TYPE 0     # Type of message corruption.  0 = Random Single Bit, 1 = Always Flip Last
+NET_STYLE 0        # Communication Style.  0 = Random Next, 1 = Receiver Facing
+
+### BUY_SELL_GROUP ###
+# Buying and Selling Parameters
+SAVE_RECEIVED 0  # Enable storage of all inputs bought from other orgs
+BUY_PRICE 0      # price offered by organisms attempting to buy
+SELL_PRICE 0     # price offered by organisms attempting to sell
+
+### ANALYZE_GROUP ###
+# Analysis Settings
+MT_CONCURRENCY 1   # Number of concurrent analyze threads
+ANALYZE_OPTION_1   # String variable accessible from analysis scripts
+ANALYZE_OPTION_2   # String variable accessible from analysis scripts
+
+### ENERGY_GROUP ###
+# Energy Settings
+ENERGY_ENABLED 1                       # Enable Energy Model. 0/1 (off/on)
+ENERGY_GIVEN_ON_INJECT 100000               # Energy given to organism upon injection.
+ENERGY_GIVEN_AT_BIRTH 0.0                # Energy given to offspring upon birth.
+FRAC_PARENT_ENERGY_GIVEN_AT_BIRTH 0.5  # Fraction of energy given to offspring.
+FRAC_ENERGY_DECAY_AT_BIRTH 0.05         # Fraction of energy lost due to decay during reproduction.
+NUM_INST_EXC_BEFORE_0_ENERGY 1000000         # Number of instructions executed before energy is exhausted.
+ENERGY_CAP -1                          # Maximun amount of energy that can be stored in an organism.  -1 means the cap is set to Max Int
+ENERGY_VERBOSE 0                       # Print energy and merit values. 0/1 (off/on)

Added: branches/energy_dev/tests/energy_deme_level_res/config/echo40.org
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/config/echo40.org	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/config/echo40.org	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,42 @@
+h-alloc    # Allocate space for child
+h-search   # Locate the end of the organism
+nop-C      #
+nop-A      #
+mov-head   # Place write-head at beginning of offspring.
+nop-C      #
+IO
+nop-C      #
+IO         # 1
+nop-C      #
+IO         # 2
+nop-C      #
+IO         # 3
+nop-C      #
+IO         # 4
+nop-C      #
+IO         # 5
+nop-C      #
+IO         # 6
+nop-C      #
+IO         # 7
+nop-C      #
+IO         # 8
+nop-C      #
+IO
+IO         # echo 9
+nop-C      #
+nand
+IO	   # nand 1
+IO
+nop-C	   # echo 10
+nand
+IO         # nand 2
+h-search   # Mark the beginning of the copy loop
+h-copy     # Do the copy
+if-label   # If we're done copying....
+nop-C      #
+nop-A      #
+h-divide   #    ...divide!
+mov-head   # Otherwise, loop back to the beginning of the copy loop.
+nop-A      # End label.
+nop-B      #

Added: branches/energy_dev/tests/energy_deme_level_res/config/environment-5tasks.cfg
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/config/environment-5tasks.cfg	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/config/environment-5tasks.cfg	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,33 @@
+##############################################################################
+#
+# This is the setup file for the task/resource system.  From here, you can
+# setup the available resources (including their inflow and outflow rates) as
+# well as the reactions that the organisms can trigger by performing tasks.
+#
+# This file is currently setup to reward 9 tasks, all of which use the
+# "infinite" resource, which is undepletable.
+#
+# For information on how to use this file, see:  doc/environment.html
+# For other sample environments, see:  source/support/config/ 
+#
+##############################################################################
+
+RESOURCE global:initial=1.0:deme=false
+RESOURCE deme_ResA:initial=1.0:deme=true
+RESOURCE deme_ResB:geometry=grid:initial=1000:inflow=1000:outflow=0.1\
+  :deme=true:\
+  inflowx1=0:inflowx2=9:inflowy1=1:inflowy2=1:\
+  outflowx1=0:outflowx2=9:outflowy1=5:outflowy2=5:\
+  xdiffuse=0:ydiffuse=0:xgravity=0:ygravity=0
+
+
+REACTION  ECHO echo  process:resource=global:value=1000.0:type=energy:frac=1.0:product=global:conversion=2.0 requisite:max_count=10
+
+REACTION  NAND nand  process:resource=deme_ResA:value=1500.0:type=energy:frac=1.0:product=deme_ResA:conversion=1.5 requisite:max_count=10
+
+
+#REACTION  OR   or    process:value=3.0:type=pow  requisite:max_count=1
+#REACTION  ANDN andn  process:value=3.0:type=pow  requisite:max_count=1
+#REACTION  NOR  nor   process:value=4.0:type=pow  requisite:max_count=1
+#REACTION  XOR  xor   process:value=4.0:type=pow  requisite:max_count=1
+#REACTION  EQU  equ   process:value=5.0:type=pow  requisite:max_count=1

Added: branches/energy_dev/tests/energy_deme_level_res/config/events-ConstResource.cfg
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/config/events-ConstResource.cfg	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/config/events-ConstResource.cfg	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,38 @@
+##############################################################################
+#
+# This is the setup file for the events system.  From here, you can
+# configure any actions that you want to have happen during the course of
+# an experiment, including setting the times for data collection.
+#
+# basic syntax: [trigger] [start:interval:stop] [action/event] [arguments...]
+#
+# This file is currently setup to record key information every 100 updates.
+#
+# For information on how to use this file, see:  doc/events.html
+# For other sample event configurations, see:  support/config/
+#
+##############################################################################
+
+
+# Print all of the standard data files...
+u 0:10:end PrintAverageData       # Save info about they average genotypes
+u 0:10:end PrintDominantData      # Save info about most abundant genotypes
+u 0:10:end PrintStatsData         # Collect satistics about entire pop.
+u 0:10:end PrintCountData         # Count organisms, genotypes, species, etc.
+u 0:10:end PrintTasksData         # Save organisms counts for each task.
+u 0:10:end PrintTimeData          # Track time conversion (generations, etc.)
+u 0:10:end PrintResourceData      # Track resource abundance.
+
+u 10:10:end PrintTasksExeData    # Num. times tasks have been executed.
+
+# Setup the exit time and full population data collection.
+
+u 0:10:end PrintInstructionAbundanceHistogram
+u 0:10:end PrintInstructionData
+u 10:10:end PrintSleepData
+
+u 0:10:end PrintDemeStats
+
+u 20:20:end ReplicateDemes
+
+u 100 exit
\ No newline at end of file

Added: branches/energy_dev/tests/energy_deme_level_res/config/instset-TEST.cfg
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/config/instset-TEST.cfg	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/config/instset-TEST.cfg	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,64 @@
+nop-A      1 1 0 100   # a
+nop-B      1 1 0 100   # b
+nop-C      1 1 0 100   # c
+if-n-equ   1 1 0 100   # d
+if-less    1 1 0 100   # e
+pop        1 1 0 100   # f
+push       1 1 0 100   # g
+swap-stk   1 1 0 100   # h
+swap       1 1 0 100   # i 
+shift-r    1 1 0 100   # j
+shift-l    1 1 0 100   # k
+inc        1 1 0 100   # l
+dec        1 1 0 100   # m
+add        1 1 0 100   # n
+sub        1 1 0 100   # o
+nand       1 1 0 100   # p
+IO         1 1 0 100   # q   Puts current contents of register and gets new.
+h-alloc    1 1 0 100   # r   Allocate as much memory as organism can use.
+h-divide   1 1 0 100   # s   Cuts off everything between the read and write heads
+h-copy     1 1 0 100   # t   Combine h-read and h-write
+h-search   1 1 0 100   # u   Search for matching template, set flow head & return info
+               #   #   if no template, move flow-head here, set size&offset=0.
+mov-head   1 1 0 100   # v   Move ?IP? head to flow control.
+jmp-head   1 1 0 100   # w   Move ?IP? head by fixed amount in CX.  Set old pos in CX.
+get-head   1 1 0 100   # x   Get position of specified head in CX.
+if-label   1 1 0 100   # y
+set-flow   1 1 0 100   # z   Move flow-head to address in ?CX? 
+
+sense-m100 1 1 0 100
+
+if-equ-0   1 1 0 100
+
+time       1 1 0 100
+
+sleep1	   1 10 0 1
+sleep2	   1 20 0 1
+sleep3	   1 40 0 1
+sleep4	   1 80 0 1
+
+
+#adv-head   1
+#jump-f     1
+#jump-b     1
+#call       1
+#return     1
+#if-bit-1   1
+#get        1
+#put        1
+#h-read     1
+#h-write    1
+#set-head   1
+#search-f   1
+#search-b   1
+
+
+# Works on multiple nops:  pop  push  inc  dec  IO  adv-head 
+
+# What if we add a new head.  Search will return the location of something,
+# and put the new head there.  Then set-head will move another head to that
+# point.  In the case of the copy loop, it only needs to be set once and
+# this will speed up the code quite a bit!
+
+# Search with no template returns current position (abs line number) in
+# genome.
\ No newline at end of file

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/average.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/average.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/average.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,30 @@
+# Avida Average Data
+# Thu Aug  2 10:14:48 2007
+#  1: Update
+#  2: Merit
+#  3: Gestation Time
+#  4: Fitness
+#  5: Repro Rate?
+#  6: Size
+#  7: Copied Size
+#  8: Executed Size
+#  9: Abundance
+# 10: Proportion of organisms that gave birth in this update
+# 11: Proportion of Breed True Organisms
+# 12: Genotype Depth
+# 13: Generation
+# 14: Neutral Metric
+# 15: Lineage Label
+# 16: True Replication Rate (based on births/update, time-averaged)
+
+0 39.000000 146.000000 0.000000 0.000000 42.000000 42.000000 39.000000 1.000000 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
+10 3.00324 146 0.267123 0 42 42 39 4 0.25 0.25 0 2 -1.57458 0 0 
+20 1.62323 146.143 0.266864 0 42 42 39 3.5 0.214286 0.214286 0.285714 3.85714 -1.17999 0 0 
+30 1.2796 146.585 0.258886 0 41.878 41.4146 37.9512 3.41667 0.268293 0.219512 0.512195 5.63415 -0.530821 0 0 
+40 1.16556 145.582 0.261338 0 41.7975 41.2911 38.0759 2.82143 0.253165 0.151899 0.708861 7.50633 -0.774455 0 0 
+50 1.07042 147.61 0.262643 0 41.85 41.62 38.68 2.12766 0.17 0.11 0.94 9.55 -1.74667 0 0 
+60 1.08003 148.18 0.258777 0 41.96 41.53 38.28 2.5641 0.09 0.09 1.06 11.64 -0.83172 0 0 
+70 1.70386 185 0.210811 0 42 42 39 4 0 0 1 12 4.62911 -1 0 
+80 1.19595 184.846 0.210987 0 42 42 39 1.625 0.153846 0.0769231 1.61538 13.7692 6.00088 -1 0 
+90 0.869817 179.724 0.217892 0 42.069 42.0345 38.931 2.41667 0.0344828 0.0344828 1.72414 15 5.65968 -1 0 
+100 0.804314 182.359 0.211528 0 42.2031 41.8125 38.5156 2.06452 0.015625 0 1.89062 16.6094 5.69214 -1 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/count.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/count.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/count.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,30 @@
+# Avida count data
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: number of insts executed this update
+#  3: number of organisms
+#  4: number of different genotypes
+#  5: number of different threshold genotypes
+#  6: number of different species
+#  7: number of different threshold species
+#  8: number of different lineages
+#  9: number of births in this update
+# 10: number of deaths in this update
+# 11: number of breed true
+# 12: number of breed true organisms?
+# 13: number of no-birth organisms
+# 14: number of single-threaded organisms
+# 15: number of multi-threaded organisms
+# 16: number of modified organisms
+
+0 30 1 1 1 0 0 0 1 0 1 1 1 1 0 0 
+10 90 4 1 1 0 0 0 1 0 1 4 2 4 0 0 
+20 330 14 4 1 0 0 0 3 0 3 11 8 14 0 0 
+30 990 41 12 2 0 0 0 11 3 9 30 22 41 0 0 
+40 2130 79 28 5 0 0 0 20 12 12 55 45 79 0 0 
+50 3000 100 47 6 0 0 0 17 17 11 65 58 100 0 0 
+60 3000 100 39 10 0 0 0 9 9 9 70 56 100 0 0 
+70 120 4 1 2 0 0 0 0 0 0 2 2 4 0 0 
+80 330 13 8 2 0 0 0 2 0 1 4 7 13 0 0 
+90 840 29 12 4 0 0 0 1 0 1 16 16 29 0 0 
+100 1920 64 31 7 0 0 0 1 1 0 33 36 64 0 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_donor.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_donor.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_donor.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Num orgs doing doing a donate for each deme in population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+
+0 0.000000 0.000000 
+10 0 0 
+20 0 0 
+30 0 0 
+40 0 0 
+50 0 0 
+60 0 0 
+70 0 0 
+80 0 0 
+90 0 0 
+100 0 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_fitness.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_fitness.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_fitness.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Average fitnesses for each deme in the population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+
+0 0.000000 0.000000 
+10 0.267123 0 
+20 0.266864 0 
+30 0.258886 0 
+40 0.261338 0 
+50 0.262643 0 
+60 0.258777 0 
+70 0.210811 0.210811 
+80 0.211138 0.210811 
+90 0.225685 0.210619 
+100 0.21843 0.20581 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_gest_time.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_gest_time.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_gest_time.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Average gestation time for each deme in population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+
+0 146.000000 0.000000 
+10 146 0 
+20 146.143 0 
+30 146.585 0 
+40 145.582 0 
+50 147.61 0 
+60 148.18 0 
+70 185 185 
+80 184.714 185 
+90 173.214 185.8 
+100 178.931 185.2 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-0.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-0.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-0.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,48 @@
+# Number of times each instruction is exectued in deme 0
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Inst 0
+#  3: Inst 1
+#  4: Inst 2
+#  5: Inst 3
+#  6: Inst 4
+#  7: Inst 5
+#  8: Inst 6
+#  9: Inst 7
+# 10: Inst 8
+# 11: Inst 9
+# 12: Inst 10
+# 13: Inst 11
+# 14: Inst 12
+# 15: Inst 13
+# 16: Inst 14
+# 17: Inst 15
+# 18: Inst 16
+# 19: Inst 17
+# 20: Inst 18
+# 21: Inst 19
+# 22: Inst 20
+# 23: Inst 21
+# 24: Inst 22
+# 25: Inst 23
+# 26: Inst 24
+# 27: Inst 25
+# 28: Inst 26
+# 29: Inst 27
+# 30: Inst 28
+# 31: Inst 29
+# 32: Inst 30
+# 33: Inst 31
+# 34: Inst 32
+
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 56 4 4 168 8 168 0 0 168 0 0 0 0 0 0 0 0 
+20 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 28 194 14 14 588 28 588 0 0 588 0 2 0 0 0 0 0 0 
+30 42 0 8 0 0 0 0 0 0 0 0 0 0 0 0 82 605 41 41 1675 82 1675 0 0 1633 0 6 0 0 0 0 2 0 
+40 62 0 38 0 0 0 0 0 0 0 0 2 0 0 0 158 1116 79 79 3239 160 3239 0 0 3177 0 11 2 0 0 0 2 0 
+50 21 0 26 1 0 0 2 0 0 1 0 3 0 0 0 200 1372 100 100 4163 206 4162 0 0 4143 0 16 3 2 2 0 5 0 
+60 18 0 22 3 0 0 12 0 0 1 0 1 0 1 0 230 1350 100 100 4111 208 4111 0 0 4115 0 17 1 6 1 0 8 0 
+70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 26 2 2 84 4 84 0 0 84 0 0 0 0 0 0 2 0 
+80 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 14 87 7 7 294 14 294 0 0 294 0 0 0 0 0 0 7 0 
+90 0 0 4 0 0 0 3 0 0 0 0 0 0 0 0 26 172 14 14 588 28 586 0 0 586 0 0 4 0 0 0 10 0 
+100 0 0 6 0 0 0 2 0 0 0 0 0 0 0 0 52 365 29 29 1218 58 1212 0 0 1212 0 2 4 0 0 0 25 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-1.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-1.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_instruction-1.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,48 @@
+# Number of times each instruction is exectued in deme 1
+# Thu Aug  2 10:14:49 2007
+#  1: update
+#  2: Inst 0
+#  3: Inst 1
+#  4: Inst 2
+#  5: Inst 3
+#  6: Inst 4
+#  7: Inst 5
+#  8: Inst 6
+#  9: Inst 7
+# 10: Inst 8
+# 11: Inst 9
+# 12: Inst 10
+# 13: Inst 11
+# 14: Inst 12
+# 15: Inst 13
+# 16: Inst 14
+# 17: Inst 15
+# 18: Inst 16
+# 19: Inst 17
+# 20: Inst 18
+# 21: Inst 19
+# 22: Inst 20
+# 23: Inst 21
+# 24: Inst 22
+# 25: Inst 23
+# 26: Inst 24
+# 27: Inst 25
+# 28: Inst 26
+# 29: Inst 27
+# 30: Inst 28
+# 31: Inst 29
+# 32: Inst 30
+# 33: Inst 31
+# 34: Inst 32
+
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+50 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+60 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 26 2 2 84 4 84 0 0 84 0 0 0 0 0 0 2 0 
+80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 78 6 6 252 12 252 0 0 252 0 0 0 0 0 0 6 0 
+90 0 0 0 0 0 0 0 0 0 4 2 0 0 0 0 30 195 15 15 632 30 632 0 0 632 0 0 0 0 0 0 15 0 
+100 20 0 0 0 0 0 4 0 0 7 7 22 0 0 0 70 455 35 35 1439 70 1439 0 0 1439 0 0 0 0 0 0 35 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_lifetime_fitness.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_lifetime_fitness.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_lifetime_fitness.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Average life fitnesses for each deme in the population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+
+0 0.000000 0.000000 
+10 0.267123 0 
+20 0.266864 0 
+30 0.258886 0 
+40 0.261338 0 
+50 0.262643 0 
+60 0.258777 0 
+70 0.210811 0.210811 
+80 0.211138 0.210811 
+90 0.225685 0.210619 
+100 0.21843 0.20581 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_merit.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_merit.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_merit.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Average merits for each deme in population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+
+0 39.000000 0.000000 
+10 3.00324 0 
+20 1.62323 0 
+30 1.2796 0 
+40 1.16556 0 
+50 1.07042 0 
+60 1.08003 0 
+70 1.70488 1.70284 
+80 1.16575 1.23119 
+90 0.641482 1.08293 
+100 0.729781 0.86607 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_mut_rates.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_mut_rates.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_mut_rates.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,18 @@
+# Average mutation rates for organisms in each deme
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+#  4: Average deme mutation rate averaged across Demes.
+
+0 0.007500 0.000000 0.003750 
+10 0.0075 0 0.00375 
+20 0.0075 0 0.00375 
+30 0.0075 0 0.00375 
+40 0.0075 0 0.00375 
+50 0.0075 0 0.00375 
+60 0.0075 0 0.00375 
+70 0.0075 0.0075 0.0075 
+80 0.0075 0.0075 0.0075 
+90 0.0075 0.0075 0.0075 
+100 0.0075 0.0075 0.0075 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_receiver.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_receiver.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_receiver.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Num orgs doing receiving a donate for each deme in population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0
+#  3: Deme 1
+
+0 0.000000 0.000000 
+10 0 0 
+20 0 0 
+30 0 0 
+40 0 0 
+50 0 0 
+60 0 0 
+70 0 0 
+80 0 0 
+90 0 0 
+100 0 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_resources.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_resources.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_resources.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,19 @@
+# Avida deme resource data
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0 Resource deme_ResA
+#  3: Deme 0 Resource deme_ResB
+#  4: Deme 1 Resource deme_ResA
+#  5: Deme 1 Resource deme_ResB
+
+0 2.000000 1000.000000 1.000000 1000.000000 
+10 7.5 11931.4 1 11931.4 
+20 25.5 20912.2 1 20912.2 
+30 67.5 30904.2 1 30904.2 
+40 176.5 40901.5 1 41901.3 
+50 381.5 50900.5 1 50900.5 
+60 583 60900.2 1 60900.2 
+70 2.5 10934.9 2.5 10934.9 
+80 5 20912.2 4.5 20912.2 
+90 12 30904.2 15 30904.2 
+100 27.5 40901.5 35.5 40901.5 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_0.m
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_0.m	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_0.m	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,132 @@
+deme_0000000_deme_ResB_0000000 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000010 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+1110 1110 1110 1110 1110 1110 1110 1110 1110 1110 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000020 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000030 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+3010 3010 3010 3010 3010 3010 3010 3010 3010 3010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000040 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+4010 4010 4010 4010 4010 4010 4010 4010 4010 4010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000050 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+5010 5010 5010 5010 5010 5010 5010 5010 5010 5010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000060 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+6010 6010 6010 6010 6010 6010 6010 6010 6010 6010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000070 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000080 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000090 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+3010 3010 3010 3010 3010 3010 3010 3010 3010 3010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000000_deme_ResB_0000100 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+4010 4010 4010 4010 4010 4010 4010 4010 4010 4010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_1.m
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_1.m	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_spacial_resource_deme_ResB_1.m	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,132 @@
+deme_0000001_deme_ResB_0000000 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000010 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+1110 1110 1110 1110 1110 1110 1110 1110 1110 1110 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 3.13811 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000020 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000030 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+3010 3010 3010 3010 3010 3010 3010 3010 3010 3010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000040 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+4110 4110 4110 4110 4110 4110 4110 4110 4110 4110 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.133028 0.133028 0.133028 0.133028 0.133028 0.133028 0.133028 0.133028 0.133028 0.133028 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000050 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+5010 5010 5010 5010 5010 5010 5010 5010 5010 5010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 0.0515378 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000060 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+6010 6010 6010 6010 6010 6010 6010 6010 6010 6010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 0.0179701 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000070 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+1010 1010 1010 1010 1010 1010 1010 1010 1010 1010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 3.48678 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000080 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 1.21577 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000090 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+3010 3010 3010 3010 3010 3010 3010 3010 3010 3010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 0.423912 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];
+deme_0000001_deme_ResB_0000100 = [ ...
+10 10 10 10 10 10 10 10 10 10 
+4010 4010 4010 4010 4010 4010 4010 4010 4010 4010 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 0.147809 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+10 10 10 10 10 10 10 10 10 10 
+];

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_task.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_task.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/deme_task.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,19 @@
+# Num orgs doing each task for each deme in population
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: Deme 0, Task 0
+#  3: Deme 0, Task 1
+#  4: Deme 1, Task 0
+#  5: Deme 1, Task 1
+
+0 0 0 0 0 
+10 4 4 0 0 
+20 14 14 0 0 
+30 41 41 0 0 
+40 79 79 0 0 
+50 100 99 0 0 
+60 100 100 0 0 
+70 2 2 2 2 
+80 7 5 6 6 
+90 14 11 15 15 
+100 29 25 35 35 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/dominant.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/dominant.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/dominant.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,30 @@
+# Avida Dominant Data
+# Thu Aug  2 10:14:48 2007
+#  1: Update
+#  2: Average Merit of the Dominant Genotype
+#  3: Average Gestation Time of the Dominant Genotype
+#  4: Average Fitness of the Dominant Genotype
+#  5: Repro Rate?
+#  6: Size of Dominant Genotype
+#  7: Copied Size of Dominant Genotype
+#  8: Executed Size of Dominant Genotype
+#  9: Abundance of Dominant Genotype
+# 10: Number of Births
+# 11: Number of Dominant Breed True?
+# 12: Dominant Gene Depth
+# 13: Dominant Breed In
+# 14: Max Fitness?
+# 15: Genotype ID of Dominant Genotype
+# 16: Name of the Dominant Genotype
+
+0 0.000000 0.000000 0.000000 0.000000 42 0.000000 0.000000 1 0 0 0 0 0.000000 1 042-aaaaa 
+10 3.70117 146 0.267123 0.00684932 42 42 39 4 1 1 0 0 0.267123 1 042-aaaaa 
+20 2.25157 146 0.267123 0.00684932 42 42 39 10 3 3 0 0 0.267123 1 042-aaaaa 
+30 1.64186 146 0.267123 0.00684932 42 42 39 25 8 7 0 0 0.267606 1 042-aaaaa 
+40 1.3826 146 0.267123 0.00684932 42 42 39 41 16 10 0 0 0.27027 1 042-aaaaa 
+50 1.28148 146 0.267123 0.00684932 42 42 39 37 9 6 0 0 0.272727 1 042-aaaaa 
+60 1.25257 146 0.267123 0.00684932 42 42 39 31 2 2 0 0 0.27972 1 042-aaaaa 
+70 1.32195 185 0.210811 0.00540541 42 42 39 4 0 0 1 0 0.210811 32 042-aaaag 
+80 1.28357 185 0.210811 0.00540541 42 42 39 6 1 1 1 0 0.211957 32 042-aaaag 
+90 1.222 185 0.210811 0.00540541 42 42 39 10 0 0 1 0 0.260274 32 042-aaaag 
+100 1.12966 185 0.210811 0.00540541 42 42 39 19 1 0 1 0 0.260274 32 042-aaaag 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,48 @@
+# Avida instruction execution data
+# Thu Aug  2 10:14:48 2007
+#  1: Update
+#  2: nop-A
+#  3: nop-B
+#  4: nop-C
+#  5: if-n-equ
+#  6: if-less
+#  7: pop
+#  8: push
+#  9: swap-stk
+# 10: swap
+# 11: shift-r
+# 12: shift-l
+# 13: inc
+# 14: dec
+# 15: add
+# 16: sub
+# 17: nand
+# 18: IO
+# 19: h-alloc
+# 20: h-divide
+# 21: h-copy
+# 22: h-search
+# 23: mov-head
+# 24: jmp-head
+# 25: get-head
+# 26: if-label
+# 27: set-flow
+# 28: sense-m100
+# 29: if-equ-0
+# 30: time
+# 31: sleep1
+# 32: sleep2
+# 33: sleep3
+# 34: sleep4
+
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 56 4 4 168 8 168 0 0 168 0 0 0 0 0 0 0 0 
+20 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 28 194 14 14 588 28 588 0 0 588 0 2 0 0 0 0 0 0 
+30 42 0 8 0 0 0 0 0 0 0 0 0 0 0 0 82 605 41 41 1675 82 1675 0 0 1633 0 6 0 0 0 0 2 0 
+40 62 0 38 0 0 0 0 0 0 0 0 2 0 0 0 158 1116 79 79 3239 160 3239 0 0 3177 0 11 2 0 0 0 2 0 
+50 21 0 26 1 0 0 2 0 0 1 0 3 0 0 0 200 1372 100 100 4163 206 4162 0 0 4143 0 16 3 2 2 0 5 0 
+60 18 0 22 3 0 0 12 0 0 1 0 1 0 1 0 230 1350 100 100 4111 208 4111 0 0 4115 0 17 1 6 1 0 8 0 
+70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 52 4 4 168 8 168 0 0 168 0 0 0 0 0 0 4 0 
+80 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 26 165 13 13 546 26 546 0 0 546 0 0 0 0 0 0 13 0 
+90 0 0 4 0 0 0 3 0 0 4 2 0 0 0 0 56 367 29 29 1220 58 1218 0 0 1218 0 0 4 0 0 0 25 0 
+100 20 0 6 0 0 0 6 0 0 7 7 22 0 0 0 122 820 64 64 2657 128 2651 0 0 2651 0 2 4 0 0 0 60 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction_histogram.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction_histogram.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/instruction_histogram.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,46 @@
+#  1: Update
+#  2: nop-A
+#  3: nop-B
+#  4: nop-C
+#  5: if-n-equ
+#  6: if-less
+#  7: pop
+#  8: push
+#  9: swap-stk
+# 10: swap
+# 11: shift-r
+# 12: shift-l
+# 13: inc
+# 14: dec
+# 15: add
+# 16: sub
+# 17: nand
+# 18: IO
+# 19: h-alloc
+# 20: h-divide
+# 21: h-copy
+# 22: h-search
+# 23: mov-head
+# 24: jmp-head
+# 25: get-head
+# 26: if-label
+# 27: set-flow
+# 28: sense-m100
+# 29: if-equ-0
+# 30: time
+# 31: sleep1
+# 32: sleep2
+# 33: sleep3
+# 34: sleep4
+
+0 84 1 15 0 0 0 0 0 0 0 0 0 0 0 0 2 14 2 1 1 3 2 0 0 1 0 0 0 0 0 0 0 0 
+10 340 4 57 0 0 0 0 0 0 0 0 0 0 0 0 8 56 7 4 4 11 9 0 0 4 0 0 0 0 0 0 0 0 
+20 1159 13 201 0 0 0 0 0 0 0 0 0 0 0 0 28 193 42 14 33 35 29 0 0 14 0 2 0 0 0 0 1 0 
+30 2711 42 693 0 1 0 0 0 0 0 0 1 0 0 0 95 672 123 44 111 104 98 0 0 45 0 7 3 0 0 0 2 0 
+40 5549 81 1421 1 1 0 2 0 0 3 57 5 0 0 2 196 1370 180 90 105 216 195 0 0 94 0 14 4 1 1 0 5 0 
+50 7225 100 1731 2 0 1 5 0 0 3 0 5 0 3 1 222 1605 212 106 108 318 255 0 0 111 0 25 5 7 3 4 10 0 
+60 6858 99 1824 7 0 0 12 0 0 3 0 2 2 2 3 218 1703 201 100 101 314 261 0 1 107 2 19 2 16 1 5 8 2 
+70 283 4 83 0 0 0 0 0 0 0 0 0 0 0 0 9 76 8 4 4 12 12 0 0 4 0 0 0 0 0 0 5 0 
+80 1052 13 208 2 0 0 3 0 0 2 0 0 0 0 0 29 193 16 14 15 33 29 0 0 14 0 0 1 0 0 0 14 0 
+90 1608 29 576 2 1 0 6 1 1 4 4 0 0 0 0 67 524 48 30 32 79 74 1 0 30 0 1 4 0 0 0 34 0 
+100 3276 64 1256 1 5 0 14 2 1 7 14 3 2 1 0 146 1153 107 65 77 179 158 2 1 72 2 2 6 0 0 0 81 1 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/resource.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/resource.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/resource.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,18 @@
+# Avida resource data
+# Thu Aug  2 10:14:48 2007
+# First column gives the current update, all further columns give the quantity
+# of the particular resource at that update.
+#  1: Update
+#  2: global
+
+0 11.000000 
+10 71 
+20 260 
+30 743 
+40 1927 
+50 4122 
+60 6173 
+70 6233 
+80 6384 
+90 6650 
+100 7323 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/sleep.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/sleep.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/sleep.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,17 @@
+# Number of organisms sleeping
+
+# total number of organisms sleeping
+#  1: update
+#  2: DemeID 0
+#  3: DemeID 1
+
+10 0 0 
+20 0 0 
+30 0 0 
+40 2 0 
+50 3 0 
+60 0 0 
+70 0 0 
+80 5 3 
+90 0 0 
+100 0 1 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/stats.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/stats.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/stats.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,26 @@
+# Generic Statistics Data
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: average inferiority (energy)
+#  3: ave probability of any mutations in genome
+#  4: probability of any mutations in dom genome
+#  5: log(average fidelity)
+#  6: log(dominant fidelity)
+#  7: change in number of genotypes
+#  8: genotypic entropy
+#  9: species entropy
+# 10: depth of most reacent coalescence
+# 11: Total number of resamplings this generation
+# 12: Total number of organisms that failed to resample this generation
+
+0 0.000000 0.335790 0.335790 0.409157 0.409157 1 0.000000 0.000000 0 0 0 
+10 0 0.33579 0.33579 0.409157 0.409157 0 0 0 0 0 0 
+20 0.00097229 0.33579 0.33579 0.409157 0.409157 0 0.895333 0 0 0 0 
+30 0.0313234 0.335199 0.33579 0.408267 0.409157 1 1.54797 0 0 0 0 
+40 0.021897 0.334808 0.33579 0.407679 0.409157 6 2.19328 0 0 0 0 
+50 0.0169143 0.335063 0.33579 0.408062 0.409157 4 2.96231 0 0 0 0 
+60 0.0317447 0.335596 0.33579 0.408865 0.409157 -4 2.95743 0 0 0 0 
+70 0 0.33579 0.33579 0.409157 0.409157 0 0 0 1 0 0 
+80 -0.000835771 0.33579 0.33579 0.409157 0.409157 1 1.73798 0 1 0 0 
+90 -0.0330401 0.336125 0.33579 0.409661 0.409157 0 2.12503 0 1 0 0 
+100 -0.00339699 0.336774 0.33579 0.41064 0.409157 0 2.86502 0 1 0 0 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,19 @@
+# Avida tasks data
+# Thu Aug  2 10:14:48 2007
+# First column gives the current update, next columns give the number
+# of organisms that have the particular task as a component of their merit
+#  1: Update
+#  2: Echo
+#  3: Nand
+
+0 0 0 
+10 4 4 
+20 14 14 
+30 41 41 
+40 79 79 
+50 100 99 
+60 100 100 
+70 4 4 
+80 13 11 
+90 29 26 
+100 64 60 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks_exe.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks_exe.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/tasks_exe.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,18 @@
+# Avida tasks execution data
+# Thu Aug  2 10:14:49 2007
+# First column gives the current update, all further columns give the number
+# of times the particular task has been executed this update.
+#  1: Update
+#  2: Echo
+#  3: Nand
+
+10 40 8 
+20 138 28 
+30 404 79 
+40 766 150 
+50 957 185 
+60 952 190 
+70 40 4 
+80 128 11 
+90 279 26 
+100 625 60 

Added: branches/energy_dev/tests/energy_deme_level_res/expected/data/time.dat
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/expected/data/time.dat	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/expected/data/time.dat	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,18 @@
+# Avida time data
+# Thu Aug  2 10:14:48 2007
+#  1: update
+#  2: avida time
+#  3: average generation
+#  4: num_executed?
+
+0 0.000000 0.000000 30 
+10 1.35371 2 90 
+20 5.65499 3.85714 330 
+30 12.4792 5.63415 990 
+40 20.7063 7.50633 2130 
+50 30.0106 9.55 3000 
+60 39.4919 11.64 3000 
+70 47.6474 12 120 
+80 54.671 13.7692 330 
+90 63.7687 15 840 
+100 75.723 16.6094 1920 

Added: branches/energy_dev/tests/energy_deme_level_res/test_list
===================================================================
--- branches/energy_dev/tests/energy_deme_level_res/test_list	                        (rev 0)
+++ branches/energy_dev/tests/energy_deme_level_res/test_list	2007-08-02 13:57:12 UTC (rev 1885)
@@ -0,0 +1,37 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+; Command line arguments to pass to the application
+args =                   
+
+app = %(default_app)s            ; Application path to test
+nonzeroexit = disallow   ; Exit code handling (disallow, allow, or require)
+                         ;  disallow - treat non-zero exit codes as failures
+                         ;  allow - all exit codes are acceptable
+                         ;  require - treat zero exit codes as failures, useful
+                         ;            for creating tests for app error checking
+createdby = Ben Beckmann ; Who created the test
+email = beckma24 at msu.edu ; Email address for the test's creator
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus 
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---




More information about the Avida-cvs mailing list