Constriant in ADNLPModels package

Hi everyone,

I am trying to do a nonlinear optimization with six parameters using the ADNLModles package. For example:

function constriants(para)


function obj(para)
return (value)



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.


Welcome. I’ve moved your question to the Optimization category since it may be more easily seen by someone who can answer it.

Since it sounds like you are solving a small problem, can you post your actual code?

Hi, answering from the phone.

Ipopt is responsible here, it doesn’t guarantee non-bounds constraints are satisfied in intermediate steps. See
This question was asked kn the past, you can check for more information.
One thing to try is the Percival.jl solver. It is also compliant with adnlpmodels.

Thanks for moving my post! I updated the constraints part in my code (my objective function is too long).

Thanks! It’s exactly my problem. I will try Percival solver.