Repository navigation
feat: Construct::TightInsertion, soft bounds held hard while constructing - #29
Open
thiagomoretto wants to merge 1 commit into
Open
thiagomoretto wants to merge 1 commit into
thiagomoretto wants to merge 1 commit into
Conversation
thiagomoretto
force-pushed
the
soft-construct-tight
branch
from
September 7, 2026 13:30
613b0ad to
4cf3720
Compare
…ting The priced greedy overloads a route early wherever one unit of excess is cheaper than a detour, and the descent does not always unload it. With soft bounds held hard until a node fits nowhere under them, the first solution pays no penalty when a penalty-free one is reachable. Opt-in: it suits overload-style softness (softcap lands on or under the open solve) and hurts window-style, where a single-customer route always meets a soft close and construction opens routes it need not. `bench --scenario=... --tight` runs a scenario from it.
thiagomoretto
force-pushed
the
soft-construct-tight
branch
from
September 7, 2026 13:31
4cf3720 to
e6fb753
Compare
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.
Stacked on #28. Opt-in, default behaviour unchanged.
What
Construct::TightInsertion { seed, k }: cheapest insertion with every soft bound treated as hard for as long as every unrouted node still fits under them. Once a node fits nowhere tightly, construction loosens and stays loose. The first solution pays no penalty when a penalty-free one is reachable.bench --scenario=softcap --tightruns a scenario from it.Why opt-in
The priced greedy overloads a route early wherever one unit of excess is cheaper than a detour, and the descent does not always unload it (X-n106 sat 5% above the open solve on #28). Tight construction fixes that shape but hurts the other one.
Measured on X-n1xx, tight vs priced construction:
X-n106 softcap lands exactly on open, X-n195 2393 under it. Softtw regresses because a single-customer route always meets a soft close, so tight construction opens extra routes instead of buying a cheap late slot.
Tests
tests/soft.rs: tight construction is penalty-free where the priced greedy overloads, and still routes a node that can never meet its soft bound.