{"abstract":"Later age groups accumulate the pressure computed for earlier groups.","category":"Epidemic compartment models","checks":7,"contract":"lambda[a] = beta*susceptibility[a]*sum_b contacts[a][b]*infected[b]/sizes[b] (groups with zero size skipped); expected new infections susceptible[a]*(1-exp(-lambda[a])); return [lambdas rounded 6, new infections rounded 4, total rounded 4].","evaluation_group":"w2-epidemic-age-foi","failed_approach":"Resetting inside the inner loop keeps only the last contact group.","family":"w2-epidemic-age-foi-pressure-accumulator-reset","id":"FA-65111","implementations":{"attempt":{"sha256":"7ca2d47408642d93bc137eb1af00aff2b478d67a448f10fbe08461b2afd559b3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(beta, contacts, sizes, infected, susceptible, susceptibility):\n    g = len(sizes)\n    lam = []\n    for a in range(g):\n        for b in range(g):\n            pressure = 0.0\n            if sizes[b] > 0:\n                pressure += contacts[a][b] * infected[b] / sizes[b]\n        lam.append(beta * susceptibility[a] * pressure)\n    new = [susceptible[a] * (1 - math.exp(-lam[a])) for a in range(g)]\n    return [[round(x, 6) for x in lam], [round(x, 4) for x in new], round(sum(new), 4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a56746ed0ce5e3141ebec0a6a6388a335953d268e5d3377ae6d7efc80fce6c6a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(beta, contacts, sizes, infected, susceptible, susceptibility):\n    g = len(sizes)\n    lam = []\n    pressure = 0.0\n    for a in range(g):\n        for b in range(g):\n            if sizes[b] > 0:\n                pressure += contacts[a][b] * infected[b] / sizes[b]\n        lam.append(beta * susceptibility[a] * pressure)\n    new = [susceptible[a] * (1 - math.exp(-lam[a])) for a in range(g)]\n    return [[round(x, 6) for x in lam], [round(x, 4) for x in new], round(sum(new), 4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"2bfc956da825b41a122a943ae5ef87007d27e3b0113d7bfcd14de879442874ac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(beta, contacts, sizes, infected, susceptible, susceptibility):\n    g = len(sizes)\n    lam = []\n    for a in range(g):\n        pressure = 0.0\n        for b in range(g):\n            if sizes[b] > 0:\n                pressure += contacts[a][b] * infected[b] / sizes[b]\n        lam.append(beta * susceptibility[a] * pressure)\n    new = [susceptible[a] * (1 - math.exp(-lam[a])) for a in range(g)]\n    return [[round(x, 6) for x in lam], [round(x, 4) for x in new], round(sum(new), 4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('regression: empty elderly band',\n   (0.2, [[5, 1, 1], [1, 5, 1], [1, 1, 5]], [100, 100, 0], [3, 4, 0], [90, 95, 0], [1.0, 1.0, 1.5]),\n   [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])],\n [('regression: three age bands',\n   (0.05, [[10, 3, 1], [3, 8, 2], [1, 2, 4]], [200, 500, 300], [5, 20, 3], [180, 450, 290], [1.0, 0.8, 1.2]),\n   [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081]),\n  ('regression: asymmetric school contacts',\n   (0.1, [[12, 2], [5, 6]], [300, 700], [10, 5], [280, 690], [1.0, 1.0]),\n   [[0.041429, 0.020952], [11.363, 14.3067], 25.6697]),\n  ('control: no infection',\n   (0.3, [[4, 1], [1, 4]], [100, 100], [0, 0], [100, 100], [1.0, 1.0]),\n   [[0.0, 0.0], [0.0, 0.0], 0.0]),\n  ('regression: high pressure saturates',\n   (2.0, [[20, 5], [5, 20]], [50, 50], [30, 25], [20, 25], [1.0, 1.0]),\n   [[29.0, 26.0], [20.0, 25.0], 45.0]),\n  ('control: single group', (0.1, [[7]], [1000], [50], [900], [0.9]), [[0.0315], [27.9081], 27.9081]),\n  ('regression: reduced child susceptibility',\n   (0.08, [[15, 4], [2, 7]], [400, 600], [2, 30], [390, 550], [0.5, 1.0]),\n   [[0.011, 0.0288], [4.2665, 15.6141], 19.8806]),\n  ('regression: unequal sizes',\n   (0.04, [[6, 6], [1, 3]], [50, 950], [5, 5], [40, 900], [1.0, 1.3]),\n   [[0.025263, 0.006021], [0.9979, 5.4027], 6.4005])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-epidemic-age-foi-pressure-accumulator-reset","generated_at":"2026-09-29T14:47:30.799356+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Compartmental epidemic calculations drive outbreak forecasts, vaccine targets and hospital planning; a single wrong flow, rate conversion or boundary silently changes every downstream number.","repair":"Restore the pressure accumulator reset rule: `lam = [] / for a in range(g): / pressure = 0.0`.","root_cause":"The pressure accumulator is initialised once, outside the age-group loop.","sha256":"44776643443a5e71380aff2e8d1f9f09703fd7ff04f94312176b4ca7e338195f","title":"Age-structured force of infection: pressure accumulator reset · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.491,"exit_code":1,"observations":[{"actual":[[0.0005,0.0008,0.0024],[0.09,0.3599,0.6952],1.145],"check":"regression: three age bands","expected":[[0.019,0.0166,0.0087],[3.3877,7.4083,2.5121],13.3081],"passed":false},{"actual":[[0.001429,0.004286],[0.3997,2.9508],3.3505],"check":"regression: asymmetric school contacts","expected":[[0.041429,0.020952],[11.363,14.3067],25.6697],"passed":false},{"actual":[[0.0,0.0,0.0],[0.0,0.0,0.0],0.0],"check":"regression: empty elderly band","expected":[[0.038,0.046,0.021],[3.3558,4.271,0.0],7.6268],"passed":false},{"actual":[[0.0,0.0],[0.0,0.0],0.0],"check":"control: no infection","expected":[[0.0,0.0],[0.0,0.0],0.0],"passed":true},{"actual":[[5.0,20.0],[19.8652,25.0],44.8652],"check":"regression: high pressure saturates","expected":[[29.0,26.0],[20.0,25.0],45.0],"passed":false},{"actual":[[0.0315],[27.9081],27.9081],"check":"control: single group","expected":[[0.0315],[27.9081],27.9081],"passed":true},{"actual":[[0.008,0.028],[3.1076,15.1864],18.294],"check":"regression: reduced child susceptibility","expected":[[0.011,0.0288],[4.2665,15.6141],19.8806],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: three age bands\", \"actual\": [[0.0005, 0.0008, 0.0024], [0.09, 0.3599, 0.6952], 1.145], \"expected\": [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081], \"passed\": false}, {\"check\": \"regression: asymmetric school contacts\", \"actual\": [[0.001429, 0.004286], [0.3997, 2.9508], 3.3505], \"expected\": [[0.041429, 0.020952], [11.363, 14.3067], 25.6697], \"passed\": false}, {\"check\": \"regression: empty elderly band\", \"actual\": [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], 0.0], \"expected\": [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268], \"passed\": false}, {\"check\": \"control: no infection\", \"actual\": [[0.0, 0.0], [0.0, 0.0], 0.0], \"expected\": [[0.0, 0.0], [0.0, 0.0], 0.0], \"passed\": true}, {\"check\": \"regression: high pressure saturates\", \"actual\": [[5.0, 20.0], [19.8652, 25.0], 44.8652], \"expected\": [[29.0, 26.0], [20.0, 25.0], 45.0], \"passed\": false}, {\"check\": \"control: single group\", \"actual\": [[0.0315], [27.9081], 27.9081], \"expected\": [[0.0315], [27.9081], 27.9081], \"passed\": true}, {\"check\": \"regression: reduced child susceptibility\", \"actual\": [[0.008, 0.028], [3.1076, 15.1864], 18.294], \"expected\": [[0.011, 0.0288], [4.2665, 15.6141], 19.8806], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.195,"exit_code":1,"observations":[{"actual":[[0.019,0.0318,0.0564],[3.3877,14.0849,15.9033],33.3759],"check":"regression: three age bands","expected":[[0.019,0.0166,0.0087],[3.3877,7.4083,2.5121],13.3081],"passed":false},{"actual":[[0.041429,0.062381],[11.363,41.7278],53.0908],"check":"regression: asymmetric school contacts","expected":[[0.041429,0.020952],[11.363,14.3067],25.6697],"passed":false},{"actual":[[0.038,0.084,0.147],[3.3558,7.654,0.0],11.0099],"check":"regression: empty elderly band","expected":[[0.038,0.046,0.021],[3.3558,4.271,0.0],7.6268],"passed":false},{"actual":[[0.0,0.0],[0.0,0.0],0.0],"check":"control: no infection","expected":[[0.0,0.0],[0.0,0.0],0.0],"passed":true},{"actual":[[29.0,55.0],[20.0,25.0],45.0],"check":"regression: high pressure saturates","expected":[[29.0,26.0],[20.0,25.0],45.0],"passed":false},{"actual":[[0.0315],[27.9081],27.9081],"check":"control: single group","expected":[[0.0315],[27.9081],27.9081],"passed":true},{"actual":[[0.011,0.0508],[4.2665,27.2422],31.5087],"check":"regression: reduced child susceptibility","expected":[[0.011,0.0288],[4.2665,15.6141],19.8806],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: three age bands\", \"actual\": [[0.019, 0.0318, 0.0564], [3.3877, 14.0849, 15.9033], 33.3759], \"expected\": [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081], \"passed\": false}, {\"check\": \"regression: asymmetric school contacts\", \"actual\": [[0.041429, 0.062381], [11.363, 41.7278], 53.0908], \"expected\": [[0.041429, 0.020952], [11.363, 14.3067], 25.6697], \"passed\": false}, {\"check\": \"regression: empty elderly band\", \"actual\": [[0.038, 0.084, 0.147], [3.3558, 7.654, 0.0], 11.0099], \"expected\": [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268], \"passed\": false}, {\"check\": \"control: no infection\", \"actual\": [[0.0, 0.0], [0.0, 0.0], 0.0], \"expected\": [[0.0, 0.0], [0.0, 0.0], 0.0], \"passed\": true}, {\"check\": \"regression: high pressure saturates\", \"actual\": [[29.0, 55.0], [20.0, 25.0], 45.0], \"expected\": [[29.0, 26.0], [20.0, 25.0], 45.0], \"passed\": false}, {\"check\": \"control: single group\", \"actual\": [[0.0315], [27.9081], 27.9081], \"expected\": [[0.0315], [27.9081], 27.9081], \"passed\": true}, {\"check\": \"regression: reduced child susceptibility\", \"actual\": [[0.011, 0.0508], [4.2665, 27.2422], 31.5087], \"expected\": [[0.011, 0.0288], [4.2665, 15.6141], 19.8806], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.893,"exit_code":0,"observations":[{"actual":[[0.019,0.0166,0.0087],[3.3877,7.4083,2.5121],13.3081],"check":"regression: three age bands","expected":[[0.019,0.0166,0.0087],[3.3877,7.4083,2.5121],13.3081],"passed":true},{"actual":[[0.041429,0.020952],[11.363,14.3067],25.6697],"check":"regression: asymmetric school contacts","expected":[[0.041429,0.020952],[11.363,14.3067],25.6697],"passed":true},{"actual":[[0.038,0.046,0.021],[3.3558,4.271,0.0],7.6268],"check":"regression: empty elderly band","expected":[[0.038,0.046,0.021],[3.3558,4.271,0.0],7.6268],"passed":true},{"actual":[[0.0,0.0],[0.0,0.0],0.0],"check":"control: no infection","expected":[[0.0,0.0],[0.0,0.0],0.0],"passed":true},{"actual":[[29.0,26.0],[20.0,25.0],45.0],"check":"regression: high pressure saturates","expected":[[29.0,26.0],[20.0,25.0],45.0],"passed":true},{"actual":[[0.0315],[27.9081],27.9081],"check":"control: single group","expected":[[0.0315],[27.9081],27.9081],"passed":true},{"actual":[[0.011,0.0288],[4.2665,15.6141],19.8806],"check":"regression: reduced child susceptibility","expected":[[0.011,0.0288],[4.2665,15.6141],19.8806],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: three age bands\", \"actual\": [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081], \"expected\": [[0.019, 0.0166, 0.0087], [3.3877, 7.4083, 2.5121], 13.3081], \"passed\": true}, {\"check\": \"regression: asymmetric school contacts\", \"actual\": [[0.041429, 0.020952], [11.363, 14.3067], 25.6697], \"expected\": [[0.041429, 0.020952], [11.363, 14.3067], 25.6697], \"passed\": true}, {\"check\": \"regression: empty elderly band\", \"actual\": [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268], \"expected\": [[0.038, 0.046, 0.021], [3.3558, 4.271, 0.0], 7.6268], \"passed\": true}, {\"check\": \"control: no infection\", \"actual\": [[0.0, 0.0], [0.0, 0.0], 0.0], \"expected\": [[0.0, 0.0], [0.0, 0.0], 0.0], \"passed\": true}, {\"check\": \"regression: high pressure saturates\", \"actual\": [[29.0, 26.0], [20.0, 25.0], 45.0], \"expected\": [[29.0, 26.0], [20.0, 25.0], 45.0], \"passed\": true}, {\"check\": \"control: single group\", \"actual\": [[0.0315], [27.9081], 27.9081], \"expected\": [[0.0315], [27.9081], 27.9081], \"passed\": true}, {\"check\": \"regression: reduced child susceptibility\", \"actual\": [[0.011, 0.0288], [4.2665, 15.6141], 19.8806], \"expected\": [[0.011, 0.0288], [4.2665, 15.6141], 19.8806], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}