FAILURE MAP
← Case archive

FA-65066 / Epidemic compartment models / Open access

SIR with daily all-or-nothing vaccination campaign: dose supply cap · case 01

Susceptibles go negative once supply exceeds the remaining pool.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Doses are not capped by the susceptibles available.

VERIFIED REPAIR

Restore the dose supply cap rule: `dose = min(doses_per_day, s)`.

Unsuccessful approach: Capping at non-vaccinated population counts infected and recovered people as eligible.

Case contract

Each day from day index start_day (inclusive), dose=min(doses_per_day, S) is given to susceptibles before transmission; dose*efficacy moves S->V; failed vaccinees stay in S; mixing uses the full pop; return [S, I, R, V, doses administered] 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, pop, i0, doses_per_day, start_day, efficacy, days):
    s, i, r, v = float(pop - i0), float(i0), 0.0, 0.0
    given = 0.0
    for day in range(days):
        if day >= start_day:
            dose = doses_per_day
            s -= dose * efficacy
            v += dose * efficacy
            given += dose
        inf = beta * s * i / pop
        rec = gamma * i
        s -= inf
        i += inf - rec
        r += rec
    return [round(s, 3), round(i, 3), round(r, 3), round(v, 3), round(given, 3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])]]
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 fixtureActualExpectedOutcome
control: city campaign from day 5[4007.174, 324.024, 1168.803, 4500.0, 5000.0][4007.174, 324.024, 1168.803, 4500.0, 5000.0]Passed
control: campaign from day 0[872.113, 79.727, 248.159, 800.0, 1000.0][872.113, 79.727, 248.159, 800.0, 1000.0]Passed
regression: supply exceeds susceptibles[-280.963, 0.014, 0.949, 380.0, 400.0][0.0, 1.516, 1.233, 97.251, 102.369]Failed
control: late campaign never starts[777.374, 141.242, 81.385, 0.0, 0.0][777.374, 141.242, 81.385, 0.0, 0.0]Passed
regression: perfect vaccine small town[-83.658, 8.275, 55.383, 520.0, 520.0][0.0, 10.271, 55.609, 434.12, 434.12]Failed
control: poor vaccine[237.471, 307.647, 1134.882, 1320.0, 3300.0][237.471, 307.647, 1134.882, 1320.0, 3300.0]Passed
control: no doses[896.73, 54.094, 49.176, 0.0, 0.0][896.73, 54.094, 49.176, 0.0, 0.0]Passed

SHA-256 / e229421b0c2b43b7ddbaded225d6b82b4b05a6e13fed1e6f0870973db15621fb

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, pop, i0, doses_per_day, start_day, efficacy, days):
    s, i, r, v = float(pop - i0), float(i0), 0.0, 0.0
    given = 0.0
    for day in range(days):
        if day >= start_day:
            dose = min(doses_per_day, pop - v)
            s -= dose * efficacy
            v += dose * efficacy
            given += dose
        inf = beta * s * i / pop
        rec = gamma * i
        s -= inf
        i += inf - rec
        r += rec
    return [round(s, 3), round(i, 3), round(r, 3), round(v, 3), round(given, 3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])]]
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 fixtureActualExpectedOutcome
control: city campaign from day 5[4007.174, 324.024, 1168.803, 4500.0, 5000.0][4007.174, 324.024, 1168.803, 4500.0, 5000.0]Passed
control: campaign from day 0[872.113, 79.727, 248.159, 800.0, 1000.0][872.113, 79.727, 248.159, 800.0, 1000.0]Passed
regression: supply exceeds susceptibles[-2.686, 1.463, 1.223, 100.0, 105.263][0.0, 1.516, 1.233, 97.251, 102.369]Failed
control: late campaign never starts[777.374, 141.242, 81.385, 0.0, 0.0][777.374, 141.242, 81.385, 0.0, 0.0]Passed
regression: perfect vaccine small town[-63.943, 8.56, 55.383, 500.0, 500.0][0.0, 10.271, 55.609, 434.12, 434.12]Failed
control: poor vaccine[237.471, 307.647, 1134.882, 1320.0, 3300.0][237.471, 307.647, 1134.882, 1320.0, 3300.0]Passed
control: no doses[896.73, 54.094, 49.176, 0.0, 0.0][896.73, 54.094, 49.176, 0.0, 0.0]Passed

