When is paying extra for a rush order worth it?

A patient hands over a prescription for an inhaler. The shelf is empty. The regular order arrives in three days. A courier could bring it this afternoon, for a fee. Every independent pharmacy makes this call, and so does every restaurant that runs to the cash-and-carry because the distributor's truck is days away. Cheap and slow, or fast and expensive?

This is post #3 in a series on award-winning operations research theses, applied outside the setting the authors studied. This one is about restocking when you can pay extra for speed. Below, the thesis first, then my experiment with a pharmacy's real sales, then what would change the conclusion.

The two-and-a-half-minute version, narrated by Renan with an AI voice clone of his own voice.
Read the video transcript

When is paying extra for a rush order worth it? A pharmacy's shelf is empty. The regular order arrives in three days. A courier could bring it today, for a fee. Cheap and slow, or fast and expensive?

This is post three in my series: award-winning operations research theses, applied to small businesses. Fabian Akkerman's thesis, from the University of Twente, won the 2026 EURO Doctoral Dissertation Award. I use a chapter he wrote with Nils Knofius, Matthieu van der Heijden and Martijn Mes.

The idea I borrow: a computer learns how much to order, each day, from a cheap, slow supplier and from a fast, expensive one. It simulates many possible futures for each choice, and keeps the cheapest.

My test: a pharmacy, with six years of real daily sales from one store. The costs are my assumptions. I compared ways to restock, among them: never rushing; a one-sentence rule, rush only what you owe a waiting patient; and a smaller version of the thesis's method.

First, demand that looks like past years. Even the best rush rule I tried saved zero point two percent: almost nothing. With my costs, a few extra packs on the shelf were cheaper.

Then came the real days of 2018 and 2019, and demand had moved. Asthma drugs sold fifty percent more. With stock levels left as they were, the one-sentence rule cost thirteen percent less than never rushing.

What helped most was simpler: re-setting stock levels every quarter, from the last twelve months of sales. Alone, that cut cost by twenty-seven percent. With the rush rule added, thirty-three percent. About a third.

Delivery time decided how much rushing was worth. When the regular order arrives the next day, it saved zero point three percent. When it takes five days, about fifteen percent.

The catch: the learning method did not beat the one-sentence rule here. My version was far smaller than the thesis's, so this is no verdict on the method. And it is one store, with costs I assumed.

To try it, write down how long your regular order takes, and what a rush really costs. Re-set stock levels every quarter. And when a customer is waiting, rush only what you owe.

The full write-up and the code are on bisdecisions.com. Thanks to Fabian Akkerman and his coauthors for the research behind it.

What the thesis did

Fabian Akkerman's PhD thesis, Machine Learning for Sequential Decisions in Logistics (University of Twente, 2025), won the 2026 EURO Doctoral Dissertation Award, presented at the IFORS 2026 conference in Vienna.12 His supervisors were Martijn Mes and Maria Iacob, with Willem van Jaarsveld as co-supervisor. The thesis uses machine learning for decisions made again and again under uncertainty: reordering stock, routing vehicles, pricing delivery slots. It separates learning to predict from learning to decide, and gives a framework for bringing machine learning into logistics operations.

I sent this draft to Fabian Akkerman a week before publication and invited his corrections. I had not heard back when it went live; any correction that arrives later will be added here with a note.

In plain words, the part I used lets a computer learn an ordering rule. Every day a business must decide how much to order from a cheap, slow supplier and how much from a fast, expensive one. The method simulates many possible futures for each candidate order, keeps the cheapest, and trains a model to choose that way in one step.

The method, for readers who work in inventory

I borrow Chapter 3, joint work with Nils Knofius, Matthieu van der Heijden and Martijn Mes.3 It studies spare parts for equipment whose downtime is expensive. A part can come from a conventional supplier or be 3D-printed, with different prices and lead times. The two kinds also fail at different rates, so today's sourcing choice changes tomorrow's demand. The chapter trains a neural-network policy with Deep Controlled Learning (DCL): simulate every candidate order from many states, keep the cheapest, and teach a network to imitate it.4 It also introduces Endogenous Parameterised Learning (EPL): one network trained across many items, with each item's numbers as input, so a new item needs no new training.

On small test instances, DCL came within 0.4% of the optimal policy on average. In a case on valve parts for TotalEnergies' offshore platforms, it cut total cost by 22.6% on average against single sourcing, where dual sourcing could help. A single EPL network did about 3 percentage points worse than DCL trained item by item, with 52 times less training. The pharmacy application below is mine, not the authors'.

