{
  "schemaVersion": 1,
  "slug": "hamster-cage-size-calculator",
  "category": "pets",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "9ecd6448bd07b9282fbcfe149de4880ad747bd1a0e996a884c365d60b9152e5b",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/hamster-cage-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_total = a×n; L_each = b",
    "vars": [
      [
        "n",
        "Number of hamsters"
      ],
      [
        "a",
        "Base floor area per hamster, in²"
      ],
      [
        "b",
        "Base enclosure length, in"
      ],
      [
        "A_min",
        "Minimum floor area, in²"
      ],
      [
        "L_min",
        "Minimum enclosure length, in"
      ]
    ],
    "note": "count means separate enclosures. Total floor area = base area × count; length, bedding and wheel are per enclosure. The reference aligns with about 100 × 50 cm floor area and 20 cm digging bedding guidance; it is not a welfare certification."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const S = { syrian:[775, 40, 10, 12], dwarf:[775, 40, 10, 8.5], roborovski:[775, 40, 10, 8.5], chinese:[775, 40, 10, 8.5] }; const s = S[species] || S.syrian; const minArea = s[0]*count; const minLength = s[1]; return { minArea, minAreaSqft: minArea/144, minLength, minBedding: s[2], wheelSize: s[3], note: 'Area and dimensions are a simplified planning reference, not a welfare certification. Do not infer that hamsters can share an enclosure; confirm species-specific housing with an experienced rescue or veterinarian.' };",
    "inputs": [
      {
        "name": "species",
        "type": "select",
        "default": "syrian",
        "options": [
          {
            "value": "syrian"
          },
          {
            "value": "dwarf"
          },
          {
            "value": "roborovski"
          },
          {
            "value": "chinese"
          }
        ]
      },
      {
        "name": "count",
        "type": "number",
        "default": 1,
        "min": 1,
        "max": 4,
        "step": 1
      }
    ],
    "outputs": [
      {
        "name": "minArea",
        "precision": 0,
        "unit": "sq in"
      },
      {
        "name": "minAreaSqft",
        "precision": 2,
        "unit": "sq ft"
      },
      {
        "name": "minLength",
        "precision": 0,
        "unit": "in"
      },
      {
        "name": "minBedding",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "wheelSize",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "note",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
