## Tuesday, March 22, 2022

### Recalculation of Delivery Time Forecast in Logistics Software

At the moment, our service recalculates the forecast several times during the entire order life cycle. The auto-assignment service can assign the next order to a courier if the previous order has not yet been delivered. Thus, the forecast will be recalculated at several stages:

• when the courier picks up the previous order from the restaurant;
• when the courier delivers the previous order;
• when the courier picks up the current order from the restaurant.

Accordingly, the recalculations for the chain of orders will be similar.

### What does it give us?

At a minimum, we adjust the initial forecast so that the client knows if the courier is delayed somewhere or, conversely, will be earlier than the original forecast.

If the restaurant can cook before the courier arrives, then the restaurant can calculate the time by which the order needs to be prepared so that it does not cool down.

### Current Route Prediction Algorithm

When an order is created in the system, it has a fallback forecast, the same happens in case of unforeseen situations. After creating an order, the client sees exactly the “default” time. Next, the auto-assignment service selects a suitable courier, and after assigning it, we have a sufficient set of data to calculate the forecast:

• distance and time between the coordinates of the courier and the restaurant;
• distance and time between the coordinates of the restaurant and the client;
• type of courier movement;
• restaurant ID.

With this data, we can predict:

• what time the courier will be in the restaurant depending on the type of his movement;
• what time the restaurant should prepare the order;
• what time the courier will be with the client.

In our calculation, we take into account several factors:

the status of the courier regarding the current order, since at the time of appointment the courier may be finishing the previous order;

average cooking time for a restaurant;

parking and exit coefficients from the restaurant and the client, if we are talking about a courier in a car or, for example, a cyclist;

average time of transfer of the order to the client.

### Recalculation of Delivery Time Forecast in Logistics Software

At the moment, our service recalculates the forecast several times during the entire order life cycle. The auto-assignment service can assig...