Picnic forecasts deliveries per hub to schedule drivers
Online supermarket Picnic forecasts the deliveries of each hub and daypart with a transformer model, so that hubs and warehouses can schedule staff, and rebuilt the forecast so every change can be backtested.
PicnicNetherlands and Germany (About 80 delivery hubs in the Netherlands, and hubs in Germany)GroceryIn production
- Scale
- 80 hubs in the Netherlands, forecasts per hub and daypart up to 14 days ahead
- Scenario
- Home delivery volume forecasting
- Business function
- Supply chain and logistics
- Kind of solution
- Forecasting and planning
- Who built it
- Built in-house
- Human oversight
- Acts under watch
- Organization
- Enterprise
- AI types
- Machine learning
- Sites
- 80
tl;drOne person per market checks Picnic's delivery forecast, and changes are tested in hours, not weeks.See the results
Picnic, the Dutch online supermarket, forecasts how many customer deliveries each of its hubs will make per daypart, up to 14 days ahead1, 2. Its hubs schedule drivers from the forecast, and its fulfillment centers schedule warehouse staff1.
The forecast runs on a Temporal Fusion Transformer (TFT), a deep learning model for time series, and it updates during the day as customers book orders1, 2. Business and operations teams review it before the delivery plan is final3.
By March 2026, one person per market checked the forecasts for anomalies2. In October 2026, Picnic described a rebuilt forecast that it can backtest, so a change goes from idea to evaluation within hours instead of weeks1.
Before the deployment
Picnic delivers groceries with its own fleet, so every delivery date needs enough drivers, vehicles, and warehouse staff1, 3. The delivery forecast drives capacity planning, staffing, routing, and vehicle allocation2.
- Hundreds of thousands of orders a day flow through dozens of hubs2.
- Analysts corrected the forecast up or down by hand when bookings drifted from the usual pace, and only twice a day so that the work didn’t overwhelm the team2.
- An underforecast plans too little capacity, so Picnic reaches fewer customers3.
- When a hub reaches capacity, Picnic closes the delivery slot, so its order history records capped demand instead of what customers wanted2, 3.
- Picnic’s first demand models were gradient-boosting trees, which couldn’t follow buying habits that changed during COVID-194.
What was built
The solution predicts unconstrained demand per hub, daypart, and date: the deliveries that customers would book if capacity were unlimited1, 2. One model serves both day-ahead planning and the intra-day updates that matter most in the last 48 hours before delivery2. The models, the correction logic, and people divide the work:
- Forecasting model: Learns from past deliveries. It combines static variables such as the hub with future variables such as weekday, holidays, and hub sizes1. Weather forecasts are also an input3.
- Remainder model: Corrects the forecast as orders arrive. It compares the confirmed deliveries with the typical build-up of orders for that hub, weekday, and daypart1.
- Unconstrainer: Rebuilds what demand would have been without slot closures and spillover, which gives the model an unconstrained training target1.
- Business and operations teams: Review the output and adjust it for what the data doesn’t capture, such as a local event or a last-minute promotion3. One person per market checks anomalous or missing forecasts2.
- Hubs and fulfillment centers: Schedule drivers and warehouse staff from the forecast1. The forecast also plans the Customer Success agents3.
Alternatives considered
- Gradient-boosting trees, LSTMs, and DeepAR: Picnic moved from trees to the TFT. Long short-term memory networks (LSTMs) showed no significant improvement, and DeepAR doesn’t take the variety of static and time-varying inputs4.
- Two separate models: Picnic chose one model for both horizons, which means fewer pipelines and forecasts that don’t disagree2.
- Confirmed deliveries as a model input: The earlier TFT took booked orders and the minutes to cutoff as features, so it reacted during the day as the analysts had2. The rebuild removed the feature because it made the model a black box and hard to backtest1.
- A single TFT: In backtests, the Time-Series Dense Encoder (TiDE) performed as well as the more expensive TFT, so the team trains an ensemble of five TiDE models1.
- An average of past curves: The team takes the median, because an early closure flattens a curve and drags down an average1.
Technology and architecture
The forecast has two paths. A training path rebuilds unconstrained demand from history, and a daily path corrects the forecast with each new booking1.
| Layer | What they used | Role | Source |
|---|---|---|---|
| Forecasting model | Temporal Fusion Transformer (TFT) | Predicts deliveries per hub and daypart up to 14 days ahead | 1, 2 |
| Forecasting model | TiDE | Five models train in parallel in the rebuilt forecast, and their forecasts are averaged | 1 |
| Rules and decision logic | Remainder model | Replaces the booked share of the forecast with the actual confirmed deliveries | 1 |
| Data preparation | Unconstrainer | Rebuilds unconstrained demand with non-negative least squares (NNLS) | 1 |
| Framework or library | Pytorch Forecasting | Provided the TFT implementation the team started with | 4 |
| Compute and servers | GPUs | Train the TFT, which takes several hours | 4 |
| Monitoring | Evaluation dashboards | Show backtests next to production predictions and business overrides | 1 |
The TFT predicts a range for each step through quantile regression, instead of one value4. To keep the training set manageable, the team samples five intra-day moments per day, which brings it under 30 million rows2, 4.
Data inputs
- Past deliveries: Deliveries per hub, daypart, and date, which the model learns from1, 2.
- Confirmed deliveries: The orders customers have already placed for a future date1.
- Calendar: Weekday and public holidays, known in advance1, 3.
- Weather forecasts: Rainy and sunny days shift ordering3.
- Hub data: The hub as a static variable and hub sizes as a future variable1.
- Slot closures: When each delivery moment closed, which the unconstrainer uses to rebuild lost and spilled-over demand1, 2.
Integrations
- Customer orders: The remainder model reads the confirmed deliveries for each future delivery moment1.
- Hub driver scheduling: Hubs, where the delivery vehicles depart, schedule drivers from the forecast1.
- Fulfillment center staff scheduling: The warehouses where orders are picked schedule employees from it1.
- Customer Success planning: The forecast also plans the agents who answer customers3.
How one daypart forecast is corrected
The build-up curve is the share of a daypart’s deliveries that is booked at each hour before cutoff. For Monday afternoons in the Haarlem hub, that curve kept a consistent shape all year1. Confirmed deliveries stay as they are, and only the deliveries still to come are predicted as unconstrained1.
Results
| Metric | Before | After | Scope and timeframe | Reported by |
|---|---|---|---|---|
| One-day-ahead forecast error | Not disclosed | 20 to 50% lower on average | TFT with the confirmed deliveries feature, reported March 2026 | Picnic, measured2 |
| People checking anomalous or missing forecasts | Not disclosed | One per market | Production delivery forecast, as of March 2026 | Picnic, measured2 |
| Time from idea to evaluation of a change | Weeks | Within hours | Delivery forecast after the October 2026 rebuild | Picnic, measured1 |
| Accuracy and bias against the old model | TFT with confirmed deliveries | Outperformed the old model | Backtests, rebuilt forecast trained on unconstrained targets, October 2026 | Picnic, backtest1 |
- One-day-ahead error: The figure is the weighted absolute percentage error (WAPE) by forecast horizon, which Picnic credits to the confirmed deliveries feature2.
- Forecast checking: Fewer checkers let more analysts move to other initiatives2.
- Time to evaluate a change: Before the rebuild, a change ran as a shadow deployment for weeks and went live only if it beat production1. Backtests now replay history month by month, several months in parallel1.
- Rebuilt forecast in backtests: Over a full year, the remainder model performed on par with the old TFT. The TiDE ensemble equaled its accuracy, and training on unconstrained targets took another significant percentage off the WAPE beyond a week1.
- Bias: The old model increasingly underforecast as the horizon grew. The new one overshoots slightly, and the unconstrained targets pull it toward zero at long horizons1.
Lessons learned
The confirmed deliveries feature worked in daily use. It improved short-term accuracy, earned the planners’ trust, and automated corrections that analysts made by hand2. Picnic says the feature never had formal testing, and it reads the gain from the model’s error by horizon2.
Under-forecasting persisted, and Picnic calls it its most painful operational error. The model sometimes predicted fewer deliveries than customers had already booked, under-forecast badly after temporary capacity constraints, or predicted close to zero2. When that happens, capacity doesn’t open in time and revenue is lost2.
The feature cost Picnic its backtests. Confirmed deliveries depend on the moment they’re read, so the team often validated the model on a partially synthetic view of history2. It also became harder to tell why a forecast for a week ahead went wrong2.
Training noise hid the real size of improvements. Five identical retrains gave significantly different WAPE, and some improvements shipped after shadow tests fell inside that variation1. The team’s lesson is to measure that noise before trusting an improvement1.
The rebuild was made for control, not accuracy. Picnic didn’t expect the remainder model alone to be more accurate, and its build-up curves still come from constrained history, so they can carry bias1.
All figures are Picnic’s own, from its engineering blog, and the gains of the rebuilt forecast are backtest results1, 2.
Case study scorecard
- 20 to 50% Lower error of the one-day-ahead forecast, on average2
- One per market People needed to check anomalous or missing forecasts2
- Within hours Time from idea to evaluation of a forecast change1
- Outperformed the old model Accuracy and bias of the rebuilt forecast1
Sources by publication date
- Organization 4
- Vendors and partners 1
- Press, academic, and regulators 1
Build this solution yourself
Analysis
What you need
- A log of slot closures: The unconstrainer needs to know when each daypart was closed to rebuild the demand that customers couldn’t book1. Without it, your model learns capped demand as if it were real demand.
- Bookings recorded as they arrive: The remainder model compares confirmed deliveries with a typical build-up curve, and Picnic lost its backtests when it couldn’t replay past booking states1, 2.
- Planners who can override the forecast: Picnic’s teams adjust for local events and promotions that the data doesn’t capture, so your planning process needs a place for that step3.
Reference architecture
Forecasting and planning
A forecasting and planning solution predicts demand, supply, load, or events from history and outside data, and turns the prediction into a plan such as orders, prices, stock positions, reserve, or crews. Each cycle, forecasting models turn fresh data into a forecast, and an optimizer can turn it into a proposed plan within set targets and limits. Planners decide and enter the plan in the operational system, or they steer an automatic plan through targets and overrides.
- Data feeds and connectors
- Data platform
- Data preparation (documented in this case study)
- Forecasting models (documented in this case study)
- Optimizer
- Approval rules (documented in this case study)
- Simulation or digital twin
- Task agents
- Planning workspace
- Operational system
- Training pipeline
- Forecasting and planning platform
A check mark shows a building block that this case study's sources document.
Open the reference architectureOthers who built it
- Ampère: Forecasts the pickup volume of each merchant partner with its QAVE model to plan truck capacity, in continuous use since September 20245.
- DHL Express: A National University of Singapore student team built a blended forecasting model, run as a Flask application on the DHL Express intranet, to plan courier hours6.
In the library
- AI agents draft production plans at Siemens' Erlangen plant Siemens
- Walmart plans inventory with AI forecasts and a digital twin Walmart
- Albertsons puts AI replenishment in every fresh department Albertsons Companies
- De Rooy predicts unplanned pickups with machine learning De Rooy Transport
- AstraZeneca calibrates transit lead times with Aera's AI AstraZeneca
- LNER's machine learning tool flags trains at risk of delay LNER
Cite this case study
Enterprise AI Case Studies. "Picnic forecasts deliveries per hub to schedule drivers." Updated Nov 21, 2026. https://case-studies.ai/case-studies/supply-chain-and-logistics/SC-035-delivery-volume-forecasting-picnic/
@misc{csai-sc-035,
author = {{Enterprise AI Case Studies}},
title = {{Picnic forecasts deliveries per hub to schedule drivers}},
year = {2026},
note = {Updated 2026-11-21},
url = {https://case-studies.ai/case-studies/supply-chain-and-logistics/SC-035-delivery-volume-forecasting-picnic/}
}Sources
The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership
- Source 1:
Building a Modular Demand Forecast: How We Made Testing New Ideas a Breeze
Supporting excerpts (51)
Picnic is an online grocery store that delivers with its own fleet.
Every driver we schedule and every pallet we order starts with one forecast: how many customer deliveries we expect for a future delivery date.
testing a single idea to adjust to new initiatives or improve the model used to take us weeks
we would create a shadow deployment: a second model running alongside production
If it beat production over the following weeks, we would start using it in production.
we rebuilt the forecast so that we could test new ideas within hours instead.
Our hubs, where our delivery vehicles depart from, use it to schedule drivers. Our fulfilment centers, the warehouses where we pick customer orders, use it to schedule employees.
The forecast is produced by a Temporal Fusion Transformer (TFT), an attention-based time-series model that combines static variables (which hub), future variables (weekday, holidays, hub sizes) and past observed values (demand in the past).
The forecast is made up to 14 days ahead.
We did so by deliberately removing our single most complex, but also most predictive, feature, and rebuilding its signal ourselves.
this feature turned our model into a black box
responded too strongly to operational constraints
whenever we reach operational capacity for a future delivery date, we close that delivery moment to customers
the business needs a forecast of unconstrained demand
the α curves for the Monday afternoon dayparts in hub Haarlem had a very consistent shape throughout the year
To model the α curve, we look at historical α curves for the same hub, weekday and daypart. We then take the median of these historical curves.
When we close early, for example, the α curve goes flat. This would drag down an average, but not a median.
The business wants the historical confirmed deliveries to stay as-is.
Only the remaining deliveries should be predicted as unconstrained.
We take our TFT prediction, strip out the share already confirmed according to the modelled α curve, and replace that share with what
When the actual α is below the modelled α curve, the forecast is corrected downwards. When the actual α is above the modelled α curve, the forecast is corrected upwards.
Backtested over a full year, the remainder model performs on par with the old TFT with the confirmed demand feature
when one daypart fills up, some customers spill over into adjacent dayparts, inflating demand there
We do so using Non-Negative Least Squares (NNLS).
we will use this number as the training target for our TFT model, so it learns to predict what demand would have been without our operational constraints
the modelled α curves were still medians of constrained historical data, rather than true unconstrained curves
it could still suffer from a bias due to operational constraints
For each month we want to backtest, we train a model on only the data available on the first day of that month.
For each day we also rerun the remainder model at several simulated times of the day, using only the data available at that time
we can even run multiple months of evaluation in parallel
The WAPE (weighted absolute percentage error) is the sum of absolute errors divided by the sum of unconstrained deliveries.
The WPE (weighted percentage error) calculates the sum of errors divided by the sum of unconstrained deliveries
these dashboards also include predictions made by the production systems, including business overrides
training the exact same model twice, with nothing changed, could produce noticeably different predictions
Across five identical retrains, WAPE varied significantly.
we had been shipping based on shadow testing were inside that variation
the more simple Time-Series Dense Encoder (TiDE) performed as well as the more complex (and expensive) TFT we had been using so far
we decided to train an ensemble of five TiDE models in parallel and average their forecasts
As TiDE is much cheaper than TFT, this resulted in significantly reduced training times of our models
it significantly reduced the WAPE on horizons beyond a week
This resulted in us equaling the accuracy of our old model with our much simpler TiDE and remainder model combination.
This took another significant percentage off the WAPE beyond a week.
The old model tends to increasingly underforecast as the horizon grows.
The remainder model overshoots slightly instead, and the unconstrained targets pull it back down towards zero at long horizons.
outperforms it when trained on unconstrained targets on both accuracy and bias
This modular forecast allowed us to finally backtest our ideas and get from idea to evaluation within hours.
The case for the remainder model was control and backtestability, but it was not expected to result in accuracy improvements on its own.
measure the noise of your own training before you trust an improvement
The result is the share of deliveries confirmed so far, which we will call the α curve.
We built our new TFT and remainder models in such a way that all their components could be historically reconstructed.
Finally, backtesting became something we can do at scale.
- Source 2:
The amazing journey of leaving behind your best feature
Supporting excerpts (39)
Every day, hundreds of thousands of orders flow through dozens of hubs.
The answer drives capacity planning, staffing, routing, and vehicle allocation
Demand shifts with weather, promotions, holidays, and customer behavior, so accuracy is both critical and difficult.
predicts deliveries per hub and daypart 1–14 days ahead using calendar and operational signals
Figure 1: Our forecasting problem: to predict 14 days ahead the number of deliveries on (hub, daypart, date) granularity using a TFT model.
When a hub runs out of capacity, delivery slots are closed and observed demand becomes capped by what we can physically deliver.
Our operational teams require intra-day updates as orders are placed.
the last 48 hours before delivery are the most critical for our forecast
When the current confirmed deliveries begin to deviate from the confirmed deliveries rate, analysts manually adjust the initial forecast upward or downward as it is required.
To avoid overwhelming the team, these corrections are performed only twice per day.
we chose to use a single model across both contexts
fewer pipelines, less duplicated feature engineering, and a smaller surface area for maintenance and monitoring
a unified model ensured consistency between long-term and short-term forecasts
When we combined confirmed deliveries with another feature — minutes to cutoff, representing the remaining time before booking closes — we gave the model a powerful signal.
with 80 hubs in the Netherlands, 2 delivery periods, 3 years of data, and 24 intra-day snapshots, we would end up with roughly 4.2 million training windows
that translates to nearly 150 million rows
would significantly increase computational costs and development friction
selecting five well-spread intra-day samples per day
This reduced the dataset to under 30 million rows
However the lack of formal testing
Specifically, the prediction error for the 1-day ahead forecast decreases by an average of 20–50%.
Currently, we have reduced the number of people required to check anomalous/missing forecasts to just one per market
which has allowed more analysts to focus on other initiatives
It dramatically improved short-term accuracy, earned the trust of planners, and automated what used to be manual corrections.
we had partially lost the ability to properly backtest our model
Confirmed deliveries are inherently stateful: their value depends on when you observe them.
In practice, we were often validating the model on a partially synthetic view of history.
it became harder to reason about failures
one weakness remained stubborn: under-forecasting
If we predict too few deliveries, capacity is not opened in time, vehicles and pickers are insufficient, and revenue is lost.
the model sometimes predicted fewer deliveries than were already booked
severe under-forecasting after temporary capacity constraints
(3) close to zero predictions
Operationally, this is our most painful error.
Was a bad 7 days ahead forecast due to overfitting
Its effectiveness is strongly suggested by our current model’s performance.
is the most important feature with almost 20%
Decoder Feature Importance ranking for our TFT model in Germany.
If there is something we learned through this journey, it is that a feature can be both your greatest ally and your most subtle trap.
- Source 3:
From Supplier to Doorstep: The Machine Learning Behind Your Delivery
Supporting excerpts (12)
At the heart of this planning sits another TFT model that forecasts delivery volumes every day.
calendar effects like public holidays
external signals such as weather forecasts
because rainy days and sunny days rarely look the same in our data
This forecast is used to plan every part of our operations, from scheduling the Runners who will drive to your street to the Customer Success agents ready to help if you have a question.
the number of available Shoppers, Runners, and Electric Picnic Vehicles (EPVs), acts as a constraint on the number of deliveries we can actually make
If we underforecast demand, we plan for lower capacity than we actually need, which means we reach fewer customers.
our historical data only shows us the orders we allowed based on past capacity
our models aim to estimate unconstrained demand first
Our business and operations teams, who know the context on the ground, review the model
they might account for an upcoming local event, a last-minute promotion, or any anomaly
we ensure that the final delivery plan is not only data-driven but also aligned with real-world context and expertise
- Source 4:
Supporting excerpts (13)
We initially employed gradient-boosting trees to forecast demand.
everyone suddenly started buying toilet paper!
they exhibited a significant drawback discovered during COVID-19
As customer behaviour was radically changing
Our exploration began with Long Short-Term Memory Networks (LSTMs), but we observed no significant improvement in performance.
DeepAR’s architecture does not consider the wide variety of inputs
the TFT employs quantile regression to generate prediction intervals
The other model operates at a delivery level
We started out using Pytorch Forecasting as it had a TFT implementation available.
To address this, we implemented sampling techniques.
Unlike gradient boosting trees, which could be trained on CPUs, the TFT requires GPUs. Even with GPUs, training the TFT model takes several hours.
We saw a 20% increase in our forecast precision, particularly benefiting from improved performance in slow-moving articles
Begin with a strong baseline, potentially utilising simpler models like gradient boosting.
- Source 5:
AI model helps Ampère predict parcel volume for millions of bol shipments
Supporting excerpts (3)
The model – Quantile-Assured Volume Estimation (QAVE) – forecasts expected pickup volumes for each merchant partner based on historical package measurements.
the logistics company has used the model continuously since September 2024
This precision helps Ampère make better use of truck capacity
- Source 6:
DHL Manpower Planning and Forecasting Optimisation Tool
Supporting excerpts (3)
Blended model adopted as final forecasting model.
Flask application hosted in DHLE’s intranet, with statsmodel and LightGBM for forecast and Gurobi for optimisation
Reduction of contract couriers' hours
Comments
Start the conversation.
Invited members of the library comment here. Sign in to join the conversation.