Multi-Echelon Inventory Optimization

This project asks a simple question: where should a retailer keep its backup stock? The network here has one overseas factory, three regional warehouses (North America, Europe, Asia-Pacific), and ten stores. Every number on this page comes from a simulation that was given only past data to plan with, then tested against a later period it had never seen - the same way a real policy would have to work.

Start Here: What The Words Mean

Every technical term used anywhere on this page is defined below. Nothing further down assumes you have read a supply-chain textbook.

Glossary, Plain-Language Definitions
Regional warehouse (DC)
A building that receives big sea shipments from the factory and sends smaller deliveries to nearby stores. There are three, one per region.
Echelon
One level in the chain. Here there are two levels that hold stock: the warehouses, and the stores they supply. “Multi-echelon” means planning both levels together instead of separately.
Lead time
How long you wait for a delivery after ordering it. Factory to warehouse is 30 to 45 days (a ship crossing an ocean, plus customs). Warehouse to store is 2 to 5 days (a truck).
Safety stock (backup stock)
Extra inventory kept on hand beyond what you normally expect to sell, so that an unusually busy week doesn’t empty the shelves. Deciding how much to keep, and where, is the whole problem.
Holding cost
What it costs to keep one unit sitting on a shelf for a day: space, money tied up, insurance, spoilage risk. Warehouse space is roughly 2.4× cheaper per unit than store space, which is why where you keep backup stock matters financially.
Service level
The share of customer demand you manage to supply. The target throughout this project is 95%.
Fill rate (% of demand met on time)
Of everything customers actually asked for, the share they actually got. This is the main scoreboard.
Warehouse order fill rate
When stores ask their regional warehouse to resupply them, this is the share of that request the warehouse could actually ship. When it drops, stores are stranded: they cannot restock no matter how well their own shelves were planned.
Variability (standard deviation)
How much demand bounces around from day to day. A store selling 100 units every day and a store averaging 100 but swinging between 20 and 300 need very different amounts of backup stock.
Pooling
Keeping one shared pile of backup stock centrally instead of many small piles locally. It works because stores rarely have their busiest week at the same time, so a shared pile can be sent wherever the shortage actually happens. Ten separate piles cannot be moved once placed.
Out-of-sample validation
Testing a plan on data it has never seen. If you check a plan against the same history you used to build it, it will always look good; that proves nothing. Every result here is out-of-sample.
Rolling-window backtest
Repeating that honest test several times. Build the plan using everything up to a date, test it on the next three months, then move the date forward and repeat. Four such tests were run here, so we can see whether a finding is consistent or just luck from one period.
Correlation
A single number from −1 to +1 summarising whether two things move together. Near +1 they rise together; near −1 one rises as the other falls; near 0 there is no relationship.
Expedite window (emergency delivery speed)
How fast a warehouse can rush an emergency delivery to a nearby store when it is about to run out. The faster this is, the less backup stock each store needs to hold itself.
How this page is ordered. Findings appear in order of how well they hold up under testing, not how impressive they sound. Warehouse reliability comes first because it was consistent in all four test periods. The money saved comes second and is shown as a range, because it was always positive but its size changed a lot depending on how busy the period was. Dollar costs appear last and only one period at a time, comparing them across periods is genuinely misleading, for a reason explained in that section.

How The Network Is Put Together

Two levels hold stock: three regional warehouses, and the ten stores they supply. Everything starts at a single overseas factory. The shape matters because the two legs of the journey are wildly different lengths: a month or more by sea to reach a warehouse, then a couple of days by road to reach a shop. That mismatch is what the rest of this page is about.

Network structure: 1 factory to 3 regional warehouses to 10 stores Hover or tab to a node to see its connections
SupplierDC-1 · R1DC-2 · R2DC-3 · R3S01S02S03S04S05S06S07S08S09S10

