Skip to content

Conversation

@odow
Copy link
Member

@odow odow commented Apr 27, 2025

Closes #273

@codecov
Copy link

codecov bot commented Apr 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c7e2fbd) to head (1308783).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #274   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines         1471      1479    +8     
=========================================
+ Hits          1471      1479    +8     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@odow
Copy link
Member Author

odow commented Apr 27, 2025

cc @sstroemer thoughts?

Copy link

@sstroemer sstroemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed two minor things, but looks good to me - thanks for adding that specifically!!

x.model_status = Highs_getModelStatus(model)
statusP = Ref{HighsInt}()
if x.model_status == kHighsModelStatusInfeasible
certificates = MOI.get(model, ComputeInfeasibilityCertificates())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I noticed: Setting ComputeInfeasibilityCertificates() to false will always result in both x.has_dual_ray and x.has_primal_ray being false.

Therefore that will never trigger:

if x.has_dual_ray || x.has_primal_ray
    return  # If a ray is present, we don't query the solution
end

I have no idea if querying the solution (status) afterwards costs time or whether skipping it also when !certificates && (x.model_status == kHighsModelStatusInfeasible || x.model_status == kHighsModelStatusUnbounded) would even be correct, but just a thought.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We query the solution only if x.primal_solution_status != kHighsSolutionStatusNone, which won't be the case for your infeasible problems. I'd like to leave the behavior as-is.

@odow odow changed the title Add HiGHS.ComputeInfeasibilityCertificates attribute Add HiGHS.ComputeInfeasibilityCertificate attribute Apr 28, 2025
@odow odow merged commit 4a347dd into master Apr 28, 2025
10 checks passed
@odow odow deleted the od/compute-infeasibility-certificates branch April 28, 2025 23:28
sstroemer pushed a commit to sstroemer/IESopt.jl that referenced this pull request Sep 11, 2025
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.

Add option to turn off certificates

3 participants