Examples
Examples
Try the starting example
- Daily demand (units)
- 4,5,6,3,4,5,2
- Allowed delivery day indices (zero-based)
- 0,3,5
- Usable shelf life after delivery (days)
- 3
- Order lead time (days)
- 1
- Order and stock ledger (JSON)
- {"orders":[[-1,0,15],[2,3,7],[4,5,7]],"shortages":[],"discarded":0,"ending_stock":0}
- Forecast shortage (units)
- 0
Try another scenario
- Daily demand (units)
- 5,6,7,4,5,6,3
- Allowed delivery day indices (zero-based)
- 0,4
- Usable shelf life after delivery (days)
- 3
- Order lead time (days)
- 2
- Order and stock ledger (JSON)
- {"orders":[[-2,0,18],[2,4,14]],"shortages":[[3,4]],"discarded":0,"ending_stock":0}
- Forecast shortage (units)
- 4
Calculation method
Calculation method
Order and stock ledger (JSON)
At each allowed delivery, target demand until next delivery or shelf-life expiry, whichever first; subtract stock surviving entire coverage; order balance. Daily FEFO consume and expire at start of expiry day.
Forecast shortage (units)
Sum daily demand not covered before expiry.
Symbols and units
- a
- Daily demand (units)
- b
- Allowed delivery day indices (zero-based)
- c
- Usable shelf life after delivery (days)
- d
- Order lead time (days)
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
- Daily demand and allowed delivery-day indices, with a fixed user shelf life. Orders may be placed before horizon start; shortages explicitly exposed. Supported limits: All numeric inputs and computed intermediates must remain finite. Supported numeric input magnitude is zero or 1e-12 through 1e12 in absolute value; reject values outside this bounded range. All lists/JSON record tables are limited to 100 records unless a stricter bound is stated; reject malformed record arity and wrong member types. Daily horizon 1..100 days; delivery indices distinct integers in horizon; integer quantities>=0; shelf life>0, lead>=0. No initial inventory; shelf-life expiry at delivery index+life; no safety-stock policy inferred.
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.