Skip to content
Discussion options

You must be logged in to vote

Hi @Destroyer1724! If you mean the standard map demo, its frontend uses /route/v1, which visits stops in the order you enter them.

To test the optimization for your project, call the Trip service directly. You can try this four-stop request.

The response's waypoints array stays in input order. Each point's waypoint_index gives its position in the optimized trip. The example returned [0, 2, 3, 1], meaning the visit order was input stops 1, 4, 2, 3, then back to 1.

In the Python bindings, the corresponding call is osrm_py.Trip(trip_params) with osrm.TripParameters.

For 10 or more waypoints, Trip uses a heuristic, so it doesn't guarantee an optimal tour.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Destroyer1724
Comment options

Answer selected by Destroyer1724
Comment options

You must be logged in to vote
1 reply
@Destroyer1724
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants