[Avida-SVN] r1107 - in development/source: . main
goingssh at myxo.css.msu.edu
goingssh at myxo.css.msu.edu
Wed Nov 29 22:39:04 PST 2006
Author: goingssh
Date: 2006-11-30 01:38:58 -0500 (Thu, 30 Nov 2006)
New Revision: 1107
Modified:
development/source/defs.h
development/source/main/cOrganism.cc
Log:
Minor change in divide_only task code
Changed org output buffer to have a size of 10
Modified: development/source/defs.h
===================================================================
--- development/source/defs.h 2006-11-30 05:22:48 UTC (rev 1106)
+++ development/source/defs.h 2006-11-30 06:38:58 UTC (rev 1107)
@@ -94,7 +94,7 @@
// Number of distinct input and outputs stored in the IOBufs (to test tasks)
const int INPUT_BUF_SIZE = 3;
-const int OUTPUT_BUF_SIZE = 3;
+const int OUTPUT_BUF_SIZE = 10;
const int SEND_BUF_SIZE = 3;
const int RECEIVE_BUF_SIZE = 3;
#define RECEIVED_MESSAGES_SIZE 10
Modified: development/source/main/cOrganism.cc
===================================================================
--- development/source/main/cOrganism.cc 2006-11-30 05:22:48 UTC (rev 1106)
+++ development/source/main/cOrganism.cc 2006-11-30 06:38:58 UTC (rev 1107)
@@ -191,7 +191,10 @@
if (m_net) net_valid = NetValidate(ctx, value);
// Do the testing of tasks performed...
- output_buf.Add(value);
+
+ // if on IO add value to output_buf, if on divide don't need to
+ if (!on_divide)
+ output_buf.Add(value);
tArray<double> res_change(resource_count.GetSize());
tArray<int> insts_triggered;
@@ -500,8 +503,7 @@
assert(m_interface);
// Test tasks one last time before actually dividing, pass true so
// know that should only test "divide" tasks here
- // Sending last output just for lack of better idea at the moment
- DoOutput(ctx, output_buf[0], true);
+ DoOutput(ctx, 0, true);
// Activate the child! (Keep Last: may kill this organism!)
return m_interface->Divide(ctx, this, child_genome);
More information about the Avida-cvs
mailing list