diff --git a/src/paramset.jl b/src/paramset.jl index e40e389..5fae650 100644 --- a/src/paramset.jl +++ b/src/paramset.jl @@ -26,7 +26,7 @@ function get_n_runs(ps::ParameterSet)::Int return n_runs end -function get_param_combos(ps::ParameterSet, n_runs::Int=get_n_runs(ps))::Matrix +function get_param_combos(ps::ParameterSet; n_runs::Int=get_n_runs(ps))::Matrix combos = Matrix{Any}(n_runs, ps.n_args) P = 1 for j in 1:ps.n_args diff --git a/src/strategy.jl b/src/strategy.jl index f3f8432..1633364 100644 --- a/src/strategy.jl +++ b/src/strategy.jl @@ -111,7 +111,7 @@ function optimize(strat::Strategy; samples::Int=0, seed::Int=0, verbose::Bool=tr else samples = n_runs end - combos = get_param_combos(strat.indicator.paramset, n_runs)[idx_samples,:] + combos = get_param_combos(strat.indicator.paramset, n_runs=n_runs)[idx_samples,:] result = zeros(samples) for (run, combo) in enumerate(idx_samples) verbose ? println("Run $run/$samples") : nothing @@ -137,7 +137,7 @@ function optimize!(strat::Strategy; samples::Int=0, seed::Int=0, verbose::Bool=t else samples = n_runs end - combos = get_param_combos(strat.indicator.paramset, n_runs)[idx_samples,:] + combos = get_param_combos(strat.indicator.paramset, n_runs=n_runs)[idx_samples,:] strat.results.optimization = zeros(samples,1) for (run, combo) in enumerate(EachRow(combos)) verbose ? println("Run $run/$samples") : nothing