Hi everyone,
I am trying to do a nonlinear optimization with six parameters using the ADNLModles package. For example:
function constriants(para)
cons=1-para[1]^2-para[2]^2-para[3]^2+2*para[1]*para[2]*para[3]
return([para[1];para[2];para[3];cons])
end
lb=[-0.999;-0.999;-0.999;0.001]
ub=[0.999;0.999;0.999;Inf]
function obj(para)
println(para)
value
return (value)
opt=ADNLPModel(obj,para,constriants,lb,ub)
ipopt(opt)
And I printed out every parameter in the optimization routine, and I found that sometimes the searching area was outside the constraints, and the optimization crashed.
I was wondering if that’s a bug in the package or if there is another optimization package I could use for nonlinear constraints. I would appreciate any advice on making this function work.
Thanks!