Search for content

Service Times

All transports have a service time for the pickup and the delivery task. Each task is different: Large or heavy items may require a longer time to load and unload. Transports that require extensive load securing will also take longer to execute. Also, the conditions at a location might require additional time for service. These times are taken into account when considering the time profile of a route.

Pickup or delivery service times can be specified within a transport. Additional service times can be specified at locations. The input integer is always interpreted as seconds. Relevant service times are summed up along the route to get the overall service time. 

Why are service times relevant to the optimization? 

Service times are necessary to be modeled if the duration spent at locations are non-negligible. If, for example, a driver will have to spend an hour unloading goods at a location and this time is not supplied for the route planning, the driver might actually have to violate the working time directives in order to execute the optimized route.

Example

Regard the following two locations and transports.

"locations": [
  {
    "id": "Depot",
    "type": "DEPOT",
    "latitude": 49.60804,
    "longitude": 6.113033,
    "depotLocationAttributes": {
      "serviceTimePerPickupStop": 3600
    }
  },
  {
    "id": "Customer",
    "type": "CUSTOMER",
    "latitude": 49.609597,
    "longitude": 6.097412,
    "customerLocationAttributes": {
      "serviceTimePerTransportStop": 60
    }
  }
]
"transports": [
  {
    "id": "Transport-Depot-Customer",
    "pickupLocationId": "Depot",
    "pickupServiceTime": 60,
    "deliveryLocationId": "Customer",
    "deliveryServiceTime": 120
  },
  {
    "id": "Transport-Customer-Depot",
    "pickupLocationId": "Customer",
    "pickupServiceTime": 120,
    "deliveryLocationId": "Depot",
    "deliveryServiceTime": 60
  }
]

If these transports are planned into a route in the following intuitive way,

"route": [
  {
    "locationId": "Depot",
    "deliveryIds": [],
    "pickupIds": ["Transport-Depot-Customer"]
  },
  {
    "locationId": "Customer",
    "deliveryIds": ["Transport-Depot-Customer"],
    "pickupIds": ["Transport-Customer-Depot"]
  },
  {
     "locationId": "Depot",
     "deliveryIds": ["Transport-Customer-Depot"],
     "pickupIds": []
  }
]

the resulting overall service time of the route is one hour and seven minutes:

  • At the first stop there is one hour of serviceTimePerPickupStop and an additional minute pickup of the transport "Transport-Depot-Customer".
  • At the second stop there is one minute of serviceTimePerTransportStop, two minutes for the delivery of the transport "Transport-Depot-Customer", and two minutes for the pickup of the transport "Transport-Customer-Depot".
  • At the third and final stop there is only the one minute of service time for the delivery of the transport "Transport-Customer-Depot". Note that the not supplied serviceTimePerDeliveryStop at the depot defaults to zero seconds.