Skip to content

ref(routing)!: Adopt upstream improvement parameter object - #9

Merged
erickreutz merged 3 commits into
masterfrom
eric/sync-improvement-parameter-object
Oct 2, 2026
Merged

erickreutz merged 3 commits into
masterfrom
eric/sync-improvement-parameter-object

Conversation

@erickreutz

@erickreutz erickreutz commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Sync upstream's implementation of improvement limits from ankane#85 and adopt its parameter-object API. The old fork-specific hash getter and setter are removed so they cannot override the upstream binding.

Configure limits through limits = search_parameters.improvement_limit_parameters, then set limits.improvement_rate_coefficient and limits.improvement_rate_solutions_distance. The getter returns a mutable parameter object rather than nil or a hash; hash assignment is no longer supported. The README and parameter tests now use the upstream interface. Callers must set valid values for both fields before solving when they enable this optional limit.

The returned parameter object retains its parent search parameters through Rice's return-value lifetime annotation. A regression demonstrates that retaining the child alone must keep the parent alive across garbage collection.

The other Lugg routing extensions remain intact: solution tracing, piecewise cumul costs, callback-aware GVL release, and restoration time limits. The API currently has no callers of the removed hash interface, and adopting this gem does not enable improvement-rate stopping in the planner. Merge with a merge commit to preserve upstream ancestry.

ankane and others added 3 commits October 1, 2026 20:42
Co-authored-by: Eric Kreutzer <eric@lugg.com>
Merge upstream improvement-limit bindings and remove the fork-specific hash interface.

BREAKING CHANGE: Configure improvement limits through the returned parameter object.
@erickreutz
erickreutz merged commit 1f09692 into master Oct 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants