Giter VIP home page Giter VIP logo

Comments (8)

odow avatar odow commented on August 17, 2024

It means that Ipopt tried to evaluate the objective at a point in the domain where the function or its derivative was undefined.

This is known and expected behavior and is not a bug. Ipopt assumes the function is defined and twice differentiable at all points in the variable domain, in Float64 precision.

Note that even if you have other constraints (like your quadratic) that should prevent this, Ipopt may evaluate infeasible points during the iteration process.

There are two likely cases:

  • Very large value of x causing exp(Ax) to be Inf
  • Very small value of sum(...), causing the derivative of log() to be very large (probably Inf).

To fix, try adding variable bounds to x to keep it in a reasonable domain.

BARON does't encounter this issue because it uses a different algorithm.

Instead of using Ipopt, you could also try formulating this as a conic program. It looks like you might have tried this since you mentioned MOSEK, but if you have trouble, please post on https://discourse.julialang.org/c/domain/opt/13.

The tricks you'll need are

from ipopt.jl.

selvi-aras avatar selvi-aras commented on August 17, 2024

Thank you for your reply! This makes great sense to me. MOSEK wouldn't work in this specific example as I am maximizing the convex logsumexp function, but I indeed apply the exp-cone reformulation trick for its minimization. Moreover, BARON typically suffers from exploding exp terms. So, I think this probably is due to small values of sum(...). I will confirm this, but I am closing the issue.

from ipopt.jl.

odow avatar odow commented on August 17, 2024

Ah. I missed reading the Max. I just assumed you meant Min.

Ipopt also assumes that the problem is convex, so if you pass it a non-convex problem, anything can happen.

Does it make sense to maximize log-sum-exp? Ipopt will also have trouble with large exp.

from ipopt.jl.

selvi-aras avatar selvi-aras commented on August 17, 2024

Thank you for your reply! From Ipopt my only hope is a decent solution, not global. In my research, I am showing some cases where maximizing logsumexp (or convex functions, in general) is useful in ML.

from ipopt.jl.

odow avatar odow commented on August 17, 2024

From Ipopt my only hope is a decent solution, not global

Yeah so then I'd suggest: tight bounds, and a few different starting points.

In my research, I am showing some cases where maximizing logsumexp (or convex functions, in general) is useful in ML.

Interesting 🤔

from ipopt.jl.

selvi-aras avatar selvi-aras commented on August 17, 2024

Yeah so then I'd suggest: tight bounds, and a few different starting points.

Exactly! Many random starting points and prayers :)

from ipopt.jl.

odow avatar odow commented on August 17, 2024

You can check if Ipopt found a solution by looking at termination_status(model). I think it returns NUMERICAL_ERROR if it encountered a problem like that. (But you should double check.)

from ipopt.jl.

selvi-aras avatar selvi-aras commented on August 17, 2024

Great to know, thank you very much for your support!

from ipopt.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.