Harden exact solve status handling and reduce DW memory - #47
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inf) gap unless an independent bound provides a conservative nonzero certificatereturn_status=TrueStatus and validation coverage
Regression tests cover tiny positive time limits, no incumbent, proven infeasibility, valid-but-unproven incumbents, expiry immediately after violated cuts, preprocessing, SAP/transformed and specialized paths, and both HiGHS and licensed Gurobi backends. They also cover the disconnected negative-cycle counterexample, custom arc-weight attributes, transform entry points, MWCS negative node weights, and Dreyfus-Wagner tied paths, zero weights, disconnected graphs, and ILP-oracle comparisons.
Dreyfus-Wagner benchmark
Compared
origin/mainat90a587dwith this implementation using fresh subprocesses, fixed seed20260904, three repetitions per case, and identical Python 3.13.4 / NetworkX 3.5 / SciPy 1.17.0 environments.fis the target edge factor (m = f*n). Every objective matched.The median runtime ratio across the matrix was 1.034, so this PR makes no general runtime-improvement claim. Median process RSS changed by -1.0 MiB across all cases; the largest measured reduction was 7.9 MiB at
k=10, n=1200.Nested-cut profiling
On a fixed
n=600, m=3600, 60-terminal separation workload (nested=1, one separation thread, 20 profiled calls), CSR construction accounted for 0.163 s of 2.850 s total (5.7%), versus 1.617 s cumulative max-flow time. A prototype per-thread CSR cache reduced construction calls from 1200 to 20, but nine unprofiled repetitions were indistinguishable: 0.085434 s cached versus 0.085517 s on main. The prototype was reverted and this PR contains no nested-cut change.Validation
python3 -m pytest -q: 795 passed, 26 skipped, 20 xpassedE501ignored to match the configured Black line lengthE501ignored): 152 findings here versus 156 on main--ignore-missing-imports): 69 existing findings here versus 71 on main; isolated new files pass with--follow-imports=skipgit diff --checkandcompileall: clean