Chocolate Factory in the Rhythm of the Season | Module 5 of 9

The Remaining Shelf Life:
Which pallet leaves the factory first

Two pallets from the same week do not have the same durability: one batch with higher water content, two days longer in the warm picking zone. The warehouse ships by production date. A model on quality and storage temperature data ships by real remaining shelf life.

Model calculation - fictitious sample company

This module is part of a nine-part model calculation on a fictitious mid-sized chocolate manufacturer (€95 million net revenue, 140 items, 4 lines). All euro amounts are derived from the documented assumptions of the sample company. They are not results of real customers and not a performance promise. Which values are achievable on your data is shown only by a pilot.

01 The problem - the label does not know the batch

The best-before date applies to the product, real durability to the batch

Retailers only accept goods with sufficient remaining shelf life; a common rule is that the first third of the life may sit with the manufacturer. A batch that stayed too long in the own warehouse is unsellable to the retailer - and fat bloom makes the goods unsightly long before the date expires.

After the better seasonal volume from module 01, the sample company is left with €399,000 of write-offs and €250,000 of returns for short remaining life per year. Neither arises from overproduction but from the order in which existing goods leave the warehouse.

Not "oldest first" - but "shortest remaining life first"

Dynamic FIFO: the picking order follows the forecast remaining shelf life per batch, not the production date.

QA batch record
Storage temperature
Gradient boosting
Remaining life per batch
Dynamic FIFO

02 The model - remaining life as a regression with a safety margin

Features per batch: fat share, water content, tempering curve, days above 20 °C, peak temperature, packaging; target: days until visible fat bloom

▸ Example values - illustration of the method, not an analysis carried out
Mean error of the remaining-life forecast: 11 days
Batches below the retail window within 14 days: 7 of 212
Actual against forecast remaining shelf life per batch (example values, 120 batches)
↳ Storage temperature is the main driver

Fat bloom is the most frequent reason chocolate becomes unsellable before the date, and storage temperature is its strongest driver: constant coolness preserves, temperature swings accelerate. The logger in the picking zone is therefore a data source of the first rank. The model forecasts with a safety margin: it would rather underestimate remaining life than overestimate it.

03 Business impact - the remainder after module 01

The lever: the write-off stock remaining after the seasonal volume, and the returns

€154,800
Savings / year
−20 %
Fewer residual write-offs
−30 %
Fewer returns
Write-off chain - base, after module 01, after module 05
Model calculation · How the amount arises - derived in the open

Every assumption comes from the sample company and is stored centrally. With your figures the input changes, not the method.

PositionValue
Write-offs / year (base today)€570,000
Already avoided by module 01−€171,000
Base: Remaining write-offs / year€399,000
Lever: Fewer residual write-offs through dynamic FIFO (20 %)€79,800
Returns for short remaining life / year€250,000
Lever: Fewer returns (30 %)€75,000
Result: savings / year€154,800

Assumptions of a sample company - in a real project your data replaces these values.

↳ No double counting

Module 01 lowers overproduction; this module only steers the stock that still arises afterwards. The remainder is derived in the calculation from module 01, never set as its own number. Fat bloom is counted only in this module; module 07 counts complaints without fat bloom.

04 Next steps in your factory

From the QA record to the picking order

① Link the batches

QA record, storage temperature and complaints get a shared batch key - the step where most projects get stuck.

② Storage test as ground truth

One category with documented storage tests is modelled. You see the forecast error in days against the real findings.

③ Order in the warehouse system

The forecast remaining life becomes the sort key of picking; batches below the retail window are flagged two weeks ahead.

All 9 modules: AI in the chocolate factory