THANKS, perfromed the 3 steps , uninstalled and reinstalled Nopt
yet still the algorithm GD_STOGO_RAND
did not work
the others algirthms work alright,
where here we are seeing that there is a problme
the error is
ArgumentError: invalid NLopt arguments
…lines 532, … 529, … 276, … 259
The same call to the optimizer worked to all the others algorithms
where i just changed the name of the algorithm
to the STOGO
and the error appeared
in case you work with windows,
can you check the algorithm STOGO ??
just run the following
using NLopt
x0=[1.1,2.3,3.2]
function f_34(x::Vector{Float64},gr_::Vector{Float64})
F_=3+(x[1]-1)^2+x[2]*(x[3]+3)
if (length(gr_)>0)
gr_[1]=2*x[1]
gr_[2]=x[3]+3
gr_[3]=x[2]
end
return abs(F_) ; end
opt = NLopt.Opt(:GD_STOGO_RAND , length(x0))
NLopt.min_objective!(opt::NLopt.Opt, (x, g_) ->f_34(x,g_) )
#NLopt.inequality_constraint!(opt, (x, g) -> LkCon_model_2st(x, g, Y), 0.204)
NLopt.xtol_rel!(opt::NLopt.Opt,0.00204)
NLopt.ftol_rel!(opt::NLopt.Opt,0.0204)
NLopt.maxeval!(opt::NLopt.Opt, 1500*4*3)
NLopt.lower_bounds!(opt::NLopt.Opt, -[50,50,50])
NLopt.upper_bounds!(opt::NLopt.Opt, [50,50,50])
# NLopt.local_optimizer!(opt, local_opt);
const CONVERGE = [:SUCCESS, :FTOL_REACHED, :XTOL_REACHED, :STOPVAL_REACHED]
(fval102, xb1, exitflag1) =
NLopt.optimize(opt::NLopt.Opt, x0::AbstractVector)
F__=3+(xb1[1]-1)^2+xb1[2]*(xb1[3]+3)