Repository navigation
irregular: check the time limit while building the periodic blocks - #891
Merged
Merged
Conversation
The blocks of the periodic packing tree search were built without checking the timer. On instances with many copies and continuous rotations (e.g. Cheng from Costa et al. 2009), building them could take far longer than the time limit. The timer is now checked while building them, and the blocks already built are returned when it needs to end.
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.
The blocks of the periodic packing tree search (TSPP) were built without checking the timer. On instances with many copies and continuous rotations, building them could take much longer than the time limit. For example, on Cheng from Costa, Gomes & Oliveira (2009), it took 76.5 s, so a run with a 30 s limit ended after about 90 s.
Changes:
compute_periodic_blocksandcompute_periodic_blocks_for_item_typetake an optional timer. The timer is checked between packings and at each top in the clipped-lattice block generation. When it needs to end, the blocks already built are returned.BranchingSchemePeriodicPacking::Parametershas a timer.tree_search_periodic_packingsets it, with the end boolean of the algorithm formatter, and returns right away if the timer ended while the blocks were being built.With a 30 s limit, Cheng now stops at 30.1 s.