spopt.route v1.0 #6
Merged
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.
First shippable verison of route module referenced by #4 (defunct) and the initial PR by @ljwolf.
This work was completed during the Google Summer of Code 2025; a NumFOCUS-sponsored project for the Python Spatial Analysis Library (PySAL). See the project blog.
The
spopt.routemodule wraps around theroutingpylibrary to leverage street data for use in solving vehicle routing problems usingPyVRP.The user can setup a OSRM instance (described in the new notebook
route.py) and then refer to it in the solve function:As well, the user can decide to not pass a router,
which will solve the problem using haversine distances.
Because
spopt.routeleverages the base functions in routingpy which are shared by all of the library's routers (matrixanddirections), users should be able to pass the other API-enabled routers and get the same functionality if their required keywords are passed torouting_kws(e.g. for Valhalla, this would include the keyword"profile" : "auto"). The OSRM service is considered the 'default' use case, but other services should be simple to incorporate.The new notebook
route.pydescribes the confirmed functional routers in more detail.