Deep Controlled Learning (DCL): one round of approximate policy iterationVisit a statestock, owed, on ordervia current policyTry each order128 demand futures30 days ahead eachKeep the cheapeststate → best orderTrain a networkstate → ordernew current policyrepeat 3 times · 1,200 states per roundEPL: train it once for many itemsEach episode draws a different item: price, lead time, demand level. Those numbers go intothe network's input, so one network serves every item, and a new demand level is just a new input.
Deep Controlled Learning, one round, as I implemented it. EPL wraps it: each training episode draws a different item, and that item's price, lead time and demand level are part of the network's input.

The pharmacy

I needed real demand, so I used six years of daily sales from one pharmacy's point-of-sale system, published as an open dataset: 57 drugs in 8 groups, 2014 to 2019.6 I kept 7 groups, from sleep aids (about one pack every two days) to anxiolytics (about nine packs a day), and treated each group as one item. Each morning the pharmacist can place a regular order or a rush order.

One drug category, one morning · illustration with a 3-day regular lead timetodayday 1day 2day 3day 4Regular orderlist pricearrives in 3 dayscheap, but you must guessRush order+20% and a $15 feearrives this morningbefore the first patient walks in
The two ways to restock. A pack that is not on the shelf leaves a patient waiting until the next delivery.

The costs are my assumptions, the same for every policy. Holding stock costs 30% of the pack price per year. A waiting patient costs $5 plus 10% of the pack price, per pack per day. A rush pack costs 20% more, plus a $15 courier fee per order. I ran 63 settings: 7 drug groups, pack prices of $10, $60 and $300, and regular lead times of 1, 3 and 5 days. I compared five policies (ways to decide what to order), all learned or tuned on 2014–2017 sales:

  • Single source (never rush): one par level, the stock level you order back up to, and regular orders only. This is the chapter's baseline. A rush-only version was never cheaper.
  • Par plus rush (the one-sentence rule): a par level on the regular order, and each morning, rush exactly what is owed to waiting patients.
  • Dual index (the best rush rule I could tune): the classic two-level rule, tuned by simulation.5 With equal failure rates, the chapter's own heuristic reduces to it.
  • DCL (the learning method): one network per setting.
  • EPL (the learning method, one model for everything): one network for all 63 settings, also trained on demand from half to double the real level.

What happened

The number to watch is total cost: holding stock, making patients wait, and paying for rush. Lower is better. First, the chapter's own kind of test: demand that looks like the training years. In that test the rush order was worth almost nothing. The dual index rule beat single sourcing by 0.2% in total, and 99.6% of packs were served from stock. With my costs, holding a few extra packs was cheaper than paying for speed. DCL came within 1.1% of the dual index rule but did not beat it. It was better by more than 1% in 1 setting of 63, and worse by more than 1% in 39. EPL was 1.2% behind. The chapter itself notes this pattern: learned policies help least when dual sourcing gains little over a single supplier.

Demand that looks like 2014–2017 · total cost over 63 settings, % above the best ruleSingle source (BSP)+0.2%Par + rush what you owe+0.2%Dual index (DIP)bestDCL, one net per item+1.1%EPL, one net for all+1.2%100 one-year paths per setting · the rush order itself was worth 0.2% here
When demand behaves like the past, there is little to learn. Total cost over the 63 settings, relative to the tuned dual index rule; 100 one-year paths per setting drawn from 2014–2017 sales.

Then the real 2018–2019 days. Demand moved. Asthma and COPD drugs sold 50% more than in 2014–2017, antihistamines 33% more, and aspirin-type analgesics 27% less.

Packs sold per day, monthly average · one pharmacy's point-of-sale data04812201420152016201720182019policies learned and tuned here (2014–2017)tested on the real daysAsthma and COPD · +50%Antihistamines · +33%Aspirin-type · −27%
Real monthly sales for three of the seven drug groups. Every policy was learned or tuned on the white part and tested on the shaded part.

With every policy frozen as tuned on the past (stock levels left as they were), par plus rush cost 13.4% less than single sourcing (never rushing), and the dual index rule 11.0% less. Here the rush order worked less as a strategy than as insurance against a forecast that went stale. DCL and EPL, frozen, cost 8.0% and 6.2% more than single sourcing: my reading is that the networks met states they had rarely seen in training.

