Repository navigation
fix(solver): required construction roster and optional pass time share (#283) - #288
Merged
Merged
Conversation
… pass The required cursor gave each row a free value before trying rematches for it, then moved to the next row, and dropped each placed row from the value degrees. Value order for later rows thus followed the rows placed so far, and a row's rematch could take the value a later row had free. On INRC-II n120w8 that roster left local search a much harder start: at 5 s, H0 ended at -213830 and H1 at -208935 soft, against -183305 and -180860 on v0.31.4, with local search at about 10 steps a second instead of 50. Required rows are now placed in two passes over the scarcity order. The direct pass gives each row its first free value, ranking values by the degrees of every row the pass started with; the augmenting pass then recounts the degrees over the rows left and places them with rematches, retiring each row it places. Both passes stay on the construction cursor with incremental scoring. n120w8, scratch build of the bench adapter, one core, seed 1: - 1 s: H0 and H1 0hard (v0.31.4 leaves all 2844 and 2872 required shifts unassigned). - 2 s: H0 -205060 / H1 -206665 soft (v0.31.4: -217370 / -221820). - 5 s: H0 -174875 / H1 -173550 (v0.31.4: -183305 / -180860). - 10 s: H0 -147015 / H1 -144165 (v0.31.4: -152470 / -148035). - 60 s: H0 -74840 / H1 -69390 (v0.31.4: -74665 / -72960). Repeats with four solves at a time (six at 10 s, three at 60 s) put the two sides within run-to-run spread; mean soft cost, this change against v0.31.4: 10 s H0 159274 / 158067, H1 153267 / 153455; 60 s H0 78495 / 79617, H1 79175 / 78388. direct_pass_orders_values_by_the_degrees_it_started_with fails when the direct pass retires placed rows from the degrees.
The optional pass stops once a fifth of a time-limited solve has passed. Its remaining share went to the construction phase as a `seconds_spent_limit`, rounded up to whole seconds, so on a 1 s solve the pass got the whole second: on INRC-II n120w8 it ran about 930 ms after required construction and local search never started. The share now reaches the phase as a `Duration` time budget, which the scoped phase termination caps below any configured limit. The trace reports it as `time_budget_ms` instead of `time_budget_seconds`. n120w8 at 1 s: the pass takes about 125 ms and local search the remaining 800 ms. With the previous commit, six repeats end at a mean soft cost of 217824 (H0) and 218989 (H1); main before both ended at 224820 and 223990.
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.
fix(solver): place required rows in a direct pass, then an augmenting pass
The required cursor gave each row a free value before trying rematches for
it, then moved to the next row, and dropped each placed row from the value
degrees. Value order for later rows thus followed the rows placed so far,
and a row's rematch could take the value a later row had free. On INRC-II
n120w8 that roster left local search a much harder start: at 5 s, H0 ended
at -213830 and H1 at -208935 soft, against -183305 and -180860 on v0.31.4,
with local search at about 10 steps a second instead of 50.
Required rows are now placed in two passes over the scarcity order. The
direct pass gives each row its first free value, ranking values by the
degrees of every row the pass started with; the augmenting pass then
recounts the degrees over the rows left and places them with rematches,
retiring each row it places. Both passes stay on the construction cursor
with incremental scoring.
n120w8, scratch build of the bench adapter, one core, seed 1:
unassigned).
Repeats with four solves at a time (six at 10 s, three at 60 s) put the
two sides within run-to-run spread; mean soft cost, this change against
v0.31.4: 10 s H0 159274 / 158067, H1 153267 / 153455; 60 s H0 78495 /
79617, H1 79175 / 78388.
direct_pass_orders_values_by_the_degrees_it_started_with fails when the
direct pass retires placed rows from the degrees.
fix(solver): give the optional assignment pass its exact time share
The optional pass stops once a fifth of a time-limited solve has passed. Its
remaining share went to the construction phase as a
seconds_spent_limit,rounded up to whole seconds, so on a 1 s solve the pass got the whole
second: on INRC-II n120w8 it ran about 930 ms after required construction
and local search never started.
The share now reaches the phase as a
Durationtime budget, which thescoped phase termination caps below any configured limit. The trace reports
it as
time_budget_msinstead oftime_budget_seconds.n120w8 at 1 s: the pass takes about 125 ms and local search the remaining
800 ms. With the previous commit, six repeats end at a mean soft cost of
217824 (H0) and 218989 (H1); main before both ended at 224820 and 223990.