Enable custom models to be passed to street route endpoint #187
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.
Background
In order to support the new "realtime closures" endpoint that utilizes query-time custom models to close particular links to the router via stable edge ID, we need a routing endpoint that
At first, I made a branch modifying the current custom route endpoint (what we use in the router sandbox to support "live" custom model queries) to support item 1) above, the combining of routes from multiple mode-prefixed routing profiles to increase route diversity.
But then, I realized that both of the above items could be achieved by simply updating our standard street routing endpoint to accept custom model inputs, optionally. This would give us 1) and 2) above much more simply, and allows us to deprecate the custom route endpoint for a cleaner setup.
Update 8/13: Usage of this new endpoint is in https://github.com/replicahq/model/pull/9594, which introduces a new "realtime closure" endpoint to our python graphhopper client
Changes
idlsto point to https://github.com/replicahq/idls/pull/116, which updates theStreetRouteRequestandProfilesStreetRouteRequestendpoints to accept custom model JSON strings (and marks the existingCustomRouteRequestas deprecated)CustomRouteRequestendpoint; I'm leaving the endpoint "available" still for a safer transition, but any calls to the endpoint will now throw an error that mentions it was deprecatedUse Custom Modeldialog box and type out a custom model to be used in your routing request - it now points to the street routing endpoint, vs. the now-deprecated custom route endpointTesting
Other notes
I purposefully didn't discuss performance details here, along with a few other subtleties I learned about the custom model feature in graphhopper. More to come on these details in the forthcoming model repo PR where I utilize the change here to add a "realtime closure" endpoint to our graphhopper python client.
CC
@rregue