I am trying to get
NLopt to work but it just stops immediately and gives :FORCED_STOP. I tried the following but it looks like the algorithm isn’t even going into
_ff. Any thoughts? Thank you!
function ff(x) return sum(x.^2) #return sum(abs.(SSresid(mod_pars,x,x,x))); end function _ff(x) try ff(x) catch println("error") end end opt = Opt(:LN_SBPLX, 3); opt.xtol_rel = 1e-1; opt.min_objective = _ff; (minf,minx,ret) = NLopt.optimize(opt, [1,25,0.1])