Skip to main content
5 min read

Improving Dispatch Efficiency with Vehicle-Dependent Stop Base Duration in HERE Tour Planning

HERE Tour planning - stop base duration

Introduction

HERE Tour Planning allows you to dynamically optimize routes for multiple vehicles visiting a set of locations given real-life constraints. Last week, we added a new capability – Stop Base Duration. Dispatchers now have greater control over the total service time by setting stop durations based on the vehicle type and managing multiple tasks at the same location. In this blog post, we will delve into the details of this newly added feature and explore how it helps logistics professionals with more granular control and optimization.

Stop Base Duration

Stop base duration allows the dispatchers to set the service time based on the vehicle type. 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: 

  1. Heterogeneous Fleet Routing

    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 different stopBaseDuration for different vehicles, and it will get added once to each stop that has at least one pickup or delivery.

  2. Multiple jobs at same location

    When there are multiple jobs to be performed at a stop, e.g., picking up five packages from the same location, dispatchers can use stop base duration to define a common duration that remains the same at every stop. At the individual job duration, 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.

 

Total duration at a stop = vehicle stop base duration + sum of individual activity duration at that stop

Example

In the following Tour Planning problem, there are two types of fleet - car and truck. 

Notice the stopBaseDuration parameter for car and for truck, which is the base time needed for the vehicle at one stop. Car needs 20 mins at every stop to park, prepare to load/unload, enter the facility, etc. For the same tasks, a truck would need an hour at every stop.

Vehicle Routing Problem
Copied
        {
 "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, let's 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 is 1 hour 25 mins. From the end and start time for each activity, we can see the time needed to execute each job is 5 mins, or 300 seconds as defined in the problem above.

Total service time at this stop = Stop base duration for "Truck" (i.e, 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 mins.

Copied
        {
  "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, HERE Tour Planning's new stop base duration feature provides greater control over total service times. Whether you're managing a diverse fleet or complex stop clusters, this feature allows for more accurate planning. Start using this feature and share your experience with us on our Slack channel. We would love to hear how this benefits your business!
 

Mohini Todkari

Mohini Todkari

Sr. Developer Evangelist

Have your say

Sign up for our newsletter

Why sign up:

  • Latest offers and discounts
  • Tailored content delivered weekly
  • Exclusive events
  • One click to unsubscribe