Comments (3)
This is indeed an issue with MadNLP.
When the initial point is not provided, the solver sets x0
to 0. This is a problem in this case, as the Jacobian is null in 0, leading to the formulation of a degenerate KKT system. Then the KKT system is solved to estimate the initial multiplier (returning NaN
in this degenerate case) which is itself use in the evaluation of the Hessian (inheriting the NaN
values from the multiplier). As a result, MadNLP is returning an error.
The quick fix is to provide an initial value to JuMP. In this case, MadNLP is returning the same solution as Ipopt:
using MadNLP
using JuMP
m = Model(Ipopt.Optimizer)
@variable(m, x, start=1.0)
@variable(m, y, start=1.0)
@NLobjective(m, Min, (x-5)^2 + (y-8)^2)
@NLconstraint(m, x*y==5)
optimize!(m)
But we have to address this issue properly in MadNLP. I see two workarounds:
- Use a dual regularization if the initial KKT system is degenerate to compute a valid initial multiplier.
- Assume directly the initial multiplier is equal to 0.0.
I will investigate what Ipopt is doing in this case.
from madnlp.jl.
Hi,
I am using MadNLP with JuMP and also get this Invalid number in Hessian Lagrangian problem. When I tried to query the termination status with termination_status(model), I got an error "MethodError: Cannot 'convert' an object of type MathOptInterface.ResultStatusCode to an object of type MathOptInterface.TerminationStatusCode". I could only see in the report that the error was due to this Invalid number in Hessian Lagrangian if I did not use set_silent to the JuMP model. Is there any way I can get this "Invalid number in Hessian Lagrangian"/did not solve successfully information with something similar to termination_status(model)?
Thank you.
from madnlp.jl.
Solved by #243
from madnlp.jl.
Related Issues (20)
- Time-to-first-solve (TTFS) HOT 2
- Incorporate lower/upper bound views to KKTRHS
- Change function names
- Add support for equality constraints in DenseCondensedKKTSystem HOT 1
- LapackGPUSolver goes into feasibility restoration when LapackCPUSolver does not HOT 3
- Number of upper and lower bounded vars are incorrectly reported HOT 1
- Definition of primal solution? HOT 3
- Reuse existing `MadNLPSolver` HOT 4
- Possibly wrong init of dual variables
- Unable to install HSL extension in Windows HOT 7
- Test for `solve!` function HOT 1
- Better error message when invalid number detected HOT 1
- Fixed variable multiplier
- Wrong solution in QuickStart example HOT 1
- MadNLP stucks at an iteration HOT 2
- Problems with relocatability HOT 1
- MadNLP.jl is not precompiling in julia 1.9 HOT 2
- Restoration failed when using MadNLP for ODE parameter estimation HOT 2
- Using weak dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from madnlp.jl.