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

Incorrect PrimalStatus if termination is not optimal #249

Closed
odow opened this issue Aug 12, 2022 · 6 comments · Fixed by #250
Closed

Incorrect PrimalStatus if termination is not optimal #249

odow opened this issue Aug 12, 2022 · 6 comments · Fixed by #250

Comments

@odow
Copy link
Collaborator

odow commented Aug 12, 2022

Juniper reports the PrimalStatus as INFEASIBLE_POINT when the problem is not optimal:

if model.inner === nothing
return MOI.NO_SOLUTION
end
if state_is_optimal(
model.inner.status;
allow_almost = model.inner.options.allow_almost_solved,
)
return MOI.FEASIBLE_POINT
else
return MOI.INFEASIBLE_POINT
end

This is incorrect, because sometimes the point is actually feasible. If we can prove feasibility, it should be FEASIBLE_POINT, otherwise it should be something like UNKNOWN_RESULT_STATUS

First reported on Discourse:
https://discourse.julialang.org/t/obtaining-sub-optimal-results-from-the-model-when-the-time-limit-is-reached/85635

@ccoffrin
Copy link
Member

A very good find! Kind of shocking this has been in the wild for so long without noticing.

I don't know MOI well enough to suggest the best fix, but as long as the inner NLP solver returns a suitable "solved" status and all discrete variables are integral within the tolerance, we should mark the current incumbent as FEASIBLE_POINT.

@odow
Copy link
Collaborator Author

odow commented Aug 14, 2022

Taking a look now.

@Wikunia
Copy link
Member

Wikunia commented Aug 15, 2022

I'm a bit confused by this to be honest. The fix in #250 doesn't change when FEASIBLE_POINT is returned, correct?
(Just talking about primal status) It changes the infeasible one to unknown. Isn't it an infeasible point if it's not a feasible point by the definition of feasibility that we are using? If it's actually feasible and the check at state_is_optimal returns false isn't the check wrong?

@odow
Copy link
Collaborator Author

odow commented Aug 16, 2022

Yeah, ideally the check in PrimalStatus would be about feasibility, not whether the optimal status has been found. But it's also okay to report feasible when you find the optimal solution and "I have no idea" if something else happened. That might be because the problem is infeasible, or it might be because of a time limit, and some other numerical issue.

@odow
Copy link
Collaborator Author

odow commented Aug 16, 2022

The DualStatus return was just always wrong in every situation.

@Wikunia
Copy link
Member

Wikunia commented Aug 17, 2022

Understood thanks for the explanation.

@odow odow closed this as completed in #250 Aug 17, 2022
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

Successfully merging a pull request may close this issue.

3 participants