Search for content

Vehicles

Without a vehicle, nothing can be transported. This is why an optimization request is required to contain at least one vehicle. They can be customized in various ways by specifying a routing profile, enforcing constraints and defining costs. While vehicle characteristics, like its maximum load, can be specified, driver-specific properties, such as break settings, are also considered parameters of the vehicle.

The optimization will assign routes to your vehicles in such a way that costs are minimized while satisfying the required constraints. Every vehicle can be assigned at most one route and every route is scheduled to be executed by a single vehicle.

Start and end

When a vehicle is assigned a route, the vehicle defines where and when the route can start and end. A vehicle has a fixed start and end location along with a time frame in which the vehicle can be used. This window is defined by the earliest start and the latest end time, with the option to include a latest start time.

Routing

The routing properties of a vehicle define how a vehicle drives from one location to another. Some vehicles go faster than others and some roads may not be accessible to certain vehicles.

The information necessary to calculate driving durations and distances is collected in a profile. This parameter is explained in more detail on a separate concept page about profiles and countries.

Due to restrictions such as weight and height limits, a vehicle may be prohibited from accessing certain road segments, which could prevent it from reaching its destination. By default, the system allows the vehicle to violate the restrictions in its routing profile if no alternative route is available. However, this behavior can be disabled, which may result in the vehicle being unable to reach its destination, requiring the optimization process to assign a different vehicle with a suitable profile to complete the tasks at that location.

Apart from the profile, a speed factor can be used to further tweak the time required to drive from one location to another. 

Example

A speed factor of 2, applied to a van, means that the van drives twice as fast, effectively halving the driving durations.

"routing": {
  "profile": "EUR_VAN",
  "speedFactor": 2
}

Costs

Assigning a route to vehicle results in a cost, which the optimization process aims to minimize. This cost consists of different components.

  • Cost per hour - Specifies the cost for each hour a vehicle is deployed, applied accurately down to a second.
  • Cost per kilometer - Specifies the cost for the distance a vehicle drives, applied accurately down to a meter.
  • Fixed cost - Specifies the cost for the vehicle to be deployed. This cost is applied exactly once if the vehicle is assigned a route by the optimization.

Example

Given a route with a duration of 8.5 hours and a travel distance of 200 kilometers, assigned to a vehicle with the following cost properties.

"costs": {
  "perHour": 40,
  "perKilometer": 0.42,
  "fixed": 50
}

This route would then have a duration cost of 340, a distance cost of 84 and a fixed cost of 50, resulting a total cost of 474.

Break settings

A vehicle can specify restrictions that define when a driver needs to take a break. A break should be scheduled after a maximum driving or working duration.

  • Driving duration — The amount of time the vehicle is driving between two locations.
  • Working duration — The amount of time the vehicle is deployed and the driver is not waiting or taking a break.

Break settings define how long the driver of a vehicle can work or drive before a break of at least a certain duration should be scheduled. A single break can fulfill the requirements of multiple break settings.  

Example

If a break of at least 30 minutes should be taken every 6 hours of working, the working duration between two consecutive breaks of at least 30 minutes should not exceed 6 hours. If, additionally, a break of at least 45 minutes should be taken every 4.5 hours of driving, a single break of 45 minutes is sufficient to satisfy the break settings in a route where the driver works 7 hours and drives 5 hours.

A simplified version of the EU regulation (regulation (EC) No 561/2006) for a single working day can be modeled with 3 break settings.

"breaks" : {
  "working" : [
    {
      "maximumWorkingDuration" : 21600,
      "minimumBreakDuration": 1800
    },
    {
      "maximumWorkingDuration": 32400
      "minimumBreakDuration": 2700
    }
  ],
  "driving" : [
    {
      "maximumDrivingDuration" : 16200,
      "minimumBreakDuration": 2700
    }
  ]
}

The US regulation for a single working day can be modeled with a single break setting.

"breaks" : {
  "driving" : [
    {
      "maximumDrivingDuration" : 28800,
      "minimumBreakDuration": 1800
    }
  ]
}

Constraints

A vehicle and its driver have limitations that should be respected by the optimization.

  • Maximum loads — Defines the maximum loads a vehicle can transport. While one order alone may fit on a vehicle, a combination of orders may not fit. You can specify the capacity of a vehicle for multiple dimensions such as weight, volume or pallets. The optimization will make sure that the order combination loaded onto the vehicle will never exceed the capacity of the vehicle for each dimension.
  • Maximum duration — Defines the maximum duration of a route that can be assigned to the vehicle. This can be used to limit the duration of a driver’s working day, according to governmental regulations.
  • Maximum distance — Defines the maximum distance of a route that can be assigned to the vehicle. This is especially relevant for electric vehicles that only have a limited range.

Categories

Certain constraints are not only specific to the vehicle but entail different entities such as orders or depots. These constraints are typically expressed based on categories, which are often functional properties of the vehicle itself. Examples of categories might be whether or not a vehicle can be cooled, the region it can be deployed or any other essential property associated with the vehicle.