Skip to content

irregular: insert blocks at several corners in the tree search maximal spaces - #885

Merged
fontanf merged 1 commit into
masterfrom
irregular-tree-search-maximal-spaces-open-dimension
Nov 21, 2026
Merged

fontanf merged 1 commit into
masterfrom
irregular-tree-search-maximal-spaces-open-dimension

Conversation

@fontanf

@fontanf fontanf commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • The tree search maximal spaces always selected the empty space closest to the bottom-left corner of the bin. It now inserts blocks at several corners:
    • for the knapsack and feasibility objectives, at the 4 corners: the selected empty space is the one closest to any corner;
    • when minimizing the extent of the items (open dimension X/Y, bin packing with leftovers with a side leftover mode), at the 2 corners of the side the items start from: the selected empty space is the one with the smallest x, ties broken by the distance to one of these corners.
  • An insertion at a corner is computed in the frame of that corner, in which it is the bottom-left one: the blocks are built in each frame, and the trapezoids of the node, stored in the frame of corner 0, are mirrored into it.
  • The open dimension X, open dimension Y and bin packing with leftovers objectives can be solved directly instead of through the sequential feasibility algorithm. The nodes are then compared on the extent of their greedy completions (better, bound, dominates). The sequential feasibility algorithm remains the default; the new option tree_search_maximal_spaces_use_sequential_feasibility (--tree-search-maximal-spaces-use-sequential-feasibility 0) selects the direct mode.

Results

Tree search maximal spaces alone, 30 s, density X, single runs:

Instance SF, 4 corners SF, 1 corner Direct, corners
albano 0.8520 0.8514 0.8412
blaz 0.7846 0.7807 0.7807
dagli 0.8273 0.8269 0.8144
fu 0.8808 0.8812 0.8636
jakobs1 0.8909 0.8884 0.8167
jakobs2 0.8014 0.8016 0.7423
mao 0.8052 0.7907 0.7613
marques 0.8717 0.8713 0.8540
shapes0 0.6200 0.6138 0.6138
shapes1 0.6585 0.6879 0.6541
shirts 0.8514 0.8479 0.8320
swim 0.6804 0.6892 0.6780
trousers 0.8650 0.8558 0.8257
  • With sequential feasibility, the corners are better on 9 instances and worse on 4, with small differences except mao (+0.015) and shapes1 (-0.029). Single runs differ by up to about 0.01 (mao gave 0.7971 in a later run with 4 corners).
  • The direct mode is worse than the sequential feasibility algorithm on all instances, so the latter stays the default.

Test plan

  • Irregular unit tests pass
  • Benchmark above on the literature instances

…l spaces

The empty space selected by the tree search maximal spaces was always the
one closest to the bottom-left corner of the bin. Blocks can now be
inserted at the four corners of the bin for the knapsack and feasibility
objectives: the selected empty space is the one closest to any corner,
and the insertion is computed in the frame of that corner, in which it is
the bottom-left one.

The open dimension X, open dimension Y and bin packing with leftovers
objectives can also be solved directly, instead of through the sequential
feasibility algorithm. Then, the selected empty space is the one closest
to the side along which the items progress, then to one of its corners,
and the nodes are compared on the extent of their greedy completions. The
sequential feasibility algorithm remains the default: the new option
'tree_search_maximal_spaces_use_sequential_feasibility' selects the
direct mode.
@fontanf
fontanf merged commit fd246f7 into master Nov 21, 2026
16 checks passed
@fontanf
fontanf deleted the irregular-tree-search-maximal-spaces-open-dimension branch November 21, 2026 17:10
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