{
  "schemaVersion": 1,
  "slug": "event-seating-chart-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "72aa9f1a573e9924ea216bf288379dcae62c8c7bcaf5e4698e249150542c70b6",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/event-seating-chart-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 = ceil(G ÷ s); C = T × s + h; N = ceil(1.2 × G) + h",
    "vars": [
      [
        "G",
        "guests"
      ],
      [
        "s",
        "seats per guest table"
      ],
      [
        "h",
        "head-table seats"
      ],
      [
        "T",
        "guest tables"
      ],
      [
        "C",
        "total chairs"
      ],
      [
        "N",
        "napkins"
      ]
    ],
    "note": "Guest tables are rounded up to fit the selected seats per table. A positive head-table value adds one head table and its seats. Napkins use a model allowance of 1.2 per guest plus the head-table seat count; this is a planning assumption, not an event standard."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const guestTables = Math.ceil(guests/seatsPerTable); const head = headTable > 0 ? 1 : 0; const total = guestTables + head; const cap = guestTables*seatsPerTable + headTable; return { tables: guestTables, totalTables: total, chairs: cap, linens: total, centerpieces: guestTables, napkins: Math.ceil(guests*1.2) + headTable, emptySeats: cap - guests };",
    "inputs": [
      {
        "name": "guests",
        "type": "number",
        "default": 100,
        "min": 1,
        "max": 2000,
        "step": 1,
        "slider": true
      },
      {
        "name": "seatsPerTable",
        "type": "number",
        "default": 10,
        "min": 4,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "headTable",
        "type": "number",
        "default": 8,
        "min": 0,
        "max": 40,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "tables",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "totalTables",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "chairs",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "linens",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "centerpieces",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "napkins",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "emptySeats",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
