Skip to main content
APIs 3 min read

How can fleet tours be optimized for geographic territories?

Tour Planning - Territory Optimization

Tour Planning generates the most optimal route for the given delivery and pickup jobs while considering several restrictions with delivery time windows, vehicle capacity, start and end of shifts, multi-depot pickup, etc. In a previous blog post, we discussed about how to build the problem and get the solution or sequence of jobs with HERE Tour Planning API.

In this blog post, we will check the Territories Optimization feature with HERE Tour Planning. Many transport companies operate in a mode where the driver-vehicle combination serves a certain geographic area. These areas or territories can be divided by distribution network, by regulations, by business constraints, to retain a strong customer relationship or for other reasons. With HERE Tour Planning, territories are used to define spatial restrictions on the delivery and pickup jobs, such as, if a vehicle is allowed to enter a certain area, or what the preferred or prioritized areas are.  

Building the Vehicle Routing Problem with Territories Optimization

In the problem, the user can define and refer to each territory by its "id". This "id" is used in both job and vehicle definitions. Territories are defined within the vehicle or fleet definition, e.g.:

Copied
        "fleet": {
    "types": [
      {
         "id": "van1",
	     ...
         "territories": {
         "items": [
            {   "id": "Central" }
          ],
          "strict": false
         }
      }
   ]
}

  

These territories are then referred to in the job definition, e.g.:

Copied
        "plan": {
    "jobs": [
      {
        "id": "job_a",
        "tasks": {
		. . .          
                  "territoryIds": [ "Central"]
                }
       . . . 
     }
  ]
}

  

Let’s work through an example to understand how vehicle territories can affect the route plan. I will start with a list of 6 delivery jobs. Each job has a territory assigned, and the lat/long.

Tour Planning - Delivery Jobs list

1. Exclusive Territories have the value of “strict” is set to “true”. That means the vehicle or groups of vehicles are strictly restricted to executing jobs that lie in this territory. In this case, Job C in the South remains unassigned as the 2 available vehicles are strictly assigned to Central and East territories respectively.

Tour Planning - Exclusive Territories

2. In case of Preferred Territories, the value for “strict” is set to “false”. This is not as restrictive. The dispatcher prefers the vehicle to operate in specified territory for efficiency reasons, but if there is spare time and capacity, the vehicle can be assigned jobs outside this territory.

Tour Planning - Preferred Territories

3. For more fine-grained control on vehicle-job sequence, the territories can be Prioritized. In this case, a vehicle can be assigned several territories with differing priorities.

Tour Planning - Prioritized Territories

Territories optimization is a powerful feature, giving the fleet managers fine-grained control on areas that the vehicles can serve. Refer to the developer guide for detailed explanation. 

Check out how active logistics is using Tour Planning to modernize their fleet.  Feel free to reach out to us on twitter at @heredev or on our Slack channel. We are excited to see how you are using HERE Tour Planning. 

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