changeset 9776:b07e53c45e4e octave-forge

ga: reduce number of generations in a test of ga The high number of generations does not look strictly needed.
author slackydeb
date Mon, 19 Mar 2012 00:54:13 +0000
parents 700cc0303b70
children 13b4a6efc295
files main/ga/inst/ga.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main/ga/inst/ga.m	Mon Mar 19 00:54:00 2012 +0000
+++ b/main/ga/inst/ga.m	Mon Mar 19 00:54:13 2012 +0000
@@ -159,7 +159,7 @@
 
 # TODO: structure/add tests below
 
-%!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000)));
+%!test x = ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 200)));
 
 %!test x = ga (struct ("fitnessfcn", @(x) rastriginsfcn (x(1:2)) + ((x(3) ** 2) - (cos (2 * pi * x(3))) + 1) + (x(4) ** 2), "nvars", 4, "options", gaoptimset ("EliteCount", 5, "FitnessLimit", 1e-7, "PopInitRange", [-2; 2], "PopulationSize", 200)));