Skip to content

Main content

Random Multi-Recipe Shopping List Generator

Sample supplied recipes, draw target servings, delegate ingredient scaling and compatible mass/volume conversions, and combine matching ingredient IDs in grams, milliliters or each. Only supplied grams-per-milliliter densities convert volume to mass; otherwise dimensions stay separate. Count amounts may be fractional, repeats are explicit, and nothing implies nutrition or food safety.

Loading tool…

Description

Sample supplied recipes, draw target servings, delegate ingredient scaling and compatible mass/volume conversions, and combine matching ingredient IDs in grams, milliliters or each. Only supplied grams-per-milliliter densities convert volume to mass; otherwise dimensions stay separate. Count amounts may be fractional, repeats are explicit, and nothing implies nutrition or food safety.

A logistics test dataset combines supplied operating ranges with explicit quantity and unit conventions. Constructed measurements and calculated indicators can exercise reports and calculators without claiming to represent an observed operation or a safe physical plan.

Sample supplied recipes, draw target servings, delegate ingredient scaling and compatible mass/volume conversions, and combine matching ingredient IDs in grams, milliliters or each. Only supplied grams-per-milliliter densities convert volume to mass; otherwise dimensions stay separate. Count amounts may be fractional, repeats are explicit, and nothing implies nutrition or food safety.

When to use this tool

Use this generator to create reproducible multi recipe shopping list cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply recipes, selectionCount, withoutReplacement, targetServings, densities in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read selections, shoppingList. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Sample recipes with the chosen repeat policy and target servings, scale every ingredient, and normalize mass to grams, volume to milliliters, and counts to each. Convert volume to grams only where a supplied ingredient density exists, then aggregate by ingredient ID and normalized unit.1

Delegated operations used for this result: recipe scale; mass. Their calculation or parsing conventions apply to the corresponding result fields.2, 3

