Skip to content

Implement strongly connected component analysis on the clique table - #3097

Closed
Opt-Mucca wants to merge 25 commits into
latestfrom
tarjan
Closed

Implement strongly connected component analysis on the clique table#3097
Opt-Mucca wants to merge 25 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 81.12450% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.90%. Comparing base (7f1b433) to head (e099131).
⚠️ Report is 1 commits behind head on latest.

Files with missing lines Patch % Lines
highs/presolve/HPresolve.cpp 64.55% 28 Missing ⚠️
highs/mip/HighsCliqueTable.cpp 88.69% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3097      +/-   ##
==========================================
+ Coverage   72.89%   72.90%   +0.01%     
==========================================
  Files         438      438              
  Lines      106283   106532     +249     
  Branches    17118    17166      +48     
==========================================
+ Hits        77470    77672     +202     
- Misses      28536    28583      +47     
  Partials      277      277              

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

@Opt-Mucca

Copy link
Copy Markdown
Collaborator Author

This was -0.5% on the larger test set and solved the same amount of instances (one or two changes between the two solved sets). I'd say this is complete noise, as was my 0.2% improvement observation. I'd therefore conclude that either this technique is not useful and its relevance is entirely SCIP specific, or we're not testing on instances where this technique shines. I'd put this PR on ice and re-evaluate it in another 6 months or a year.

@jajhall

jajhall commented Aug 11, 2026

Copy link
Copy Markdown
Member

Shame, but was sensible to try it.

@Opt-Mucca Opt-Mucca closed this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants