Using ors_optimization command in R

I want to use the ors_optimization command in R on a large last-mile delivery dataset (from China). However, I am looking for some example code for optimizing a route with one origin, multiple destinations with either the last destination as an endpoint or the origin. If anybody has tried something similar I would highly appreciate some tips and tricks.

1 Like

Thanks for reaching out!

The usage of the ORS optimization service from R is described in the function’s man page, see ?ors_optimization. In general, the function’s arguments map the API parameters described in the documentation. Objects for the two required arguments jobs and vehicles can be conveniently constructed with the corresponding helper functions. The example from the package vignette should get you started.

Please feel free to contact us again if you have some specific questions, or something doesn’t work for you as expected.