Network structure in text: a single overseas factory feeds three regional warehouses. DC-1 · R1, the Los Angeles DC in North America, sits 35 days from the factory and serves 4 stores: S01, S02, S03 and S04. DC-2 · R2, the Rotterdam DC in Europe, sits 45 days from the factory and serves 3 stores: S05, S06 and S07. DC-3 · R3, the Singapore DC in Asia-Pacific, sits 30 days from the factory and serves 3 stores: S08, S09 and S10. Factory to warehouse lead times run 30 to 45 days by sea including customs. Warehouse to store deliveries take 2 to 5 days by road. Every store is held to a 95% service target.

Note that this is a simple tree: every store is supplied by exactly one warehouse, so there is a single path from the factory to any shop. That is what makes the pooling question tractable here, and it is a different shape from a hierarchy where product and geography cross one another.

Why does this matter?

Where a network branches is where the money and the risk sit. A warehouse that serves four stores is carrying risk for all four at once, so getting its stock level wrong has four times the blast radius of getting one shop wrong. That is the argument for planning the levels together rather than one at a time.

The long sea leg is the other half of the picture. An order placed today for a warehouse arrives more than a month from now, against a forecast made today. The shops, by contrast, can be corrected within days. Most of the difficulty in this project comes from that asymmetry.

Main Finding: Keeping Regional Warehouses In Stock

What this shows: for each three-month test period, how much of what stores asked their regional warehouse for was actually shipped. What to look for: the green dots stay pinned at 100% every time, while the orange dots slip, and slip furthest in Q4, the busiest quarter.

Why does this matter?

When a regional warehouse runs empty, the damage is not limited to one shop. Every store that depends on that warehouse is stranded at once - they place their restock orders as normal and simply do not receive the goods, however well their own shelves were planned. A single warehouse shortage in this network therefore turns into simultaneous empty shelves across three or four stores, during the busiest trading weeks of the year, which is precisely when lost sales are most expensive and most visible to customers.

This is also the failure that is hardest to see coming. The textbook method reports healthy numbers for three quarters out of four. Anyone reviewing it in a calm period would reasonably conclude it was working fine.

Why The Textbook Method Breaks Down Under Pressure

“Explained” writes the interpretation onto the chart.
What this shows: each dot is one three-month test period. Left-to-right is how much busier (or quieter) that period turned out to be than the history the plan was built from. Up-and-down is how well the textbook method’s warehouses coped. What to look for: the dots fall as you move right, the busier it got, the worse the warehouses performed.

Why it happens. The textbook method sizes each warehouse’s backup stock with a standard formula that assumes each day’s demand is unrelated to the last. Real demand is not like that: it has a weekly rhythm, a Christmas season, and a growth trend, so busy days arrive in clusters. Across a 30to45 day sea crossing those clusters pile up, and the true swing in demand turns out to be between 2.8× and 10.6× larger than the formula assumes. The formula therefore buys a backup stock sized for a calm world. The new method sizes the same backup stock from what demand actually did over that same 30to45 day window, so the clustering is already accounted for.

Why does this matter?

This is a warning about how inventory plans are usually reviewed. The textbook formula is not broken in an obvious way, it is the standard approach taught everywhere, and it performs perfectly well for most of the year. Its weakness only appears under demand pressure, which is the one condition where being wrong is expensive.

The practical implication is that a policy should never be judged on an average or a quiet period. It should be judged on its worst quarter, because that is where the lost sales, the emergency freight bills, and the disappointed customers actually occur. Any review process that looks at annual averages will systematically miss this.

Money Saved: A Range, Not A Single Number

What this shows: how much cheaper the shared-warehouse method was than giving every store its own independent backup stock, in each test period. What to look for: every bar is above zero, it saved money every time, but the bars are very different heights, so the size of the saving is not something you can promise in advance.

Why does this matter?

A business case built on “this saves 2.7%” would be on shaky ground: in a quiet quarter the real figure is nearer 1.5%, and anyone checking the books three months later would find the promised saving missing. A business case built on “this saves between 1.5% and 8.3%, averaging under 4%, and it holds our warehouses at full reliability even at Christmas” is both more honest and more persuasive, because the reliability part is the finding that actually replicated every time.

