{
  "schemaVersion": 1,
  "slug": "taco-bar-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "cb789d38b5ea28861b83131d51384b0a06bb682dff9ecfd71f99f49bd7397633",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/taco-bar-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": "T = G × t; M = G(1 − v÷100) × t × o ÷ 16",
    "vars": [
      [
        "G",
        "Number of guests"
      ],
      [
        "t",
        "Tortillas per person"
      ],
      [
        "v",
        "Vegetarian share (%)"
      ],
      [
        "o",
        "Meat per tortilla (oz)"
      ],
      [
        "T",
        "Tortillas needed"
      ],
      [
        "M",
        "Meat needed (lb)"
      ]
    ],
    "note": "Cheese = 1.5G ÷ 16 lb; salsa = 0.5G cups; sour cream = 0.4G cups; lettuce = ⌈G ÷ 12⌉ heads."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const tortillas = guests*tortillasPerPerson; const meatEaters = guests*(1 - vegetarianPct/100); const meatOz = meatEaters*tortillasPerPerson*meatOzPerTortilla; return { tortillas: tortillas, meatLb: meatOz/16, meatOz: meatOz, cheeseLb: guests*1.5/16, salsaCups: guests*0.5, lettuceHeads: Math.ceil(guests/12), sourCreamCups: guests*0.4 };",
    "inputs": [
      {
        "name": "guests",
        "type": "number",
        "default": 25,
        "min": 1,
        "max": 500,
        "step": 1,
        "slider": true
      },
      {
        "name": "tortillasPerPerson",
        "type": "number",
        "default": 3,
        "min": 1,
        "max": 10,
        "step": 1
      },
      {
        "name": "meatOzPerTortilla",
        "type": "number",
        "default": 2,
        "min": 0.5,
        "max": 8,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "vegetarianPct",
        "type": "number",
        "default": 15,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "tortillas",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "meatLb",
        "precision": 1,
        "unit": "lb"
      },
      {
        "name": "meatOz",
        "precision": 0,
        "unit": "oz"
      },
      {
        "name": "cheeseLb",
        "precision": 1,
        "unit": "lb"
      },
      {
        "name": "salsaCups",
        "precision": 1,
        "unit": "cups"
      },
      {
        "name": "lettuceHeads",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "sourCreamCups",
        "precision": 1,
        "unit": "cups"
      }
    ],
    "interpret": null
  }
}
