Skip to content

Incorporate kktCheck into HiPO#2862

Open
filikat wants to merge 19 commits intolatestfrom
hipo-kkt
Open

Incorporate kktCheck into HiPO#2862
filikat wants to merge 19 commits intolatestfrom
hipo-kkt

Conversation

@filikat
Copy link
Collaborator

@filikat filikat commented Feb 19, 2026

HiPO now checks if the kktCheck passes before returning a solution, if crossover is not run.
If HiPO finds a primal-dual feasible solution, but kktCheck disagrees, more iterations are performed until either a solution is found that satisfies the check, or the solver stagnates, or IPX is called. The check is not performed on the solution returned by IPX.
If crossover is requested, no check is performed, because a tighter tolerance is required by the solver already.

Option parsing has been moved inside of hipo::Solver rather than in the wrapper. Final residuals are no longer printed in the summary.

@filikat filikat requested a review from jajhall February 19, 2026 13:50
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.35%. Comparing base (789e17f) to head (1df4aa5).
⚠️ Report is 5 commits behind head on latest.

Files with missing lines Patch % Lines
highs/lp_data/HighsOptions.cpp 66.66% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2862      +/-   ##
==========================================
- Coverage   80.35%   80.35%   -0.01%     
==========================================
  Files         348      348              
  Lines       86491    86522      +31     
==========================================
+ Hits        69503    69527      +24     
- Misses      16988    16995       +7     

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

options_.time_limit = highs_options.time_limit;

options_.max_iter =
highs_options.ipm_iteration_limit - highs_info.ipm_iteration_count;
Copy link
Member

Choose a reason for hiding this comment

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

IPM iteration limit is limit for a particular solve, not total "all time" iterations of IPM, so subtracting highs_info.ipm_iteration_count shouldn't be done. Hence HighsInfo& highs_info isn't needed in this method

}

// Reordering heuristic
if (highs_options.hipo_ordering != kHipoMetisString &&
Copy link
Member

@jajhall jajhall Feb 20, 2026

Choose a reason for hiding this comment

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

Checking the validity of string options is done by Highs::setOptionValue, since this must not return HighsStatus::kOk if the option value is not valid.

I'll leave you to add the necessary calls and methods to lp_data/HighsOptions.h/cpp, along the lines of what's in the version of checkOptionValue for strings.

For sanity you can then leave an assert in Solver::setOptions, but it can return void, hence you don't have to handle an error return below the call.

Copy link
Member

@jajhall jajhall left a comment

Choose a reason for hiding this comment

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

Generally fine - and the "wrapper" idea was inherited from IPX so that the internal IPX code didn't have to be modified, so moving stuff into HiPO from the wrapper is fine.

See comments on validating option values externally.

@filikat
Copy link
Collaborator Author

filikat commented Feb 20, 2026

I changed all the options in HiPO from enum to string, so that they can be passed directly from the highs options. I added functions to check the validity of hipo_parallel_type, hipo_system, hipo_ordering. The asserts are present when the options are actually used, in FactorHiGHSSolver.cpp.

@filikat filikat requested a review from jajhall February 20, 2026 12:10
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.

2 participants

Comments