Skip to content

Prove infeasibility from the one-dimensional relaxation bound - #619

Merged
fontanf merged 1 commit into
masterfrom
fix-irregular-onedimensional-bound-infeasibility
Oct 1, 2026
Merged

fontanf merged 1 commit into
masterfrom
fix-irregular-onedimensional-bound-infeasibility

Conversation

@fontanf

@fontanf fontanf commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Problem

optimize_onedimensional_bound solves the one-dimensional relaxation of the instance: items and bins become their areas, or volumes. It only copied the relaxation's bounds back, though. When the relaxation was proven infeasible, the instance wasn't. For example, four 40x40 squares in one 100x60 bin (6400 > 6000) was not proven infeasible.

It was also only run for the BinPacking, Knapsack and VariableSizedBinPacking objectives. BinPackingWithLeftovers and Feasibility instances can be infeasible in the same way.

Five problem types had the same code: rectangleguillotine, rectangle, box, boxstacks (where the bound runs within the box bounds) and irregular.

Fix

  • Propagate the relaxation's is_proven_infeasible.
  • Also run the bound for BinPackingWithLeftovers and Feasibility. For these objectives only the infeasibility is used, since there's no bound to report.

Testing

  • New python/tests/test_infeasibility.py (40 tests). For each of the 5 problem types and the 4 objectives:
    • three 6x6 squares (or 6x6x6 cubes) whose area exceeds the bin's are proven infeasible;
    • a single one is feasible and not proven infeasible.
  • C++ unit tests: 689 passed. Python tests: 311 passed, 7 expected failures (as on master).

'optimize_onedimensional_bound' solves the one-dimensional relaxation of
the instance (item and bin areas, or volumes), but only copied its bounds
back: when the relaxation was proven infeasible, e.g. when the area of
the items exceeds the one of the bins, the instance wasn't. And it was only
run for the 'BinPacking', 'Knapsack' and 'VariableSizedBinPacking'
objectives.

- Propagate the infeasibility of the relaxation.
- Also run it for 'BinPackingWithLeftovers' and 'Feasibility', for which
  only the infeasibility is used (no bound).

For rectangleguillotine, rectangle, box, boxstacks (where it is run within
the box bounds) and irregular.
@fontanf
fontanf merged commit e501ec5 into master Oct 1, 2026
11 checks passed
@fontanf
fontanf deleted the fix-irregular-onedimensional-bound-infeasibility branch October 1, 2026 22:29
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