Probably a stupid question, but I cannot manage to pass the maximum number of function calls f_calls_limit
to the optimizer since the following does not seem to have any effect
using Metaheuristics
function gogo()
c = randn(10);
A = randn(10, 10);
function f(x)
if issorted(x)
return c'*x, -999*ones(size(x)), [0.0]
else
return 2*c'*x, 999*ones(size(x)), [0.0]
end
end
bounds = repeat([0,100], 1, 10)
#information = Information(f_optimum = 0.0)
options = Options(f_calls_limit = 900000, f_tol = 1e-5, seed=1)
@show options
ga = GA(;crossover=SBX(;bounds),
mutation=PolynomialMutation(;bounds),
information=information,
options=options,
environmental_selection=GenerationalReplacement()
);
@show ga
result = optimize(f, bounds, ga)
@show minimizer(result)
@show result
end
gogo()