Skip to content

Implement strongly connected component analysis on the clique table#3097

Open
Opt-Mucca wants to merge 23 commits into
latestfrom
tarjan
Open

Implement strongly connected component analysis on the clique table#3097
Opt-Mucca wants to merge 23 commits into
latestfrom
tarjan

Conversation

@Opt-Mucca

Copy link
Copy Markdown
Collaborator

This PR implements an iterative form of tarjans algorithm that traverses the clique table and tries to find strongly connected component, e.g. a proof that x = y = ~z, as well as infeasible assignments, e.g., x -> y -> ~x => x can't be true.

It is first mentioned in Mixed integer programming: Analyzing 12 years of progress, albeit some improvements of the algorithm are intentionally not described in depth. The implementation is largely copied from SCIP 5.0, where it gave a ~2% performance improvement (only getting ~0.2% on my smaller test set)

Some notes:

  • I did not implement the topological sorting that SCIP does for a second DFS sweep. I don't think it's that important, but it still may be worth adding.
  • The algorithm is kind of hacked in because the clique table is not always up to date with the presolved problem. Therefore I call it at the start of probing and stash all the reductions in HighsDomain and HighsCliqueTable, which will then be applied in finaliseProbing

@fwesselm No rush to review this. I'd rather attention is on #2990 first.

@Opt-Mucca Opt-Mucca requested a review from fwesselm June 26, 2026 12:40
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.32932% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.16%. Comparing base (fa85493) to head (2911e3b).
⚠️ Report is 22 commits behind head on latest.

Files with missing lines Patch % Lines
highs/presolve/HPresolve.cpp 65.82% 27 Missing ⚠️
highs/mip/HighsCliqueTable.cpp 89.88% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3097      +/-   ##
==========================================
+ Coverage   73.11%   73.16%   +0.05%     
==========================================
  Files         431      430       -1     
  Lines      103801   104118     +317     
  Branches    16712    16765      +53     
==========================================
+ Hits        75892    76181     +289     
- Misses      27633    27661      +28     
  Partials      276      276              

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant