On-demand delivery is an industry that is growing at very high speed. There are new companies appearing every day, especially in the food & beverage and fresh delivery market. And the competition is wild. Efficiency is a key metric in the era of "I want it all and I want it now" and the most critical part is what happens since a new order is placed until it gets delivered.

Whip pan shot to get a nice motion blur behind the subject!

If you use this photo or like it, check out my Instagram @OnlyBrett leave a comment on how you used and be sure to follow for more City photography!
Photo by Brett Jordan / Unsplash

Today I want to focus on the problem of dispatching new orders, i.e. how to decide which is the courier the order should be assigned to when one order enters the system. This is because dispatching nowadays is not addressed systematically. Optimizing the dispatching system may minimize the delivery time and improve customer satisfaction.

The operational paradigm of the companies that do on-demand delivery can be divided into two different types:

  1. Single depot based deliveries are those operatives centred in one depot. This depot has multiple couriers and the scheduling is performed once for a list of orders; usually grouping the orders by areas. Amazon Prime is a good example of this operational paradigm.
  2. Multiple depot based deliveries are those operatives that rely on picking the order in one of the multiple depots and deliver it to a customer. In this case, couriers are scattered around the city, and once a new order arrives it is assigned by a dispatching process to one of the multiple couriers. Companies such as Uber, Uber Eats, Delivero, etc. operate this way.

The problem of dispatching is solved more or less successfully in the first scenario, due to the possibility of chaining a list of deliveries and treating it just like a common Traveling Salesman Problem with some pre-clustering constraints (OK, I know that TSP it's a really expensive problem, but... come on, it's Amazon).

Contrary in the second scenario is not that clear that the problem is addressed in an optimal way. How can a new incoming order be added to a running scenario? There are tons of variables that must be taken into account:

  • Can the courier perform multiple pickups before start delivering?
  • Can an already assigned order, be reassigned to another courier?
  • Do all the orders have the same priority? (e.g. all orders must be delivered before 30 minutes after being performed)
  • Do the orders require to be delivered by a particular vehicle?
  • ...
Formulas on an old blackboard
Photo by Roman Mager / Unsplash

Modelling this scenario can be quite challenging, and this is why SmartMonkey has been working for a while on this problem. We called our solution Online Scheduling Optimization Model (OSOM) (Yeah, branding isn't one of our strengths 😓, but it phonetically sounds like "awesome" and that's funny enough). OSOM is able to model the business constraints and find a feasible solution to the dispatching problem.

In the simulation offered below, we have modelled a world where

  • a courier can be assigned multiple pickups and deliveries at a time
  • and the first upcoming service of each courier is fixed and cannot be reassigned in the following iterations.

The visualization contains twenty iterations of the world divided into two steps:

  1. New incoming services are marked in grey colour
  2. Services are assigned dynamically to the couriers to optimize the overall delivery time.

Thank you for your time, I hope you enjoyed reading this story. I'll appreciate any feedback or questions you have.