Repository navigation
Fix exact objective ordering in primal solution storage - #218
Open
reinhardullrich wants to merge 1 commit into
Open
reinhardullrich wants to merge 1 commit into
reinhardullrich wants to merge 1 commit into
Conversation
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.
Problem
In exact solving mode, the primal solution pool is still ordered using floating-point objective values. Two different rational objectives can round to the same floating-point value. Consequently,
SCIPgetBestSol()can return a worse solution even when another stored solution attains the exact primal bound. With a full solution pool, the insertion position can also cause an exactly better solution to be discarded.I reproduced the ordering issue on SCIP 10.0.3 and upstream master. In a rational MILP application, two stored solutions differed in objective by approximately 2.29e-37. The second solution matched the exact primal and dual bounds, but
SCIPgetBestSol()returned the first. An independent rational verification exposed the discrepancy.Change
The comparison handles original/transformed objective conversion and candidates without exact solution data consistently with the existing exact-mode acceptance checks.
Verification
unittest-scip-*executables pass, together with their build steps.unittest-event-dual,unittest-limit-solutions, andunittest-limit-primalpass.SCIPgetBestSol()directly without selecting a different solution from the pool.Test environment: Linux aarch64, upstream master based on fea16d9, exact solving enabled, SoPlex 8.0.3. Debug and Release builds were used. The full SCIP test suite and a performance benchmark were not run.
Separate Debug-build limitation
The full application reproducer aborts in the installed SoPlex
SSVectorBase<double>::forceSetup()assertion (isPlusZero) with both unpatched and patched Debug builds. This is separate from the ordering regression and remains unresolved. The focused Debug tests and the patched Release application run pass as described above; this PR does not claim to fix that assertion.