# Test your supply chain in simulation before the world does

By [Dr. Linda Xu](/about) · 14 Nov 2026 · 5 min read

Most companies find out their ordering rule was wrong when a ship is late or an energy bill doubles. Supply chain simulation lets you find out first, for the price of an afternoon, and the best results come when classic algorithms, language models and people who know the business work together.

## Why your current rule may be costing you

Every manufacturer has an ordering rule: "keep two weeks of stock", "order what we sold last month". Most were set in calmer years and never tested against a shock.

In early 2024, attacks in the Red Sea cut container ship transits through the Suez Canal by about two thirds, and freight rates from Shanghai to Europe tripled [1]. In 2022, European gas prices hit record highs, and industry used an estimated 15% less gas as factories cut production [2].

## I rebuilt my PhD model so other companies can use it

My PhD research was in operations research: how a manufacturer should order materials and plan production when demand, suppliers and delivery times are all uncertain. I built a simulation of a real chemical manufacturer and used genetic algorithms, which "breed" better rules from good ones, to find cheaper ordering policies. In simulation tests on the company's data, the optimised strategies cost 36–48% less than the company's original approach [3]. A manufacturer later adopted the system. The figures come from older data: what simulation can reveal, not a promise.

This year I rebuilt it as a tool any manufacturer can use. The tool compares the rules most companies use (just-in-time, safety stock, Kanban, vendor-managed inventory) with optimised ones, and runs every plan through thousands of simulated futures.

## What the dashboard shows

The examples use a made-up furniture maker: one office chair, two materials, one market.

![The tool running: data, analysis, dashboard, stress test](/images/articles/test-supply-chain-in-simulation/demo.mp4) "77 seconds, no sound."

![Data form: production capacity, cost and lead time, and each raw material with its quantity, price and supplier lead time](/images/articles/test-supply-chain-in-simulation/data.jpg) "Step 1: the company's own data, required fields marked."

**Your own data.** Twelve required items, such as capacity, prices, lead times and demand; forty more have defaults. The data stays on the company's computer.

![Recommended plan: weekly ordering instructions, 461k expected cost, 99.8% on time](/images/articles/test-supply-chain-in-simulation/plan.jpg) "The answer first, as instructions a planner can follow."

**The recommended plan, in plain words.** Here it delivers 99.8% of demand on time, against 79.9% for just-in-time, at slightly lower cost.

![Chart of cost against on-time service for 89 plans, recommended plan circled](/images/articles/test-supply-chain-in-simulation/cost-service.jpg) "Further left is cheaper; higher is better service."

**Cost against service, for every plan.** Leaders see what each extra point of service costs.

![Cost breakdown of the recommended plan: production, material purchases, delivery, shortages and holding stock](/images/articles/test-supply-chain-in-simulation/money.jpg) "The settings behind the plan, and where the money goes."

**Where the money goes.** Holding stock is cheap here; shortages and delivery are not.

![Weekly chart of finished stock, customer backlog and production over one simulated year](/images/articles/test-supply-chain-in-simulation/future.jpg) "One simulated year, week by week."

**One year, week by week.** Planners see when stock runs thin, or a backlog builds.

![Table comparing plans: vendor-managed inventory costs the same as the recommended plan but delivers 13.8% on time](/images/articles/test-supply-chain-in-simulation/plans.jpg) "All plans compared, sortable."

**All plans side by side.** Vendor-managed inventory costs the same as the recommended plan here, but delivers only 13.8% on time.

![Stress test: just-in-time falls to 43.7% on time; optimised plans stay above 91%](/images/articles/test-supply-chain-in-simulation/stress-test.jpg) "Same plans, half and 50% more uncertainty."

**The stress test.** When delays and demand swings rise by half, just-in-time falls from 79.1% to 43.7% on time. The optimised plans hold above 91% for about 3% more cost. Just-in-time looks cheapest only in the world you planned for.

## Energy and AI tokens are now input costs

Two costs used to sit in "overheads". They now behave like raw materials: a quantity per unit and a price, entered like steel or fabric.

**Energy.** For chemical, metal or food producers it is a major input, and its price can reach record highs within months [2].

**AI tokens.** A token is the small unit of text an AI model reads or writes, and providers charge per million. Once AI is in quoting and planning, every order carries a token cost. The price of a given level of AI ability has fallen 9 to 900 times a year, depending on the task [4]. But the price of running the most capable models is rising 3 to 18 times a year, because they are bigger and reason at greater length [5]. Token cost per unit can rise even while the price per token falls.

## Why LLMs alone are not enough

A large language model (LLM) is good at reading messy inputs and turning a planner's "what if the port closes?" into a scenario. It is not good at searching thousands of plans under uncertainty for the cheapest.

The strongest systems combine three things:

- **Classic algorithms** for the maths. Same input, same answer, every time.
- **Language models** for the people.
- **Deep domain knowledge** to decide what the model must include. The tool warns before it runs when the data cannot work: zero opening stock, or a promised delivery faster than transit. A person who knows the operation spots that in minutes; an algorithm optimises around it.

## Questions for the leadership team

1. When did we last test our ordering rules against a shipping disruption or an energy spike?
2. Do we know our energy and AI token cost per unit of product?

## What I would do now

- **Write down the current rule** for your top products.
- **Put energy and AI tokens on the bill of materials** as costs per unit.
- **Stress-test every option** before the next budget, and pick the plan that survives, not the one that is cheapest in a calm year.
- **Give the decision an owner:** usually the head of supply chain, with finance agreeing the service target.

Simulation is cheap; finding out in a crisis is not. Test your options before the world tests them for you.

## References

1. Mike Schuler, gCaptain, [UNCTAD Sounds the Alarm Over Unprecedented Disruptions to Global Trade](https://gcaptain.com/unctad-sounds-the-alarm-over-unprecedented-disruptions-to-global-trade), 26 January 2024.
2. International Energy Agency, [Gas Market Report, Q4-2022: Cold comfort](https://www.iea.org/reports/gas-market-report-q4-2022/cold-comfort), 3 October 2022.
3. Wei Xu and Dong-Ping Song, [Operational Research, 2022](/publications/operational-research-2022).
4. Epoch AI, [LLM inference prices have fallen rapidly but unequally across tasks](https://epoch.ai/blog/llm-inference-price-trends), 12 March 2025.
5. Hans Gundlach, Jayson Lynch, Matthias Mertens and Neil Thompson, arXiv, [The Price of Progress: Price Performance and the Future of AI](https://arxiv.org/abs/2511.23455), 28 November 2025.

## About the author

[Dr. Linda Xu](/about) is Director of Data Analytics & AI at MealSuite, where she owns AI end to end. [More about her](/about).

---
Source: https://drlindaxu.com. Dr. Linda Xu (publishes academically as Wei Xu).
