Mercurial > forge
changeset 6715:887b641e0909 octave-forge
Enable 'UseParallel' and 'Vectorized' options (even if not used at the moment). Doc improvements and fixes.
author | slackydeb |
---|---|
date | Tue, 16 Feb 2010 00:36:55 +0000 |
parents | 9d6036e710f5 |
children | a34530704572 |
files | main/ga/inst/__gaoptimset_default_options__.m main/ga/inst/gaoptimset.m |
diffstat | 2 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/main/ga/inst/__gaoptimset_default_options__.m Mon Feb 15 23:55:16 2010 +0000 +++ b/main/ga/inst/__gaoptimset_default_options__.m Tue Feb 16 00:36:55 2010 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2008, 2009 Luca Favatella <slackydeb@gmail.com> +## Copyright (C) 2008, 2009, 2010 Luca Favatella <slackydeb@gmail.com> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -14,7 +14,7 @@ ## along with this program; If not, see <http://www.gnu.org/licenses/>. ## Author: Luca Favatella <slackydeb@gmail.com> -## Version: 1.2.2 +## Version: 1.2.3 function default_options = __gaoptimset_default_options__ () default_options.CreationFcn = @gacreationuniform; @@ -48,6 +48,6 @@ default_options.TimeLimit = Inf; #default_options.TolCon = 1e-6; #default_options.TolFun = 1e-6; - #default_options.UseParallel = "never"; - #default_options.Vectorized = "off"; + default_options.UseParallel = "never"; + default_options.Vectorized = "off"; endfunction \ No newline at end of file
--- a/main/ga/inst/gaoptimset.m Mon Feb 15 23:55:16 2010 +0000 +++ b/main/ga/inst/gaoptimset.m Tue Feb 16 00:36:55 2010 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2008, 2009 Luca Favatella <slackydeb@gmail.com> +## Copyright (C) 2008, 2009, 2010 Luca Favatella <slackydeb@gmail.com> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -42,19 +42,25 @@ ## @item FitnessScalingFcn ## @item Generations ## @item InitialPopulation +## Can be partial. ## @item InitialScores +## column vector | [] (default) . Can be partial. ## @item MutationFcn ## @item PopInitRange ## @item PopulationSize ## @item SelectionFcn ## @item TimeLimit +## @item UseParallel +## "always" | "never" (default) . Parallel evaluation of objective function. TODO: parallel evaluation of nonlinear constraints +## @item Vectorized +## "on" | "off" (default) . Vectorized evaluation of objective function. TODO: vectorized evaluation of nonlinear constraints ## @end table ## -## @seealso{ga, gaoptimget} +## @seealso{ga} ## @end deftypefn ## Author: Luca Favatella <slackydeb@gmail.com> -## Version: 4.4.4 +## Version: 4.4.5 function options = gaoptimset (varargin) if ((nargout != 1) || @@ -85,5 +91,5 @@ %!test %! options = gaoptimset ("EliteCount", 1, "FitnessLimit", 1e-7, "Generations", 1000, "PopInitRange", [-5; 5], "PopulationSize", 200); %! -%! ## "CrossoverFraction" is not specified, so gaoptimset should put the default value: test this too +%! ## "CrossoverFraction" is not specified, so gaoptimset should put the default value: testing this too %! assert ([(getfield (options, "CrossoverFraction")); (getfield (options, "EliteCount")); (getfield (options, "FitnessLimit")); (getfield (options, "Generations")); (getfield (options, "PopInitRange")); (getfield (options, "PopulationSize"))], [0.8; 1; 1e-7; 1000; [-5; 5]; 200]) \ No newline at end of file