Examples
Examples
Try the starting example
- Lots [lot ID,expiry ISO date,units]; enter JSON
- [["A","2026-11-05",10],["B","2026-11-10",20]]
- Orders [dispatch ISO date,units]; enter JSON
- [["2026-11-01",12],["2026-11-04",15]]
- User minimum remaining life (days)
- 3
- Dispatch allocation ledger (JSON)
- {"allocations":[[1,"A",10],[1,"B",2],[2,"B",15]],"shortages":[],"remaining":[["A",0],["B",3]]}
- Unfilled order units
- 0
Try another scenario
- Lots [lot ID,expiry ISO date,units]; enter JSON
- [["A","2026-11-04",8],["B","2026-11-12",15]]
- Orders [dispatch ISO date,units]; enter JSON
- [["2026-11-02",10],["2026-11-07",18]]
- User minimum remaining life (days)
- 4
- Dispatch allocation ledger (JSON)
- {"allocations":[[1,"B",10],[2,"B",5]],"shortages":[[2,13]],"remaining":[["A",8],["B",0]]}
- Unfilled order units
- 13
Calculation method
Calculation method
Dispatch allocation ledger (JSON)
Process orders in chronological input order; eligible expiry>=dispatch+minimum; allocate earliest expiry first, lot-ID ties.
Unfilled order units
Sum order shortages.
Symbols and units
- a
- Lots [lot ID,expiry ISO date,units]; enter JSON
- b
- Orders [dispatch ISO date,units]; enter JSON
- c
- User minimum remaining life (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
- First-expiry-first-out lot dispatch using a user-supplied remaining-life minimum; no product safety judgment. 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. Valid ISO dates; orders chronological; unique lot IDs; all units nonnegative integers.
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.