Thanks. That’s what I thought.
tatm₀=0.8, so it’s still well within the range I’m trying to bound.
Yeah, it’s odd that Ipopt has this issue in this case then. I’ve tried to cut my project down to a MWE before for another problem, but it’s pretty closely bound and doesn’t seem to occur when I’m not using the full system.
Here’s a link to a script which will show you what I’m seeing, which is the smallest I can get it sorry.
To run it, just make a new folder fixtest, then:
julia> ]
(v1.1) pkg> activate .
(fixtest) pkg> add JuMP
(fixtest) pkg> add Ipopt
Then add fixtest.jl to fixtest/src/
Finally, from the src directory run julia --project=@. fixtest.jl
At the moment, the solver will spool forever and not reach an end condition.
If you comment out lines 250-253, and replace them with 256-261, you’ll get a solution quite quickly.
Note, that I’ve been testing on Ipopt 3.12.13, can’t say for sure that the bundled 3.12.10 will give the same results—I’ve had issues with it in the past. Just in case, here’s what I see:
Spooling version, using fix (killed early)
This is Ipopt version 3.12.13, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).Number of nonzeros in equality constraint Jacobian…: 3912
Number of nonzeros in inequality constraint Jacobian.: 176
Number of nonzeros in Lagrangian Hessian…: 944Total number of variables…: 1544
variables with only lower bounds: 536
variables with lower and upper bounds: 178
variables with only upper bounds: 59
Total number of equality constraints…: 1374
Total number of inequality constraints…: 59
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 59iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 -0.0000000e+00 9.00e+03 1.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
250r-6.4597620e+13 1.04e+10 2.32e-03 -3.3 8.42e-03 - 1.00e+00 3.05e-05f 16
500r-6.4597620e+13 1.04e+10 2.31e-03 -3.3 8.42e-03 - 1.00e+00 1.53e-05f 17
750r-6.4597620e+13 1.04e+10 2.30e-03 -3.3 8.42e-03 - 1.00e+00 1.53e-05f 17
Working version, with constraints
This is Ipopt version 3.12.13, running with linear solver mumps.
NOTE: Other linear solvers might be more efficient (see Ipopt documentation).Number of nonzeros in equality constraint Jacobian…: 3916
Number of nonzeros in inequality constraint Jacobian.: 176
Number of nonzeros in Lagrangian Hessian…: 945Total number of variables…: 1545
variables with only lower bounds: 536
variables with lower and upper bounds: 179
variables with only upper bounds: 59
Total number of equality constraints…: 1375
Total number of inequality constraints…: 59
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 59iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 -0.0000000e+00 9.00e+03 1.00e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
In iteration 59, 1 Slack too small, adjusting variable bound
In iteration 62, 1 Slack too small, adjusting variable boundNumber of Iterations…: 228
(scaled) (unscaled)Objective…: -2.6944230209485045e+03 -2.6944230209485045e+03
Dual infeasibility…: 5.6843418860808015e-14 5.6843418860808015e-14
Constraint violation…: 9.7067947429918533e-11 9.7067947429918533e-11
Complementarity…: 2.5059126891810398e-09 2.5059126891810398e-09
Overall NLP error…: 2.5059126891810398e-09 2.5059126891810398e-09Number of objective function evaluations = 311
Number of objective gradient evaluations = 199
Number of equality constraint evaluations = 311
Number of inequality constraint evaluations = 311
Number of equality constraint Jacobian evaluations = 238
Number of inequality constraint Jacobian evaluations = 238
Number of Lagrangian Hessian evaluations = 228
Total CPU secs in IPOPT (w/o function evaluations) = 86.921
Total CPU secs in NLP function evaluations = 1.485EXIT: Optimal Solution Found.