FAILURE MAP
← Case archive

FA-65626 / Ecological population dynamics / Open access

Nicholson-Bailey host-parasitoid generations: escape fraction · case 01

Hosts escape too often at moderate parasitoid densities.

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

ROOT CAUSE

The Poisson zero term is linearised.

VERIFIED REPAIR

Restore the escape fraction rule: `escape = math.exp(-a * p)`.

Unsuccessful approach: Escape depends on host density instead of searching parasitoids.

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 = max(0.0, 1 - 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]]]),
  ('regression: 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]]]),
  ('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 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]]]),
  ('regression: 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]]]),
  ('regression: 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 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], [[30.0, 15.0], [15.0, 22.5], [0.0, 15.0], [0.0, 0.0], [0.0, 0.0]]][[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], [[50.0, 8.0], [50.0, 32.0], [0.0, 40.0], [0.0, 0.0]]][[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]Failed
regression: 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.0, 2.0], [6.4, 1.6], [5.376, 1.024]]][None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]Failed
regression: inefficient parasitoid[[329.5837, 109.8612], [[240.0, 10.0], [648.0, 12.0], [1710.72, 38.88], [3136.7762, 332.564]]][[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 / b8aa010c307eaa669a10f6e08da00f552dc785f254bdd309f019544d6b2d233b

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 * h)
        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]]]),
  ('regression: 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]]]),
  ('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 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]]]),
  ('regression: 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]]]),
  ('regression: 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 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], [[13.3878, 23.3061], [13.7097, 6.533], [13.8151, 6.8021], [13.8482, 6.891], [13.8584, 6.919]]][[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], [[13.5335, 13.8346], [17.4835, 8.0295], [15.216, 11.5522], [16.613, 9.5147]]][[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]Failed
regression: no parasitoids[[12.164, 4.0547], [[5.5182, 6.3212], [4.7669, 2.3403], [4.4392, 1.8074], [4.2717, 1.5914]]][[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]Failed
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, [[3.6788, 6.3212], [2.5465, 1.1323], [1.974, 0.5725]]][None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]Failed
regression: inefficient parasitoid[[329.5837, 109.8612], [[110.3638, 31.606], [109.8105, 36.8802], [109.8662, 36.5942], [109.8607, 36.623]]][[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 / 918f2a6e8d2a7a143ce95273a87b0b5465809892e781d381fb667f7e12f3b2c8

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]]]),
  ('regression: 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]]]),
  ('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 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]]]),
  ('regression: 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]]]),
  ('regression: 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 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
regression: 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 / aec3336255f9a8ee807c9f8f8cf3ec441f692b8dba4f02e6c119a60d4a04cbde

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

Case digest / dfcefbe12d8131d64c8bb021add740c08191df8fd1179f74dbc2d3f1f6ac5f94