In this experiment, re-planning every quarter from the last twelve months of sales did more than any choice of policy. It cut the single-source rule's cost by 26.6%. Par plus rush, re-planned, was another 9.2% lower, and 33.3% below single sourcing left alone: about a third. This is where EPL looked most useful. The same network, simply fed each quarter's new demand numbers with no retraining, cost 30.9% less than when frozen, as little as the re-tuned single-source rule. It still did not match the re-tuned rush rule, and it almost never rushed.

Real 2018–2019 days · total cost over 63 settings · frozen single source = 100frozen as tuned on 2014–2017re-planned every quarterSingle source10073.4Par + rush what you owe86.666.7Dual index8967.7EPL, one net106.273.4DCL, net per item*108108, stays frozen* one network per item, trained on 2014–2017; it would need retraining to use new demand
Total cost on the real 2018–2019 days over the 63 settings, with frozen single sourcing set to 100. Re-planning every quarter helped every policy that could re-plan. DCL keeps one network per item and cannot use new demand without retraining.

Here, the regular lead time largely decided whether a rush option was worth having. With next-day regular delivery, par plus rush saved 0.3% on the real days. With 3 days it saved 4.1%, and with 5 days 14.8%. Rush orders stayed rare, about once every eight months per drug group.

Saving from adding the rush order, vs the single-source rule (%), by regular lead time-0.20.3next day04.13 days+0.614.85 daysdemand like the past (dual index vs single source)real 2018–19, re-planned (par + rush vs single source)
Saving from adding the rush order, by regular lead time. Grey: demand like 2014–2017. Green: the real 2018–2019 days, every policy re-planned quarterly.

What didn't work

In this setting, the learning part of the thesis did not pay off. My DCL and EPL did not beat the tuned rule overall. My version is much smaller than the thesis's: 128 simulated futures per candidate order instead of 2,000, a 30-day look-ahead instead of 500 to 1,000 days, three rounds, and a start from the tuned rule rather than from scratch. A first full run that started from an untuned rule did worse, 4.8% above the tuned rule, and was still improving when it stopped. A full-size run might close the 1% gap. I doubt it would open a large one: with these costs, the best possible dual-sourcing policy had little room over a single supplier. Re-planning also hurt one group: anxiolytic sales dipped in 2017 and recovered in 2018, so the trailing year under-stocked.

If you want to try it

  • Write down two numbers for each supplier: how many days the regular order takes, and what a rush really costs (fee, premium, staff time). In this experiment, with next-day regular delivery, the rush logic added nothing.
  • Re-set par levels every quarter from the last 12 months of sales. Here that did more than any policy choice, though it hurt one drug group whose sales had dipped the year before. Seasonal items need more care: antihistamine sales peaked in late spring.
  • Try a rush rule you can say in one sentence: when you owe a patient, rush exactly what you owe. In this test it cost almost nothing when demand behaved and paid off when demand shifted.
  • A learned policy did not earn its keep here. If you manage hundreds of items, EPL's idea is the part I would test next: one model for all items, fed each item's numbers, so a shift in demand is a new input rather than a new training run.

What would change this conclusion

  • Expensive stock. If holding a pack costs much more than 30% of its price per year (short expiry, refrigeration, tight cash), safety stock stops being cheap, and a rush option, and a smarter policy for using it, could be worth far more than the 0.2% I found under stable demand.
  • A real per-drug model. I treated each drug group as one item. Thousands of slow-moving single drugs, each with a few packs a month, look more like the thesis's spare parts, where DCL did beat simple rules.
  • Lost patients instead of waiting ones. If a patient who can't be served goes elsewhere for good, a stockout costs more than my $5 plus 10% per day, and the balance between holding and rushing shifts.
  • A full-size DCL run, or a different pharmacy. My learning runs were far smaller than the thesis's, and the sales come from one store. Either could move the 1% gap between DCL and the tuned rule in either direction.

Caveats

The sales are real but come from one pharmacy, and the dataset does not say where. Its publisher pre-processed it (outlier treatment, missing-value imputation). Each drug group stands in for one item, while a real pharmacy stocks each drug separately. I left out paracetamol-type drugs, about 30 packs a day, because their order sizes were too large for my networks. All costs are my assumptions, and the results depend on them. Patients wait in this model; in reality some go elsewhere. No policy uses seasonality. The chapter's distinctive feature, parts that fail at different rates depending on the source, has no analogue for pills, so this post tests the chapter's learning methods, not its main model. The code and results are public.9

Drafted with AI assistance (Claude). The experiment ran on my machine, and every number above is in the repository.