OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
Optimal food delivery operation plan with periodic delivery and multi vehicle routing with time windows
1. Optimize Food Delivery Operation Plan with
Periodical Delivery and Multi Vehicle Routing with
Time Window
Xiyuan Ren, Weili He, Mingyi He
TR-GY 7013 course project
3. ● Jardine Restaurant Group (JRG) Hong Kong operates the Pizza Hut, PHD and
KFC franchise in Hong Kong and Macao with combined store footprint of over 200
stores.
● Currently, more than 60% orders are delivered and this number is growing during
the COVID-19 epidemic.
● However, JRG have about 3-7 riders in each store, and riders only serve for
orders in their own stores. In peak-hour, ready-to-be-delivered order could wait a
long time in a store running out of riders, while meanwhile riders at nearby stores
are available.
Introduction — Background
5. Introduction — Data Used
1) From June to September 2020
2) 147,507 records after cleansing
3) 62 KFC stores, 104 Pizza Hut
stores, 36 PHD stores.
6. System Design — benchmark system description
Use case diagram for benchmark system
“Incomplete and Irrational”
Benchmark system:
● Most of the orders are delivered one to
one by riders of each store, each
delivery cost the store 9$.
● Rider-sharing occurs infrequently and
spontaneously.
Current rider-sharing rate is low
Current rider-sharing isn’t well-organized
7. System Design — alternative system
Alternative system:
● A new platform to generate
organized rider-sharing scheme.
● Provide 3rd party riders when
stores are running out of their
own riders.
● Consider rider-sharing in peak-
hour when one-to-one
assignment leads to long waiting
time.
Use case diagram for alternative system
“Rider-sharing Platform”
8. System Design — objective
In order to ...
1. Decrease customers’ total waiting time for food delivery
2. Increase rider-sharing rate to save labor costs for stores
3. Decrease the wasted travel distance for riders
Provide food delivery rider-sharing schemes
9. Scenario 1— rider-sharing within the same store
Order 1
KFC
PHD
Pizza Hut
Residential
Order 2
Order 3
Order 4
Original delivery route
Ridesharing delivery route
Order 1&2, 3&4 can be delivered together
within the time window
10. Scenario 2— sharing between two adjacent stores
Order 3
Order 4
Order 1
KFC
PHD
Pizza Hut
Residential
Original delivery route
Ridesharing delivery route
Order 1&4, 2&3 can be combined within the
time window, while Order 1&3 cannot
Order 2
11. System Design — KPI comparison for systems
Table. System Validation
Average
waiting time
Number of
shared orders
Average
delivery
duration
Number of 3rd
party riders
Number of
Deliveries
Benchmark — — — — —
Scenario 1&2
5min / 55min
? —
Scenario 1&2
3min / 45min
?
Scenario 1&2
1min / --
?
15. Methodology
2. Main Model Settings
● We set the scheduling period as 1min/ 3min/ 5min and run the model to solve the pickup and delivery
courier routing problem using the data inside this period. It’s can actually satisfy the dynamic routing given
the solving period.
● After specifying the constraints, we use OR-Tools[1] VRP package to solve the problem. For the first
strategy, "PATH CHEAPEST ARC" method is used. The method starts from a route "start" node, connects
it to the node which produces the cheapest route segment, then extends the route by iterating on the last
node added to the route.
● Then we use default local search strategy Greedy Descent to do the further searching. Greedy Descent is
a strategy accepting cost-reducing local search neighbors until a local minimum is reached.
[1]https://developers.google.com/optimization/routing/routing_options.
16. Data Description
● Data Source: Jardine Restaurant Group Hong
Kong, 1st June to 30th September
● 62 KFC stores, 104 Pizza Hut stores, 36 PHD
stores.
● Info contains store address, delivery address,
order generation time, delivery assign time,
rider arrival time, rider departure time and
order complete time
● Records from 06/29/2020 - 07/04/2020 were
selected for analysis and modeling
17. Data Description
Statistics
● Average waiting time 42.0 min (order preparation time 21.3 min + trip duration 20.7 min)
● Estimated waiting time 47.8 min > average actual waiting time 42.0 min
● Peak hour is at 18:00 - 19:00, with 100 orders in 6 days, 19 orders per hour
21. Discussion
1. Lack the timestamp of when orders are prepared, order dispatch time could be
earlier
T1
Range a lot
Job Assign Duration
Job
Assign
Time
T2
~ Ave. 0 min
Rider
Assign
Duration
Rider
Assign
Time
T3
~ Ave. 5 min
Rider arrive at
stores
Pick Up
Time
T4
~ Ave. 10 min
Rider Go to the
Scooter
Trip Dispatch
Time
T5
~ Ave. 18 min
Rider On the Way
Delivered
Time
T0
Does not matter
User Explore the
Menu
Quote
Time
Food preparation time
22. 2. When to enable periodical delivery?
No order 1 order 2 orders
and above
Discussion
23. Conclusion
1. Converting dynamic routing problem to static, the more jobs in each
assignment, the higher efficiency (less cost in delivery labors).
2. Delayed dispatch time in periodical delivery is not always lead to a later
arrival time.
food delivery is inherently suitable for rider-sharing since before a rider’s departure, there is a long waiting time for order preparation. In this time window, we can keep receiving new orders and calculating combination choices
Maximize number of shard orders within acceptable waiting time
Here we can choose two to compare the result and running efficiency, for heuristic, generally we have genetic algorithm, tabu search, simulated annealing
Here we can choose two to compare the result and running efficiency, for heuristic, generally we have genetic algorithm, tabu search, simulated annealing
Here we can choose two to compare the result and running efficiency, for heuristic, generally we have genetic algorithm, tabu search, simulated annealing
Here we can choose two to compare the result and running efficiency, for heuristic, generally we have genetic algorithm, tabu search, simulated annealing
Here we can choose two to compare the result and running efficiency, for heuristic, generally we have genetic algorithm, tabu search, simulated annealing
Here we can choose two to compare the result and running efficiency, for heuristic, generally we have genetic algorithm, tabu search, simulated annealing
Basically, the more rigorous operation plan requires more labor but customers, of course, gonna have a shorter waiting time. It is a little surprising that in the 1 min, no time window operation plan, we still have approximately 20% orders are delivered in shared trips, as routes of orders could be totally overlapped, and we ignored the dropoff time in each order.
In scenario 2, the greatest improvement is no extra 3rd party riders are needed in all operation plans. And average waiting time from each operation plan are shorter comparing to scenario 1. But scenario 2 might cause a higher management cost as it requires two stores using the same delivery management system.
Here are two plots for number of orders per trip in different scenario and operation plan. The max number of orders in one trip is 4 in scenario 1, and 5 in scenario 2.
We have some problem cannot be solved in this project. The first one, in fact, the order dispatch time could be early. As we discussed it before, currently, the lateness might be caused by lack of available riders, so the order cannot be delivered until a rider came back. Or due to unwisely ridesharing plan, an order have to wait a long time find a shareable order. From the dataset provided by JRG, we could know when did a rider arrive at a store to pick up, and when did the rider left, but the time when an order is ready to go could be anytime from T3 to T5. So in a nutshell, we believe our design could have a better performance in reality.
In our simulation, periodical delivery method is no always enabled. When the order volume is sparse, we just deliver orders immediately as it is unlikely to find a shareable order in a short time. However, the problem is, when to enable periodical delivery. This plot shows the order volume in every 5 minutes, grey means no order, yellow means only one order, red means multiple orders. It is clear that the peak of order volume is not the same in each day. In the future, prediction algorithms like ARIMA could be implemented to predicted when to enable periodical delivery to decrease meaningless waiting time.