Examples
Examples
Try the starting example
- Lots [lot ID,expiry day,stock units]
- [["A",5,20],["B",10,30]]
- Demand [day,units]
- [[2,15],[7,30]]
- First-expiry-first-out allocation
- [[2,"A",15],[7,"B",30]]
- Shortage units
- 0
- Remaining lot stocks
- [["A",5,5],["B",0,10]]
Try another scenario
- Lots [lot ID,expiry day,stock units]
- [["A",5,20],["B",10,30]]
- Demand [day,units]
- [[2,20],[7,35]]
- First-expiry-first-out allocation
- [[2,"A",20],[7,"B",30]]
- Shortage units
- 5
- Remaining lot stocks
- [["A",0,5],["B",0,10]]
Calculation method
Calculation method
First-expiry-first-out allocation
Process demand by increasing day; use lots with expiry≥demand day in expiry then input order.
Shortage units
Unfilled demand; expired lots are not used.
Remaining lot stocks
Balances after allocations, including expired stock separately identifiable by lot expiry.
Symbols and units
- a
- Lots [lot ID,expiry day,stock units]
- b
- Demand [day,units]
Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.
Assumptions & limits
Assumptions & limits
- Lots, expiry, demand forecast, stock. Returns First-expiry allocation and shortages. All coefficients and observations are user supplied; results describe only the stated mathematical model. Quantities are deterministic calculations from supplied observations and assumptions; no external data is fetched. Supported limits: Finite inputs only; numeric fields bounded as labelled. Lists and JSON records are limited to 256 entries unless a stricter tool bound is stated. No automatic design approval, legal conclusion, treatment recommendation or safety certification.
Are these inputs private?
These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.