Search for content

Locations, Transport and Stops

With the Route Optimisation service, you use locations with exact map coordinates that are either meant for carrying out a transport (pickup and delivery of transport goods) or for locating vehicles. Pickups and/or deliveries that are carried out at the same location are grouped into stops.

Locations

Every location contains exact map coordinates. In addition, more specific attributes like opening intervals or a specific location access type can be specified. Multiple locations at a single coordinate should only be used if it cannot be avoided, e.g. due to different opening intervals for different transport. A location can either be meant for carrying out a transport (pickup or delivery) or for locating vehicles. The Route Optimisation service distinguishes two types of locations, customer locations and depot locations.

Customer and depot locations

Customer locations are locations with further attributes such as specifying a first/last customer stop at that location. In contrast, depot locations act as trip delimiters within routes. As such, goods are usually only allowed to be picked up at a depot location if the vehicle is empty. And goods are usually only allowed to be delivered at a depot location if the vehicle will become empty again. However, consecutive depot stops are one exception.

The characteristics read as follows:

  • Goods may only be picked up at a depot location if no customer location was visited since the vehicle was empty for the last time.
  • Once some goods are delivered at a depot location, goods may only be delivered and only at the depot location until the vehicle is empty again.

Note: In this context, "empty" does not only mean that there is no load on the vehicle, but also that there is no open transport (e.g. without any specified quantities). For more details on trips, see Routes and Trips.

 

"locations": [
  {
    "id": "Depot",
    "type": "DEPOT",
    "latitude": 49.60804,
    "longitude": 6.113033,
    "openingIntervals": [
      {
        "start": "2020-12-06T08:00:00+00:00",
        "end": "2020-12-06T18:00:00+00:00"
      }
    ]
  },
  {
    "id": "Customer",
    "type": "CUSTOMER",
    "latitude": 49.609597,
    "longitude": 6.097412,
    "openingIntervals": [
      {
        "start": "2020-12-06T10:00:00+00:00",
        "end": "2020-12-06T10:00:10+00:00"
      }
    ]
  }
]

Location Access Types

The Route Optimisation API supports different location access types and attributes in order to support different use cases.

By choosing the appropriate location access type the routes will actually reach the location off the road or stop on the road close to the location.

Off-road locations

The pickup from or delivery to an off-road location is at the given location, and the distance to the match point on the nearest possible road will be included in the route. The travel time for this part is calculated using an average vehicle-specific speed.

This location access type should be used when transports to and from this location are to be serviced at the front door rather than at the road, for example for delivery services.

Off-road locations

 

"locations": [
  {
    "id": "Depot",
    "type": "DEPOT",
    "latitude": 49.60804,
    "longitude": 6.113033,
    "includeLastMeters": true
    ]
  },
  {
    "id": "Customer",
    "type": "CUSTOMER",
    "latitude": 49.609597,
    "longitude": 6.097412,
    "includeLastMeters": true
  }
]

For several exact addresses with street and house number, the Geocoding API provides an additional roadAccessPosition which is on the road from which the house can be accessed. This is not necessarily the nearest road.

roadAccessPosition

 

"locations": [
  {
    "id": "Depot",
    "type": "DEPOT",
    "latitude": 51.540508,
    "longitude": 0.003530,
    "roadAccess": {
        "latitude": 51.540611,
        "longitude": 0.003830
    },
    "includeLastMeters": true
    ]
  },
  {
    "id": "Customer",
    "type": "CUSTOMER",
    "latitude": 49.609597,
    "longitude": 6.097412,
    "includeLastMeters": true
  }
]

On-road locations

The transport from or to an on-road location starts or ends on the road which is nearest to the given location and which can be used by the selected vehicle.

This location access type should be used when the distance from the given location to the match point on the road is not significant.

On-road locations

 


"locations": [
  {
    "id": "Depot",
    "type": "DEPOT",
    "latitude": 49.60804,
    "longitude": 6.113033,
    "includeLastMeters": false
    ]
  },
  {
    "id": "Customer",
    "type": "CUSTOMER",
    "latitude": 49.609597,
    "longitude": 6.097412,
    "includeLastMeters": false
  }
]

Side of street

In some use cases, the driver shall not cross the street to reach a location, e.g. for safety reasons. Therefore, it is possible to take into account the side of the street of the route location during the calculation, in order to start or arrive on the same side of the road as the location.

without the matchSideOfStreet parameter

 

considering the side of the street at which the destination is located

 

In this example, the first route has been calculated using a delivery location without the matchSideOfStreet parameter. The driver is allowed to cross the street in order to reach the delivery location as fast as possible.

The second route has been calculated considering the side of the street at which the delivery location is located. Therefore, the driver is forbidden to cross the street. The vehicle has to take a detour to be able to reach the delivery location.


"locations": [
  {
    "id": "Depot",
    "type": "DEPOT",
    "latitude": 49.60804,
    "longitude": 6.113033,
    "includeLastMeters": false
    ]
  },
  {
    "id": "Customer",
    "type": "CUSTOMER",
    "latitude": 49.609597,
    "longitude": 6.097412,
    "includeLastMeters": false,
    "matchSideOfStreet": true
  }
]

Transports

A transport is an order to pick transport goods up at one location and deliver them to another location. Additionally transports can specify more specific details like the quantities to be transported, the service times of pickup and delivery or the required equipment.

"transports": [
  {
    "id": "Transport-Depot-Customer",
    "quantities": [
    100
    ],
    "pickupLocationId": "Depot",
    "pickupServiceTime": 60,
    "deliveryLocationId": "Customer",
    "deliveryServiceTime": 60
  }
]

Stops

Stops group subsequent pickup and/or deliveries within a trip that are carried out at the same location.

 

"stops": [
  {
    "locationId": "Depot",
    "tripId": "trip0",
    "pickupIds": [
      "Transport-Depot-Customer"
    ]
  },
  {
    "locationId": "Customer",
    "tripId": "trip0",
    "deliveryIds": [
      "Transport-Depot-Customer"
    ],
    "pickupIds": [
      "Transport-Customer-Depot"
    ]
  },
  {
    "locationId": "Depot",
    "tripId": "trip0",
    "deliveryIds": [
      "Transport-Customer-Depot"
    ]
  }
]

 

If there is more than one pickup/delivery at the same customer location, they are grouped to one stop and scheduled in order of their type, i.e. the delivery takes place before the pickup.

If there is more than one pick-up/delivery at the same depot location, all deliveries are grouped to one stop and all pickups are grouped to another stop. These two stops will be part of two different trips - for more details on valid trip structures, see Routes and Trips.

 

"stops": [
  {
    "locationId": "Customer",
    "tripId": "trip0",
    "pickupIds": [
      "Transport-Customer-Depot"
    ]
  },
  {
    "locationId": "Depot",
    "tripId": "trip0",
    "deliveryIds": [
      "Transport-Customer-Depot"
    ]
  },
  {
    "locationId": "Depot",
    "tripId": "trip1",
    "pickupIds": [
      "Transport-Depot-Customer"
    ]
  },
  {
    "locationId": "Customer",
    "tripId": "trip1",
    "deliveryIds": [
      "Transport-Depot-Customer"
    ]
  }
]

 

The sequence of multiple pick-ups or deliveries at a stop will be sorted by Last In - First Out (LIFO). The order is dependent on the position of the corresponding pick-up/delivery of the transport within the trip: If a pickup p1 is in front of another pickup p2 at the same stop, the corresponding delivery d2 is scheduled before d1.

Opening intervals of locations hold stop-wise, i.e. just the first pickup or delivery of a stop has to start within some interval of a location.