Skip to content

Commit

Permalink
Make sure num_random is set correctly and set fminunc type correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Lht97 committed Dec 5, 2024
1 parent e189c7a commit 4b5d7ca
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/profile_optiprofiler.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ function profile_optiprofiler(options)
if ~isfield(options, 'labels')
error('Please provide the labels for the solvers');
end
feature_adaptive = ['noisy', 'truncated', 'custom'];
feature_adaptive = {'noisy', 'truncated', 'custom'};
if ismember('fminunc', options.labels) && ismember(options.feature_name, feature_adaptive)
options.labels(strcmp(options.labels, 'fminunc')) = {'fminunc-adaptive'};
end
if ~isfield(options, 'n_runs') || strcmpi(options.feature_name, 'plain')
options.n_runs = 1;
else
options.n_runs = 3;
if ~isfield(options, 'n_runs')
if strcmpi(options.feature_name, 'plain')
options.n_runs = 1;
else
options.n_runs = 3;
end
end
time_str = char(datetime('now', 'Format', 'yy_MM_dd_HH_mm'));
options.silent = false;
Expand Down

0 comments on commit 4b5d7ca

Please sign in to comment.