Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JuMP Interface, Incorrect Status Returned #1068

Open
ccoffrin opened this issue Jan 27, 2024 · 5 comments
Open

JuMP Interface, Incorrect Status Returned #1068

ccoffrin opened this issue Jan 27, 2024 · 5 comments

Comments

@ccoffrin
Copy link

There seems to be an issue when using Optim as a solver for JuMP in a constrained optimization setting.

If the algorithm terminates but does not satisfy the constraints it currently returns,

  • termination_status of LOCALLY_SOLVED
  • primal status of FEASIBLE_POINT

Per this guide, https://jump.dev/MathOptInterface.jl/stable/manual/solutions/#Local-search-solvers

In this situation it should probably return,

  • termination_status of LOCALLY_INFEASIBLE
  • primal status of INFEASIBLE_POINT

The issue can be reproduced by running this example, https://github.com/lanl-ansi/rosetta-opf/blob/main/debug/optim-jump.jl

CC @blegat

@pkofod
Copy link
Member

pkofod commented Jan 27, 2024

Thanks for reporting it!

@blegat
Copy link
Contributor

blegat commented Jan 28, 2024

We are assuming that converged means LOCALLY_SOLVED:

Optim.jl/src/MOI_wrapper.jl

Lines 337 to 338 in 1a649e8

elseif converged(model.results)
return MOI.LOCALLY_SOLVED

Is this an incorrect assumption or should converged be false here ?

@ccoffrin
Copy link
Author

I am surely not on expert in Optim but based on my brief experience using it, I suspect this function should look something like,

if converged, 
    check if the constraints are satisfied up to the prescribed tolerance
    if yes return `LOCALLY_SOLVED` otherwise return `LOCALLY_INFEASIBLE`

@pkofod
Copy link
Member

pkofod commented Jan 29, 2024

Is it possible to give a reproducer here? Then it'd be a bit easier to look into.

@ccoffrin
Copy link
Author

It's not a steam lined example but this code can be used to reproduce,

The issue can be reproduced by running this example, https://github.com/lanl-ansi/rosetta-opf/blob/main/debug/optim-jump.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants