Re-enable bound strengthening and diophantine check in simplex - #651
Merged
Conversation
Commit 14d675f ('Test code', 2018) disabled these integer-feasibility phases with 'if (false && ...)' guards, leaving only the integrality check before branch & bound. This caused large slowdowns on easy QF_LIA instances with mod/div (issue #410: 0.003s in 2.5.x vs 812s in 2.6.4). Restore the four calls and add a regression test.
With the integer-feasibility phases re-enabled, the original instance solves in under a second, so the 1s timeout it relies on never fires. Use a Cornuejols-Dawande market-split instance instead, which is hard for branch & bound.
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.
Fixes #410.
Commit 14d675f ("Test code", Oct 2018, shipped in 2.6.1) disabled bound strengthening and the diophantine-solver check in
simplex_make_integer_feasiblewithif (false && ...)guards, leaving only the integrality check before branch & bound. On the issue's 2-variable QF_LIA mod/div instance this makes B&B thrash: 0.003s in 2.5.x vs 812s in 2.6.4 (315s on current master). That commit also added the per-variable Gomory cut path, so the phases were most likely disabled to exercise the new cuts and never re-enabled.This restores the four disabled calls. The issue's instance drops to 0.009s, matching 2.5.4 behavior (2 branch atoms, 3 dioph checks). The latent bug in this path (unnormalized gcd passed to
q_integer_reminstrengthen_bounds_on_integer_variable) was already fixed by theq_normalizecalls added in #513.Verification:
iss410test fails by timeout.The
iss547test relies on a 1s timeout firing, and its instance now solves instantly, so it no longer tested the timeout path. Replaced with a Cornuejols-Dawande market-split instance (hard for B&B); verified the timeout fires and the expected output is produced on debug, release, and pre-fix binaries.