SHA-256 / 56ccaf9a794a8573c5f8198db858aeefb4892f6ecc6214fb74c1a18e161ac125

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, pop, i0, doses_per_day, start_day, efficacy, days):
    s, i, r, v = float(pop - i0), float(i0), 0.0, 0.0
    given = 0.0
    for day in range(days):
        if day >= start_day:
            dose = min(doses_per_day, s)
            s -= dose * efficacy
            v += dose * efficacy
            given += dose
        inf = beta * s * i / pop
        rec = gamma * i
        s -= inf
        i += inf - rec
        r += rec
    return [round(s, 3), round(i, 3), round(r, 3), round(v, 3), round(given, 3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('control: late campaign never starts',
   (0.3, 0.1, 1000, 5, 100, 50, 0.9, 20),
   [777.374, 141.242, 81.385, 0.0, 0.0]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])],
 [('control: city campaign from day 5',
   (0.4, 0.2, 10000, 20, 200, 5, 0.9, 30),
   [4007.174, 324.024, 1168.803, 4500.0, 5000.0]),
  ('control: campaign from day 0',
   (0.5, 0.25, 2000, 10, 50, 0, 0.8, 20),
   [872.113, 79.727, 248.159, 800.0, 1000.0]),
  ('regression: supply exceeds susceptibles',
   (0.3, 0.1, 100, 2, 80, 1, 0.95, 6),
   [0.0, 1.516, 1.233, 97.251, 102.369]),
  ('regression: perfect vaccine small town',
   (0.6, 0.2, 500, 5, 40, 2, 1.0, 15),
   [0.0, 10.271, 55.609, 434.12, 434.12]),
  ('control: poor vaccine',
   (0.45, 0.15, 3000, 30, 150, 3, 0.4, 25),
   [237.471, 307.647, 1134.882, 1320.0, 3300.0]),
  ('control: no doses', (0.4, 0.2, 1000, 10, 0, 0, 0.9, 10), [896.73, 54.094, 49.176, 0.0, 0.0]),
  ('control: start day one', (0.35, 0.1, 800, 4, 30, 1, 0.7, 12), [519.85, 32.463, 16.687, 231.0, 330.0])]]
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 fixtureActualExpectedOutcome
control: city campaign from day 5[4007.174, 324.024, 1168.803, 4500.0, 5000.0][4007.174, 324.024, 1168.803, 4500.0, 5000.0]Passed
control: campaign from day 0[872.113, 79.727, 248.159, 800.0, 1000.0][872.113, 79.727, 248.159, 800.0, 1000.0]Passed
regression: supply exceeds susceptibles[0.0, 1.516, 1.233, 97.251, 102.369][0.0, 1.516, 1.233, 97.251, 102.369]Passed
control: late campaign never starts[777.374, 141.242, 81.385, 0.0, 0.0][777.374, 141.242, 81.385, 0.0, 0.0]Passed
regression: perfect vaccine small town[0.0, 10.271, 55.609, 434.12, 434.12][0.0, 10.271, 55.609, 434.12, 434.12]Passed
control: poor vaccine[237.471, 307.647, 1134.882, 1320.0, 3300.0][237.471, 307.647, 1134.882, 1320.0, 3300.0]Passed
control: no doses[896.73, 54.094, 49.176, 0.0, 0.0][896.73, 54.094, 49.176, 0.0, 0.0]Passed

SHA-256 / 7d9f2ae039e03051ca616aebf12904df6360027393698555559fa1776acc25b6

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:30.630369+00:00.

Case digest / 78e5c53bcea3bebc1f7504c7a7f65115a14dd2197e7e44e5742d243c6f55598f