FA-65191 / Epidemic compartment models / Open access
SIQR testing and isolation model: detection series · case 01
Reported daily detections accumulate instead of showing new positives.
ROOT CAUSE
The isolated stock is reported instead of the daily detection flow.
VERIFIED REPAIR
Restore the detection series rule: `detected.append(round(iso, 3))`.
Unsuccessful approach: Recomputing detect*I after the update uses end-of-day prevalence and ignores scaling.
Case contract
Daily Euler SIQR: infectives recover (gamma*I) or are detected (detect*I), both exits scaled down proportionally if they exceed I; isolated Q do not transmit and are released to R at Q/isolation_days; report daily detections, final Q and final R rounded to 3.
Why this case matters
Compartmental epidemic calculations drive outbreak forecasts, vaccine targets and hospital planning; a single wrong flow, rate conversion or boundary silently changes every downstream number.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(beta, gamma, detect, pop, i0, days, isolation_days):
s, i, q, r = float(pop - i0), float(i0), 0.0, 0.0
detected = []
for _ in range(days):
inf = beta * s * i / pop
rec = gamma * i
iso = detect * i
if rec + iso > i:
scale = i / (rec + iso)
rec *= scale
iso *= scale
release = q / isolation_days
s -= inf
i += inf - rec - iso
q += iso - release
r += rec + release
detected.append(round(q, 3))
return [detected, round(q, 3), round(r, 3)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: moderate testing | [[1.0, 2.095, 3.311, 4.675, 6.218, 7.973, 9.973, 12.253], 12.253, 35.079] | [[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079] | Failed |
| regression: aggressive testing saturates exits | [[9.231, 13.229, 14.328, 13.938, 12.859], 12.859, 30.703] | [[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703] | Failed |
| control: no testing | [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826] | [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826] | Passed |
| regression: short isolation | [[4.5, 6.469, 7.164, 7.22, 6.959, 6.546, 6.068], 6.068, 40.676] | [[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676] | Failed |
| control: boundary zero days | [[], 0.0, 0.0] | [[], 0.0, 0.0] | Passed |
| regression: long run | [[0.4, 0.851, 1.365, 1.955, 2.639, 3.435, 4.366, 5.459, 6.744, 8.257, 10.038, 12.133], 12.133, 34.018] | [[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018] | Failed |
| regression: exits exactly I | [[20.0, 20.8, 17.723, 14.419], 14.419, 37.828] | [[20.0, 4.8, 1.083, 0.241], 14.419, 37.828] | Failed |
SHA-256 / b5cfc04a66920142e9fd4c21808d234bd6ebb8142c940c45595795ef0639dbd5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(beta, gamma, detect, pop, i0, days, isolation_days):
s, i, q, r = float(pop - i0), float(i0), 0.0, 0.0
detected = []
for _ in range(days):
inf = beta * s * i / pop
rec = gamma * i
iso = detect * i
if rec + iso > i:
scale = i / (rec + iso)
rec *= scale
iso *= scale
release = q / isolation_days
s -= inf
i += inf - rec - iso
q += iso - release
r += rec + release
detected.append(round(detect * i, 3))
return [detected, round(q, 3), round(r, 3)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: moderate testing | [[1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277, 3.818], 12.253, 35.079] | [[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079] | Failed |
| regression: aggressive testing saturates exits | [[6.912, 3.886, 2.154, 1.185, 0.649], 12.859, 30.703] | [[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703] | Failed |
| control: no testing | [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826] | [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826] | Passed |
| regression: short isolation | [[4.219, 3.929, 3.638, 3.349, 3.067, 2.795, 2.537], 6.068, 40.676] | [[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676] | Failed |
| control: boundary zero days | [[], 0.0, 0.0] | [[], 0.0, 0.0] | Passed |
| regression: long run | [[0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813, 3.329], 12.133, 34.018] | [[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018] | Failed |
| regression: exits exactly I | [[4.8, 1.083, 0.241, 0.053], 14.419, 37.828] | [[20.0, 4.8, 1.083, 0.241], 14.419, 37.828] | Failed |
SHA-256 / 03bd1d4270b186db31273bfb3aeee2ffb028238d36902e932bf180a989a10db6
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(beta, gamma, detect, pop, i0, days, isolation_days):
s, i, q, r = float(pop - i0), float(i0), 0.0, 0.0
detected = []
for _ in range(days):
inf = beta * s * i / pop
rec = gamma * i
iso = detect * i
if rec + iso > i:
scale = i / (rec + iso)
rec *= scale
iso *= scale
release = q / isolation_days
s -= inf
i += inf - rec - iso
q += iso - release
r += rec + release
detected.append(round(iso, 3))
return [detected, round(q, 3), round(r, 3)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('regression: short isolation',
(0.5, 0.25, 0.3, 600, 15, 7, 2),
[[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])],
[('regression: moderate testing',
(0.5, 0.2, 0.1, 1000, 10, 8, 10),
[[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079]),
('regression: aggressive testing saturates exits',
(0.6, 0.7, 0.6, 500, 20, 5, 7),
[[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703]),
('control: no testing', (0.4, 0.2, 0.0, 800, 5, 6, 10), [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826]),
('control: boundary zero days', (0.5, 0.2, 0.1, 100, 5, 0, 5), [[], 0.0, 0.0]),
('regression: long run',
(0.35, 0.1, 0.05, 2000, 8, 12, 14),
[[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018]),
('regression: exits exactly I',
(0.3, 0.5, 0.5, 200, 40, 4, 5),
[[20.0, 4.8, 1.083, 0.241], 14.419, 37.828]),
('regression: high transmission',
(1.2, 0.3, 0.2, 400, 4, 6, 10),
[[0.8, 1.35, 2.26, 3.729, 6.008, 9.305], 20.739, 37.893])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: moderate testing | [[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079] | [[1.0, 1.195, 1.425, 1.695, 2.011, 2.377, 2.798, 3.277], 12.253, 35.079] | Passed |
| regression: aggressive testing saturates exits | [[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703] | [[9.231, 5.317, 2.989, 1.657, 0.912], 12.859, 30.703] | Passed |
| control: no testing | [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826] | [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 0.0, 9.826] | Passed |
| regression: short isolation | [[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676] | [[4.5, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 6.068, 40.676] | Passed |
| control: boundary zero days | [[], 0.0, 0.0] | [[], 0.0, 0.0] | Passed |
| regression: long run | [[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018] | [[0.4, 0.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.133, 34.018] | Passed |
| regression: exits exactly I | [[20.0, 4.8, 1.083, 0.241], 14.419, 37.828] | [[20.0, 4.8, 1.083, 0.241], 14.419, 37.828] | Passed |
SHA-256 / 38ac769a91e9125f11fc7fda8f235fb83fc69ca16d999f4a2cbe7c014d839b90
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:47:31.482614+00:00.
Case digest / 7b2e3f18462b2e5c5a47fef37d29bd81f008bae9d55ff59c176631f0fa7b3527