Enhanced Bin Packing propagator#202
Open
95A31 wants to merge 4 commits into
Open
Conversation
be6b80c to
a883d63
Compare
zayenz
reviewed
Jul 9, 2026
zayenz
left a comment
Member
There was a problem hiding this comment.
I pushed 44fbbe3 to fix the definite integer-range defects in the DFF arithmetic: half-capacity comparisons, transformed-weight accumulation, RMax capacity arithmetic, and lambda-step overflow. The commit also adds boundary regressions. The focused BinPacking tests pass in Debug/Audit and UBSan builds, the CMake smoke suite passes, and the tree passes tidy.
I am leaving three algorithm and policy questions for manual review:
- The sampler drops both interval endpoints and every singleton interval. That differs from the inclusive ranges in the cited algorithm and weakens propagation in at least one small case: capacity 11, three bins, weights {7, 7, 5, 5, 5} fails at the root on main, but not on this branch.
- RMin currently duplicates R0 at this call site because the minimum virtual weight is always zero.
- The sequential portfolio has a substantial hot-path cost. On u120_00 it explored the same 94 nodes and ran the same 217 propagations, but took 47.99 ms versus 2.67 ms on main (five samples, 20 runs per sample, Release builds). The paper's implementation relies on parallel evaluation of the DFF portfolio.
I would keep the PR open until we decide whether the exact L2 check should be preserved alongside the sampled portfolio, and what performance gate this propagator should meet.
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.
Hello,
This patch implements a stronger pruning technique for the BinPacking constraint. It leverages tighter lower bounds based on Dual-Feasible Functions. This approach was presented at CP 2024 in the paper CP for Bin Packing with Multi-Core and GPUs.
There might be a need for some polishing and testing, but I think the benefits are worth the effort. I attached a simple model for testing.
Cheers
bpp.mzn.txt
N2W1B2R5.dzn.txt