← Back to the lab

Simulation

Medicine supply digital twin (3/14): min-max vs forecast-based ordering

Two ways to replenish the central warehouse, simulated with the same demand and the same unpunctual suppliers. One holds more stock and gives worse service; the other places more, smaller orders. Why.

By ·

The fictional system’s central warehouse supplies the whole network. Every Monday it reviews each item and decides whether to order from the supplier and how much. There are two common ways to do it, and the twin runs them side by side with exactly the same demand and the same suppliers.

Min-max

It is the most widespread rule. Two numbers are set for each item from planned demand: a minimum of 25 days and a maximum of 55. If stock plus what’s in transit falls to the minimum or below, order what’s needed to reach the maximum:

if I+P≤m⇒Q=M−I−P\text{if } I + P \le m \quad\Rightarrow\quad Q = M - I - P

The rule is easy to audit, and that is its merit. Its problem lies in the word planned: the limits don’t move when real demand changes. If the respiratory season arrives and use rises 40 %, the maximum is still computed from the old demand.

Forecast-based ordering

The alternative uses the last two posts. Every Monday:

  1. Forecast demand for the coming weeks with Holt-Winters, using the last five weeks of observed use.
  2. Add up the forecast over the horizon H=L+7+5H = L + 7 + 5: the supplier’s lead time, the review week and five days of margin.
  3. Add the safety stock, 1.65 σH1.65\,\sigma\sqrt{H}.
  4. Subtract what’s on hand and in transit. If what’s missing is less than two days of demand, don’t order.
Q=∑k=1Hy^t+k+1.65 σH−I−P,Q<2μ⇒Q=0Q = \sum_{k=1}^{H} \hat y_{t+k} + 1.65\,\sigma\sqrt{H} - I - P, \qquad Q < 2\mu \Rightarrow Q = 0

The underlying difference: min-max reacts to a threshold; the forecast reacts to the trend. If demand starts rising, the forecast picks it up within a week or two and orders more before hitting the minimum.

Suppliers that fail

For a fair comparison, both methods face the same supplier. In the aid, a share of orders fail; of those failures, 58 % arrive late (5 to 13 days more) and 42 % arrive short (45 to 80 % of the order). The draws are the same for both methods: if the order on day 28 is late with one, it’s late with the other.

With the aid’s starting values (supplier at 14 days, 24 % of orders failing, 40 % seasonal peak), over 120 days:

MetricMin-maxForecast
Service level96.0 %97.1 %
Days short54
Average stock20.3 days15.3 days
Supplier orders411

The forecast gives better service with 25 % less stock. In exchange it places almost three times as many orders, smaller ones.

The state network under the min/max policy, on the Shortages tab (“Desabasto”). (Interface in Spanish.) · Open full screen · Open with forecast-based ordering

Why it happens

Min-max orders in big, spaced-out blocks. Between orders, stock falls in a sawtooth from the maximum to the minimum, so on average it sits halfway between the two: about 40 days if demand were stable. That stock doesn’t protect better; it just sits there. And when demand rises, the minimum, computed from old demand, no longer covers the lead time: the order goes out late and the shortage arrives before the truck.

The forecast keeps stock close to what the horizon needs, no more, no less. Its weakness is that it depends on the supplier accepting frequent orders, and on the forecast not being fooled by an odd week.

Now raise supplier failures to 50 %. The result flips: min-max ends up at 97.5 % service and the forecast drops to 95.7 %. The forecast’s safety stock was computed from the variation in demand, not the supplier’s, and the previous post showed the supplier’s weighs much more. With such an unreliable supplier, min-max’s large stock works as expensive but effective insurance. The fix isn’t to go back to min-max, but to put supplier variation into the forecast’s buffer.

In the full twin

In the simulation of the whole network (60 units, 90 days, every item) the difference is larger than in this single-item aid:

MetricMin-maxForecast
Warehouse service level97.5 %99.6 %
Item-days out of stock161
Average stock27.6 days20.4 days
Supplier orders150567

What comes next

Even the best policy isn’t always enough: a supplier fails and the warehouse has half of what’s being asked for. In the next post, how to allocate what isn’t enough, and why splitting in proportion to orders leaves the neediest units with less.