Repository navigation
irregular: make the direct trigonometry local search independent of the time - #727
Merged
Merged
Conversation
…he time
Replace the exploration and compression phases of Sparrow, which depend on
the time limit, by the population-based iterated local search on each
sub-problem of the sequential feasibility algorithm:
- A separation starting from a disruption of a failed layout of the
population stops after a single strike while its loss isn't smaller than
the loss of this failed layout
('SeparatorParameters::maximum_number_of_strikes_above_reference').
- The separation of the initial layout of a sub-problem gets more strikes
('LocalSearchParameters::initial_separation_maximum_number_of_strikes').
- 'maximum_number_of_failed_separations' can be -1 (no limit).
Optimization modes:
- Anytime: no limit on the number of failed separations; the local search
stops with the timer.
- Not anytime: new parameter
'not_anytime_local_search_maximum_number_of_failed_separations' (also on
the command line and in the Python bindings).
- NotAnytimeSequential: a single worker in the separator.
Remove the compression of the sequential feasibility algorithm, which isn't
used anymore.
fontanf
force-pushed
the
irregular-local-search-deterministic
branch
from
October 20, 2026 16:41
ef57c1b to
dfd23f5
Compare
…estartSelection Separate the initial layout first, then loop: draw a failed layout from the population, disrupt it and separate it. Remove the selection of Sparrow (RestartSelection::LowestLoss): the failed layouts are always drawn by binary tournament in the population.
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.
Summary
Makes the direct trigonometry local search independent of the time, so that it fits the optimization modes of the library and is deterministic in the not anytime modes.
The exploration and compression phases of Sparrow (exploration until 80% of the time limit, then compression with shrink ratios decreasing with the elapsed time) are replaced by the population-based iterated local search on each sub-problem of the sequential feasibility algorithm, with two changes to the separation:
SeparatorParameters::maximum_number_of_strikes_above_reference).LocalSearchParameters::initial_separation_maximum_number_of_strikes), a bit like the compression step of Sparrow.Optimization modes
Anytime: no limit on the number of failed separations; the local search stops with the timer.not_anytime_local_search_maximum_number_of_failed_separationsfailed separations (newOptimizeParametersfield, default 10, also on the command line and in the Python bindings).NotAnytimeSequential: a single worker in the separator. The 3 workers of the other modes are deterministic (seeded from the generator, joined, best one kept).With the same seed, two runs give identical solutions in
NotAnytimeDeterministicandNotAnytimeSequential(checked on jakobs1 and albano).Results
13 literature instances (
data_literature.csv), 120 s, seeds 0 and 1, mean gap to the best known solutions:Variants tried along the way (same benchmark): iterated local search without the reference loss rule 1.73, with 5 strikes for all separations 1.69, plus a "no perturbation" operator 1.63, smaller fixed shrink ratios 1.68–1.74, several initial layouts per sub-problem 1.77.
Other changes
maximum_number_of_failed_separationscan be -1 (no limit).local_search_direct_trigonometryis restructured: separation of the initial layout, then a loop that draws a failed layout from the population, disrupts it and separates it (same behaviour: identical solutions in the not anytime modes).RestartSelectionis removed: the failed layouts are always drawn by binary tournament in the population (the selection of Sparrow was behind on the benchmark of irregular: add a local search with a direct trigonometry engine #725, 1.61 against 1.54).Tests
All irregular test executables and Python irregular tests pass.