FAILURE MAP
← Case archive

FA-65621 / Ecological population dynamics / Open access

Nicholson-Bailey host-parasitoid generations: simultaneous generation update · case 01

Parasitoid emergence is computed from next generation's hosts.

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

ROOT CAUSE

The host update is applied before the parasitoid update reads H.

VERIFIED REPAIR

Restore the simultaneous generation update rule: `h, p = lam * h * escape, c * h * (1 - escape)`.

Unsuccessful approach: Undoing only the growth factor still leaves the escape factor applied to H.

Case contract

Escape fraction exp(-a*P); H' = lam*H*escape and P' = c*H*(1-escape) computed from the same generation; equilibrium [lam*ln(lam)/((lam-1)*a*c), ln(lam)/a] rounded 4 when lam>1, a>0, c>0 else None; return [equilibrium, trajectory of [H,P] rounded 4].

Why this case matters

Population projections set harvest quotas, conservation status and pest-control timing; a wrong update order, boundary or rate conversion silently changes management advice.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(lam, a, c, h0, p0, gens):
    if lam <= 1 or a <= 0 or c <= 0:
        eq = None
    else:
        eq = [round(lam * math.log(lam) / ((lam - 1) * a * c), 4), round(math.log(lam) / a, 4)]
    h, p = float(h0), float(p0)
    traj = []
    for _ in range(gens):
        escape = math.exp(-a * p)
        h = lam * h * escape
        p = c * h * (1 - escape)
        traj.append([round(h, 4), round(p, 4)])
    return [eq, traj]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])]]
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
regression: greenhouse whitefly[[27.7259, 13.8629], [[36.3918, 14.3191], [35.5713, 18.1867], [28.6557, 17.1134], [24.3573, 14.0055], [24.1843, 12.178]]][[27.7259, 13.8629], [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]Failed
regression: fecund host[[25.1475, 16.0944], [[60.6531, 19.0921], [44.9431, 30.6262], [10.5089, 8.0139], [23.5768, 10.3983]]][[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]Failed
control: no parasitoids[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]][[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]Passed
control: no hosts[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]][[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]Passed
regression: non-growing host[None, [[8.1873, 1.4841], [7.0581, 0.9735], [6.4034, 0.594]]][None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]Failed
regression: inefficient parasitoid[[329.5837, 109.8612], [[245.6192, 22.2616], [589.7972, 58.8552], [982.2429, 218.485], [331.4909, 147.1]]][[329.5837, 109.8612], [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]Failed
control: invalid search[None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]][None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]Passed

SHA-256 / 05526c71b486294d716e9b58af24744428553de3fa4eb6b9f852377f6b7235e9

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(lam, a, c, h0, p0, gens):
    if lam <= 1 or a <= 0 or c <= 0:
        eq = None
    else:
        eq = [round(lam * math.log(lam) / ((lam - 1) * a * c), 4), round(math.log(lam) / a, 4)]
    h, p = float(h0), float(p0)
    traj = []
    for _ in range(gens):
        escape = math.exp(-a * p)
        h = lam * h * escape
        p = c * (h / lam) * (1 - escape)
        traj.append([round(h, 4), round(p, 4)])
    return [eq, traj]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])]]
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
regression: greenhouse whitefly[[27.7259, 13.8629], [[36.3918, 7.1595], [50.8823, 7.6555], [69.4, 11.0358], [79.9375, 16.95], [68.504, 19.5755]]][[27.7259, 13.8629], [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]Failed
regression: fecund host[[25.1475, 16.0944], [[60.6531, 3.8184], [207.0098, 10.5127], [361.7434, 37.6506], [41.9011, 6.5489]]][[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]Failed
control: no parasitoids[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]][[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]Passed
control: no hosts[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]][[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]Passed
regression: non-growing host[None, [[8.1873, 1.4841], [7.0581, 0.9735], [6.4034, 0.594]]][None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]Failed
regression: inefficient parasitoid[[329.5837, 109.8612], [[245.6192, 7.4205], [684.1584, 8.1551], [1891.7378, 24.6915], [4433.5148, 161.6706]]][[329.5837, 109.8612], [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]Failed
control: invalid search[None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]][None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]Passed

SHA-256 / 31a1e43b72b492e5b4ae37fae7d8b136d7ccbbfafbf80c531ff2d0c22a67f238

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(lam, a, c, h0, p0, gens):
    if lam <= 1 or a <= 0 or c <= 0:
        eq = None
    else:
        eq = [round(lam * math.log(lam) / ((lam - 1) * a * c), 4), round(math.log(lam) / a, 4)]
    h, p = float(h0), float(p0)
    traj = []
    for _ in range(gens):
        escape = math.exp(-a * p)
        h, p = lam * h * escape, c * h * (1 - escape)
        traj.append([round(h, 4), round(p, 4)])
    return [eq, traj]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: fecund host',
   (5.0, 0.1, 0.8, 20, 5, 4),
   [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
 [('regression: greenhouse whitefly',
   (2.0, 0.05, 1.0, 30, 10, 5),
   [[27.7259, 13.8629],
    [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
  ('control: no parasitoids',
   (1.5, 0.1, 1.0, 10, 0, 4),
   [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
  ('control: no hosts', (2.0, 0.1, 1.0, 0, 10, 3), [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
  ('regression: non-growing host',
   (1.0, 0.1, 1.0, 10, 2, 3),
   [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
  ('regression: inefficient parasitoid',
   (3.0, 0.01, 0.5, 100, 20, 4),
   [[329.5837, 109.8612],
    [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
  ('control: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
  ('regression: gregarious parasitoid',
   (2.5, 0.03, 2.0, 40, 8, 5),
   [[25.4525, 30.543],
    [[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])]]
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
regression: greenhouse whitefly[[27.7259, 13.8629], [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]][[27.7259, 13.8629], [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]Passed
regression: fecund host[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]][[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]Passed
control: no parasitoids[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]][[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]Passed
control: no hosts[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]][[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]Passed
regression: non-growing host[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]][None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]Passed
regression: inefficient parasitoid[[329.5837, 109.8612], [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]][[329.5837, 109.8612], [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]Passed
control: invalid search[None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]][None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]Passed

SHA-256 / da61ea71a7afcaedf7faedb55d1af209e3d350e732eb65b2042a8ecd4b2a71d4

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

Case digest / f3c85eeb21ec8fcd4a7d97af4253f4626098a5d6a3fb504df80055f2e950a01e