Fleet routing
What is fleet routing?
Fleet routing, also known as a vehicle routing problem (VRP), is the process of determining the most effective routes for a set of vehicles that need to visit a set of locations. It creates the overall minimum transportation cost.
You can use fleet routing to build applications such as:
- A large furniture store might deliver goods from a central warehouse location.
- A specialized grease recycling company might route trucks from a facility to pick up used grease from restaurants.
- A health department might schedule daily inspection visits for each of its health inspectors.
- A health care provider might want to find best routes to transport people from their homes to different hospitals for medical appointments.
How fleet routing works
The typical workflow for determining fleet routes is to:
- Define the locations to visit (orders).
- Define the start and end location for vehicles (depots).
- Define the travel mode (driving a car or truck).
- Use the service to find the best routes and directions for all vehicles.
URL requests
You can perform fleet routing by making an HTTPS request to the Fleet Routing service execute
operation or by using client APIs. Specify the orders, depots, routes, and optionally, additional parameters such as the travel mode used when finding routes or if you need to generate driving directions.
Required parameters
Direct
Use for shorter transactions that complete in less than 5 minutes and optimize up to 2 routes and 100 orders.
Key parameters
Name (Direct) | Description |
---|---|
orders | A list of locations to visit with attributes such as the order name or the time required to complete the delivery at each order. |
depots | The start and the return location for the vehicles. |
routes | The characteristics and constraints for each vehicle. For example, the start and the return depot name, the maximum number of orders a vehicle is allowed to visit, and the total time the vehicle is allowed to operate. |
travel_ | The mode of transportation such as driving a car or a truck. |
default_ | The date on which all of your routes start. |
populate_ | Generate driving directions for the routes. |
Additional parameters:
Solve complex fleet routing scenarios by specifying additional inputs such as route_
, order_
, breaks
, route_
or setting additional constraints when finding routes using time_
, excess_
, spatially_
.
Job
Use for longer transactions that can take up to 4 hours and optimize up to 100 routes and 2,000 orders.
Key parameters
Name (Job) | Description |
---|---|
orders | A list of locations to visit with attributes such as the order name or the time required to complete the delivery at each order. |
depots | The start and the return location for the vehicles. |
routes | The characteristics and constraints for each vehicle. For example, the start and the return depot name, the maximum number of orders a vehicle is allowed to visit, and the total time the vehicle is allowed to operate. |
travel_ | The mode of transportation such as driving a car or a truck. |
default_ | The date on which all of your routes start. |
populate_ | Generate driving directions for the routes. |
Additional parameters:
Solve complex fleet routing scenarios by specifying additional inputs such as route_
, order_
, breaks
, route_
or setting additional constraints when finding routes using time_
, excess_
, spatially_
.
Code examples
Direct: Multi-vehicle routing and delivery
In this example, use the fleet routing service to find optimized routes and directions for an appliance delivery company using two vehicles which start from a warehouse and return to the same location at the end of the working day.
In this scenario, two vehicles will depart from a warehouse located in Santa Monica, California. Each vehicle has a capacity of four appliances. There are a total of six restaurants to visit and it takes ten minutes at complete the delivery at each restaurant. Each vehicle needs to return in one hour and can only visit a maximum of three restaurants in total.
The response contains a list of results describing various outputs such as:
- Set of stops that shows the route assignment.
- Set of routes that shows the overall time and distance.
- Set of directions for each route (if you requested to populate directions).
APIs
REST API
For this example scenario, the important information from the response includes:
- In the
out_
result, thestops Route
field shows the route to which an order is assigned to.Name - In the
out_
result,routes - The
Order
field shows the total number of orders assigned to a route.Count - The
Total
field shows the overall route time (travel time + time to make the delivery) in Minutes.Time - The
Total
field shows the time spent making the delivery in Minutes.Order Service Time - The
Total
field shows the travel time (minus the delivery time) in Minutes.Travel Time - The
Total
field that shows the travel distance in Miles for each route.Distance
- The
- In the
out_
result, thedirections Text
field contains the driving instruction for each route.
Job: Goods delivery
In this example, you will find the best routes for a fleet of three vehicles, operated by a distribution company, to deliver goods from a distribution center to a set of nine grocery stores. Each store has a specific quantity of demand for the goods, and each truck has a limited capacity for carrying the goods. The main objective is to assign trucks in the fleet a subset of the stores to service and to sequence the deliveries in a way that minimizes the overall transportation costs.
In this scenario, specify the stores as orders
, the distribution center as depots
, and the three trucks as routes
.
APIs
REST API
Unlike Direct request type which allows you to make a request and get back all the results in the response, when working with a Job request type, you need to follow a three step workflow:
- Make the
submit
request with the appropriate request parameters to get a job id.Job - Using the job id, check the job status to see if the job completed successfully.
- Use the job id to get one or more results.
Tutorials

Find a route and directions
Find a route and directions with the routing service.

Find service areas
Create an isochrone with driving distance with the routing service.
Services
Routing service
Get turn-by-turn directions and solve advanced routing problems.
API support
Routing | Optimized Routing | Fleet routing | Closest facility routing | Service areas | Location-allocation | Travel cost matrix | |
---|---|---|---|---|---|---|---|
ArcGIS Maps SDK for JavaScript | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for .NET | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Kotlin | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Swift | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Java | 1 | 1 | 1 | ||||
ArcGIS Maps SDK for Qt | 1 | 1 | 1 | ||||
ArcGIS API for Python | |||||||
ArcGIS REST JS | |||||||
Esri Leaflet | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
MapLibre GL JS | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
OpenLayers | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
- 1. Access with geoprocessing task.
- 2. Access via ArcGIS REST JS.
Tools
Developer dashboard
Manage API keys, service usage, and data with the ArcGIS Developers website.
ArcGIS Online
Create, manage, and share content and data with cloud-based GIS tools.
Map Viewer
Create, explore, and share web maps for 2D applications.
Scene Viewer
Create, explore, and share web scenes for 3D applications.
ArcGIS Pro
Explore, visualize, and analyze both 2D and 3D data with desktop GIS tools.