Skip to main content

Route Optimization

Plantrunner uses the Mapbox Optimization API to calculate the most efficient order for visiting your route's waypoints, minimizing total driving time.

How it works

When you optimize a route (either during automatic generation or manually), Plantrunner:

  1. Sends all waypoint coordinates to Mapbox
  2. Receives the optimized order based on real road networks
  3. Reorders waypoints to match the optimized sequence
  4. Stores the route geometry (the actual road path) for map display

Return to start

Routes that start from your company office automatically factor in the return trip. The optimization considers the full round-trip when calculating the best order.

When to re-optimize

Re-optimize a route when you:

  • Add or remove waypoints
  • Change the start location
  • Manually reorder stops and want to recalculate

The route retains its last optimization until you change it.

Calculation details

MetricSource
Driving timeMapbox Optimization API (real road network)
Service timeSum of each waypoint's estimated service duration
Total distanceMapbox Optimization API
Route geometryGeoJSON LineString for map rendering