{"abstract":"Fractional admissions round to zero and small waves report empty wards.","category":"Epidemic compartment models","checks":7,"contract":"admissions[t] = hosp_frac*infections[t-delay] (0 before the delay); each admission occupies a bed on days t..t+los-1; return [admissions rounded 4, occupancy rounded 4, earliest peak day].","evaluation_group":"w2-epidemic-hospital-occupancy","failed_approach":"Rounding occupancy to integers breaks the 4-decimal contract.","family":"w2-epidemic-hospital-occupancy-rounding-stage","id":"FA-65211","implementations":{"attempt":{"sha256":"bebd322ffc0c0c0b1659e150c00c9cae13151e5bc3e5a9347a12e8cd6ac102f8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(infections, hosp_frac, delay, los):\n    n = len(infections)\n    adm = [hosp_frac * infections[t - delay] if t - delay >= 0 else 0.0 for t in range(n)]\n    occ = []\n    for t in range(n):\n        lo = max(0, t - los + 1)\n        occ.append(round(sum(adm[lo:t + 1])))\n    peak = max(range(n), key=lambda t: (occ[t], -t)) if n else None\n    return [[round(a, 4) for a in adm], occ, peak]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"5ccdff955be8b9068fae3722b3d271afa92fc7df4aa51acb4cb394abbf248552","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(infections, hosp_frac, delay, los):\n    n = len(infections)\n    adm = [hosp_frac * infections[t - delay] if t - delay >= 0 else 0.0 for t in range(n)]\n    occ = []\n    for t in range(n):\n        lo = max(0, t - los + 1)\n        occ.append(round(sum(round(a) for a in adm[lo:t + 1]), 4))\n    peak = max(range(n), key=lambda t: (occ[t], -t)) if n else None\n    return [[round(a, 4) for a in adm], occ, peak]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"ea52b889780290fb0a15bfb36d753f35c1fb232ab07ed690f18c00da09f4765b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(infections, hosp_frac, delay, los):\n    n = len(infections)\n    adm = [hosp_frac * infections[t - delay] if t - delay >= 0 else 0.0 for t in range(n)]\n    occ = []\n    for t in range(n):\n        lo = max(0, t - los + 1)\n        occ.append(round(sum(adm[lo:t + 1]), 4))\n    peak = max(range(n), key=lambda t: (occ[t], -t)) if n else None\n    return [[round(a, 4) for a in adm], occ, peak]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('control: no delay one day stay',\n   ([5, 10, 15, 10, 5], 0.2, 0, 1),\n   [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2]),\n  ('regression: plateau tie',\n   ([10, 10, 10, 10, 10, 10, 10], 0.05, 1, 3),\n   [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2])],\n [('control: wave with 3 day delay',\n   ([10, 20, 40, 60, 50, 30, 20, 10, 5], 0.1, 3, 4),\n   [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8]),\n  ('regression: long stay',\n   ([100, 80, 60, 40, 20, 10, 5, 0], 0.03, 2, 6),\n   [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7]),\n  ('control: delay beyond series', ([1, 2, 3], 0.5, 5, 2), [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0]),\n  ('control: empty series', ([], 0.1, 1, 3), [[], [], None]),\n  ('control: twin peaks',\n   ([0, 30, 0, 0, 30, 0, 0, 0], 0.1, 1, 2),\n   [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2]),\n  ('regression: rising',\n   ([1, 3, 7, 12, 20, 33], 0.08, 2, 5),\n   [[0.0, 0.0, 0.08, 0.24, 0.56, 0.96], [0.0, 0.0, 0.08, 0.32, 0.88, 1.84], 5]),\n  ('regression: near-tie peaks',\n   ([10, 12, 10, 0, 11.8, 12.1, 0, 0], 0.5, 0, 1),\n   [[5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], [5.0, 6.0, 5.0, 0.0, 5.9, 6.05, 0.0, 0.0], 5])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic bounded teaching model with a stipulated contract; not a validated scientific or public-health modelling library. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-epidemic-hospital-occupancy-rounding-stage","generated_at":"2026-09-29T14:47:31.985058+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Compartmental epidemic calculations drive outbreak forecasts, vaccine targets and hospital planning; a single wrong flow, rate conversion or boundary silently changes every downstream number.","repair":"Restore the rounding stage rule: `occ.append(round(sum(adm[lo:t + 1]), 4))`.","root_cause":"Admissions are rounded to whole patients before summation.","sha256":"990792e52e7d8d20600a5cbf3abc8795a660599d1eba9e15024a96a1ae0787c9","title":"Hospital occupancy from delayed admissions: rounding stage · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.549,"exit_code":1,"observations":[{"actual":[[0.0,0.0,0.0,1.0,2.0,4.0,6.0,5.0,3.0],[0,0,0,1,3,7,13,17,18],8],"check":"control: wave with 3 day delay","expected":[[0.0,0.0,0.0,1.0,2.0,4.0,6.0,5.0,3.0],[0.0,0.0,0.0,1.0,3.0,7.0,13.0,17.0,18.0],8],"passed":true},{"actual":[[1.0,2.0,3.0,2.0,1.0],[1,2,3,2,1],2],"check":"control: no delay one day stay","expected":[[1.0,2.0,3.0,2.0,1.0],[1.0,2.0,3.0,2.0,1.0],2],"passed":true},{"actual":[[0.0,0.5,0.5,0.5,0.5,0.5,0.5],[0,0,1,2,2,2,2],3],"check":"regression: plateau tie","expected":[[0.0,0.5,0.5,0.5,0.5,0.5,0.5],[0.0,0.5,1.0,1.5,1.5,1.5,1.5],3],"passed":false},{"actual":[[0.0,0.0,3.0,2.4,1.8,1.2,0.6,0.3],[0,0,3,5,7,8,9,9],6],"check":"regression: long stay","expected":[[0.0,0.0,3.0,2.4,1.8,1.2,0.6,0.3],[0.0,0.0,3.0,5.4,7.2,8.4,9.0,9.3],7],"passed":false},{"actual":[[0.0,0.0,0.0],[0,0,0],0],"check":"control: delay beyond series","expected":[[0.0,0.0,0.0],[0.0,0.0,0.0],0],"passed":true},{"actual":[[],[],null],"check":"control: empty series","expected":[[],[],null],"passed":true},{"actual":[[0.0,0.0,3.0,0.0,0.0,3.0,0.0,0.0],[0,0,3,3,0,3,3,0],2],"check":"control: twin peaks","expected":[[0.0,0.0,3.0,0.0,0.0,3.0,0.0,0.0],[0.0,0.0,3.0,3.0,0.0,3.0,3.0,0.0],2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: wave with 3 day delay\", \"actual\": [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0, 0, 0, 1, 3, 7, 13, 17, 18], 8], \"expected\": [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8], \"passed\": true}, {\"check\": \"control: no delay one day stay\", \"actual\": [[1.0, 2.0, 3.0, 2.0, 1.0], [1, 2, 3, 2, 1], 2], \"expected\": [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2], \"passed\": true}, {\"check\": \"regression: plateau tie\", \"actual\": [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0, 0, 1, 2, 2, 2, 2], 3], \"expected\": [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3], \"passed\": false}, {\"check\": \"regression: long stay\", \"actual\": [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0, 0, 3, 5, 7, 8, 9, 9], 6], \"expected\": [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7], \"passed\": false}, {\"check\": \"control: delay beyond series\", \"actual\": [[0.0, 0.0, 0.0], [0, 0, 0], 0], \"expected\": [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0], \"passed\": true}, {\"check\": \"control: empty series\", \"actual\": [[], [], null], \"expected\": [[], [], null], \"passed\": true}, {\"check\": \"control: twin peaks\", \"actual\": [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0, 0, 3, 3, 0, 3, 3, 0], 2], \"expected\": [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.39,"exit_code":1,"observations":[{"actual":[[0.0,0.0,0.0,1.0,2.0,4.0,6.0,5.0,3.0],[0,0,0,1,3,7,13,17,18],8],"check":"control: wave with 3 day delay","expected":[[0.0,0.0,0.0,1.0,2.0,4.0,6.0,5.0,3.0],[0.0,0.0,0.0,1.0,3.0,7.0,13.0,17.0,18.0],8],"passed":true},{"actual":[[1.0,2.0,3.0,2.0,1.0],[1,2,3,2,1],2],"check":"control: no delay one day stay","expected":[[1.0,2.0,3.0,2.0,1.0],[1.0,2.0,3.0,2.0,1.0],2],"passed":true},{"actual":[[0.0,0.5,0.5,0.5,0.5,0.5,0.5],[0,0,0,0,0,0,0],0],"check":"regression: plateau tie","expected":[[0.0,0.5,0.5,0.5,0.5,0.5,0.5],[0.0,0.5,1.0,1.5,1.5,1.5,1.5],3],"passed":false},{"actual":[[0.0,0.0,3.0,2.4,1.8,1.2,0.6,0.3],[0,0,3,5,7,8,9,9],6],"check":"regression: long stay","expected":[[0.0,0.0,3.0,2.4,1.8,1.2,0.6,0.3],[0.0,0.0,3.0,5.4,7.2,8.4,9.0,9.3],7],"passed":false},{"actual":[[0.0,0.0,0.0],[0,0,0],0],"check":"control: delay beyond series","expected":[[0.0,0.0,0.0],[0.0,0.0,0.0],0],"passed":true},{"actual":[[],[],null],"check":"control: empty series","expected":[[],[],null],"passed":true},{"actual":[[0.0,0.0,3.0,0.0,0.0,3.0,0.0,0.0],[0,0,3,3,0,3,3,0],2],"check":"control: twin peaks","expected":[[0.0,0.0,3.0,0.0,0.0,3.0,0.0,0.0],[0.0,0.0,3.0,3.0,0.0,3.0,3.0,0.0],2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: wave with 3 day delay\", \"actual\": [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0, 0, 0, 1, 3, 7, 13, 17, 18], 8], \"expected\": [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8], \"passed\": true}, {\"check\": \"control: no delay one day stay\", \"actual\": [[1.0, 2.0, 3.0, 2.0, 1.0], [1, 2, 3, 2, 1], 2], \"expected\": [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2], \"passed\": true}, {\"check\": \"regression: plateau tie\", \"actual\": [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0, 0, 0, 0, 0, 0, 0], 0], \"expected\": [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3], \"passed\": false}, {\"check\": \"regression: long stay\", \"actual\": [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0, 0, 3, 5, 7, 8, 9, 9], 6], \"expected\": [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7], \"passed\": false}, {\"check\": \"control: delay beyond series\", \"actual\": [[0.0, 0.0, 0.0], [0, 0, 0], 0], \"expected\": [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0], \"passed\": true}, {\"check\": \"control: empty series\", \"actual\": [[], [], null], \"expected\": [[], [], null], \"passed\": true}, {\"check\": \"control: twin peaks\", \"actual\": [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0, 0, 3, 3, 0, 3, 3, 0], 2], \"expected\": [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.151,"exit_code":0,"observations":[{"actual":[[0.0,0.0,0.0,1.0,2.0,4.0,6.0,5.0,3.0],[0.0,0.0,0.0,1.0,3.0,7.0,13.0,17.0,18.0],8],"check":"control: wave with 3 day delay","expected":[[0.0,0.0,0.0,1.0,2.0,4.0,6.0,5.0,3.0],[0.0,0.0,0.0,1.0,3.0,7.0,13.0,17.0,18.0],8],"passed":true},{"actual":[[1.0,2.0,3.0,2.0,1.0],[1.0,2.0,3.0,2.0,1.0],2],"check":"control: no delay one day stay","expected":[[1.0,2.0,3.0,2.0,1.0],[1.0,2.0,3.0,2.0,1.0],2],"passed":true},{"actual":[[0.0,0.5,0.5,0.5,0.5,0.5,0.5],[0.0,0.5,1.0,1.5,1.5,1.5,1.5],3],"check":"regression: plateau tie","expected":[[0.0,0.5,0.5,0.5,0.5,0.5,0.5],[0.0,0.5,1.0,1.5,1.5,1.5,1.5],3],"passed":true},{"actual":[[0.0,0.0,3.0,2.4,1.8,1.2,0.6,0.3],[0.0,0.0,3.0,5.4,7.2,8.4,9.0,9.3],7],"check":"regression: long stay","expected":[[0.0,0.0,3.0,2.4,1.8,1.2,0.6,0.3],[0.0,0.0,3.0,5.4,7.2,8.4,9.0,9.3],7],"passed":true},{"actual":[[0.0,0.0,0.0],[0.0,0.0,0.0],0],"check":"control: delay beyond series","expected":[[0.0,0.0,0.0],[0.0,0.0,0.0],0],"passed":true},{"actual":[[],[],null],"check":"control: empty series","expected":[[],[],null],"passed":true},{"actual":[[0.0,0.0,3.0,0.0,0.0,3.0,0.0,0.0],[0.0,0.0,3.0,3.0,0.0,3.0,3.0,0.0],2],"check":"control: twin peaks","expected":[[0.0,0.0,3.0,0.0,0.0,3.0,0.0,0.0],[0.0,0.0,3.0,3.0,0.0,3.0,3.0,0.0],2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: wave with 3 day delay\", \"actual\": [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8], \"expected\": [[0.0, 0.0, 0.0, 1.0, 2.0, 4.0, 6.0, 5.0, 3.0], [0.0, 0.0, 0.0, 1.0, 3.0, 7.0, 13.0, 17.0, 18.0], 8], \"passed\": true}, {\"check\": \"control: no delay one day stay\", \"actual\": [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2], \"expected\": [[1.0, 2.0, 3.0, 2.0, 1.0], [1.0, 2.0, 3.0, 2.0, 1.0], 2], \"passed\": true}, {\"check\": \"regression: plateau tie\", \"actual\": [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3], \"expected\": [[0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0, 0.5, 1.0, 1.5, 1.5, 1.5, 1.5], 3], \"passed\": true}, {\"check\": \"regression: long stay\", \"actual\": [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7], \"expected\": [[0.0, 0.0, 3.0, 2.4, 1.8, 1.2, 0.6, 0.3], [0.0, 0.0, 3.0, 5.4, 7.2, 8.4, 9.0, 9.3], 7], \"passed\": true}, {\"check\": \"control: delay beyond series\", \"actual\": [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0], \"expected\": [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0], \"passed\": true}, {\"check\": \"control: empty series\", \"actual\": [[], [], null], \"expected\": [[], [], null], \"passed\": true}, {\"check\": \"control: twin peaks\", \"actual\": [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2], \"expected\": [[0.0, 0.0, 3.0, 0.0, 0.0, 3.0, 0.0, 0.0], [0.0, 0.0, 3.0, 3.0, 0.0, 3.0, 3.0, 0.0], 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}