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

Check feasibility of solutions in PrimalStatus and DualStatus #548

Merged
merged 8 commits into from
Mar 12, 2024

Conversation

odow
Copy link
Member

@odow odow commented Mar 5, 2024

Closes #546

This is one option, but I don't really like it, because it relies on magic constants. Is there a way for Gurobi to tell us whether the problem is feasible according to any parameters the user has set?

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 80.48%. Comparing base (3a6a83e) to head (ae1e4a9).

Files Patch % Lines
src/MOI_wrapper/MOI_wrapper.jl 93.75% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #548      +/-   ##
==========================================
+ Coverage   80.36%   80.48%   +0.11%     
==========================================
  Files           6        6              
  Lines        2908     2936      +28     
==========================================
+ Hits         2337     2363      +26     
- Misses        571      573       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blegat
Copy link
Member

blegat commented Mar 6, 2024

The other option is to just return UNKNOWN_RESULT_STATUS

@odow
Copy link
Member Author

odow commented Mar 6, 2024

Always returning UNKNOWN_RESULT_STATUS will break returning a feasible point on a time limit.

@odow
Copy link
Member Author

odow commented Mar 7, 2024

Support confirm there is nothing in the API for this, so I guess we're stuck with a magic constant.

@simonbowly
Copy link
Collaborator

Support confirm there is nothing in the API for this, so I guess we're stuck with a magic constant.

Why compare with a hard-coded constant instead of the tolerance parameters set by the user?

@odow
Copy link
Member Author

odow commented Mar 7, 2024

instead of the tolerance parameters set by the user?

I mean, we could. But then we'd need to loop through all tolerances and all violations and account for any nasty differences between algorithms etc (without being able to know what they are). It'd turn into the function I want in the C API that you're running up the flagpole...

@simonbowly
Copy link
Collaborator

Sure, this is more to point out that the default tolerances are 10^-6, so you can expect a lot of false conclusions with a hard coded 10^-8. But now I see @blegat's suggestion above for a jump-side parameter.

@odow
Copy link
Member Author

odow commented Mar 7, 2024

Yeah we wouldn't actually hard-code. And 1e-8 is just a placeholder.

@odow
Copy link
Member Author

odow commented Mar 8, 2024

Okay, how's this. I assumed that is sufficient to check only ConstrVio, BoundVio, and IntVio.

src/MOI_wrapper/MOI_wrapper.jl Outdated Show resolved Hide resolved
src/MOI_wrapper/MOI_wrapper.jl Outdated Show resolved Hide resolved
@odow odow merged commit 1892ca0 into master Mar 12, 2024
4 checks passed
@odow odow deleted the od/check-feasibility-solutions branch March 12, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Strange reporting with respect to feasibility
3 participants