Search for content

Locations, Transports and Stops

With the Sequence Optimization 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 a vehicle. 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 transports. A location can either be meant for carrying out a transport (pickup or delivery) or for locating a vehicle. The Sequence Optimization 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 delimiters of the route. As such, goods are usually only allowed to be picked up at a depot location at the beginning of the route when the vehicle is empty. And goods are usually only allowed to be delivered at a depot location at the end of the route when the vehicle will be empty afterwards. However, consecutive depot stops are one exception.

The characteristics reads as follows:

  • Goods may only be picked up at a depot location if nothing was picked up at a customer location before and nothing was delivered anywhere yet.
  • Once some goods are delivered at a depot location, goods may only be delivered and only at depot locations until the end of the route.

 

"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 Sequence Optimization API supports different location access types and attributes in order to support different use cases.

By choosing the appropriate location access type the route 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 that 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 or the service times of pickup and delivery.

 

"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 route that are carried out at the same location. 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. At a depot location, there can only be pickups or deliveries, never both types.

 

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

 

The sequence of multiple pickups or deliveries at a stop will be sorted by Last In - First Out (LIFO). The order is dependent on the position of the corresponding pickup/delivery of the transports within the route, i.e, if a pickup p1 is in front of another pickup p2 at the same stop, the corresponding delivery d2 is scheduled before delivery 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.