{"abstract":"Webster cycle length returns a wrong result when the constant 5 s is scaled together with lost time.","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":"Multiplying the constant by the number of phases is a different wrong scaling of the same fixed term.","family":"w2-traffic_signal_timing_plans-webster-cycle-formula-constant","id":"FA-67851","implementations":{"attempt":{"sha256":"fb8e58d1c2f8c73fe858150e4720593effa32bb71c7a7ad87f1b0dab82be9ec6","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 * len(ph)) / (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': [[840, 390], [810]], 'sat': 2000, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 150}, {'cycle': 90, 'lost': 7, 'y_milli': 825}), ({'phases': [[510], [450, 510, 660], [300]], 'sat': 1800, 'lost': 5, 'allred': 3, 'cmin': 50, 'cmax': 180}, {'cycle': 175, 'lost': 18, 'y_milli': 816}), ({'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': [[660, 840, 750], [90, 150]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 90}, {'cycle': 40, 'lost': 7, 'y_milli': 550}), ({'phases': [[660, 870, 540], [270, 750, 900], [390, 510, 630], [570]], 'sat': 2000, 'lost': 5, 'allred': 5, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[300, 540, 240], [420, 480, 690]], 'sat': 1800, 'lost': 2, 'allred': 1, 'cmin': 40, 'cmax': 90}, {'cycle': 40, 'lost': 5, 'y_milli': 683}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated')], [({'phases': [[300, 480], [540, 300, 900], [480, 210], [390]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[630], [630, 240], [60]], 'sat': 2000, 'lost': 5, 'allred': 1, 'cmin': 60, 'cmax': 180}, {'cycle': 90, 'lost': 16, 'y_milli': 660}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[270], [240, 420], [570, 510], [660]], 'sat': 1900, 'lost': 3, 'allred': 6, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[90, 540], [720, 600, 720]], 'sat': 1800, 'lost': 2, 'allred': 2, 'cmin': 40, 'cmax': 150}, {'cycle': 50, 'lost': 6, 'y_milli': 700}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[120, 900], [390, 720, 450], [450, 510]], 'sat': 1900, 'lost': 2, 'allred': 0, 'cmin': 50, 'cmax': 180}, 'oversaturated')], [({'phases': [[210, 870, 390], [390, 270], [60, 60, 360]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[780, 120, 780], [270]], 'sat': 1900, 'lost': 4, 'allred': 6, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 14, 'y_milli': 552}), ({'phases': [[210], [210, 810, 540]], 'sat': 1800, 'lost': 5, 'allred': 5, 'cmin': 40, 'cmax': 90}, {'cycle': 65, 'lost': 15, 'y_milli': 566}), ({'phases': [[900], [390, 60, 450]], 'sat': 1800, 'lost': 5, 'allred': 5, 'cmin': 60, 'cmax': 90}, {'cycle': 90, 'lost': 15, 'y_milli': 750}), ({'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': [[450, 870], [300, 420, 150]], 'sat': 1900, 'lost': 3, 'allred': 2, 'cmin': 60, 'cmax': 90}, {'cycle': 60, 'lost': 8, 'y_milli': 678}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated')], [({'phases': [[480], [210]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 60, 'cmax': 90}, {'cycle': 60, 'lost': 10, 'y_milli': 383}), ({'phases': [[660, 210], [270, 900, 180]], 'sat': 1900, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 180}, {'cycle': 150, 'lost': 14, 'y_milli': 821}), ({'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], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[540, 450, 360], [720, 210, 390], [360]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 60, 'cmax': 180}, 'oversaturated'), ({'phases': [[660, 360, 450], [630], [870, 210, 120], [720]], 'sat': 1900, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 90}, 'oversaturated'), ({'phases': [[420], [150], [60, 360, 510]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 80, 'lost': 17, 'y_milli': 600})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[690], [750, 750]], 'sat': 1900, 'lost': 3, 'allred': 4, 'cmin': 60, 'cmax': 150}, {'cycle': 85, 'lost': 10, 'y_milli': 757}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[210], [390, 660], [210, 480, 210]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 50, 'cmax': 90}, {'cycle': 80, 'lost': 10, 'y_milli': 750}), ({'phases': [[720, 600, 330], [480]], 'sat': 1900, 'lost': 2, 'allred': 1, 'cmin': 40, 'cmax': 180}, {'cycle': 40, 'lost': 5, 'y_milli': 631}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[810], [810, 360], [180]], 'sat': 1900, 'lost': 5, 'allred': 6, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[420, 420], [150, 300, 750], [540, 150], [510]], 'sat': 1800, 'lost': 5, 'allred': 1, 'cmin': 50, 'cmax': 180}, 'oversaturated')]]\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":"2b036323df1520a5f2e53b4b6218ff88148d466a10cab2d3d9475b8b2aa81195","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': [[840, 390], [810]], 'sat': 2000, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 150}, {'cycle': 90, 'lost': 7, 'y_milli': 825}), ({'phases': [[510], [450, 510, 660], [300]], 'sat': 1800, 'lost': 5, 'allred': 3, 'cmin': 50, 'cmax': 180}, {'cycle': 175, 'lost': 18, 'y_milli': 816}), ({'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': [[660, 840, 750], [90, 150]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 90}, {'cycle': 40, 'lost': 7, 'y_milli': 550}), ({'phases': [[660, 870, 540], [270, 750, 900], [390, 510, 630], [570]], 'sat': 2000, 'lost': 5, 'allred': 5, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[300, 540, 240], [420, 480, 690]], 'sat': 1800, 'lost': 2, 'allred': 1, 'cmin': 40, 'cmax': 90}, {'cycle': 40, 'lost': 5, 'y_milli': 683}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated')], [({'phases': [[300, 480], [540, 300, 900], [480, 210], [390]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[630], [630, 240], [60]], 'sat': 2000, 'lost': 5, 'allred': 1, 'cmin': 60, 'cmax': 180}, {'cycle': 90, 'lost': 16, 'y_milli': 660}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[270], [240, 420], [570, 510], [660]], 'sat': 1900, 'lost': 3, 'allred': 6, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[90, 540], [720, 600, 720]], 'sat': 1800, 'lost': 2, 'allred': 2, 'cmin': 40, 'cmax': 150}, {'cycle': 50, 'lost': 6, 'y_milli': 700}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[120, 900], [390, 720, 450], [450, 510]], 'sat': 1900, 'lost': 2, 'allred': 0, 'cmin': 50, 'cmax': 180}, 'oversaturated')], [({'phases': [[210, 870, 390], [390, 270], [60, 60, 360]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[780, 120, 780], [270]], 'sat': 1900, 'lost': 4, 'allred': 6, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 14, 'y_milli': 552}), ({'phases': [[210], [210, 810, 540]], 'sat': 1800, 'lost': 5, 'allred': 5, 'cmin': 40, 'cmax': 90}, {'cycle': 65, 'lost': 15, 'y_milli': 566}), ({'phases': [[900], [390, 60, 450]], 'sat': 1800, 'lost': 5, 'allred': 5, 'cmin': 60, 'cmax': 90}, {'cycle': 90, 'lost': 15, 'y_milli': 750}), ({'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': [[450, 870], [300, 420, 150]], 'sat': 1900, 'lost': 3, 'allred': 2, 'cmin': 60, 'cmax': 90}, {'cycle': 60, 'lost': 8, 'y_milli': 678}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated')], [({'phases': [[480], [210]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 60, 'cmax': 90}, {'cycle': 60, 'lost': 10, 'y_milli': 383}), ({'phases': [[660, 210], [270, 900, 180]], 'sat': 1900, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 180}, {'cycle': 150, 'lost': 14, 'y_milli': 821}), ({'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], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[540, 450, 360], [720, 210, 390], [360]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 60, 'cmax': 180}, 'oversaturated'), ({'phases': [[660, 360, 450], [630], [870, 210, 120], [720]], 'sat': 1900, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 90}, 'oversaturated'), ({'phases': [[420], [150], [60, 360, 510]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 80, 'lost': 17, 'y_milli': 600})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[690], [750, 750]], 'sat': 1900, 'lost': 3, 'allred': 4, 'cmin': 60, 'cmax': 150}, {'cycle': 85, 'lost': 10, 'y_milli': 757}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[210], [390, 660], [210, 480, 210]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 50, 'cmax': 90}, {'cycle': 80, 'lost': 10, 'y_milli': 750}), ({'phases': [[720, 600, 330], [480]], 'sat': 1900, 'lost': 2, 'allred': 1, 'cmin': 40, 'cmax': 180}, {'cycle': 40, 'lost': 5, 'y_milli': 631}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[810], [810, 360], [180]], 'sat': 1900, 'lost': 5, 'allred': 6, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[420, 420], [150, 300, 750], [540, 150], [510]], 'sat': 1800, 'lost': 5, 'allred': 1, 'cmin': 50, 'cmax': 180}, 'oversaturated')]]\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":"3e1a218a875968ab3541bc6a84a325cc60d597ab938478071520a251c440ebda","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': [[840, 390], [810]], 'sat': 2000, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 150}, {'cycle': 90, 'lost': 7, 'y_milli': 825}), ({'phases': [[510], [450, 510, 660], [300]], 'sat': 1800, 'lost': 5, 'allred': 3, 'cmin': 50, 'cmax': 180}, {'cycle': 175, 'lost': 18, 'y_milli': 816}), ({'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': [[660, 840, 750], [90, 150]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 40, 'cmax': 90}, {'cycle': 40, 'lost': 7, 'y_milli': 550}), ({'phases': [[660, 870, 540], [270, 750, 900], [390, 510, 630], [570]], 'sat': 2000, 'lost': 5, 'allred': 5, 'cmin': 50, 'cmax': 120}, 'oversaturated'), ({'phases': [[300, 540, 240], [420, 480, 690]], 'sat': 1800, 'lost': 2, 'allred': 1, 'cmin': 40, 'cmax': 90}, {'cycle': 40, 'lost': 5, 'y_milli': 683}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated')], [({'phases': [[300, 480], [540, 300, 900], [480, 210], [390]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[630], [630, 240], [60]], 'sat': 2000, 'lost': 5, 'allred': 1, 'cmin': 60, 'cmax': 180}, {'cycle': 90, 'lost': 16, 'y_milli': 660}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[270], [240, 420], [570, 510], [660]], 'sat': 1900, 'lost': 3, 'allred': 6, 'cmin': 40, 'cmax': 150}, 'oversaturated'), ({'phases': [[90, 540], [720, 600, 720]], 'sat': 1800, 'lost': 2, 'allred': 2, 'cmin': 40, 'cmax': 150}, {'cycle': 50, 'lost': 6, 'y_milli': 700}), ({'phases': [[300, 600], [450]], 'sat': 1800, 'lost': 4, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 50, 'lost': 10, 'y_milli': 583}), ({'phases': [[120, 900], [390, 720, 450], [450, 510]], 'sat': 1900, 'lost': 2, 'allred': 0, 'cmin': 50, 'cmax': 180}, 'oversaturated')], [({'phases': [[210, 870, 390], [390, 270], [60, 60, 360]], 'sat': 1800, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[780, 120, 780], [270]], 'sat': 1900, 'lost': 4, 'allred': 6, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 14, 'y_milli': 552}), ({'phases': [[210], [210, 810, 540]], 'sat': 1800, 'lost': 5, 'allred': 5, 'cmin': 40, 'cmax': 90}, {'cycle': 65, 'lost': 15, 'y_milli': 566}), ({'phases': [[900], [390, 60, 450]], 'sat': 1800, 'lost': 5, 'allred': 5, 'cmin': 60, 'cmax': 90}, {'cycle': 90, 'lost': 15, 'y_milli': 750}), ({'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': [[450, 870], [300, 420, 150]], 'sat': 1900, 'lost': 3, 'allred': 2, 'cmin': 60, 'cmax': 90}, {'cycle': 60, 'lost': 8, 'y_milli': 678}), ({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated')], [({'phases': [[480], [210]], 'sat': 1800, 'lost': 2, 'allred': 6, 'cmin': 60, 'cmax': 90}, {'cycle': 60, 'lost': 10, 'y_milli': 383}), ({'phases': [[660, 210], [270, 900, 180]], 'sat': 1900, 'lost': 5, 'allred': 4, 'cmin': 40, 'cmax': 180}, {'cycle': 150, 'lost': 14, 'y_milli': 821}), ({'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], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[540, 450, 360], [720, 210, 390], [360]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 60, 'cmax': 180}, 'oversaturated'), ({'phases': [[660, 360, 450], [630], [870, 210, 120], [720]], 'sat': 1900, 'lost': 4, 'allred': 1, 'cmin': 50, 'cmax': 90}, 'oversaturated'), ({'phases': [[420], [150], [60, 360, 510]], 'sat': 1800, 'lost': 5, 'allred': 2, 'cmin': 40, 'cmax': 120}, {'cycle': 80, 'lost': 17, 'y_milli': 600})], [({'phases': [[720, 360], [540, 900]], 'sat': 1800, 'lost': 4, 'allred': 4, 'cmin': 60, 'cmax': 150}, 'oversaturated'), ({'phases': [[690], [750, 750]], 'sat': 1900, 'lost': 3, 'allred': 4, 'cmin': 60, 'cmax': 150}, {'cycle': 85, 'lost': 10, 'y_milli': 757}), ({'phases': [[810], [810]], 'sat': 1800, 'lost': 4, 'allred': 0, 'cmin': 40, 'cmax': 180}, 'oversaturated'), ({'phases': [[210], [390, 660], [210, 480, 210]], 'sat': 1800, 'lost': 3, 'allred': 1, 'cmin': 50, 'cmax': 90}, {'cycle': 80, 'lost': 10, 'y_milli': 750}), ({'phases': [[720, 600, 330], [480]], 'sat': 1900, 'lost': 2, 'allred': 1, 'cmin': 40, 'cmax': 180}, {'cycle': 40, 'lost': 5, 'y_milli': 631}), ({'phases': [[90], [90], [90]], 'sat': 1800, 'lost': 3, 'allred': 0, 'cmin': 60, 'cmax': 120}, {'cycle': 60, 'lost': 9, 'y_milli': 150}), ({'phases': [[810], [810, 360], [180]], 'sat': 1900, 'lost': 5, 'allred': 6, 'cmin': 40, 'cmax': 120}, 'oversaturated'), ({'phases': [[420, 420], [150, 300, 750], [540, 150], [510]], 'sat': 1800, 'lost': 5, 'allred': 1, 'cmin': 50, 'cmax': 180}, 'oversaturated')]]\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-formula-constant","generated_at":"2026-09-29T14:47:56.586548+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 Webster numerator rule so that the step reads `(Fraction(3, 2) * L + 5)`.","root_cause":"Parenthesization multiplies the 5 second constant by 1.5, lengthening every computed cycle.","sha256":"14fbf596e032796062eb31eec7d452c1a7759d630aef7616cd3e746e8be44a98","title":"Webster cycle length: the constant 5 s is scaled together with lost time · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.258,"exit_code":1,"observations":[{"actual":{"cycle":120,"lost":7,"y_milli":825},"check":"timing oracle 0","expected":{"cycle":90,"lost":7,"y_milli":825},"passed":false},{"actual":{"cycle":180,"lost":18,"y_milli":816},"check":"timing oracle 1","expected":{"cycle":175,"lost":18,"y_milli":816},"passed":false},{"actual":"oversaturated","check":"timing oracle 2","expected":"oversaturated","passed":true},{"actual":{"cycle":60,"lost":9,"y_milli":150},"check":"timing oracle 3","expected":{"cycle":60,"lost":9,"y_milli":150},"passed":true},{"actual":{"cycle":50,"lost":7,"y_milli":550},"check":"timing oracle 4","expected":{"cycle":40,"lost":7,"y_milli":550},"passed":false},{"actual":"oversaturated","check":"timing oracle 5","expected":"oversaturated","passed":true},{"actual":{"cycle":60,"lost":5,"y_milli":683},"check":"timing oracle 6","expected":{"cycle":40,"lost":5,"y_milli":683},"passed":false},{"actual":"oversaturated","check":"timing oracle 7","expected":"oversaturated","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 120, \"lost\": 7, \"y_milli\": 825}, \"expected\": {\"cycle\": 90, \"lost\": 7, \"y_milli\": 825}, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 180, \"lost\": 18, \"y_milli\": 816}, \"expected\": {\"cycle\": 175, \"lost\": 18, \"y_milli\": 816}, \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": {\"cycle\": 60, \"lost\": 9, \"y_milli\": 150}, \"expected\": {\"cycle\": 60, \"lost\": 9, \"y_milli\": 150}, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 50, \"lost\": 7, \"y_milli\": 550}, \"expected\": {\"cycle\": 40, \"lost\": 7, \"y_milli\": 550}, \"passed\": false}, {\"check\": \"timing oracle 5\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": {\"cycle\": 60, \"lost\": 5, \"y_milli\": 683}, \"expected\": {\"cycle\": 40, \"lost\": 5, \"y_milli\": 683}, \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.799,"exit_code":1,"observations":[{"actual":{"cycle":105,"lost":7,"y_milli":825},"check":"timing oracle 0","expected":{"cycle":90,"lost":7,"y_milli":825},"passed":false},{"actual":{"cycle":180,"lost":18,"y_milli":816},"check":"timing oracle 1","expected":{"cycle":175,"lost":18,"y_milli":816},"passed":false},{"actual":"oversaturated","check":"timing oracle 2","expected":"oversaturated","passed":true},{"actual":{"cycle":60,"lost":9,"y_milli":150},"check":"timing oracle 3","expected":{"cycle":60,"lost":9,"y_milli":150},"passed":true},{"actual":{"cycle":40,"lost":7,"y_milli":550},"check":"timing oracle 4","expected":{"cycle":40,"lost":7,"y_milli":550},"passed":true},{"actual":"oversaturated","check":"timing oracle 5","expected":"oversaturated","passed":true},{"actual":{"cycle":50,"lost":5,"y_milli":683},"check":"timing oracle 6","expected":{"cycle":40,"lost":5,"y_milli":683},"passed":false},{"actual":"oversaturated","check":"timing oracle 7","expected":"oversaturated","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 105, \"lost\": 7, \"y_milli\": 825}, \"expected\": {\"cycle\": 90, \"lost\": 7, \"y_milli\": 825}, \"passed\": false}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 180, \"lost\": 18, \"y_milli\": 816}, \"expected\": {\"cycle\": 175, \"lost\": 18, \"y_milli\": 816}, \"passed\": false}, {\"check\": \"timing oracle 2\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": {\"cycle\": 60, \"lost\": 9, \"y_milli\": 150}, \"expected\": {\"cycle\": 60, \"lost\": 9, \"y_milli\": 150}, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 40, \"lost\": 7, \"y_milli\": 550}, \"expected\": {\"cycle\": 40, \"lost\": 7, \"y_milli\": 550}, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": {\"cycle\": 50, \"lost\": 5, \"y_milli\": 683}, \"expected\": {\"cycle\": 40, \"lost\": 5, \"y_milli\": 683}, \"passed\": false}, {\"check\": \"timing oracle 7\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.091,"exit_code":0,"observations":[{"actual":{"cycle":90,"lost":7,"y_milli":825},"check":"timing oracle 0","expected":{"cycle":90,"lost":7,"y_milli":825},"passed":true},{"actual":{"cycle":175,"lost":18,"y_milli":816},"check":"timing oracle 1","expected":{"cycle":175,"lost":18,"y_milli":816},"passed":true},{"actual":"oversaturated","check":"timing oracle 2","expected":"oversaturated","passed":true},{"actual":{"cycle":60,"lost":9,"y_milli":150},"check":"timing oracle 3","expected":{"cycle":60,"lost":9,"y_milli":150},"passed":true},{"actual":{"cycle":40,"lost":7,"y_milli":550},"check":"timing oracle 4","expected":{"cycle":40,"lost":7,"y_milli":550},"passed":true},{"actual":"oversaturated","check":"timing oracle 5","expected":"oversaturated","passed":true},{"actual":{"cycle":40,"lost":5,"y_milli":683},"check":"timing oracle 6","expected":{"cycle":40,"lost":5,"y_milli":683},"passed":true},{"actual":"oversaturated","check":"timing oracle 7","expected":"oversaturated","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"timing oracle 0\", \"actual\": {\"cycle\": 90, \"lost\": 7, \"y_milli\": 825}, \"expected\": {\"cycle\": 90, \"lost\": 7, \"y_milli\": 825}, \"passed\": true}, {\"check\": \"timing oracle 1\", \"actual\": {\"cycle\": 175, \"lost\": 18, \"y_milli\": 816}, \"expected\": {\"cycle\": 175, \"lost\": 18, \"y_milli\": 816}, \"passed\": true}, {\"check\": \"timing oracle 2\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 3\", \"actual\": {\"cycle\": 60, \"lost\": 9, \"y_milli\": 150}, \"expected\": {\"cycle\": 60, \"lost\": 9, \"y_milli\": 150}, \"passed\": true}, {\"check\": \"timing oracle 4\", \"actual\": {\"cycle\": 40, \"lost\": 7, \"y_milli\": 550}, \"expected\": {\"cycle\": 40, \"lost\": 7, \"y_milli\": 550}, \"passed\": true}, {\"check\": \"timing oracle 5\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}, {\"check\": \"timing oracle 6\", \"actual\": {\"cycle\": 40, \"lost\": 5, \"y_milli\": 683}, \"expected\": {\"cycle\": 40, \"lost\": 5, \"y_milli\": 683}, \"passed\": true}, {\"check\": \"timing oracle 7\", \"actual\": \"oversaturated\", \"expected\": \"oversaturated\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}