{
  "schemaVersion": 1,
  "slug": "event-tent-size-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "01d453d42507809a2479c0e8aeb3246c0d3c4336cf011d53aee4c10899287e8c",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/event-tent-size-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": "A = guests × layout rate + dance? (guests × 0.35 × 3) : 0; side = ceil(√A ÷ 5) × 5",
    "vars": [
      [
        "G",
        "guests"
      ],
      [
        "p",
        "area per guest by layout (sq ft)"
      ],
      [
        "d",
        "dance floor flag (1 yes, 0 no)"
      ],
      [
        "A",
        "total tent area (sq ft)"
      ],
      [
        "L",
        "tent side rounded to 5 ft"
      ]
    ],
    "note": "Layout allowance per guest: cocktail 6, theatre 8, seated 13, buffet 16 sq ft. Dance area = 35% of guests × 3 sq ft. Square side rounds upward to the next 5 ft."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const per=layout==='cocktail'?6:layout==='theater'?8:layout==='buffet'?16:13,ga=guests*per,da=danceFloor==='yes'?guests*0.35*3:0,totalArea=ga+da,side=Math.sqrt(totalArea),roundedSide=Math.ceil(side/5)*5;return {areaPerGuest:per,guestArea:ga,danceArea:da,totalArea,tentSize:roundedSide+' x '+roundedSide+' ft',sideLength:side};",
    "inputs": [
      {
        "name": "guests",
        "type": "number",
        "default": 100,
        "min": 1,
        "max": 3000,
        "step": 1,
        "slider": true
      },
      {
        "name": "layout",
        "type": "select",
        "default": "seated",
        "options": [
          {
            "value": "cocktail"
          },
          {
            "value": "theater"
          },
          {
            "value": "seated"
          },
          {
            "value": "buffet"
          }
        ]
      },
      {
        "name": "danceFloor",
        "type": "select",
        "default": "yes",
        "options": [
          {
            "value": "yes"
          },
          {
            "value": "no"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "tentSize",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "totalArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "areaPerGuest",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "guestArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "danceArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "sideLength",
        "precision": 1,
        "unit": "ft"
      }
    ],
    "interpret": null
  }
}
