This September at the online AnyLogic Conference 2026 (#ALConf26), the Decision Lab and Gousto engineering teams dived seep the technical architecture behind ToteSim.
ToteSim is a data-driven simulation twin of the automated replenishment and material-handling system at Gousto’s Warrington fulfilment facility. Delivered through an intensive five-month collaborative sprint comprising 24 epics and over 300 technical tasks, the model bridges industrial discrete-event kinematics with modern cloud data stacks and live Python decision services.
Below is an engineering walkthrough of the system topology, technical challenges, and architecture presented by Dr Fabrice Durier and Will Seymour (Gousto), alongside Peter Riley, Jacob Whyte, and Andrew Nestor (Decision Lab).
You can watch the full recorded presentation from the conference below:
At a Glance: ToteSim Technical Summary
- Project: ToteSim — a high-fidelity digital twin of Gousto’s Warrington fulfilment centre (fulfilling ~200k boxes/week).
- Architecture: Developed with AnyLogic, coupled directly with Databricks for real-time factory state initialisation and live Python microservices (
Dynamic ReplenishmentandTotewise).- Physical Scale: Simulates 18,000 reserve storage locations, 9,800 active pick slots, 20 vertical lifts, and 270 automated shuttles.
- Production Impact: Used to engineer the “Robin Hood” flow-control algorithm, delivering a +4.3% throughput AUC gain, 24% lower p95 tail queueing, and zero operational disruption across 2M+ audited journeys.
1. The Physical Modelling Challenge
Gousto’s Warrington plant operates 24/7, fulfilling approximately 200,000 customer recipe boxes and 5 million ingredient picks weekly. While Gousto had already built an established AnyLogic simulation for red-box picking lines, that model historically relied on simplified assumptions about upstream blue-tote supply.
ToteSim was developed to model the physical replenishment system with complete fidelity:
- 18,000 reserve storage locations in a multi-level automated shuttle system
- 9,800 active pick slots
- 20 vertical lifts and 270 automated shuttles
- Shared high-speed conveyor loops (spines) that transport full, empty, and reserve replenishment totes across multiple levels
In a high-throughput network running at ~3 seconds per completed customer box, local conveyor merges, lift bottlenecks, and recirculation loops cannot be evaluated with static queueing formulas. Physical layout kinematics interact continuously with automated warehouse control software.
2. System Architecture: Integrating AnyLogic with Databricks and Python
One of the common traps in enterprise simulation is building monolithic desktop models fed by static Excel or CSV files. From day one, ToteSim was engineered as an enterprise software component embedded directly within Gousto’s data ecosystem.
The Ingestion & State Initialisation Pipeline
Run parameters, inventory layouts, and movement tasks originate in Databricks. Rather than “warming up” a model from empty over arbitrary hours, ToteSim initialises directly into a historically observed factory state—including the exact location and contents of all 27,800 storage and pick slots, active tote coordinates on the belts, and outstanding order queues.
Coupling Live Decision Code via Python
Rather than re-coding Gousto’s production allocation algorithms into Java heuristics inside AnyLogic, ToteSim invokes Gousto’s live Python decision services during runtime.
At periodic runtime checkpoints, AnyLogic exports the simulated factory state. Gousto’s proprietary Python services (Dynamic Replenishment (DR) and Totewise) read this telemetry, execute their logic, and return updated tasks (which pallets to decant, how many ingredients to place in each tote, and where to route replenishment) directly back into the simulation.
This architectural decoupling ensures that the simulation tests the actual software logic deployed in production, not a synthetic approximation.
3. Modelling Depth: Kinematics, Storage Logic, and Asset Reliability
To deliver actionable decision intelligence, the model implements granular logic across two critical subsystems:
A. Intelligent Inventory Logic, Not Just Geometry
A common mistake in warehouse simulation is treating storage bins as simple abstract sinks. In ToteSim, inventory allocation is explicitly modelled as an operational decision layer. Every SKU is tracked across aisle, level, side, bin, and pickslot locations.
Because storage decisions determine lift cycle times, conveyor travel distances, and congestion around specific aisles, the model faithfully reflects Gousto’s dynamic slotting and zoning eligibility rules.
B. Asset-by-Asset Mechanical Reliability
Lifts and shuttles fail in the real world. In ToteSim, mechanical downtime is treated as an explicit experimental variable rather than random, uncalibrated background noise.
Every single lift (20 units) and shuttle car (270 units) can be independently configured under three distinct execution modes:
- Historic Replay: Replaying exact logged machine breakdowns from physical telemetry to audit past shifts.
- Synthetic Stress-Testing: Forcing selected critical lifts or entire aisle groups offline to measure how the conveyor loop recirculates and recovers from catastrophic hardware failure.
- Stochastic Sampling: Drawing from parametric failure distributions to quantify variance under extended runs.
4. The “Red + Blue = Purple” Simulation Modular Boundary
To manage model complexity, the project employed a strict architectural pattern dubbed Red + Blue = Purple:
- Blue-Tote Model (ToteSim): Focuses strictly on decant induction, Automated Storage and Retrieval (ASRS) reserve, conveyor spines, and pick-face replenishment.
- Red-Box Model: The mature picking model tracking customer cartons, recipe assembly lines, packing, and dispatch.
- Purple (Integrated Twin): Connecting both models together to test complete end-to-end dynamics.
This decoupling is essential for simulation engineering. It allows data scientists to isolate causal mechanisms and so test, for instance, whether pick-line starvation is driven by physical conveyor merge constraints in Blue or inefficient pick-sequencing rules in Red.
5. Automated Verification, Calibration, and Validation
Building trust in an engineering model requires objective calibration before running counterfactual experiments.
The engineering team implemented headless execution pipelines that ran automated test suites via GitHub without launching the graphical AnyLogic animation. Historical production replay windows were assessed across two quantitative dimensions:
- Headline Network Accuracy (~80%): Assessed via cumulative journey-volume curves (“worms”) comparing simulated vs. recorded tote completions across all major pathways.
- Granular Critical Pathway Accuracy (>95%): Key high-volume flows—specifically decant-to-reserve (94.51%) and reserve-to-pickstation (96.42%)—reproduced production physical timings with exceptional precision.
- Transit Distributions & Percentiles: Transit-time distributions and p5-through-p95 profiles along complex conveyor routes aligned closely with observed sensor telemetry.
6. The Production Output: The “Robin Hood” Headroom Controller
The engineering value of ToteSim was validated in Q1–Q2 2026 when Gousto used it to design, test, and deploy a new spine flow-control algorithm dubbed Robin Hood.
The previous controller enforced hard, static tote-category limits on the main spine conveyor loop. When decant induction totes hit their ceiling, they queued at the merge point—blocking upstream belts and starving pick stations, even while spare capacity existed on the belt for empty or replenishment totes.
From 2,000+ Headless Runs to Live Deployment

Using ToteSim’s headless execution, the team executed over 2,000 simulation runs across varying stress levels (testing artificially compressed tray volumes to simulate heavy peak loads). Candidate control scripts were evaluated using Cumulative Spine Activity Area Under the Curve (AUC), tracking total entries and exits over time.
The Robin Hood logic demonstrated a +4.3% throughput AUC gain under high stress ().
Because the algorithm was coded as a drop-in Python module using the exact telemetry inputs and outputs established in ToteSim, Gousto deployed the code directly into Warrington’s production environment at the start of Q2 2026.
A subsequent six-week production audit across more than 2 million live tote journeys confirmed the simulation findings:
- Zero System Destabilisation: Normal operating throughput remained completely stable.
- 24% Reduction in p95 Tail Queueing: The 95th-percentile queue time for heavily constrained decant induction dropped by nearly a quarter.
- 10%–20% Lower Peak Congestion: Avoidable merge waiting was slashed during peak operational windows.
Illustrative redraw of the Use Case 6 spine_activity metric: higher or earlier cumulative activity increases AUC.
A higher cumulative activity curve means the spine transported more totes and/or transported them earlier.
Looking Ahead: The Evolution Toward Real-Time Twin Control
ToteSim demonstrates that building high-value digital twins does not require starting with a fully autonomous, live-connected IoT system. By treating simulation twinning as an integrated software discipline and combining AnyLogic’s discrete-event power with modern data lakes and live Python services, engineering teams can eliminate production risk and de-risk major operational software changes before touching live machinery.
Current work on ToteSim includes pallet induction prioritisation, dynamic pick-face allocation, and reverse-engineering third-party equipment logic to further scale Gousto’s automated facilities.
- Watch the Recording: See the model in action and review the presentation slides by watching our full session on YouTube.
- Read the Case Study: Discover the wider operational context in our published case study: How Simulation Became Gousto’s Recipe for Growth.
- Connect with Decision Lab: Building complex intralogistics models or scaling your AnyLogic architecture? Get in touch with our simulation engineering team.
