It is also worth being clear that this is a modest saving on its own. The reason to adopt the approach is that shelves stay stocked in peak season; the cost reduction is a bonus, not the headline.

Try It Yourself: How Fast Must Emergency Deliveries Be?

The shared-warehouse method assumes a regional warehouse can rush an emergency delivery to a nearby store quickly. The faster that is, the less backup stock each store has to hold itself. This was the single softest assumption in the whole model, so it was tested directly. Move the slider to see what the simulation actually produced at each speed.

What this shows: the simulated result at all four emergency delivery speeds, with your current choice highlighted. What to look for: the bars are almost the same height - this assumption barely changes the outcome.
Why does this matter?

Models usually rest on a handful of assumptions nobody can verify, and the honest question is always “how much would it matter if this were wrong?” Here that question has an answer, and the answer is reassuring: even if the assumed emergency delivery speed is off by a factor of three, the recommendation does not change.

That is worth knowing before committing money to a change. It means the case does not depend on negotiating a fast internal courier arrangement, and it removes an obvious line of objection from anyone reviewing the proposal.

Cost In Dollars, One Period At A Time

What this shows: the yearly cost of stock held under each of the three methods, within the single period you selected. The share of customer demand each one met is printed on its bar. What to look for: read the cost and the demand-met figure together, never the cost on its own.
Why does this matter?

This is the most common way an inventory review goes wrong. Cost is easy to measure and lands straight on a financial report; stockouts are diffuse, show up as lost sales nobody logged, and rarely get attributed back to an inventory decision. So the policy that quietly runs out of stock can look like the responsible, frugal choice on paper.

Putting the service figure directly on the cost bar is a deliberate guard against that. Any time someone presents an inventory saving, the first question should be what happened to availability over the same period.

Share Of Customer Demand Met, By Period

What this shows: of everything customers asked for across all ten stores, how much they actually got, under each method. The dotted line is the 95% target. What to look for: the two methods are close for most of the year, then separate in Q4.

These bars start at zero, so the differences look modest, and they genuinely are modest in ordinary quarters. The gap opens up in Q4. The larger operational difference between the two methods is in the warehouses, shown at the top of this page.

All The Numbers

What this shows: every figure behind the charts above, one row per method per test period. What to look for: the “Demand vs Plan” column explains most of the variation, the higher it is, the worse every method performs.
Store-By-Store And Warehouse-By-Warehouse Detail

One row per location per method per test period.

How This Was Worked Out, And What It Cannot Tell You

Method And Known Limitations

The test. Four separate tests were run. Each one builds the stocking plan using only the history up to a cut-off date, then simulates the following three months day by day, stores selling, ordering from their warehouse, warehouses ordering from the factory, deliveries arriving after realistic delays. Demand the shops could not supply is treated as a lost sale, not a delayed one, which is how retail actually works. The simulation runs for two months before measurement starts, so it is not being judged on its opening conditions.

Why the standard formula was replaced. The textbook approach understates how much demand really swings over a 30to45 day sea crossing, by between 2.8× and 10.6× at the warehouses, because it assumes each day is unrelated to the one before. Every backup stock figure here is instead taken from what demand actually did over windows of that same length in the real history.

Where the saving comes from. The stores do not all get busy at the same time, Sydney peaks mid-year while Tokyo and Jakarta peak in December. That means one shared pile of backup stock at the warehouse only needs 65to75% of what ten separate piles would. This was measured by adding up genuine simultaneous shortfalls in the history, not assumed.

What this cannot tell you.

Source: rolling-window backtest of 4 test periods × 3 methods × 13 locations. Generated by src/rolling_validation.py, with the emergency-delivery comparison from src/validate_policy.py. This page is a static build of the Streamlit dashboard (dashboard.py), same data, no server required.  ·  Source code on GitHub