Input fieldMeaning and unitsAccepted input
recipesRecipesRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 64.
recipes[].idLiteral identifier used to match records, independently of their display labels.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
recipes[].originalServingsOriginal ServingsRequired. Finite number; minimum 1.
recipes[].ingredientsIngredientsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
recipes[].ingredients[].ingredientIdIngredient IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
recipes[].ingredients[].amountAmountRequired. Finite number; minimum 0.
recipes[].ingredients[].dimensionDimensionRequired. Text; one of "mass", "volume", "count".
recipes[].ingredients[].unitUnitRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 64.
selectionCountSelection CountRequired. Safe integer; minimum 1; maximum 16.
withoutReplacementWithout ReplacementRequired. Boolean.
targetServingsTarget ServingsRequired. Array of Finite number; minimum 0.; minimum items 1; maximum items 32.
densitiesEstimated density at each returned point, in inverse sample units.Required. Array of Object; no unknown keys.; maximum items 128.
densities[].ingredientIdIngredient IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
densities[].gramsPerMilliliterGrams Per MilliliterRequired. Finite number; strictly above 0.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
selectionsSelectionsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 16.
selections[].recipeIdRecipe IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
selections[].originalServingsOriginal ServingsRequired. Finite number; minimum 1.
selections[].targetServingsTarget ServingsRequired. Finite number; minimum 0.
selections[].ingredientsIngredientsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
selections[].ingredients[].ingredientIdIngredient IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
selections[].ingredients[].originalAmountOriginal AmountRequired. Finite number; minimum 0.
selections[].ingredients[].originalUnitOriginal UnitRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 64.
selections[].ingredients[].scaledAmountScaled AmountRequired. Finite number; minimum 0.
selections[].ingredients[].normalizedAmountNormalized AmountRequired. Finite number; minimum 0.
selections[].ingredients[].normalizedUnitNormalized UnitRequired. Text; one of "g", "ml", "each".
shoppingListShopping ListRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 512.
shoppingList[].ingredientIdIngredient IdRequired. Text; minimum UTF-16 length 1; maximum UTF-16 length 128.
shoppingList[].unitUnitRequired. Text; one of "g", "ml", "each".
shoppingList[].amountAmountRequired. Finite number; minimum 0.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "recipes": [
      {
        "id": "R1",
        "originalServings": 2,
        "ingredients": [
          {
            "ingredientId": "flour",
            "amount": 0.25,
            "dimension": "mass",
            "unit": "kg"
          },
          {
            "ingredientId": "milk",
            "amount": 100,
            "dimension": "volume",
            "unit": "ml"
          }
        ]
      },
      {
        "id": "R2",
        "originalServings": 1,
        "ingredients": [
          {
            "ingredientId": "flour",
            "amount": 50,
            "dimension": "mass",
            "unit": "g"
          },
          {
            "ingredientId": "milk",
            "amount": 0.2,
            "dimension": "volume",
            "unit": "l"
          },
          {
            "ingredientId": "eggs",
            "amount": 1,
            "dimension": "count",
            "unit": "each"
          }
        ]
      }
    ],
    "selectionCount": 2,
    "withoutReplacement": true,
    "targetServings": [
      2,
      4
    ],
    "densities": [
      {
        "ingredientId": "milk",
        "gramsPerMilliliter": 1.03
      }
    ],
    "seed": 42
  },
  "output": {
    "selections": [
      {
        "recipeId": "R2",
        "originalServings": 1,
        "targetServings": 4,
        "ingredients": [
          {
            "ingredientId": "flour",
            "originalAmount": 50,
            "originalUnit": "g",
            "scaledAmount": 200,
            "normalizedAmount": 200,
            "normalizedUnit": "g"
          },
          {
            "ingredientId": "milk",
            "originalAmount": 0.2,
            "originalUnit": "l",
            "scaledAmount": 0.8,
            "normalizedAmount": 824,
            "normalizedUnit": "g"
          },
          {
            "ingredientId": "eggs",
            "originalAmount": 1,
            "originalUnit": "each",
            "scaledAmount": 4,
            "normalizedAmount": 4,
            "normalizedUnit": "each"
          }
        ]
      },
      {
        "recipeId": "R1",
        "originalServings": 2,
        "targetServings": 4,
        "ingredients": [
          {
            "ingredientId": "flour",
            "originalAmount": 0.25,
            "originalUnit": "kg",
            "scaledAmount": 0.5,
            "normalizedAmount": 500,
            "normalizedUnit": "g"
          },
          {
            "ingredientId": "milk",
            "originalAmount": 100,
            "originalUnit": "ml",
            "scaledAmount": 200,
            "normalizedAmount": 206,
            "normalizedUnit": "g"
          }
        ]
      }
    ],
    "shoppingList": [
      {
        "ingredientId": "flour",
        "unit": "g",
        "amount": 700
      },
      {
        "ingredientId": "milk",
        "unit": "g",
        "amount": 1030
      },
      {
        "ingredientId": "eggs",
        "unit": "each",
        "amount": 4
      }
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Without density, the same ingredient can retain separate gram and milliliter totals. Densities are caller data; units and dimensions are checked, but this is not nutrition, allergy, storage, or cooking-safety advice.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Multi-Recipe Shopping List Generator — tool.io

  2. Calculation or validation: cooking/recipe-scale — tool.io

  3. Calculation or validation: convert/mass — tool.io

Similar or alternative tools

  • Random Inventory ABC Classification Dataset Generator

    Generate positive synthetic demand and unit values in one caller-labeled value unit, rank independently by annual usage value and demand throughput, and delegate cumulative-share ABC classifications. Value policy remains the existing fixed 80/95 boundaries, velocity boundaries are explicit, ties retain item order, and classification uses the cumulative share including the current item—not a forced A class for the largest item.

  • Random Inventory Forecast Error Dataset Generator

    Construct nonnegative synthetic demand with selected perfect, signed-additive or multiplicative forecast patterns, retain parameters and zero-clamping, and delegate MAE plus logistics WMAPE/bias. All-zero actual demand makes WMAPE explicitly undefined, not zero; outputs preserve existing floating arithmetic and are controlled fixtures rather than forecast-quality guarantees.