These docs are for v1.1. Click to read the latest docs for v2.0.

OnRoute Overview

An overview of the OnRoute API

Test our routing API in just one command:

curl https://api.solvice.io/demo/vrp -H "Authorization: <<apiKey>>" |  \
curl https://api.solvice.io/v1/solve -H "Authorization: <<apiKey>>" \
     -X POST -H "Content-Type: application/json" -d @-

OnRoute Solvers

There are different types of problems the Solvice Solver can handle. We differentiate between 3 types:

VRP: Single day vehicle routing

Single day Vehicle Routing Problem (VRP). We see examples of VRP every day:

  • Meal prep companies delivering food from central kitchens to hungry homes
  • Delivery vans that bring you groceries from local stores
  • Couriers who deliver packages to your office

The Vehicle Routing Problem is everywhere, and solving it is critical in helping to facilitate the movement of goods and services from one place to another. As the problem entails not only finding the shortest path between addresses but also the assignment of stops to multiple drivers, optimisation techniques and algorithms are most definitely recommended.

PDP: Pickup and delivery routing

Single day Pickup and Delivery Problem (PDP). This model works well for third party logistics but if you are a restaurant delivery service, a parcel courier, or ridesharing platform, you need a way to handle multiple pickup and delivery addresses while taking into account vehicle capacities, driver shift timings and delivery time windows. VRP or TSP solvers can’t help you because they are constrained to a single depot location.

PVRP: Long term routing

Multi day (Periodic) Vehicle Routing Problem (PVRP). This model is excellent for planning multiple days or even weeks. Lots of field services require this setup.

Differences with Google

The main challenge in any logistics business is lowering cost per delivery. By trying to minimize the total driving distance of your vehicle fleet, the Solvice Engine PDP API automatically batches pickups and dropoffs at common locations together, increasing the utilization of your fleet and reducing your cost per delivery. Mapbox offers an optimization API that allows you to route pickups and dropoffs but they only support a single driver. The Google Maps Directions API cannot distinguish between pickups and dropoffs, and neither of these services support time-window constraints, capacity constraints, round trips, stop priority, driver breaks, and more.

Send the addresses of your pickup and delivery orders, along with the locations for all your drivers in your fleet – Solvice will return a JSON response detailing the optimal order in which you should visit those addresses.