Repository navigation
irregular: select the tree search maximal spaces when many items fit in the sections of the bin - #833
Merged
Merged
Conversation
…ng boxes in the tree search with maximal spaces The supporting parts of a block are computed on the inflated shapes of its items, and the empty spaces above it start at the top of the rectangles covering these inflated shapes. With an item-item spacing, they are above the bounding box of the non-inflated shapes, which was used to select the blocks whose supporting parts may touch the bottom of an empty space: the empty spaces above the blocks had no supporting part, and were removed. Use the bounding box of the supporting parts of the blocks instead.
…in the sections of the bin With a single bin and the 'Knapsack' or 'Feasibility' objective, run the tree search maximal spaces instead of the tree search when many items fit in both an x section and a y section of the bin: the height (resp. width) of the bin divided by the mean height (resp. width) of the bounding boxes of the items is larger than 'many_items_in_section_threshold' (4 by default), as in the selection of the rectangle and box problem types. The number of insertions of a node of the tree search may then be large, and its search may stay shallow. The instances for which the tree search periodic packing is run alone are not concerned.
…of the default selection
fontanf
force-pushed
the
irregular-tsms-selection
branch
from
November 9, 2026 06:03
c57af64 to
1e092bb
Compare
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.
Depends on #832 (and #831): their commits are included until they are merged.
Change
With a single bin and the
knapsackorfeasibilityobjective, run the tree search maximal spaces instead of the tree search when many items fit in both an x section and a y section of the bin. As in the rectangle and box selections, a section's count is the bin's height (resp. width) divided by the mean height (resp. width) of the items' bounding boxes. The threshold is the new parametermany_items_in_section_threshold(4 by default, also in Python).The criterion only replaces the tree search where it would have been selected. The instances for which the tree search periodic packing runs alone (dominated by item types with many copies, and many items in the bin) are not concerned, e.g.
users/2026-04-23_sub*andusers/2026-04-08_sub*.The selection of the other problem types is unchanged.
Results
Default selection, this branch vs #832, 79 instances (literature, user2025, opencutlist, users), 15 s:
users/2026-11-08_many_item_types_1000(#829)users/2026-11-08_many_item_types_2000(#829)opencutlist/deer_2(bin packing with leftovers, 1 bin) is slightly worse: leftover value 1.9975–1.9985M in 2 of 3 runs, against 2.0074M in 3 runs before (−0.4%). The criterion also applies to the knapsack subproblems of the algorithms for several bins.The instances of #829 are added in
data/irregular/users/, with the solutions found by the default selection in 60 s (83.4% and 85.8% of the bin used, instead of 80% and 74% for the solutions of #829), checked for overlaps.All the irregular tests pass.
Doc:
algorithm_selection.rst(irregular line), and the automatic selection sections of the irregular tree search and tree search maximal spaces pages.