FA-65181 / Epidemic compartment models / Open access
SIQR testing and isolation model: release rate · case 01
Isolated people pile up and are released only in proportion to new detections.
ROOT CAUSE
Release is computed from today's detections instead of the isolated stock.
VERIFIED REPAIR
Restore the release rate rule: `release = q / isolation_days`.
Unsuccessful approach: Adding a day to the duration slows release against the contract.
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 = iso / 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], 14.2, 33.133] | [[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, 5.317, 2.989, 1.657, 0.912], 17.233, 26.329] | [[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, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 12.748, 33.996] | [[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.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 14.285, 31.866] | [[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, 4.8, 1.083, 0.241], 20.899, 31.348] | [[20.0, 4.8, 1.083, 0.241], 14.419, 37.828] | Failed |
SHA-256 / b45cd4e7a372cbf11cbc1c30735fdaec6a607ed59bc14bb44a514228da4d4437
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 + 1)
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.526, 34.807] | [[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, 5.317, 2.989, 1.657, 0.912], 13.623, 29.939] | [[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, 4.219, 3.929, 3.638, 3.349, 3.067, 2.795], 9.133, 37.611] | [[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.479, 0.574, 0.688, 0.823, 0.985, 1.177, 1.405, 1.675, 1.994, 2.371, 2.813], 12.315, 33.836] | [[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, 4.8, 1.083, 0.241], 16.051, 36.197] | [[20.0, 4.8, 1.083, 0.241], 14.419, 37.828] | Failed |
SHA-256 / 2aae461eb2c26fd478a8021c1d00005ff228f62d6f92878588e49bcbedbc44a7
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.440941+00:00.
Case digest / 5156546e99cb88c4cbc8eb709727451e2971a6283f059ac421524ac3baee625f