Giter Club home page Giter Club logo

Comments (3)

frapac avatar frapac commented on June 16, 2024 1

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:

  1. Use a dual regularization if the initial KKT system is degenerate to compute a valid initial multiplier.
  2. Assume directly the initial multiplier is equal to 0.0.

I will investigate what Ipopt is doing in this case.

from madnlp.jl.

vinhpb avatar vinhpb commented on June 16, 2024

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.

frapac avatar frapac commented on June 16, 2024

Solved by #243

from madnlp.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.