Provisional: non-mutating solution comparison for Gecode 7 (breaking changes) - #242
Draft
zayenz wants to merge 9 commits into
Draft
Provisional: non-mutating solution comparison for Gecode 7 (breaking changes)#242zayenz wants to merge 9 commits into
zayenz wants to merge 9 commits into
Conversation
added 9 commits
September 10, 2026 08:22
Zdev-Change-Id: Zd450758a16d392690607cf153a5160083ad5c3a5cd6812f461a16610075fc80a
…iness Zdev-Change-Id: Z5c772894bb48c0852974820982b13020d663b002850618c6bcba63a53e9e4571
Zdev-Change-Id: Zd3bd5210f7a14908a3b4cf47a040ce93d4488f82ec178872c8b90824895e3f87
Zdev-Change-Id: Z1c007f6a8f418dab7835ce3c161f32811819842b08897f39166326aacd7afcb5
Zdev-Change-Id: Z87d7de4220478ed2e6d58d55f4648cde323acfbbb28ecb589c39215a802aeb03
Zdev-Change-Id: Z738bbca9dd306371480ab382cbd9492a52cd416d460e53b9512a5f83e57476d7
Zdev-Change-Id: Zc9f2540cb25a8b2bc131505b4314c6ea435ced462e808cb28c0b3f57b66f8f34
Arbitrate candidates and external incumbents with non-mutating comparison, invalidate superseded queued results, and deliver comparison failures safely through next(). Preserve restart support by clearing failure state during reset, with focused parallel BAB regressions. Zdev-Change-Id: Z7926867238a6c0cfb64f226c42bf1df0d6994fedf653be929d33ef60ec652f92
Use non-mutating comparison for PBS incumbent arbitration and safely return collector or nested-asset failures after portfolio workers quiesce. Add mixed portfolio regressions and document model-defined comparability, float ranking, migration, and the possible future best-effort incomparability policy. Zdev-Change-Id: Ze012cd6e1d4ae7aebf1483d8aabd40f2204a99b09907e93c1a7e61d6dfc7b911
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.
Provisional draft — future breaking-change release only
This PR is a provisional design and implementation for Gecode 7, or another future release that explicitly permits breaking changes. It is not ready for merge and must not be included in Gecode 6.x or any compatibility-preserving release. The comparison contract, search policy for incomparability, and migration requirements remain subject to review and testing.
Adding
Space::compare()changes the C++ ABI ofSpace. Optimization models with custom objectives must implement comparison as well asconstrain(). Release version and ABI-number changes are intentionally left to release preparation.Changes
Space::compare()operation with better, equivalent, worse, and incomparable results. Models decide when two spaces contain enough objective information to compare; the spaces need not otherwise be fully assigned.constrain()remains responsible for pruning working spaces and is no longer used to rank independently produced solutions.Policy requiring review
The current exact best-solution engines reject an incomparable incoming solution. This makes policy failures explicit while the interface and use cases are evaluated.
A possible future best-effort policy is that an incomparable incoming solution becomes the current best. The comparison interface already supports that policy, so testing it would not require another API change. Such a policy would not by itself guarantee completeness, Pareto maximality, or preservation of previously incomparable solutions. Pareto archives and diverse-solution search remain outside this PR.
Verification
Local verification on arm64 macOS with Apple Clang 21:
gecode-testbuild and the completeSearch::PBS::matrix.GECODE_ENABLE_THREAD=OFFbuild with applicable comparison and PBS checks.The full combinatorial
Search::matrix was sampled under a time bound; all executed cases passed. Other platforms and configurations have not been verified locally. Passing these checks does not change the provisional draft status.