Search for content


The primary objective of the optimization is to effectively allocate tasks to routes. As such, a route is a sequence of tasks, assigned to a vehicle. The efficiency of routes is gauged by metrics such as the total drive duration, the count of scheduled orders, and the associated cost. The optimization strives to minimize the overall cost of the routes.

Start and end

At the start of the route, vehicles initiate their journey from a designated point known as the start location of the vehicle. Here, all necessary preparations happen before stops can be visited. As the route progresses, various stops for pickups and deliveries are executed according to the optimized schedule. After the last stop, the vehicle proceeds to its end location and carries out its final activities, marking the end of the route.

Note that no pickup or delivery tasks are executed at the start and end of the route. These tasks are captured in the stops of the route, which may take place at the start or end location of the vehicle.


A stop denotes the visit of a location for the purpose of executing a pickup or delivery. As neither pickups nor deliveries are carried out at the start or end of a route, these are not classified as stops. Nevertheless, there is a possibility that the initial stop of a route takes place at the start location of the vehicle, or the final stop occurs at the vehicle's end location. A stop is characterized by several noticeable properties.

  • An approach describes the segment or leg of the route since the preceding stop. It includes information such as driving duration, distance traveled and breaks that take place between the two consecutive stops.
  • A stop’s preparation duration is a period of time, scheduled before planned appointments. It reflects the preparation duration as defined on the corresponding location. This is not influenced by the tasks scheduled for execution at this stop.
  • The appointments associated with a stop encapsulate its vital information, detailing the tasks scheduled and their respective timing restrictions. An appointment is a sequential arrangement of tasks coordinated with the same time slot.


An appointment involves a consecutive series of tasks at a stop scheduled with the same time slot. The start of the appointment is limited by the time slot. The optimization will schedule appointments such that their start lies within the earliest start and latest start of the appointment’s time slot. This can result in a waiting duration before the appointment's start, in case the driver has to wait for the earliest start of the time slot. Two main activities take place during an appointment.

  • An appointment’s preparation duration, defined by the time slot's preparation duration, is a period of time that is scheduled before tasks are executed. Note that the appointment’s preparation duration is scheduled after the start of the appointment, while the stop’s preparation duration is scheduled before the start of the first appointment at the stop.
  • The optimization schedules an appointment at a stop to carry out pickup or delivery tasks. As long as the start of the appointment falls within the limits specified by its time slot, any number of tasks can be executed within this appointment, provided the time slot aligns with the requirements of the task. When the last task of the appointment is executed, the appointment ends. The end of the appointment must not be later than the latest end time defined by the time slot.



Below is an example of a time slot that can be used to schedule an appointment with a preparation duration of 1 hour.

"timeSlots": [
                    "id": "NOON",
                    "earliestStart": "2023-01-01T12:00:00+01:00",
                    "latestStart": "2023-01-01T12:00:00+01:00",
                    "latestEnd": "2023-01-01T14:00:00+01:00",
                    "preparationDuration": 3600

The start of the appointment must adhere the constraints set by the time slot. For instance, if the time slot above is used to arrange an appointment, the preparation duration of the stop, when defined, will be scheduled before noon. The appointment’s preparations will be scheduled to start exactly at noon and the start of the first task’s execution will be scheduled at one o’clock. Any number of tasks can be assigned to this appointment as long as the task allows for the time slot to be used and as long as the last task ends before 2 o’clock.


For every order present in the optimization request, the algorithm tries to schedule the pickup and delivery of the order on a route. Depending on the order type, these tasks can take place either at a depot or an order-specific location. In case the task is executed at a depot, it will reference the depot selected by the optimization.


The optimization tries to minimize the total cost of the routes. This cost is computed based on the cost per hour, cost per kilometer and fixed cost of the vehicle assigned to the route. The cost of the individual route, together with other specific aspects of the route such as the covered distance, the duration of the route and the number of stops visited are provided in the metrics of the route.


The structure of scheduled tasks depends on the order types present in the optimization request. Besides the default constraints on the route structure explained below, additional constraints can also be defined manually. Both of these constraints are taken into account when scheduling tasks on routes.

Depot visits

Upon arrival at a depot, all orders present in the vehicle must be unloaded first. Orders are delivered at the depot in the opposite order they were picked up. Similarly, orders are picked up at the depot in the opposite order their delivery will be scheduled. Specifically, this implies that there will be a moment during a depot visit when the vehicle is completely empty.


The Last In, First Out (LIFO) rule applies separately to pickup and to delivery orders. Within pickup orders, the last item acquired is delivered first, and the same principle applies within delivery orders.


However, the combination of a pickup order and a delivery order might not adhere to this principle. More precisely, pickup orders may already be picked up before all deliveries are completed.


Pickup-delivery orders

For pickup-delivery orders, the Last In, First Out (LIFO) principle dictates that the most recently picked-up item must be delivered before anything previously present in the vehicle, ensuring the immediate delivery of the latest item acquired.