Repository navigation
irregular: grow the queue size of the tree search maximal spaces in the sequential single knapsack - #884
Merged
fontanf merged 1 commit intoNov 19, 2026
Conversation
…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.
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.
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.Tests
alma2025,-t 60, one run each:alma_05alma_07On
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.