{
  "schemaVersion": 1,
  "slug": "punch-bowl-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "593eb4c5c6100e8d3545063e09b1038cddfefaf86800576d3bf7b2c0c4d43c4f",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/punch-bowl-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "V = G × n × c ÷ 128; B = ⌈V ÷ b⌉; V_j = 0.5V; V_s = 0.4V; M_i = 4V",
    "vars": [
      [
        "G",
        "Guests"
      ],
      [
        "n",
        "Cups per guest"
      ],
      [
        "c",
        "Cup size (oz)"
      ],
      [
        "V",
        "Total punch (gal)"
      ],
      [
        "b",
        "Bowl capacity (gal)"
      ],
      [
        "B",
        "Batches needed"
      ]
    ],
    "note": "Total volume = guests × cups per guest × cup size in fluid ounces ÷ 128. Batches = ceiling(total gallons / bowl size). Juice, soda, sherbet, ice and cup quantities use fixed planning ratios and do not form a recipe guarantee."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const totalOz = guests*cupsPerGuest*cupSize; const gallons = totalOz/128; return { totalGallons: gallons, batchesNeeded: bowlSize > 0 ? Math.ceil(gallons/bowlSize) : 0, juiceGallons: gallons*0.5, sodaGallons: gallons*0.4, sherbetQuarts: guests*0.11, iceLb: gallons*4, cups: guests*cupsPerGuest + Math.ceil(guests*0.3) };",
    "inputs": [
      {
        "name": "guests",
        "type": "number",
        "default": 40,
        "min": 1,
        "max": 500,
        "step": 1,
        "slider": true
      },
      {
        "name": "cupsPerGuest",
        "type": "number",
        "default": 2,
        "min": 1,
        "max": 8,
        "step": 1
      },
      {
        "name": "cupSize",
        "type": "number",
        "default": 8,
        "min": 4,
        "max": 24,
        "step": 1,
        "slider": true
      },
      {
        "name": "bowlSize",
        "type": "number",
        "default": 1.5,
        "min": 0.5,
        "max": 10,
        "step": 0.25,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "totalGallons",
        "precision": 2,
        "unit": "gallons"
      },
      {
        "name": "batchesNeeded",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "juiceGallons",
        "precision": 2,
        "unit": "gallons"
      },
      {
        "name": "sodaGallons",
        "precision": 2,
        "unit": "gallons"
      },
      {
        "name": "sherbetQuarts",
        "precision": 1,
        "unit": "quarts"
      },
      {
        "name": "iceLb",
        "precision": 1,
        "unit": "lb"
      },
      {
        "name": "cups",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
