Skip to content

Conversation

@Opt-Mucca
Copy link
Collaborator

This PR sorts rows via their fractionalActivity in HighsPathSeparator when considering which row to add to the aggregation.
High level overview: The separator tries to find a continuous column to aggregate out, and to do so finds an additional row that also contains that continuous column. Which row to use is non-obvious.

The old method:

  • No sorting. Given the array of rows, each time you want to select a new row, scan through the array starting at a random point.

The new method:

  • Sort rows via their fractional activities. Scan through them in order each time.

Pros:

  • More informed ordering. Should prioritise rows that can generate good cMIR cuts.
  • Randomly selecting a starting point to scan through the array already kind of enforced a priority. That is, array[i-1] is checked before array[i] in all cases aside from starting the scan at i.

Cons:

  • Losing some inherent diversity that a random algorithm provides. It's now more likely that we'd aggregate similar rows each time, which could lead to many duplicate cuts.

This should only be merged after doing a performance run.

@Opt-Mucca Opt-Mucca requested a review from fwesselm December 1, 2025 09:36
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.25%. Comparing base (e4632db) to head (48be3da).
⚠️ Report is 68 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2674      +/-   ##
==========================================
+ Coverage   81.20%   81.25%   +0.04%     
==========================================
  Files         349      349              
  Lines       85465    85801     +336     
==========================================
+ Hits        69406    69721     +315     
- Misses      16059    16080      +21     

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

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