Hi @slmontes, welcome to the forum ![]()
You can safely ignore the differences in the non-zero count between Ipopt.jl and AmplNLWriter.jl. As you can see from the logs, Ipopt takes identical sequences of iterations.
The differences are due to two reasons:
- Multiple non-zeros can be specified for the same element in the Hessian. These are summed together and have no effect on the output.
- JuMP’s sparsity detection is conservative. It may have “non-zeros” in the Hessian which are in fact always
0.0.
In some rare cases there might be a different sequence of iterations due to small numerical round off differences in how the Hessian matrix is evaluated.