Repository navigation
Reduction: lift item dimensions for box, boxstacks and rectangleguillotine - #715
Merged
Merged
Conversation
…otine
Port rectangle's subset-sum item dimension lift, against the bin shrunk
to the largest total length of the items, to the box, boxstacks and
rectangleguillotine reductions ('lift_item_dimensions' parameter, enabled
by default, exposed in the Python bindings). An item type with a single
copy is enlarged along an axis to close a gap beside it that no
combination of the other items can fill. The shared multiple-choice
subset-sum bound is in 'algorithms/subset_sum_bound.hpp'.
- box: only along an axis on which every allowed rotation of the item
type puts the same dimension; not with fixed items, nor along an axis
measured by the objective (open dimension, leftover mode).
'InstanceBuilder::set_item_type_box' is added.
- boxstacks: only item types alone in their stack (unique stackability
id). Along 'z', up to the height of the bin. Along 'x'/'y', with a
single rotation, if the item satisfies the maximum stack density with
its true footprint; nothing along 'x' with a semi-trailer truck (axle
weights), and nothing along an axis whose compaction could break the
unloading constraint. 'unreduce_solution' rebuilds the stacks with the
true footprints. 'InstanceBuilder::set_item_type_box' is added.
- rectangleguillotine: the argument is a compaction of the cut tree;
lengths are increased by the cut thickness, and the maximum distances
between 1-cuts/2-cuts are additional capacities. NonExact lifts both
axes, Exact only the last-stage cut axis and Roadef2018 only the extra
cut axis (both with a fixed first stage orientation). Skipped with a
minimum distance between cuts, a minimum waste, a maximum number of
cuts, defects, fixed items, trims with a cut thickness, and objectives
depending on more than the items and bins used. 'unreduce_solution'
rewrites the cut tree around each enlarged item.
rectangle: lifting is now also skipped with fixed items, along 'x' with
a semi-trailer truck, and along the axis whose compaction could break the
unloading constraint ('x' for OnlyYMovements/IncreasingX, 'y' for
OnlyXMovements/IncreasingY). 'Instance::weight_matters' now also accounts
for the axle maximum weights of a semi-trailer truck, so that companion
absorption is skipped with weighted items in a truck with an infinite
maximum weight.
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.
Ports rectangle's subset-sum item dimension lift (against the bin shrunk to the largest total length of the items) to the box, boxstacks and rectangleguillotine reductions, and fixes cases where rectangle's own lift could break weight distribution, unloading or fixed-item constraints. New
lift_item_dimensionsparameter (enabled by default, exposed in the Python bindings). An item type with a single copy is enlarged along an axis to close a gap beside it that no combination of the other items can fill.The soundness argument compacts any solution along the lifted axis, so constraints that depend on positions along that axis block it.
box
boxstacks
z, up to the height of the bin.x/y: single rotation only, and only if the item satisfies the maximum stack density with its true footprint.xwith a semi-trailer truck (axle weights depend onxpositions and centers).xblocked forOnlyYMovements/IncreasingX,yblocked forOnlyXMovements/IncreasingY.unreduce_solutionrebuilds the stacks with the true footprints.rectangleguillotine
unreduce_solutionrewrites the cut tree around each enlarged item: the node is shrunk and the freed length goes to the next waste, or the true item goes into a child node, or (at the deepest allowed level) its parent is shrunk.rectangle (fixes)
xwith a semi-trailer truck, and along the axis whose compaction could break the unloading constraint (same rule as boxstacks).Instance::weight_mattersnow accounts for the axle maximum weights of a semi-trailer truck, so companion absorption is skipped for weighted items in a truck with an infinite maximum weight.Not covered
Testing