Skip to content

Conversation

@chris-maes
Copy link
Contributor

@chris-maes chris-maes commented Jun 11, 2025

The current bound-flipping ratio test (BFRT) makes an O(N) pass through the remaining breakpoints for each breakpoint resulting in O(N^2) run time, where N is the number of breakpoints.

This PR places the breakpoints in a heap in O(N) time. And then removes the minimum breakpoint O(1) and reorders the heap O(log N) for each of the N breakpoints. Thus, the run time should be O(N log N).

On the NETLIB LP test set this results in a 67% reduction of time spent in the BFRT and a 13% reduction in overall solve time.

The entering variable chosen by the new code should be the same as the previous code (except when ties are broken differently when constructing the heap).

@chris-maes chris-maes requested review from a team as code owners June 11, 2025 20:52
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jun 11, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@chris-maes chris-maes self-assigned this Jun 11, 2025
@chris-maes chris-maes added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jun 11, 2025
@chris-maes
Copy link
Contributor Author

This is still a work in progress. As I have not yet removed the old code, since I am still using it to run benchmarks on the MIPLIB test set.

@chris-maes chris-maes marked this pull request as draft June 11, 2025 21:07
@chris-maes chris-maes changed the title Fix accidental O(N^2) BFRT with O(N log N). 13% better on NETLIB Replace accidental O(N^2) BFRT with O(N log N). 13% better on NETLIB Jun 11, 2025
@anandhkb anandhkb added this to the 25.08 milestone Jul 1, 2025
@aliceb-nv
Copy link
Contributor

Should this draft PR be deleted since #192 exists?

@chris-maes
Copy link
Contributor Author

Should this draft PR be deleted since #192 exists?

Yes. I will close. Thank you.

@chris-maes chris-maes closed this Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants