Overview
Assign jobs to vehicles and determine the order in which each vehicle should visit its assigned jobs. Use this tool when the user needs to:- assign multiple deliveries or pickups to vehicles
- plan routes for a fleet
- determine the order of multiple stops
- optimize a multi-vehicle routing solution
route.
Do not use it only to compare distances or travel times between locations. Use table.
Input
id.
Every job must have a unique id and a location.
Locations must use:
start or an end.
For a round trip, set both start and end to the same location:
start or end is omitted, the vehicle may start or end anywhere.
Vehicle profiles
Each vehicle can use its own routing profile. Use:profile to use the default driving profile.
For example:
Output
A simplified result looks like:routes[].steps to determine:
- which vehicle serves each job
- the order in which jobs are visited
- when each job is reached
job step contains the job ID, arrival time, travel duration, and travel distance for reaching that job.
Always check unassigned.
Do not assume that every job will be assigned.
If the user provides place names or addresses instead of coordinates, call geocode first for every location and use the selected coordinates in the optimization request.
