Skip to content

irregular: grow the queue size of the tree search maximal spaces in the sequential single knapsack - #884

Merged
fontanf merged 1 commit into
masterfrom
irregular-sequential-single-knapsack-maximal-spaces-queue-size
Nov 19, 2026
Merged

fontanf merged 1 commit into
masterfrom
irregular-sequential-single-knapsack-maximal-spaces-queue-size

Conversation

@fontanf

@fontanf fontanf commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Problem

The sequential single knapsack sets the queue sizes of the tree search and of the tree search periodic packing of its subproblems (growing from their own initial values at each iteration in anytime mode), but not the one of the tree search maximal spaces. The subproblems which select the tree search maximal spaces (single bin, many items in the sections of the bin) therefore always used its default queue size of 4, from the first iteration.

Changes

  • anytime_sequential_single_knapsack_subproblem_tree_search_maximal_spaces_initial_queue_size (1 by default): initial queue size, multiplied by the growth factor of the iteration like the other ones.
  • not_anytime_sequential_single_knapsack_subproblem_tree_search_maximal_spaces_queue_size (4 by default, the previous value): queue size in not-anytime mode.
  • Matching command line options and Python bindings.

Tests

  • Irregular unit tests pass.
  • Python bindings build and expose the new parameters.
  • alma2025, -t 60, one run each:
Instance master This PR
alma_05 3 bins at 0.1 s; SSK it 2 at 13.7 s, it 3 at 27.5 s (leftover 2.147e6) 3 bins at 0.1 s; SSK it 2 at 11.8 s, it 3 at 33.8 s (leftover 2.139e6)
alma_07 17 bins at 2.2 s, 16 bins at 42.1 s 17 bins at 1.0 s, 16 bins at 18.4 s

On alma_07, the solutions found are the same, but on master the tree search stalls between 2.3 s and 31 s (queue size 3 to 4); this is consistent with the subproblems of the sequential single knapsack, running in parallel, being much more expensive, but it is a single run.

…he sequential single knapsack

The sequential single knapsack sets the queue sizes of the tree search
and of the tree search periodic packing of its subproblems, growing them
at each iteration in anytime mode, but not the one of the tree search
maximal spaces, so the subproblems which select it always used the
default queue size of 4.

Add 'anytime_sequential_single_knapsack_subproblem_tree_search_maximal_spaces_initial_queue_size'
(1 by default), grown like the other ones, and
'not_anytime_sequential_single_knapsack_subproblem_tree_search_maximal_spaces_queue_size'
(4 by default, as before), with the matching command line options and
Python bindings.
@fontanf
fontanf merged commit 20398b4 into master Nov 19, 2026
16 checks passed
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