[Avida-SVN] r1879 - development/source/main

goingssh at myxo.css.msu.edu goingssh at myxo.css.msu.edu
Wed Aug 1 10:31:31 PDT 2007


Author: goingssh
Date: 2007-08-01 13:31:31 -0400 (Wed, 01 Aug 2007)
New Revision: 1879

Modified:
   development/source/main/cTaskLib.cc
Log:
fixed a couple bugs in optimize task when using more than 2 variables

Modified: development/source/main/cTaskLib.cc
===================================================================
--- development/source/main/cTaskLib.cc	2007-07-31 23:19:30 UTC (rev 1878)
+++ development/source/main/cTaskLib.cc	2007-08-01 17:31:31 UTC (rev 1879)
@@ -2137,7 +2137,7 @@
   {
     if (args->GetInt(1))
     {
-      envreqs.SetMinOutputs(args->GetInt(2)*2);
+      envreqs.SetMinOutputs(args->GetInt(2)*args->GetInt(3));
     }
     else 
     {
@@ -2147,10 +2147,15 @@
       {
       case 1:
         envreqs.SetMinOutputs(1);
+		break;
       case 2:
         envreqs.SetMinOutputs(2);
+		break;
       case 3:
         envreqs.SetMinOutputs(2);
+		break;
+	  default:
+		  envreqs.SetMinOutputs(2);
       };
     }
 
@@ -2252,7 +2257,7 @@
     {
       double sum = 0;
       for (int i=1; i<5; i++)
-	sum += vars[i]/4.0;
+			sum += vars[i]/4.0;
       Fx = (1.0 + 9*sum) * (1.0 - sqrt(vars[0] / (1.0 + 9*sum)));
       break;
     }




More information about the Avida-cvs mailing list