Limit maximum driving time
The maxDrivingTime sets the limit on the cumulative time a vehicle can spend actively driving during a shift, independently of other activities like service time, waiting time, or break time. By using this property, you can ensure that your fleet operations adhere to such regulatory frameworks as European Union drivers' hour rules that mandate that a driver must not exceed a specific number of hours behind the wheel per shift, regardless of shift duration.
Limiting the maximum shift time is also potentially beneficial for fleets where vehicles operate over a wide geographic area. In such cases, even a short shift can accumulate significant driving time. Because of that, the maxDrivingTime constraint might prevent the optimization algorithm from assigning too many geographically spread jobs to one vehicle in a single shift.
Note
Understanding the distinction between
shiftTimeandmaxDrivingTimeis important for accurate compliance modelling. TheshiftTimeparameter limits the total working time of a vehicle type (driving + serving + waiting + breaks), whereasmaxDrivingTimetargets only the driving component.For example, a vehicle with a 12-hour
shiftTimebut a 5-hourmaxDrivingTimecan spend the remaining shift time on service and waiting, but cannot drive beyond five hours even if the shift window would allow it.For limiting the maximum shift time for a vehicle type, regardless of the total shift time, see Limit maximum shift time.
You configure limits.maxDrivingTime as part of a vehicle type setup an integer value in seconds, as shown in the following example:
{
"fleet": {
"types": [
{
"profile": "car",
"amount": 2,
"capacity": [
50
],
"costs": {
"time": 0.002,
"distance": 0.001,
"fixed": 10
},
"id": "vehicle_1",
"shifts": [
{
"start": {
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": "2024-06-24T08:00:00+02:00"
},
"end": {
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": "2024-06-24T20:00:00+02:00"
}
}
],
"limits": {
// Maximum driving time for the vehicle type (5 hrs)
"maxDrivingTime": 18000
}
}
],
"profiles": [
{
"name": "car",
"type": "car"
}
]
}
// Remaining problem components...
}Limit driving time across a fleet with multiple vehicles
As a demonstration of the maxDrivingTime feature on a practical example, consider a depot in Berlin with two car-profile vehicles, each with capacity of 50 and a limit of 18,000 seconds (five hours) of driving time per shift that is running from 08:00 to 20:00. In this sample use case, the fleet needs to serve 49 jobs that are spread across the greater Berlin area.
By specifying the maxDrivingTime constraint, you make sure that if a vehicle exceeds the cumulative driving time required to serve all the jobs, the optimization algorithm splits the jobs between the two available vehicles.
Any job that would push a vehicle past its driving time limit is reassigned to the second vehicle. If both vehicles exhaust their respective limits before completing all jobs, the remaining jobs appear in the unassigned list in the solution.
See the full problem configuration in the following section.
Note
Service time (
duration: 300per job) does not count towardmaxDrivingTime; only road travel time does.
Click to expand/collapse the sample JSON
{
"fleet": {
"types": [
{
"profile": "car",
"amount": 2,
"capacity": [
50
],
"costs": {
"time": 0.002,
"distance": 0.001,
"fixed": 10
},
"id": "vehicle_1",
"shifts": [
{
"start": {
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": "2024-06-24T08:00:00+02:00"
},
"end": {
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": "2024-06-24T20:00:00+02:00"
}
}
],
"limits": {
"maxDrivingTime": 18000
}
}
],
"profiles": [
{
"name": "car",
"type": "car"
}
]
},
"plan": {
"jobs": [
{
"id": "Job_1",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.63329,
"lng": 13.3138
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_2",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.62738533184079,
"lng": 13.3789
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_3",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.51635175288175,
"lng": 13.343661020679571
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_4",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.456,
"lng": 13.403260583257188
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_5",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.63256,
"lng": 13.37322
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_6",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.45810373923444,
"lng": 13.331808942475499
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_7",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.439442845393685,
"lng": 13.336118100685782
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_8",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.53213114000045,
"lng": 13.373517153879769
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_9",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.4823,
"lng": 13.4703
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_10",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.5313,
"lng": 13.35356
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_11",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.457844833248835,
"lng": 13.322525701671735
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_12",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.4329271708958,
"lng": 13.376558539227483
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_13",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.48128598928299,
"lng": 13.4944
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_14",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.580380893737356,
"lng": 13.304479222218161
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_15",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.444597854004236,
"lng": 13.42729037972278
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_16",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.5102,
"lng": 13.3444
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_17",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.48903177127663,
"lng": 13.495944342993262
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_18",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.62863,
"lng": 13.3621182
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_19",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.65831976801964,
"lng": 13.359646771531477
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_20",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.61955,
"lng": 13.29845
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_21",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.49949154428338,
"lng": 13.40857671284082
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_22",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.465255531970406,
"lng": 13.511537556934355
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_23",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.4312,
"lng": 13.45023
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_24",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.5293,
"lng": 13.38507204916371
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_25",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.6378,
"lng": 13.48675
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_26",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.53754,
"lng": 13.34152
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_27",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.48811100200862,
"lng": 13.376
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_28",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.4745,
"lng": 13.42
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_29",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.58884270031872,
"lng": 13.352068415230912
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_30",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.60079217247425,
"lng": 13.339813254226156
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_31",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.4779,
"lng": 13.5012
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_32",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.60066027234286,
"lng": 13.502741838681837
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_33",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.55437436208552,
"lng": 13.503142187091647
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_34",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.48446152479127,
"lng": 13.392004256315916
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_35",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.482203294624796,
"lng": 13.391214601891551
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_36",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.60842932011795,
"lng": 13.46922174529483
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_37",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.47651505101506,
"lng": 13.459944175857151
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_38",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.50488105730338,
"lng": 13.355333507786808
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_39",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.6029,
"lng": 13.3113
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_40",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.6543,
"lng": 13.39278
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_41",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.51508491755749,
"lng": 13.38
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_42",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.63313572894435,
"lng": 13.506488581249922
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_43",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.459450803409204,
"lng": 13.396015195980405
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_44",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.54433793446157,
"lng": 13.49579242116612
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_45",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.486517527979494,
"lng": 13.382057792236846
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_46",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.55606147412602,
"lng": 13.41517487839967
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_47",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.591995183321515,
"lng": 13.36000789424169
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_48",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.56223251898173,
"lng": 13.471999398223556
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
},
{
"id": "Job_49",
"tasks": {
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.595251760429065,
"lng": 13.456764166098564
},
"duration": 300
}
],
"demand": [
1
]
}
]
}
}
]
}
}Solution
The following figure visualizes the solution of the problem presented in the sample use case:
As the visualization shows, the optimization algorithm selected both vehicles to complete the assigned jobs. The following table summarizes the key statistics for each vehicle, with driving time highlighted against the 5-hour (18,000 s) limit:
| Metric | vehicle_1_1 | vehicle_1_2 |
|---|---|---|
| Jobs assigned | 18 | 31 |
| Driving time | 2 h 19 min (8,350 s) | 4 h 5 min (14,690 s) |
| Service time | 1 h 30 min (5,400 s) | 2 h 35 min (9,300 s) |
| Total tour duration | 3 h 49 min (13,750 s) | 6 h 40 min (23,990 s) |
| Distance | 69.2 km | 119.1 km |
| Cost | 106.72 | 177.04 |
Even though the vehicle type specified in the sample problem had its capacity value set to 50, allowing a single vehicle to complete all jobs within the specified shift, the maxDrivingTime constraint forced the algorithm to split the tour between the two vehicles. Thanks to this split, neither vehicle exceeded the maximum driving time limit.
The following section provides the full solution JSON:
Click to expand/collapse the sample JSON
{
"statistic": {
"cost": 283.762,
"distance": 188282,
"duration": 37740,
"times": {
"driving": 23040,
"serving": 14700,
"waiting": 0,
"stopping": 0,
"break": 0,
"intraStop": 0
},
"intraStopDistance": 0
},
"tours": [
{
"vehicleId": "vehicle_1_2",
"typeId": "vehicle_1",
"stops": [
{
"time": {
"arrival": "2024-06-24T06:00:00Z",
"departure": "2024-06-24T06:00:00Z"
},
"load": [
31
],
"activities": [
{
"jobId": "departure",
"type": "departure",
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": {
"start": "2024-06-24T06:00:00Z",
"end": "2024-06-24T06:00:00Z",
"arrival": "2024-06-24T06:00:00Z"
}
}
],
"location": {
"lat": 52.531,
"lng": 13.38461
},
"distance": 0
},
{
"time": {
"arrival": "2024-06-24T06:01:15Z",
"departure": "2024-06-24T06:06:15Z"
},
"load": [
30
],
"activities": [
{
"jobId": "Job_24",
"type": "delivery",
"location": {
"lat": 52.5293,
"lng": 13.38507204916371
},
"time": {
"start": "2024-06-24T06:01:15Z",
"end": "2024-06-24T06:06:15Z",
"arrival": "2024-06-24T06:01:15Z"
}
}
],
"location": {
"lat": 52.5293,
"lng": 13.38507204916371
},
"distance": 485
},
{
"time": {
"arrival": "2024-06-24T06:12:05Z",
"departure": "2024-06-24T06:17:05Z"
},
"load": [
29
],
"activities": [
{
"jobId": "Job_41",
"type": "delivery",
"location": {
"lat": 52.51508491755749,
"lng": 13.38
},
"time": {
"start": "2024-06-24T06:12:05Z",
"end": "2024-06-24T06:17:05Z",
"arrival": "2024-06-24T06:12:05Z"
}
}
],
"location": {
"lat": 52.51508491755749,
"lng": 13.38
},
"distance": 2709
},
{
"time": {
"arrival": "2024-06-24T06:24:37Z",
"departure": "2024-06-24T06:29:37Z"
},
"load": [
28
],
"activities": [
{
"jobId": "Job_21",
"type": "delivery",
"location": {
"lat": 52.49949154428338,
"lng": 13.40857671284082
},
"time": {
"start": "2024-06-24T06:24:37Z",
"end": "2024-06-24T06:29:37Z",
"arrival": "2024-06-24T06:24:37Z"
}
}
],
"location": {
"lat": 52.49949154428338,
"lng": 13.40857671284082
},
"distance": 6111
},
{
"time": {
"arrival": "2024-06-24T06:43:21Z",
"departure": "2024-06-24T06:48:21Z"
},
"load": [
27
],
"activities": [
{
"jobId": "Job_35",
"type": "delivery",
"location": {
"lat": 52.4822032946248,
"lng": 13.391214601891551
},
"time": {
"start": "2024-06-24T06:43:21Z",
"end": "2024-06-24T06:48:21Z",
"arrival": "2024-06-24T06:43:21Z"
}
}
],
"location": {
"lat": 52.4822032946248,
"lng": 13.391214601891551
},
"distance": 10125
},
{
"time": {
"arrival": "2024-06-24T06:59:37Z",
"departure": "2024-06-24T07:04:37Z"
},
"load": [
26
],
"activities": [
{
"jobId": "Job_28",
"type": "delivery",
"location": {
"lat": 52.4745,
"lng": 13.42
},
"time": {
"start": "2024-06-24T06:59:37Z",
"end": "2024-06-24T07:04:37Z",
"arrival": "2024-06-24T06:59:37Z"
}
}
],
"location": {
"lat": 52.4745,
"lng": 13.42
},
"distance": 13924
},
{
"time": {
"arrival": "2024-06-24T07:10:05Z",
"departure": "2024-06-24T07:15:05Z"
},
"load": [
25
],
"activities": [
{
"jobId": "Job_34",
"type": "delivery",
"location": {
"lat": 52.48446152479127,
"lng": 13.392004256315916
},
"time": {
"start": "2024-06-24T07:10:05Z",
"end": "2024-06-24T07:15:05Z",
"arrival": "2024-06-24T07:10:05Z"
}
}
],
"location": {
"lat": 52.48446152479127,
"lng": 13.392004256315916
},
"distance": 16806
},
{
"time": {
"arrival": "2024-06-24T07:18:44Z",
"departure": "2024-06-24T07:23:44Z"
},
"load": [
24
],
"activities": [
{
"jobId": "Job_45",
"type": "delivery",
"location": {
"lat": 52.486517527979494,
"lng": 13.382057792236846
},
"time": {
"start": "2024-06-24T07:18:44Z",
"end": "2024-06-24T07:23:44Z",
"arrival": "2024-06-24T07:18:44Z"
}
}
],
"location": {
"lat": 52.486517527979494,
"lng": 13.382057792236846
},
"distance": 17938
},
{
"time": {
"arrival": "2024-06-24T07:27:21Z",
"departure": "2024-06-24T07:32:21Z"
},
"load": [
23
],
"activities": [
{
"jobId": "Job_27",
"type": "delivery",
"location": {
"lat": 52.48811100200862,
"lng": 13.376
},
"time": {
"start": "2024-06-24T07:27:21Z",
"end": "2024-06-24T07:32:21Z",
"arrival": "2024-06-24T07:27:21Z"
}
}
],
"location": {
"lat": 52.48811100200862,
"lng": 13.376
},
"distance": 19137
},
{
"time": {
"arrival": "2024-06-24T07:41:52Z",
"departure": "2024-06-24T07:46:52Z"
},
"load": [
22
],
"activities": [
{
"jobId": "Job_11",
"type": "delivery",
"location": {
"lat": 52.457844833248835,
"lng": 13.322525701671736
},
"time": {
"start": "2024-06-24T07:41:52Z",
"end": "2024-06-24T07:46:52Z",
"arrival": "2024-06-24T07:41:52Z"
}
}
],
"location": {
"lat": 52.457844833248835,
"lng": 13.322525701671736
},
"distance": 25995
},
{
"time": {
"arrival": "2024-06-24T07:49:48Z",
"departure": "2024-06-24T07:54:48Z"
},
"load": [
21
],
"activities": [
{
"jobId": "Job_6",
"type": "delivery",
"location": {
"lat": 52.45810373923444,
"lng": 13.3318089424755
},
"time": {
"start": "2024-06-24T07:49:48Z",
"end": "2024-06-24T07:54:48Z",
"arrival": "2024-06-24T07:49:48Z"
}
}
],
"location": {
"lat": 52.45810373923444,
"lng": 13.3318089424755
},
"distance": 27183
},
{
"time": {
"arrival": "2024-06-24T08:00:29Z",
"departure": "2024-06-24T08:05:29Z"
},
"load": [
20
],
"activities": [
{
"jobId": "Job_7",
"type": "delivery",
"location": {
"lat": 52.439442845393685,
"lng": 13.336118100685782
},
"time": {
"start": "2024-06-24T08:00:29Z",
"end": "2024-06-24T08:05:29Z",
"arrival": "2024-06-24T08:00:29Z"
}
}
],
"location": {
"lat": 52.439442845393685,
"lng": 13.336118100685782
},
"distance": 29964
},
{
"time": {
"arrival": "2024-06-24T08:13:24Z",
"departure": "2024-06-24T08:18:24Z"
},
"load": [
19
],
"activities": [
{
"jobId": "Job_12",
"type": "delivery",
"location": {
"lat": 52.4329271708958,
"lng": 13.376558539227483
},
"time": {
"start": "2024-06-24T08:13:24Z",
"end": "2024-06-24T08:18:24Z",
"arrival": "2024-06-24T08:13:24Z"
}
}
],
"location": {
"lat": 52.4329271708958,
"lng": 13.376558539227483
},
"distance": 34249
},
{
"time": {
"arrival": "2024-06-24T08:26:48Z",
"departure": "2024-06-24T08:31:48Z"
},
"load": [
18
],
"activities": [
{
"jobId": "Job_43",
"type": "delivery",
"location": {
"lat": 52.4594508034092,
"lng": 13.396015195980404
},
"time": {
"start": "2024-06-24T08:26:48Z",
"end": "2024-06-24T08:31:48Z",
"arrival": "2024-06-24T08:26:48Z"
}
}
],
"location": {
"lat": 52.4594508034092,
"lng": 13.396015195980404
},
"distance": 38375
},
{
"time": {
"arrival": "2024-06-24T08:34:11Z",
"departure": "2024-06-24T08:39:11Z"
},
"load": [
17
],
"activities": [
{
"jobId": "Job_4",
"type": "delivery",
"location": {
"lat": 52.456,
"lng": 13.403260583257188
},
"time": {
"start": "2024-06-24T08:34:11Z",
"end": "2024-06-24T08:39:11Z",
"arrival": "2024-06-24T08:34:11Z"
}
}
],
"location": {
"lat": 52.456,
"lng": 13.403260583257188
},
"distance": 39280
},
{
"time": {
"arrival": "2024-06-24T08:46:06Z",
"departure": "2024-06-24T08:51:06Z"
},
"load": [
16
],
"activities": [
{
"jobId": "Job_15",
"type": "delivery",
"location": {
"lat": 52.44459785400424,
"lng": 13.42729037972278
},
"time": {
"start": "2024-06-24T08:46:06Z",
"end": "2024-06-24T08:51:06Z",
"arrival": "2024-06-24T08:46:06Z"
}
}
],
"location": {
"lat": 52.44459785400424,
"lng": 13.42729037972278
},
"distance": 43183
},
{
"time": {
"arrival": "2024-06-24T08:59:16Z",
"departure": "2024-06-24T09:04:16Z"
},
"load": [
15
],
"activities": [
{
"jobId": "Job_23",
"type": "delivery",
"location": {
"lat": 52.4312,
"lng": 13.45023
},
"time": {
"start": "2024-06-24T08:59:16Z",
"end": "2024-06-24T09:04:16Z",
"arrival": "2024-06-24T08:59:16Z"
}
}
],
"location": {
"lat": 52.4312,
"lng": 13.45023
},
"distance": 47494
},
{
"time": {
"arrival": "2024-06-24T09:16:51Z",
"departure": "2024-06-24T09:21:51Z"
},
"load": [
14
],
"activities": [
{
"jobId": "Job_37",
"type": "delivery",
"location": {
"lat": 52.47651505101506,
"lng": 13.459944175857151
},
"time": {
"start": "2024-06-24T09:16:51Z",
"end": "2024-06-24T09:21:51Z",
"arrival": "2024-06-24T09:16:51Z"
}
}
],
"location": {
"lat": 52.47651505101506,
"lng": 13.459944175857151
},
"distance": 55773
},
{
"time": {
"arrival": "2024-06-24T09:28:08Z",
"departure": "2024-06-24T09:33:08Z"
},
"load": [
13
],
"activities": [
{
"jobId": "Job_9",
"type": "delivery",
"location": {
"lat": 52.4823,
"lng": 13.4703
},
"time": {
"start": "2024-06-24T09:28:08Z",
"end": "2024-06-24T09:33:08Z",
"arrival": "2024-06-24T09:28:08Z"
}
}
],
"location": {
"lat": 52.4823,
"lng": 13.4703
},
"distance": 58485
},
{
"time": {
"arrival": "2024-06-24T09:43:20Z",
"departure": "2024-06-24T09:48:20Z"
},
"load": [
12
],
"activities": [
{
"jobId": "Job_13",
"type": "delivery",
"location": {
"lat": 52.48128598928299,
"lng": 13.4944
},
"time": {
"start": "2024-06-24T09:43:20Z",
"end": "2024-06-24T09:48:20Z",
"arrival": "2024-06-24T09:43:20Z"
}
}
],
"location": {
"lat": 52.48128598928299,
"lng": 13.4944
},
"distance": 60613
},
{
"time": {
"arrival": "2024-06-24T10:02:58Z",
"departure": "2024-06-24T10:07:58Z"
},
"load": [
11
],
"activities": [
{
"jobId": "Job_22",
"type": "delivery",
"location": {
"lat": 52.465255531970406,
"lng": 13.511537556934355
},
"time": {
"start": "2024-06-24T10:02:58Z",
"end": "2024-06-24T10:07:58Z",
"arrival": "2024-06-24T10:02:58Z"
}
}
],
"location": {
"lat": 52.465255531970406,
"lng": 13.511537556934355
},
"distance": 65266
},
{
"time": {
"arrival": "2024-06-24T10:14:43Z",
"departure": "2024-06-24T10:19:43Z"
},
"load": [
10
],
"activities": [
{
"jobId": "Job_31",
"type": "delivery",
"location": {
"lat": 52.4779,
"lng": 13.5012
},
"time": {
"start": "2024-06-24T10:14:43Z",
"end": "2024-06-24T10:19:43Z",
"arrival": "2024-06-24T10:14:43Z"
}
}
],
"location": {
"lat": 52.4779,
"lng": 13.5012
},
"distance": 67768
},
{
"time": {
"arrival": "2024-06-24T10:24:37Z",
"departure": "2024-06-24T10:29:37Z"
},
"load": [
9
],
"activities": [
{
"jobId": "Job_17",
"type": "delivery",
"location": {
"lat": 52.48903177127663,
"lng": 13.495944342993262
},
"time": {
"start": "2024-06-24T10:24:37Z",
"end": "2024-06-24T10:29:37Z",
"arrival": "2024-06-24T10:24:37Z"
}
}
],
"location": {
"lat": 52.48903177127663,
"lng": 13.495944342993262
},
"distance": 69134
},
{
"time": {
"arrival": "2024-06-24T10:43:39Z",
"departure": "2024-06-24T10:48:39Z"
},
"load": [
8
],
"activities": [
{
"jobId": "Job_44",
"type": "delivery",
"location": {
"lat": 52.54433793446157,
"lng": 13.49579242116612
},
"time": {
"start": "2024-06-24T10:43:39Z",
"end": "2024-06-24T10:48:39Z",
"arrival": "2024-06-24T10:43:39Z"
}
}
],
"location": {
"lat": 52.54433793446157,
"lng": 13.49579242116612
},
"distance": 77271
},
{
"time": {
"arrival": "2024-06-24T10:52:54Z",
"departure": "2024-06-24T10:57:54Z"
},
"load": [
7
],
"activities": [
{
"jobId": "Job_33",
"type": "delivery",
"location": {
"lat": 52.55437436208552,
"lng": 13.503142187091647
},
"time": {
"start": "2024-06-24T10:52:54Z",
"end": "2024-06-24T10:57:54Z",
"arrival": "2024-06-24T10:52:54Z"
}
}
],
"location": {
"lat": 52.55437436208552,
"lng": 13.503142187091647
},
"distance": 79279
},
{
"time": {
"arrival": "2024-06-24T11:04:26Z",
"departure": "2024-06-24T11:09:26Z"
},
"load": [
6
],
"activities": [
{
"jobId": "Job_48",
"type": "delivery",
"location": {
"lat": 52.56223251898173,
"lng": 13.471999398223556
},
"time": {
"start": "2024-06-24T11:04:26Z",
"end": "2024-06-24T11:09:26Z",
"arrival": "2024-06-24T11:04:26Z"
}
}
],
"location": {
"lat": 52.56223251898173,
"lng": 13.471999398223556
},
"distance": 83276
},
{
"time": {
"arrival": "2024-06-24T11:17:19Z",
"departure": "2024-06-24T11:22:19Z"
},
"load": [
5
],
"activities": [
{
"jobId": "Job_32",
"type": "delivery",
"location": {
"lat": 52.60066027234286,
"lng": 13.502741838681835
},
"time": {
"start": "2024-06-24T11:17:19Z",
"end": "2024-06-24T11:22:19Z",
"arrival": "2024-06-24T11:17:19Z"
}
}
],
"location": {
"lat": 52.60066027234286,
"lng": 13.502741838681835
},
"distance": 88937
},
{
"time": {
"arrival": "2024-06-24T11:35:16Z",
"departure": "2024-06-24T11:40:16Z"
},
"load": [
4
],
"activities": [
{
"jobId": "Job_42",
"type": "delivery",
"location": {
"lat": 52.63313572894435,
"lng": 13.506488581249922
},
"time": {
"start": "2024-06-24T11:35:16Z",
"end": "2024-06-24T11:40:16Z",
"arrival": "2024-06-24T11:35:16Z"
}
}
],
"location": {
"lat": 52.63313572894435,
"lng": 13.506488581249922
},
"distance": 97764
},
{
"time": {
"arrival": "2024-06-24T11:44:49Z",
"departure": "2024-06-24T11:49:49Z"
},
"load": [
3
],
"activities": [
{
"jobId": "Job_25",
"type": "delivery",
"location": {
"lat": 52.6378,
"lng": 13.48675
},
"time": {
"start": "2024-06-24T11:44:49Z",
"end": "2024-06-24T11:49:49Z",
"arrival": "2024-06-24T11:44:49Z"
}
}
],
"location": {
"lat": 52.6378,
"lng": 13.48675
},
"distance": 99323
},
{
"time": {
"arrival": "2024-06-24T11:58:45Z",
"departure": "2024-06-24T12:03:45Z"
},
"load": [
2
],
"activities": [
{
"jobId": "Job_36",
"type": "delivery",
"location": {
"lat": 52.60842932011795,
"lng": 13.46922174529483
},
"time": {
"start": "2024-06-24T11:58:45Z",
"end": "2024-06-24T12:03:45Z",
"arrival": "2024-06-24T11:58:45Z"
}
}
],
"location": {
"lat": 52.60842932011795,
"lng": 13.46922174529483
},
"distance": 104561
},
{
"time": {
"arrival": "2024-06-24T12:08:58Z",
"departure": "2024-06-24T12:13:58Z"
},
"load": [
1
],
"activities": [
{
"jobId": "Job_49",
"type": "delivery",
"location": {
"lat": 52.595251760429065,
"lng": 13.456764166098564
},
"time": {
"start": "2024-06-24T12:08:58Z",
"end": "2024-06-24T12:13:58Z",
"arrival": "2024-06-24T12:08:58Z"
}
}
],
"location": {
"lat": 52.595251760429065,
"lng": 13.456764166098564
},
"distance": 107405
},
{
"time": {
"arrival": "2024-06-24T12:26:12Z",
"departure": "2024-06-24T12:31:12Z"
},
"load": [
0
],
"activities": [
{
"jobId": "Job_46",
"type": "delivery",
"location": {
"lat": 52.55606147412602,
"lng": 13.41517487839967
},
"time": {
"start": "2024-06-24T12:26:12Z",
"end": "2024-06-24T12:31:12Z",
"arrival": "2024-06-24T12:26:12Z"
}
}
],
"location": {
"lat": 52.55606147412602,
"lng": 13.41517487839967
},
"distance": 114513
},
{
"time": {
"arrival": "2024-06-24T12:39:50Z",
"departure": "2024-06-24T12:39:50Z"
},
"load": [
0
],
"activities": [
{
"jobId": "arrival",
"type": "arrival",
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": {
"start": "2024-06-24T12:39:50Z",
"end": "2024-06-24T12:39:50Z",
"arrival": "2024-06-24T12:39:50Z"
}
}
],
"location": {
"lat": 52.531,
"lng": 13.38461
},
"distance": 119058
}
],
"statistic": {
"cost": 177.038,
"distance": 119058,
"duration": 23990,
"times": {
"driving": 14690,
"serving": 9300,
"waiting": 0,
"stopping": 0,
"break": 0,
"intraStop": 0
},
"intraStopDistance": 0
},
"shiftIndex": 0
},
{
"vehicleId": "vehicle_1_1",
"typeId": "vehicle_1",
"stops": [
{
"time": {
"arrival": "2024-06-24T06:00:00Z",
"departure": "2024-06-24T06:00:00Z"
},
"load": [
18
],
"activities": [
{
"jobId": "departure",
"type": "departure",
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": {
"start": "2024-06-24T06:00:00Z",
"end": "2024-06-24T06:00:00Z",
"arrival": "2024-06-24T06:00:00Z"
}
}
],
"location": {
"lat": 52.531,
"lng": 13.38461
},
"distance": 0
},
{
"time": {
"arrival": "2024-06-24T06:02:22Z",
"departure": "2024-06-24T06:07:22Z"
},
"load": [
17
],
"activities": [
{
"jobId": "Job_8",
"type": "delivery",
"location": {
"lat": 52.53213114000045,
"lng": 13.373517153879767
},
"time": {
"start": "2024-06-24T06:02:22Z",
"end": "2024-06-24T06:07:22Z",
"arrival": "2024-06-24T06:02:22Z"
}
}
],
"location": {
"lat": 52.53213114000045,
"lng": 13.373517153879767
},
"distance": 1079
},
{
"time": {
"arrival": "2024-06-24T06:23:36Z",
"departure": "2024-06-24T06:28:36Z"
},
"load": [
16
],
"activities": [
{
"jobId": "Job_29",
"type": "delivery",
"location": {
"lat": 52.58884270031872,
"lng": 13.352068415230912
},
"time": {
"start": "2024-06-24T06:23:36Z",
"end": "2024-06-24T06:28:36Z",
"arrival": "2024-06-24T06:23:36Z"
}
}
],
"location": {
"lat": 52.58884270031872,
"lng": 13.352068415230912
},
"distance": 9692
},
{
"time": {
"arrival": "2024-06-24T06:32:59Z",
"departure": "2024-06-24T06:37:59Z"
},
"load": [
15
],
"activities": [
{
"jobId": "Job_30",
"type": "delivery",
"location": {
"lat": 52.60079217247425,
"lng": 13.339813254226156
},
"time": {
"start": "2024-06-24T06:32:59Z",
"end": "2024-06-24T06:37:59Z",
"arrival": "2024-06-24T06:32:59Z"
}
}
],
"location": {
"lat": 52.60079217247425,
"lng": 13.339813254226156
},
"distance": 11746
},
{
"time": {
"arrival": "2024-06-24T06:43:37Z",
"departure": "2024-06-24T06:48:37Z"
},
"load": [
14
],
"activities": [
{
"jobId": "Job_47",
"type": "delivery",
"location": {
"lat": 52.591995183321515,
"lng": 13.36000789424169
},
"time": {
"start": "2024-06-24T06:43:37Z",
"end": "2024-06-24T06:48:37Z",
"arrival": "2024-06-24T06:43:37Z"
}
}
],
"location": {
"lat": 52.591995183321515,
"lng": 13.36000789424169
},
"distance": 13998
},
{
"time": {
"arrival": "2024-06-24T07:02:05Z",
"departure": "2024-06-24T07:07:05Z"
},
"load": [
13
],
"activities": [
{
"jobId": "Job_2",
"type": "delivery",
"location": {
"lat": 52.62738533184079,
"lng": 13.3789
},
"time": {
"start": "2024-06-24T07:02:05Z",
"end": "2024-06-24T07:07:05Z",
"arrival": "2024-06-24T07:02:05Z"
}
}
],
"location": {
"lat": 52.62738533184079,
"lng": 13.3789
},
"distance": 20504
},
{
"time": {
"arrival": "2024-06-24T07:14:44Z",
"departure": "2024-06-24T07:19:44Z"
},
"load": [
12
],
"activities": [
{
"jobId": "Job_18",
"type": "delivery",
"location": {
"lat": 52.62863,
"lng": 13.3621182
},
"time": {
"start": "2024-06-24T07:14:44Z",
"end": "2024-06-24T07:19:44Z",
"arrival": "2024-06-24T07:14:44Z"
}
}
],
"location": {
"lat": 52.62863,
"lng": 13.3621182
},
"distance": 23286
},
{
"time": {
"arrival": "2024-06-24T07:22:38Z",
"departure": "2024-06-24T07:27:38Z"
},
"load": [
11
],
"activities": [
{
"jobId": "Job_5",
"type": "delivery",
"location": {
"lat": 52.63256,
"lng": 13.37322
},
"time": {
"start": "2024-06-24T07:22:38Z",
"end": "2024-06-24T07:27:38Z",
"arrival": "2024-06-24T07:22:38Z"
}
}
],
"location": {
"lat": 52.63256,
"lng": 13.37322
},
"distance": 24338
},
{
"time": {
"arrival": "2024-06-24T07:36:44Z",
"departure": "2024-06-24T07:41:44Z"
},
"load": [
10
],
"activities": [
{
"jobId": "Job_40",
"type": "delivery",
"location": {
"lat": 52.6543,
"lng": 13.39278
},
"time": {
"start": "2024-06-24T07:36:44Z",
"end": "2024-06-24T07:41:44Z",
"arrival": "2024-06-24T07:36:44Z"
}
}
],
"location": {
"lat": 52.6543,
"lng": 13.39278
},
"distance": 29341
},
{
"time": {
"arrival": "2024-06-24T07:46:44Z",
"departure": "2024-06-24T07:51:44Z"
},
"load": [
9
],
"activities": [
{
"jobId": "Job_19",
"type": "delivery",
"location": {
"lat": 52.65831976801964,
"lng": 13.359646771531477
},
"time": {
"start": "2024-06-24T07:46:44Z",
"end": "2024-06-24T07:51:44Z",
"arrival": "2024-06-24T07:46:44Z"
}
}
],
"location": {
"lat": 52.65831976801964,
"lng": 13.359646771531477
},
"distance": 32061
},
{
"time": {
"arrival": "2024-06-24T07:58:14Z",
"departure": "2024-06-24T08:03:14Z"
},
"load": [
8
],
"activities": [
{
"jobId": "Job_1",
"type": "delivery",
"location": {
"lat": 52.63329,
"lng": 13.3138
},
"time": {
"start": "2024-06-24T07:58:14Z",
"end": "2024-06-24T08:03:14Z",
"arrival": "2024-06-24T07:58:14Z"
}
}
],
"location": {
"lat": 52.63329,
"lng": 13.3138
},
"distance": 36933
},
{
"time": {
"arrival": "2024-06-24T08:09:15Z",
"departure": "2024-06-24T08:14:15Z"
},
"load": [
7
],
"activities": [
{
"jobId": "Job_20",
"type": "delivery",
"location": {
"lat": 52.61955,
"lng": 13.29845
},
"time": {
"start": "2024-06-24T08:09:15Z",
"end": "2024-06-24T08:14:15Z",
"arrival": "2024-06-24T08:09:15Z"
}
}
],
"location": {
"lat": 52.61955,
"lng": 13.29845
},
"distance": 40041
},
{
"time": {
"arrival": "2024-06-24T08:22:29Z",
"departure": "2024-06-24T08:27:29Z"
},
"load": [
6
],
"activities": [
{
"jobId": "Job_39",
"type": "delivery",
"location": {
"lat": 52.6029,
"lng": 13.3113
},
"time": {
"start": "2024-06-24T08:22:29Z",
"end": "2024-06-24T08:27:29Z",
"arrival": "2024-06-24T08:22:29Z"
}
}
],
"location": {
"lat": 52.6029,
"lng": 13.3113
},
"distance": 44417
},
{
"time": {
"arrival": "2024-06-24T08:35:13Z",
"departure": "2024-06-24T08:40:13Z"
},
"load": [
5
],
"activities": [
{
"jobId": "Job_14",
"type": "delivery",
"location": {
"lat": 52.58038089373736,
"lng": 13.30447922221816
},
"time": {
"start": "2024-06-24T08:35:13Z",
"end": "2024-06-24T08:40:13Z",
"arrival": "2024-06-24T08:35:13Z"
}
}
],
"location": {
"lat": 52.58038089373736,
"lng": 13.30447922221816
},
"distance": 48209
},
{
"time": {
"arrival": "2024-06-24T08:52:35Z",
"departure": "2024-06-24T08:57:35Z"
},
"load": [
4
],
"activities": [
{
"jobId": "Job_26",
"type": "delivery",
"location": {
"lat": 52.53754,
"lng": 13.34152
},
"time": {
"start": "2024-06-24T08:52:35Z",
"end": "2024-06-24T08:57:35Z",
"arrival": "2024-06-24T08:52:35Z"
}
}
],
"location": {
"lat": 52.53754,
"lng": 13.34152
},
"distance": 55829
},
{
"time": {
"arrival": "2024-06-24T09:02:29Z",
"departure": "2024-06-24T09:07:29Z"
},
"load": [
3
],
"activities": [
{
"jobId": "Job_10",
"type": "delivery",
"location": {
"lat": 52.5313,
"lng": 13.35356
},
"time": {
"start": "2024-06-24T09:02:29Z",
"end": "2024-06-24T09:07:29Z",
"arrival": "2024-06-24T09:02:29Z"
}
}
],
"location": {
"lat": 52.5313,
"lng": 13.35356
},
"distance": 57596
},
{
"time": {
"arrival": "2024-06-24T09:14:42Z",
"departure": "2024-06-24T09:19:42Z"
},
"load": [
2
],
"activities": [
{
"jobId": "Job_3",
"type": "delivery",
"location": {
"lat": 52.51635175288175,
"lng": 13.343661020679573
},
"time": {
"start": "2024-06-24T09:14:42Z",
"end": "2024-06-24T09:19:42Z",
"arrival": "2024-06-24T09:14:42Z"
}
}
],
"location": {
"lat": 52.51635175288175,
"lng": 13.343661020679573
},
"distance": 60648
},
{
"time": {
"arrival": "2024-06-24T09:24:24Z",
"departure": "2024-06-24T09:29:24Z"
},
"load": [
1
],
"activities": [
{
"jobId": "Job_38",
"type": "delivery",
"location": {
"lat": 52.50488105730338,
"lng": 13.355333507786808
},
"time": {
"start": "2024-06-24T09:24:24Z",
"end": "2024-06-24T09:29:24Z",
"arrival": "2024-06-24T09:24:24Z"
}
}
],
"location": {
"lat": 52.50488105730338,
"lng": 13.355333507786808
},
"distance": 62954
},
{
"time": {
"arrival": "2024-06-24T09:34:20Z",
"departure": "2024-06-24T09:39:20Z"
},
"load": [
0
],
"activities": [
{
"jobId": "Job_16",
"type": "delivery",
"location": {
"lat": 52.5102,
"lng": 13.3444
},
"time": {
"start": "2024-06-24T09:34:20Z",
"end": "2024-06-24T09:39:20Z",
"arrival": "2024-06-24T09:34:20Z"
}
}
],
"location": {
"lat": 52.5102,
"lng": 13.3444
},
"distance": 64688
},
{
"time": {
"arrival": "2024-06-24T09:49:10Z",
"departure": "2024-06-24T09:49:10Z"
},
"load": [
0
],
"activities": [
{
"jobId": "arrival",
"type": "arrival",
"location": {
"lat": 52.531,
"lng": 13.38461
},
"time": {
"start": "2024-06-24T09:49:10Z",
"end": "2024-06-24T09:49:10Z",
"arrival": "2024-06-24T09:49:10Z"
}
}
],
"location": {
"lat": 52.531,
"lng": 13.38461
},
"distance": 69224
}
],
"statistic": {
"cost": 106.724,
"distance": 69224,
"duration": 13750,
"times": {
"driving": 8350,
"serving": 5400,
"waiting": 0,
"stopping": 0,
"break": 0,
"intraStop": 0
},
"intraStopDistance": 0
},
"shiftIndex": 0
}
]
}Next steps
- To learn how to limit total working time instead of pure driving time, see Limit maximum shift time.
- To set an upper bound on how far a vehicle travels, see Limit maximum distance.
- To control how many stops a vehicle makes per shift, see Set maximum number of stops.
- For an in-depth exploration of the HERE Tour Planning API methods, endpoints, and parameters, see the API Reference.
Updated 8 hours ago