Skip to content

rectangleguillotine: fix column_generation_strips max1cut budget bug and add max1cut tests#429

Merged
fontanf merged 1 commit into
masterfrom
rectangleguillotine-max1cut-tests
Jul 3, 2026
Merged

rectangleguillotine: fix column_generation_strips max1cut budget bug and add max1cut tests#429
fontanf merged 1 commit into
masterfrom
rectangleguillotine-max1cut-tests

Conversation

@fontanf

@fontanf fontanf commented Jul 3, 2026

Copy link
Copy Markdown
Owner

first_stage_available_width() capped a single strip's width by maximum_distance_1_cuts, but five pricing call sites then subtracted the width already used by previously fixed strips from that per-strip cap instead of from the bin's total width budget. Once enough strips were fixed to exceed maximum_distance_1_cuts, the computed remaining width went negative, silently preventing pricing from ever proposing the column needed to fill the genuinely available leftover space. Fixed by giving the function an explicit filled_width parameter so the cap is applied after subtracting from the total budget, not folded into a value filled_width is later subtracted from.

Add 16 knapsack__max1cut test instances (all [23][ehnr]v[or] configurations) to the tree_search and column_generation_strips test suites, each verified to be feasible, genuinely require the stated stage count and cut-type behavior (and genuine rotation for rotatable variants), and produce a different optimum than the corresponding base/min1cut instance.

…and add max1cut tests

first_stage_available_width() capped a single strip's width by
maximum_distance_1_cuts, but five pricing call sites then subtracted the
width already used by previously fixed strips from that per-strip cap
instead of from the bin's total width budget. Once enough strips were
fixed to exceed maximum_distance_1_cuts, the computed remaining width went
negative, silently preventing pricing from ever proposing the column
needed to fill the genuinely available leftover space. Fixed by giving the
function an explicit filled_width parameter so the cap is applied after
subtracting from the total budget, not folded into a value filled_width is
later subtracted from.

Add 16 knapsack_<code>_max1cut test instances (all [23][ehnr]v[or]
configurations) to the tree_search and column_generation_strips test
suites, each verified to be feasible, genuinely require the stated stage
count and cut-type behavior (and genuine rotation for rotatable variants),
and produce a different optimum than the corresponding base/min1cut
instance.
@fontanf fontanf merged commit d14e8ca into master Jul 3, 2026
3 checks passed
@fontanf fontanf deleted the rectangleguillotine-max1cut-tests branch July 3, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant