Hi all,

I am solving a nonlinear problem using JuMP and IPOPT. All my constraints are linear or degree 2 polynomials. I firstly try to add nonlinear constraints using `@NLconstraint`

and here is the summary of IPOPT

```
This is Ipopt version 3.12, running with linear solver ma27.
Number of nonzeros in equality constraint Jacobian...: 554022
Number of nonzeros in inequality constraint Jacobian.: 285500
Number of nonzeros in Lagrangian Hessian.............: 1144062
Total number of variables............................: 117369
variables with only lower bounds: 0
variables with lower and upper bounds: 117369
variables with only upper bounds: 0
Total number of equality constraints.................: 109186
Total number of inequality constraints...............: 105502
inequality constraints with only lower bounds: 32284
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 73218
```

Then I also tried to use `@constraint`

to add all nonlinear constraint (which is the only change I made) and IPOPT reports

```
This is Ipopt version 3.12, running with linear solver ma27.
Number of nonzeros in equality constraint Jacobian...: 988378
Number of nonzeros in inequality constraint Jacobian.: 434498
Number of nonzeros in Lagrangian Hessian.............: 785852
Total number of variables............................: 117369
variables with only lower bounds: 0
variables with lower and upper bounds: 117369
variables with only upper bounds: 0
Total number of equality constraints.................: 109186
Total number of inequality constraints...............: 105502
inequality constraints with only lower bounds: 32284
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 73218
```

The sparsity patterns of Jacobian and Hessian are very different. In terms of performance, the first one is extremely slow: the primal step size becomes very small (1e-3 or -4), the Hessian of the Lagrangian becomes ill-conditioned so that some nontrivial perturbation is needed for a lot iterations, and IPOPT reached 3000 iteration at the end. In contrast, the second one can be finished in around 300 iterations. Could anyone please explain why the two ways of adding constraints cause this difference?

Thanks