Examples
Examples
Try the starting example
- JSON Items [ID,available units,units per approved parcel]
- [["grain",120,3],["tins",90,2]]
- Households needing identical parcels (count)
- 50
- Feasible complete parcels
- 40
- Leftover units after allocation
- [["grain",0],["tins",10]]
- Unserved households
- 10
Try another scenario
- JSON Items [ID,available units,units per approved parcel]
- [["grain",120,3],["tins",90,2]]
- Households needing identical parcels (count)
- 35
- Feasible complete parcels
- 35
- Leftover units after allocation
- [["grain",15],["tins",20]]
- Unserved households
- 0
Calculation method
Calculation method
Feasible complete parcels
min(b,min(math.floor(r[1]/r[2]) for r in a))
Leftover units after allocation
J([[r[0],r[1]-r[2]*min(b,min(math.floor(q[1]/q[2]) for q in a))] for r in a])
Unserved households
max(0,b-min(math.floor(r[1]/r[2]) for r in a))
Symbols and units
- a
- JSON Items [ID,available units,units per approved parcel]
- b
- Households needing identical parcels (count)
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
- One explicitly approved parcel template only; no nutrition adequacy, fairness or multiple-template optimization asserted. Supported limits: All numeric inputs must be finite. Only the explicitly described mathematical scenario is supported.
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.