{
  "schemaVersion": 1,
  "slug": "greenhouse-size-calculator",
  "category": "gardening",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "03a2a53dda71931bdc198c416437b14ca74ac1e3901870ae02755a3c5c3f5f87",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/greenhouse-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": "B = n × s; w = max(6,w₀); l = max(8,l₀); A = w × l; V = A × (h + 0.75)",
    "vars": [
      [
        "n",
        "plants"
      ],
      [
        "s",
        "bench area per plant (sq ft)"
      ],
      [
        "w,l",
        "estimated width and length (ft)"
      ],
      [
        "A",
        "floor area (sq ft)"
      ],
      [
        "h",
        "eave height (ft)"
      ],
      [
        "V",
        "interior volume (cu ft)"
      ]
    ],
    "note": "Minimum dimensions are 6 ft wide and 8 ft long. Volume assumes a gable roof with a fixed 1.5-ft rise, so its average roof cross-section adds 0.75 ft above the eaves. Both long sides: (w₀,l₀) = (4+p,B/4); One side only: (w₀,l₀) = (2+p,B/2); Central island bench: (w₀,l₀) = (4+2p,B/4)"
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "Oklahoma State University Extension — Bench and walkway sizing",
        "url": "https://extension.okstate.edu/fact-sheets/the-hobby-greenhouse-2"
      }
    ],
    "referenceRole": "context",
    "implementationHash": "03a2a53dda71931bdc198c416437b14ca74ac1e3901870ae02755a3c5c3f5f87",
    "basis": "B = n × s; w = max(6,w₀); l = max(8,l₀); A = w × l; V = A × (h + 0.75)",
    "limitations": "The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions."
  },
  "contract": {
    "compute": "const benchSpace=plants*spacePerPlant; let width,length; if(benchSides===\"both\"){width=4+pathWidth;length=benchSpace/4;} else if(benchSides===\"one\"){width=2+pathWidth;length=benchSpace/2;} else if(benchSides===\"centre\"){width=4+2*pathWidth;length=benchSpace/4;} else {width=6;length=benchSpace/width;} const w=Math.max(6,width);const l=Math.max(8,length);const floorArea=w*l;return {benchSpace,width:w,length:l,floorArea,volume:floorArea*(eaveHeight+0.75)};",
    "inputs": [
      {
        "name": "plants",
        "type": "number",
        "default": 40,
        "min": 1,
        "max": 2000,
        "step": 1,
        "slider": true
      },
      {
        "name": "spacePerPlant",
        "type": "number",
        "default": 1.5,
        "min": 0.3,
        "max": 10,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "benchSides",
        "type": "select",
        "default": "both",
        "options": [
          {
            "value": "both"
          },
          {
            "value": "one"
          },
          {
            "value": "centre"
          },
          {
            "value": "none"
          }
        ]
      },
      {
        "name": "pathWidth",
        "type": "number",
        "default": 2,
        "min": 1,
        "max": 6,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "eaveHeight",
        "type": "number",
        "default": 6,
        "min": 4,
        "max": 12,
        "step": 0.5,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "benchSpace",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "width",
        "precision": 1,
        "unit": "ft"
      },
      {
        "name": "length",
        "precision": 1,
        "unit": "ft"
      },
      {
        "name": "floorArea",
        "precision": 1,
        "unit": "sq ft"
      },
      {
        "name": "volume",
        "precision": 0,
        "unit": "cu ft"
      }
    ],
    "interpret": null
  }
}
