Skip to content

Introduced relative KKT error data to HighsInfo, and using it to assess optimality claims from PDLP and IPM without crossover#2346

Merged
jajhall merged 122 commits intolatestfrom
fix-2251
May 20, 2025
Merged

Introduced relative KKT error data to HighsInfo, and using it to assess optimality claims from PDLP and IPM without crossover#2346
jajhall merged 122 commits intolatestfrom
fix-2251

Conversation

@jajhall
Copy link
Copy Markdown
Member

@jajhall jajhall commented May 18, 2025

PDLP and IPM without crossover terminate with optimality using relative measures of KKT conditions. Hence it's unreasonable to expect the absolute KKT conditions used to determine optimality in simplex and IPM with crossover - when a basis is available. However, using measures of the bounds (costs) of the LP in relative measures of primal (dual) KKT conditions can flatter the solution obtained (particularly in the case of PDLP).

Hence, this PR introduces relative KKT error data - available to the user via HighsInfo - that are computed using the optimal solution, and ignore large costs and bounds that play no role in the optimal solution. The measures of the costs and bounds are computed for bounds that are active, and costs for which the corresponding dual is small.

The fix in #1978 to remove residual errors (that, previously, were not being checked for) after IPM without crossover by transferring them to primal and dual activities, was a bad idea. If nothing else, it led to a lot of erroneous model status values of HighsModelStatus::kUnknown when the problem had been solved satisfactorily using relative tolerances. This correction of residuals has now been removed. The relative residuals are assessed using the new measures. The large residuals that were reported, probably correspond to #2306

jajhall added 30 commits March 23, 2025 21:56
…l objecive error when assessing LP solutions without a basis, but not considering off-bound meaningful duals as infeasible
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2025

Codecov Report

Attention: Patch coverage is 83.07552% with 186 lines in your changes missing coverage. Please review.

Project coverage is 79.01%. Comparing base (c1e6903) to head (718829d).
Report is 165 commits behind head on latest.

Files with missing lines Patch % Lines
highs/lp_data/HighsInterface.cpp 55.98% 92 Missing ⚠️
highs/lp_data/HighsSolution.cpp 95.22% 23 Missing ⚠️
highs/lp_data/HighsModelUtils.cpp 0.00% 20 Missing ⚠️
highs/lp_data/Highs.cpp 77.77% 18 Missing ⚠️
highs/lp_data/HighsInfo.h 67.50% 13 Missing ⚠️
highs/pdlp/CupdlpWrapper.cpp 75.00% 8 Missing ⚠️
highs/ipm/IpxWrapper.cpp 20.00% 4 Missing ⚠️
check/TestPdlp.cpp 97.50% 2 Missing ⚠️
highs/lp_data/HighsOptions.h 86.66% 2 Missing ⚠️
highs/mip/HighsMipSolverData.cpp 0.00% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2346      +/-   ##
==========================================
- Coverage   79.08%   79.01%   -0.07%     
==========================================
  Files         346      346              
  Lines       84605    84969     +364     
==========================================
+ Hits        66906    67138     +232     
- Misses      17699    17831     +132     

☔ 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.

@jajhall
Copy link
Copy Markdown
Member Author

jajhall commented May 18, 2025

The documentation of HighsOptions and HighsInfo has been updated to reflect the new options and data introduced.

FEATURES.md has been update with respect to recent merged PRs, and this PR!

@jajhall jajhall requested review from galabovaa and odow May 18, 2025 19:50
@jajhall
Copy link
Copy Markdown
Member Author

jajhall commented May 18, 2025

I've added @odow as a reviewer, mainly to flag up this significant change.

@odow
Copy link
Copy Markdown
Collaborator

odow commented May 20, 2025

If the Julia tests pass, I'm okay with it. We don't really have a good solver-independent way for users to check the quality of the returned solutions, but @joaquimg's tool that he is building should help.

@galabovaa
Copy link
Copy Markdown
Contributor

Great!

@jajhall jajhall merged commit ddcf4ac into latest May 20, 2025
306 checks passed
@jajhall jajhall deleted the fix-2251 branch February 9, 2026 11:59
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 this pull request may close these issues.

3 participants