Allow resuming previous run of CMAES

Also enables saving of intermediate results, consistent with the manual.
time-shift
Johannes Pfeifer 2015-10-11 19:13:48 +02:00
parent e3e34e1c7d
commit fd9f2db79d
3 changed files with 10 additions and 1 deletions

View File

@ -5280,6 +5280,10 @@ Available options are:
@table @code
@item 'CMAESResume'
Resume previous run. Requires the @code{variablescmaes.mat} from the last run.
Set to 1 to enable. Default: @code{0}
@item 'MaxIter'
Maximum number of iterations.

View File

@ -540,7 +540,7 @@ simplex.delta_factor=0.05;
options_.simplex = simplex;
% CMAES optimization routine.
cmaes.SaveVariables='off';
cmaes.SaveVariables='on';
cmaes.DispFinal='on';
cmaes.WarnOnEqualFunctionValues='no';
cmaes.DispModulo='10';
@ -548,6 +548,7 @@ cmaes.LogModulo='0';
cmaes.LogTime='0';
cmaes.TolFun = 1e-7;
cmaes.TolX = 1e-7;
cmaes.Resume = 0;
options_.cmaes = cmaes;
% simpsa optimization routine.

View File

@ -331,6 +331,10 @@ switch minimizer_algorithm
cmaesOptions.LogModulo = '0'; % [0:Inf] if >1 record data less frequently after gen=100';
cmaesOptions.LogTime = '0'; % [0:100] max. percentage of time for recording data';
end
case 'CMAESResume'
if options_list{i,2}==1
cmaesOptions.Resume = 'yes';
end
otherwise
warning(['cmaes: Unknown option (' options_list{i,1} ')!'])
end