Description
Take minimum floored quotient as complete parcels; return each leftover and all indexes tied on that quotient.
Stock planning relates quantities to use rates, reservations, losses and package sizes. The resulting coverage is a model of supplied inventory, not assurance of edibility, safe storage, adequate nutrition or actual recipient eligibility.
Take minimum floored quotient as complete parcels; return each leftover and all indexes tied on that quotient.
When to use this tool
Use Food Parcel Mixedpack Splitting Rounding Gap when you need an explicit food-inventory or distribution-budget calculation.
How to use the tool and how it works
- Enter available, requiredPerParcel. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read completeParcels, leftovers, limitingIndices. Use the output convention below.
Require aligned nonempty nonnegative available quantities and positive per-parcel requirements. Take minimum floored quotient as complete parcels; return each leftover and all indexes tied on that quotient.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| available | Available | Required. Array of safe integer; maximum items 256. |
| requiredPerParcel | Required Per Parcel | Required. Array of safe integer; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| completeParcels | Complete Parcels | Required. Safe integer. |
| leftovers | Leftovers | Required. Array of safe integer; maximum items 256. |
| limitingIndices | Limiting Indices | Required. Array of safe integer; maximum items 256. |
{
"input": {
"available": [
10,
12
],
"requiredPerParcel": [
2,
3
]
},
"output": {
"completeParcels": 4,
"leftovers": [
2,
0
],
"limitingIndices": [
1
]
}
} Limitations and assumptions
- Limiting indexes use whole-parcel capacity, so different continuous ratios can tie. This inventory model does not assess package balance, nutrition, or actual distribution.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Reconcile physical stock and the applicable handling and distribution procedures. Assess food condition and appropriate nutritional requirements independently of inventory arithmetic.
References
Similar or alternative tools
- Food Parcel Split Unit Remainder
Floor-divide for complete parcels, cap served households at demand, and return unit remainder and unmet households.
- Foodaid Shared Package Allocation Remainder
Divide distributable units into equal whole units and remainder.