{"abstract":"Webster cycle length returns a wrong result when the computed cycle is rounded down to a 5 s multiple.","category":"Traffic signal timing plans","checks":8,"contract":"Input {phases: per-phase lists of lane-group flows veh/h, sat: saturation flow per lane group, lost: lost seconds per phase, allred: extra all-red seconds per cycle, cmin, cmax}. Y is the sum over phases of the critical (largest) flow ratio; L = lost*phases + allred. If Y >= 0.9 return 'oversaturated'. Otherwise C0 = (1.5L + 5)/(1 - Y), rounded UP to a multiple of 5 s and clamped to [cmin, cmax]. Return {cycle, lost: L, y_milli: floor(1000Y)}.","evaluation_group":"w2-traffic_signal_timing_plans-webster-cycle","failed_approach":"Rounding to the nearest multiple still rounds down whenever the fractional part is below one half.","family":"w2-traffic_signal_timing_plans-webster-cycle-round-up","id":"FA-67856","implementations":{"attempt":{"sha256":"869ddb912f2b6528075c2524c39062a9009da5dd9ad1c5232f35a8498f4721f0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ph = x['phases']\n    s = x['sat']\n    Y = Fraction(0)\n    for group in ph:\n        Y += Fraction(max(group), s)\n    L = x['lost'] * len(ph) + x['allred']\n    if Y >= Fraction(9, 10):\n        return 'oversaturated'\n    c0 = (Fraction(3, 2) * L + 5) / (1 - Y)\n    c = round(c0 / 5) * 5\n    c = max(x['cmin'], min(x['cmax'], int(c)))\n    return {'cycle': c, 'lost': L, 'y_milli': int(Y * 1000)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[90], [300], [90, 720]], 'sat': 1800, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 180}, {'cycle': 65, 'lost': 13, 'y_milli': 616}), ({'phases': [[300, 540], [120, 210], [180, 450, 570]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 95, 'lost': 15, 'y_milli': 694}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[210, 690], [540, 480]], 'sat': 1900, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 90}, {'cycle': 55, 'lost': 9, 'y_milli': 647}), ({'phases': [[390], [150, 510, 810]], 'sat': 1900, 'lost': 2, 'allred': 6, 'cmin': 40, 'cmax': 150}, {'cycle': 55, 'lost': 10, 'y_milli': 631}), ({'phases': [[180, 540], [480], [720], [450, 690]], 'sat': 1900, 'lost': 4, 'allred': 5, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated')], [({'phases': [[630, 600], [510, 270, 120], [720, 90]], 'sat': 1800, 'lost': 3, 'allred': 4, 'cmin': 50, 'cmax': 90}, 'oversaturated'), ({'phases': [[690, 150], [90, 300, 90]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 180}, {'cycle': 55, 'lost': 12, 'y_milli': 550}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[180, 630, 300], [90, 600, 120], [570, 540, 390]], 'sat': 1900, 'lost': 3, 'allred': 4, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[660], [240, 480, 510]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 50, 'cmax': 180}, {'cycle': 60, 'lost': 10, 'y_milli': 650}), ({'phases': [[210, 840, 900], [60], [510]], 'sat': 1800, 'lost': 3, 'allred': 5, 'cmin': 40, 'cmax': 150}, {'cycle': 145, 'lost': 14, 'y_milli': 816})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[750, 570], [180, 510]], 'sat': 1900, 'lost': 3, 'allred': 5, 'cmin': 50, 'cmax': 120}, {'cycle': 65, 'lost': 11, 'y_milli': 663}), ({'phases': [[150, 60], [600, 480, 330], [210, 60, 720]], 'sat': 1900, 'lost': 5, 'allred': 2, 'cmin': 50, 'cmax': 180}, {'cycle': 135, 'lost': 17, 'y_milli': 773}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[420, 450], [270, 510, 690], [210], [60, 150]], 'sat': 1800, 'lost': 2, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 105, 'lost': 8, 'y_milli': 833}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[900], [840, 570, 390], [660, 90]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[540], [900]], 'sat': 1900, 'lost': 3, 'allred': 3, 'cmin': 60, 'cmax': 150}, {'cycle': 80, 'lost': 9, 'y_milli': 757})], [({'phases': [[810, 450, 540], [450, 240]], 'sat': 1800, 'lost': 5, 'allred': 1, 'cmin': 40, 'cmax': 180}, {'cycle': 75, 'lost': 11, 'y_milli': 700}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[270], [390, 150], [900], [480]], 'sat': 2000, 'lost': 5, 'allred': 5, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[630, 60], [570]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 120}, {'cycle': 80, 'lost': 14, 'y_milli': 666}), ({'phases': [[660, 570, 330], [570, 210, 150]], 'sat': 1900, 'lost': 3, 'allred': 6, 'cmin': 60, 'cmax': 180}, {'cycle': 70, 'lost': 12, 'y_milli': 647}), ({'phases': [[270, 600, 120], [570], [570, 900]], 'sat': 1800, 'lost': 2, 'allred': 5, 'cmin': 50, 'cmax': 150}, 'oversaturated')], [({'phases': [[240], [510], [510, 450, 570]], 'sat': 1900, 'lost': 3, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 75, 'lost': 11, 'y_milli': 694}), ({'phases': [[690], [720, 690, 750]], 'sat': 2000, 'lost': 2, 'allred': 0, 'cmin': 50, 'cmax': 180}, {'cycle': 50, 'lost': 4, 'y_milli': 720}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[810], [660]], 'sat': 2000, 'lost': 3, 'allred': 3, 'cmin': 50, 'cmax': 90}, {'cycle': 70, 'lost': 9, 'y_milli': 735}), ({'phases': [[180], [570], [330, 510, 150], [150]], 'sat': 2000, 'lost': 5, 'allred': 3, 'cmin': 40, 'cmax': 180}, {'cycle': 135, 'lost': 23, 'y_milli': 705}), ({'phases': [[630, 90], [60, 240], [180, 60, 420]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 50, 'cmax': 120}, {'cycle': 75, 'lost': 10, 'y_milli': 716})]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing oracle' + ' %d' % i, 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":"005ef200db2a9fe5bfc8c3f51cb63332c9b0bb9776ea406499346616d462d665","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ph = x['phases']\n    s = x['sat']\n    Y = Fraction(0)\n    for group in ph:\n        Y += Fraction(max(group), s)\n    L = x['lost'] * len(ph) + x['allred']\n    if Y >= Fraction(9, 10):\n        return 'oversaturated'\n    c0 = (Fraction(3, 2) * L + 5) / (1 - Y)\n    c = (c0 // 5) * 5\n    c = max(x['cmin'], min(x['cmax'], int(c)))\n    return {'cycle': c, 'lost': L, 'y_milli': int(Y * 1000)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[90], [300], [90, 720]], 'sat': 1800, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 180}, {'cycle': 65, 'lost': 13, 'y_milli': 616}), ({'phases': [[300, 540], [120, 210], [180, 450, 570]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 95, 'lost': 15, 'y_milli': 694}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[210, 690], [540, 480]], 'sat': 1900, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 90}, {'cycle': 55, 'lost': 9, 'y_milli': 647}), ({'phases': [[390], [150, 510, 810]], 'sat': 1900, 'lost': 2, 'allred': 6, 'cmin': 40, 'cmax': 150}, {'cycle': 55, 'lost': 10, 'y_milli': 631}), ({'phases': [[180, 540], [480], [720], [450, 690]], 'sat': 1900, 'lost': 4, 'allred': 5, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated')], [({'phases': [[630, 600], [510, 270, 120], [720, 90]], 'sat': 1800, 'lost': 3, 'allred': 4, 'cmin': 50, 'cmax': 90}, 'oversaturated'), ({'phases': [[690, 150], [90, 300, 90]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 180}, {'cycle': 55, 'lost': 12, 'y_milli': 550}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[180, 630, 300], [90, 600, 120], [570, 540, 390]], 'sat': 1900, 'lost': 3, 'allred': 4, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[660], [240, 480, 510]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 50, 'cmax': 180}, {'cycle': 60, 'lost': 10, 'y_milli': 650}), ({'phases': [[210, 840, 900], [60], [510]], 'sat': 1800, 'lost': 3, 'allred': 5, 'cmin': 40, 'cmax': 150}, {'cycle': 145, 'lost': 14, 'y_milli': 816})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[750, 570], [180, 510]], 'sat': 1900, 'lost': 3, 'allred': 5, 'cmin': 50, 'cmax': 120}, {'cycle': 65, 'lost': 11, 'y_milli': 663}), ({'phases': [[150, 60], [600, 480, 330], [210, 60, 720]], 'sat': 1900, 'lost': 5, 'allred': 2, 'cmin': 50, 'cmax': 180}, {'cycle': 135, 'lost': 17, 'y_milli': 773}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[420, 450], [270, 510, 690], [210], [60, 150]], 'sat': 1800, 'lost': 2, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 105, 'lost': 8, 'y_milli': 833}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[900], [840, 570, 390], [660, 90]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[540], [900]], 'sat': 1900, 'lost': 3, 'allred': 3, 'cmin': 60, 'cmax': 150}, {'cycle': 80, 'lost': 9, 'y_milli': 757})], [({'phases': [[810, 450, 540], [450, 240]], 'sat': 1800, 'lost': 5, 'allred': 1, 'cmin': 40, 'cmax': 180}, {'cycle': 75, 'lost': 11, 'y_milli': 700}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[270], [390, 150], [900], [480]], 'sat': 2000, 'lost': 5, 'allred': 5, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[630, 60], [570]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 120}, {'cycle': 80, 'lost': 14, 'y_milli': 666}), ({'phases': [[660, 570, 330], [570, 210, 150]], 'sat': 1900, 'lost': 3, 'allred': 6, 'cmin': 60, 'cmax': 180}, {'cycle': 70, 'lost': 12, 'y_milli': 647}), ({'phases': [[270, 600, 120], [570], [570, 900]], 'sat': 1800, 'lost': 2, 'allred': 5, 'cmin': 50, 'cmax': 150}, 'oversaturated')], [({'phases': [[240], [510], [510, 450, 570]], 'sat': 1900, 'lost': 3, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 75, 'lost': 11, 'y_milli': 694}), ({'phases': [[690], [720, 690, 750]], 'sat': 2000, 'lost': 2, 'allred': 0, 'cmin': 50, 'cmax': 180}, {'cycle': 50, 'lost': 4, 'y_milli': 720}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[810], [660]], 'sat': 2000, 'lost': 3, 'allred': 3, 'cmin': 50, 'cmax': 90}, {'cycle': 70, 'lost': 9, 'y_milli': 735}), ({'phases': [[180], [570], [330, 510, 150], [150]], 'sat': 2000, 'lost': 5, 'allred': 3, 'cmin': 40, 'cmax': 180}, {'cycle': 135, 'lost': 23, 'y_milli': 705}), ({'phases': [[630, 90], [60, 240], [180, 60, 420]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 50, 'cmax': 120}, {'cycle': 75, 'lost': 10, 'y_milli': 716})]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing oracle' + ' %d' % i, 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":"f2577158d6daa81f4b241d8963fb7e5e3893c5b3160a8ec825186d10a7ba5207","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ph = x['phases']\n    s = x['sat']\n    Y = Fraction(0)\n    for group in ph:\n        Y += Fraction(max(group), s)\n    L = x['lost'] * len(ph) + x['allred']\n    if Y >= Fraction(9, 10):\n        return 'oversaturated'\n    c0 = (Fraction(3, 2) * L + 5) / (1 - Y)\n    c = -(-c0 // 5) * 5\n    c = max(x['cmin'], min(x['cmax'], int(c)))\n    return {'cycle': c, 'lost': L, 'y_milli': int(Y * 1000)}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[90], [300], [90, 720]], 'sat': 1800, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 180}, {'cycle': 65, 'lost': 13, 'y_milli': 616}), ({'phases': [[300, 540], [120, 210], [180, 450, 570]], 'sat': 1900, 'lost': 5, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 95, 'lost': 15, 'y_milli': 694}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[210, 690], [540, 480]], 'sat': 1900, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 90}, {'cycle': 55, 'lost': 9, 'y_milli': 647}), ({'phases': [[390], [150, 510, 810]], 'sat': 1900, 'lost': 2, 'allred': 6, 'cmin': 40, 'cmax': 150}, {'cycle': 55, 'lost': 10, 'y_milli': 631}), ({'phases': [[180, 540], [480], [720], [450, 690]], 'sat': 1900, 'lost': 4, 'allred': 5, 'cmin': 60, 'cmax': 120}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated')], [({'phases': [[630, 600], [510, 270, 120], [720, 90]], 'sat': 1800, 'lost': 3, 'allred': 4, 'cmin': 50, 'cmax': 90}, 'oversaturated'), ({'phases': [[690, 150], [90, 300, 90]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 180}, {'cycle': 55, 'lost': 12, 'y_milli': 550}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[180, 630, 300], [90, 600, 120], [570, 540, 390]], 'sat': 1900, 'lost': 3, 'allred': 4, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[660], [240, 480, 510]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 50, 'cmax': 180}, {'cycle': 60, 'lost': 10, 'y_milli': 650}), ({'phases': [[210, 840, 900], [60], [510]], 'sat': 1800, 'lost': 3, 'allred': 5, 'cmin': 40, 'cmax': 150}, {'cycle': 145, 'lost': 14, 'y_milli': 816})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[750, 570], [180, 510]], 'sat': 1900, 'lost': 3, 'allred': 5, 'cmin': 50, 'cmax': 120}, {'cycle': 65, 'lost': 11, 'y_milli': 663}), ({'phases': [[150, 60], [600, 480, 330], [210, 60, 720]], 'sat': 1900, 'lost': 5, 'allred': 2, 'cmin': 50, 'cmax': 180}, {'cycle': 135, 'lost': 17, 'y_milli': 773}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[420, 450], [270, 510, 690], [210], [60, 150]], 'sat': 1800, 'lost': 2, 'allred': 0, 'cmin': 60, 'cmax': 180}, {'cycle': 105, 'lost': 8, 'y_milli': 833}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[900], [840, 570, 390], [660, 90]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[540], [900]], 'sat': 1900, 'lost': 3, 'allred': 3, 'cmin': 60, 'cmax': 150}, {'cycle': 80, 'lost': 9, 'y_milli': 757})], [({'phases': [[810, 450, 540], [450, 240]], 'sat': 1800, 'lost': 5, 'allred': 1, 'cmin': 40, 'cmax': 180}, {'cycle': 75, 'lost': 11, 'y_milli': 700}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[270], [390, 150], [900], [480]], 'sat': 2000, 'lost': 5, 'allred': 5, 'cmin': 50, 'cmax': 180}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[630, 60], [570]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 120}, {'cycle': 80, 'lost': 14, 'y_milli': 666}), ({'phases': [[660, 570, 330], [570, 210, 150]], 'sat': 1900, 'lost': 3, 'allred': 6, 'cmin': 60, 'cmax': 180}, {'cycle': 70, 'lost': 12, 'y_milli': 647}), ({'phases': [[270, 600, 120], [570], [570, 900]], 'sat': 1800, 'lost': 2, 'allred': 5, 'cmin': 50, 'cmax': 150}, 'oversaturated')], [({'phases': [[240], [510], [510, 450, 570]], 'sat': 1900, 'lost': 3, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 75, 'lost': 11, 'y_milli': 694}), ({'phases': [[690], [720, 690, 750]], 'sat': 2000, 'lost': 2, 'allred': 0, 'cmin': 50, 'cmax': 180}, {'cycle': 50, 'lost': 4, 'y_milli': 720}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[810], [660]], 'sat': 2000, 'lost': 3, 'allred': 3, 'cmin': 50, 'cmax': 90}, {'cycle': 70, 'lost': 9, 'y_milli': 735}), ({'phases': [[180], [570], [330, 510, 150], [150]], 'sat': 2000, 'lost': 5, 'allred': 3, 'cmin': 40, 'cmax': 180}, {'cycle': 135, 'lost': 23, 'y_milli': 705}), ({'phases': [[630, 90], [60, 240], [180, 60, 420]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 50, 'cmax': 120}, {'cycle': 75, 'lost': 10, 'y_milli': 716})]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('timing oracle' + ' %d' % i, 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":"A deterministic, bounded toy model with a stipulated contract; it makes no claim of conformance to any agency manual or standard. 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-traffic_signal_timing_plans-webster-cycle-round-up","generated_at":"2026-09-29T14:47:56.753224+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Signal timing arithmetic is exact and integer or rational; a wrong rule silently produces unsafe or inefficient timing plans.","repair":"Restore the cycle rounding rule so that the step reads `-(-c0 // 5) * 5`.","root_cause":"Floor division rounds the optimum cycle down, producing a cycle shorter than the Webster value.","sha256":"ef669cab291a9dbc18510cfe2ef9b665e6200a2a949714640021b1aabe0c30bd","title":"Webster cycle length: the computed cycle is rounded down to a 5 s multiple · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.739,"exit_code":1,"observations":[{"actual":{"cycle":50,"lost":10,"y_milli":583},"check":"timing oracle 0","expected":{"cycle":50,"lost":10,"y_milli":583},"passed":true},{"actual":{"cycle":65,"lost":13,"y_milli":616},"check":"timing oracle 1","expected":{"cycle":65,"lost":13,"y_milli":616},"passed":true},{"actual":{"cycle":90,"lost":15,"y_milli":694},"check":"timing oracle 2","expected":{"cycle":95,"lost":15,"y_milli":694},"passed":false},{"actual":"oversaturated","check":"timing oracle 3","expected":"oversaturated","passed":true},{"actual":{"cycle":50,"lost":9,"y_milli":647},"check":"timing oracle 4","expected":{"cycle":55,"lost":9,"y_milli":647},"passed":false},{"actual":{"cycle":55,"lost":10,"y_milli":631},"check":"timing oracle 5","expected":{"cycle":55,"lost":10,"y_milli":631},"passed":true},{"actual":"oversaturated","check":"timing oracle 6","expected":"oversaturated","passed":true},{"actual":"oversaturated","check":"timing oracle 7","expected":"oversaturated","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"expected\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 65, \"lost\": 13, \"y_milli\": 616}, \"expected\": {\"cycle\": 65, \"lost\": 13, \"y_milli\": 616}, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": {\"cycle\": 90, \"lost\": 15, \"y_milli\": 694}, \"expected\": {\"cycle\": 95, \"lost\": 15, \"y_milli\": 694}, \"passed\": false}, {\"check\": \"timing oracle 3\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 647}, \"expected\": {\"cycle\": 55, \"lost\": 9, \"y_milli\": 647}, \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": {\"cycle\": 55, \"lost\": 10, \"y_milli\": 631}, \"expected\": {\"cycle\": 55, \"lost\": 10, \"y_milli\": 631}, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.621,"exit_code":1,"observations":[{"actual":{"cycle":45,"lost":10,"y_milli":583},"check":"timing oracle 0","expected":{"cycle":50,"lost":10,"y_milli":583},"passed":false},{"actual":{"cycle":60,"lost":13,"y_milli":616},"check":"timing oracle 1","expected":{"cycle":65,"lost":13,"y_milli":616},"passed":false},{"actual":{"cycle":90,"lost":15,"y_milli":694},"check":"timing oracle 2","expected":{"cycle":95,"lost":15,"y_milli":694},"passed":false},{"actual":"oversaturated","check":"timing oracle 3","expected":"oversaturated","passed":true},{"actual":{"cycle":50,"lost":9,"y_milli":647},"check":"timing oracle 4","expected":{"cycle":55,"lost":9,"y_milli":647},"passed":false},{"actual":{"cycle":50,"lost":10,"y_milli":631},"check":"timing oracle 5","expected":{"cycle":55,"lost":10,"y_milli":631},"passed":false},{"actual":"oversaturated","check":"timing oracle 6","expected":"oversaturated","passed":true},{"actual":"oversaturated","check":"timing oracle 7","expected":"oversaturated","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 45, \"lost\": 10, \"y_milli\": 583}, \"expected\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 60, \"lost\": 13, \"y_milli\": 616}, \"expected\": {\"cycle\": 65, \"lost\": 13, \"y_milli\": 616}, \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": {\"cycle\": 90, \"lost\": 15, \"y_milli\": 694}, \"expected\": {\"cycle\": 95, \"lost\": 15, \"y_milli\": 694}, \"passed\": false}, {\"check\": \"timing oracle 3\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 50, \"lost\": 9, \"y_milli\": 647}, \"expected\": {\"cycle\": 55, \"lost\": 9, \"y_milli\": 647}, \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 631}, \"expected\": {\"cycle\": 55, \"lost\": 10, \"y_milli\": 631}, \"passed\": false}, {\"check\": \"timing oracle 6\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.607,"exit_code":0,"observations":[{"actual":{"cycle":50,"lost":10,"y_milli":583},"check":"timing oracle 0","expected":{"cycle":50,"lost":10,"y_milli":583},"passed":true},{"actual":{"cycle":65,"lost":13,"y_milli":616},"check":"timing oracle 1","expected":{"cycle":65,"lost":13,"y_milli":616},"passed":true},{"actual":{"cycle":95,"lost":15,"y_milli":694},"check":"timing oracle 2","expected":{"cycle":95,"lost":15,"y_milli":694},"passed":true},{"actual":"oversaturated","check":"timing oracle 3","expected":"oversaturated","passed":true},{"actual":{"cycle":55,"lost":9,"y_milli":647},"check":"timing oracle 4","expected":{"cycle":55,"lost":9,"y_milli":647},"passed":true},{"actual":{"cycle":55,"lost":10,"y_milli":631},"check":"timing oracle 5","expected":{"cycle":55,"lost":10,"y_milli":631},"passed":true},{"actual":"oversaturated","check":"timing oracle 6","expected":"oversaturated","passed":true},{"actual":"oversaturated","check":"timing oracle 7","expected":"oversaturated","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"expected\": {\"cycle\": 50, \"lost\": 10, \"y_milli\": 583}, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 65, \"lost\": 13, \"y_milli\": 616}, \"expected\": {\"cycle\": 65, \"lost\": 13, \"y_milli\": 616}, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": {\"cycle\": 95, \"lost\": 15, \"y_milli\": 694}, \"expected\": {\"cycle\": 95, \"lost\": 15, \"y_milli\": 694}, \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 55, \"lost\": 9, \"y_milli\": 647}, \"expected\": {\"cycle\": 55, \"lost\": 9, \"y_milli\": 647}, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": {\"cycle\": 55, \"lost\": 10, \"y_milli\": 631}, \"expected\": {\"cycle\": 55, \"lost\": 10, \"y_milli\": 631}, \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}