Skip to content

Main content

Food Parcel Mixedpack Splitting Rounding Gap Tool

Calculate food parcel mixedpack splitting rounding gap from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter available, requiredPerParcel. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
availableAvailableRequired. Array of safe integer; maximum items 256.
requiredPerParcelRequired Per ParcelRequired. Array of safe integer; maximum items 256.
Output fieldInterpretationReturned shape
completeParcelsComplete ParcelsRequired. Safe integer.
leftoversLeftoversRequired. Array of safe integer; maximum items 256.
limitingIndicesLimiting IndicesRequired. Array of safe integer; maximum items 256.
json
{
  "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

  1. Calculation and input contract: food-security/food-parcel-mixedpack-splitting-rounding-gap — tool.io

Similar or alternative tools