Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Send More Riders
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
peteowlett
February 02, 2016
Technology
970
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Send More Riders
Predictive scheduling for an on demand delivery fleet
peteowlett
February 02, 2016
More Decks by peteowlett
See All by peteowlett
Lessons from 6 Months of using Luigi
peteowlett
4
1k
Takeaway Tales
peteowlett
1
230
Other Decks in Technology
See All in Technology
顧客価値を追いかけたら、プライシングにたどり着いた
sansantech
PRO
2
1k
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
0
560
DevelopersIO2026 -バックアップは“消されないこと”が9割-
yoshida0129
0
410
Microsoft のサポート ライフサイクルを理解する
murachiakira
PRO
0
210
「作れる」と「リリースできる」の間にあったもの── PdMを外して見えた、PdMがやるべき仕事/Buildable ≠ Shippable: What Removing the PM Taught Me About the PM’s Job
yappli_developers
0
290
プロダクトが成長すると、 プロダクトマネージャーの仕事はどう変わるのか - 「まず作る」から「小さく学び、確かめながら進む」へ
sansantech
PRO
1
370
ガチで放置できるClaude Code実行環境の作り方.pdf
lamaglama39
5
9.8k
国際カードブランドルール変更に伴うクレジットカード決済取引仕様変更について
k1style
0
240
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
3
1.1k
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
1
440
VLA-JEPA: Enhancing Vision-Language-Action Models with Latent World Models
takmin
0
330
Deep Data Security 機能解説
oracle4engineer
PRO
3
940
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.9k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
560
Balancing Empowerment & Direction
lara
6
1.3k
A Soul's Torment
seathinner
8
3.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Transcript
Send More Riders! Predictive scheduling for an on demand delivery
fleet @PeterOwlett
High quality food, delivered fast and on demand
None
Life of an order
Life of an order
Utilisation % Hour of Day (Colour = Day of Week)
We need enough drivers to deliver on time, but not
so many we lose money
•Restaurants take longer than expected to make food •Items get
missed - we have to go back and get them •Drivers become unavailable (flat tyre etc) •Customers hard to find It gets harder …
Exam question How many drivers should we schedule for the
next two weeks in each part of London over 15 minute blocks?
Before we dive in - a quick apology
Lets formulate! Where • O is orders • d is
date • z is zone
Forecasting Daily Volume
This book is awesome And Free!!! - https://www.otexts.org/fpp
Forecasting Daily Volume
None
Statsmodels supports this out of the box Forecasting Daily Volume
# Decompose the raw time series decomposition = sm.tsa.seasonal_decompose(data.values, freq=7) # Extract individual components all_trend = decomposition.trend all_seasonal = decomposition.seasonal all_resid = decomposition.resid
First Results
Holidays (and Weather) Forecasting Daily Volume
Improving the seasonal 50% Improvement!
•Vary the training range •Train on np.log(series) and transform back
Signal in the noise? Looks Seasonal Looks Seasonal Random Noise
Because we can chart each series, we can reason about
how to improve our model
Forecast each component Forecasting Daily Volume # Forecast Trend lm_lin
= LinearRegression().fit(dates, trend_vals) forecast_trend = lm_lin.predict(forecast_window) # Forecast Seasonal seasonal_pattern = np.tile(base_seasonal_pattern, math.ceil(days_to_forecast / 7.0)) forecast_seasonal = seasonal_pattern[0: days_to_forecast]
Forecasting Daily Volume
Where • O is orders • D is demand •
E is efficiency • z is zone • d is date • w is weekday • t is time of day Converting Daily Orders to Driver Hours
Zero to One Scale - neat trick Estimating Demand Curves
scaled_series = df_mean_curves.order_volume / df_mean_curves.groupby(['zone', ‘day_of_week’])\ .transform(np.sum).order_volume
Estimating Demand Curves Ratio of daily orders per unit time
Hour of Day
Efficiency Orders per driver per hour Hour of Day
Final Forecast
Getting the forecast out into the real world
Volumes to Shifts
Deployment
SUCCESS!!!
1. While not as powerful as R, Statsmodels does give
you core time series tools 2. Seasonal decomposition is very meaningful to human beings 3. By using all python, we were able to ship quickly Stuff we learned
Thanks!