Repository navigation
irregular: use the free area of the bin in the algorithm selection - #728
Merged
Merged
Conversation
The automatic selection of the single-bin algorithms estimated the number of items fitting in the bin, and the area to fill with the item types with many copies, from the whole bin area, and it counted the fixed items as items to place. With large fixed items, an instance whose solutions hold few items could look like it held many, and the tree search wasn't run alongside the periodic packing. The bin area is now its free area: its area minus the areas of its fixed items and of its defects; and only the copies which are not fixed are counted.
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.
Follow-up of #720 and #726.
The automatic selection of the single-bin algorithms uses two estimates:
max_number_of_items_in_bin, which fills the bin area with the smallest items, is belowperiodic_packing_max_items_threshold(64).Both used the whole bin area, and counted the fixed items as items to place. With large fixed items, an instance whose solutions hold few items could look like it held many, so only periodic packing was run.
Change
bin_free_area(instance): the bin area minus the areas of its fixed items and of its defects (approximate if defects overlap or go out of the bin).copies - copies_fixed).Results
The four instances of the reporter of #720, default selection,
--time-limit 10, items placed excluding the fixed item, spacing 0 / 3:--use-tree-search 1(reporter)frame_rect(frame with hole, 200 rectangles)frame_l(frame with hole, 120 L shapes)solid_rect(solid fixed rectangle, 300 rectangles)solid_l(solid fixed rectangle, 200 L shapes)The solutions were checked with shapely (fixed item kept, no overlap, spacing, inside the bin). On
solid_l, the free area still holds more than 64 items, so the gap with the tree search remains: it comes from periodic packing on non-rectangular items, not from the fixed items.The irregular tests pass (15 + 16 + 4 + 24 + 112).