Improve dispatch with vehicle-dependent stop base durations
This tutorial describes the use of the stop base duration feature.
Feature description
HERE Tour Planning allows you to dynamically optimize routes for multiple vehicles visiting a set of locations given real-life constraints. With the stop base duration feature, dispatchers have greater control over the total service time by setting stop durations based on the vehicle and managing multiple tasks at the same location. This topic explores the details of this feature and how it helps logistics professionals with more granular control and optimization.
Feature application
Stop base duration allows the dispatchers to set the service time configured per vehicle. This time can be for parking the vehicle, preparing for loading or unloading, completing procedures to enter the facility, or other similar tasks that need to be done one time at each stop.
There are two main scenarios where stop base duration can be applied effectively:
-
Heterogeneous fleet routing
Stop base duration can be used to account for the time it takes to unload different vehicle types. In situations where a fleet consists of vehicles with different capabilities, such as trucks and cars, the duration of a stop can vary based on the vehicle type. For example, a delivery or pickup job could take longer when performed by a truck as compared to a car. With stop base duration, dispatchers can specify a different
stopBaseDurationvalue for different vehicles, and it will get added once to each stop that has at least one pickup or delivery. -
Multiple jobs at same location
Stop base duration can be used to define a common duration that remains the same at every stop. When there are multiple jobs to be performed at a stop, for example, picking up five packages from the same location, dispatchers can use stop base duration to define a common duration. At the individual job, a shorter duration can be specified to account only for the execution of that particular delivery or pickup. This helps in accurately calculating the time at each stop, thus providing accurate ETAs, resource allocation, and other plans.
So the formula is as follows:
Total duration at a stop = vehicle stop base duration + sum of individual activity duration at that stop
Example
This example demonstrates how stop base duration can be used. In the following problem, there is a fleet of cars and a fleet of trucks. The stopBaseDuration parameter set for car and for truck is the base time needed for the vehicle at one stop.
- A car needs 20 minutes at every stop to park, prepare to load/unload, enter the facility, and so on.
- For the same tasks, a truck would need an hour at every stop.
Vehicle routing problem
{
"fleet": {
"types": [
{
"id": "Car_1",
...
"shifts": [
{
...SHIFT START & END TIME, LOCATION
"stopBaseDuration": {
"type": "oncePerStop",
"value": 1200
}
}
],
},
{
"id": "Truck",
...
"shifts": [
{
...SHIFT START & END TIME, LOCATION
"stopBaseDuration": {
"type": "oncePerStop",
"value": 3600
}
}
],
}
],
"profiles": [
{
... CAR AND TRUCK TYPE PROFILES
}
]
},
"plan": {
"jobs": [
{
"id": "Job_1",
"tasks": {
"pickups": [
{
"places": [
{
"location": {
"lat": 52.44975,
"lng": 13.301483
},
"duration": 300
}
],
"demand": [1]
}
]
}
},
{
"id": "Job_2",
"tasks": {
"pickups": [
{
"places": [
{
"location": {
"lat": 52.44975,
"lng": 13.301483
},
"duration": 300
}
],
"demand": [1]
}
]
}
}
.... MORE PICKUP & DEVELIVERIES JOBS
}
]
}
} Solution - API Response
In the solution below, we focus on a single stop and see how the service time at one stop is calculated. The arrival and departure times at the stop are 9:29 and 10:54, which means the vehicle stops for 1 hour and 25 minutes. From the end and start times for each activity, we can see the time needed to execute each job is 5 min, or 300 seconds as defined in the problem above.
Total service time at this stop =
Stop base duration for "Truck" (that is, 3600 sec as defined in the problem)
+ Job_1 duration (5 min)
+ Job_5 duration (5 min)
+ Job_4 duration (5 min)
+ Job_3 duration (5 min)
+ Job_2 duration (5 min)
= 1 hour 25 min.
{
"statistic": {
... OVERALL STATS: COST, DISTANCE, DURATION, TIMES
}
},
"tours": [
{
"vehicleId": "Truck_1",
"typeId": "Truck",
"stops": [
...
{
... LOCATION, LOAD, DISTANCE
"time": {
"arrival": "2023-08-05T09:29:00Z",
"departure": "2023-08-05T10:54:00Z"
},
"activities": [
{
... LOCATION, TYPE
"jobId": "Job_1",
"time": {
"start": "2023-08-05T10:29:00Z",
"end": "2023-08-05T10:34:00Z"
}
},
{
... LOCATION, TYPE
"jobId": "Job_5",
"time": {
"start": "2023-08-05T10:34:00Z",
"end": "2023-08-05T10:39:00Z"
}
},
{
... LOCATION, TYPE
"jobId": "Job_4",
"time": {
"start": "2023-08-05T10:39:00Z",
"end": "2023-08-05T10:44:00Z"
}
},
{
... LOCATION, TYPE
"jobId": "Job_3",
"time": {
"start": "2023-08-05T10:44:00Z",
"end": "2023-08-05T10:49:00Z"
}
},
{
... LOCATION, TYPE
"jobId": "Job_2",
"time": {
"start": "2023-08-05T10:49:00Z",
"end": "2023-08-05T10:54:00Z"
}
}
]
}
],
... STATS
},
.. MORE TOURS
]
}Conclusion
In conclusion, the HERE Tour Planning stop base duration feature provides greater control over total service times. Whether you're managing a diverse fleet or cases with many activities at one stop, this feature allows for more accurate planning.
Updated 28 days ago