{"abstract":"Route setting time ignores the individual throw time of slow or fast points.","category":"Railway interlocking logic","checks":8,"contract":"A route needs points in given lies (processed in list order). Points already detected in the needed lie are skipped; an undetected point (missing from current) must be thrown. A point that must move but is locked by another route blocks the whole request (blocked:<p>, nothing thrown). At most max_parallel points move at once: each point starts on the earliest-free supply slot (lowest index on ties) and takes its own throw time or the default. Return the start time per thrown point and the time all have finished.","evaluation_group":"w2-railway_interlocking_logic-sequential-point-throwing","failed_approach":"Defaulting to zero makes points without a specific time move instantaneously.","family":"w2-railway_interlocking_logic-sequential-point-throwing-throw-time-lookup","id":"FA-67251","implementations":{"attempt":{"sha256":"2fa9ac027e999ab737ec83bdbe69ea54eb13d3978fdb45e0c20817beb953894d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cur = x['current']\n    locked = set(x['locked'])\n    todo = []\n    for p, pos in x['need']:\n        if cur.get(p) == pos:\n            continue\n        if p in locked:\n            return {'result': 'blocked:' + p, 'starts': {}, 'done_s': 0}\n        todo.append(p)\n    slots = [0] * x['max_parallel']\n    starts = {}\n    for p in todo:\n        k = min(range(len(slots)), key=lambda i: (slots[i], i))\n        starts[p] = slots[k]\n        slots[k] += x['throw_s'].get(p, 0)\n    done = max(slots) if todo else 0\n    return {'result': 'set', 'starts': starts, 'done_s': done}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('boundary: locked point already in the right lie', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0}, 'done_s': 5}), ('sampled regression 1', {'need': [['P3', 'R'], ['P6', 'N'], ['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0, 'P6': 0, 'P1': 5}, 'done_s': 11}), ('boundary: undetected point', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P2': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0}, 'done_s': 5}), ('boundary: locked point needing to move', {'need': [['P1', 'R'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'blocked:P1', 'starts': {}, 'done_s': 0}), ('control 4', {'need': [['P1', 'N'], ['P5', 'N']], 'current': {'P1': 'N', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P3': 4, 'P5': 3, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 7', {'need': [['P6', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P4': 'R', 'P5': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('sampled regression 10', {'need': [['P3', 'R'], ['P4', 'N']], 'current': {'P2': 'N', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': ['P1', 'P5'], 'max_parallel': 3, 'throw_s': {'P2': 3, 'P4': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0}, 'done_s': 4})], [('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('boundary: undetected point', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P2': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0}, 'done_s': 5}), ('sampled regression 17', {'need': [['P2', 'N'], ['P5', 'N'], ['P4', 'N']], 'current': {'P1': 'R', 'P3': 'R', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P1': 3, 'P3': 3, 'P5': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0, 'P5': 5}, 'done_s': 11}), ('control 2', {'need': [['P4', 'R'], ['P6', 'R'], ['P5', 'R'], ['P2', 'N']], 'current': {'P1': 'N', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P1'], 'max_parallel': 3, 'throw_s': {'P1': 6, 'P3': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P6': 0, 'P5': 0, 'P2': 0}, 'done_s': 5}), ('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('control 12', {'need': [['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P6'], 'max_parallel': 2, 'throw_s': {'P2': 6, 'P4': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0}, 'done_s': 5}), ('control 15', {'need': [['P1', 'N'], ['P5', 'R'], ['P4', 'R'], ['P3', 'R'], ['P2', 'R']], 'current': {'P2': 'R', 'P4': 'R', 'P5': 'R', 'P6': 'N'}, 'locked': ['P1', 'P4'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P5': 4}, 'default_throw_s': 5}, {'result': 'blocked:P1', 'starts': {}, 'done_s': 0}), ('sampled regression 18', {'need': [['P2', 'N'], ['P3', 'R']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'N', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 6, 'P4': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0, 'P3': 0}, 'done_s': 6})], [('regression: points with individual throw times', {'need': [['P4', 'R'], ['P5', 'N']], 'current': {'P4': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P5': 3}, 'done_s': 8}), ('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('sampled regression 29', {'need': [['P4', 'N'], ['P2', 'N'], ['P1', 'N'], ['P5', 'N'], ['P6', 'R']], 'current': {'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P1': 4, 'P2': 3, 'P3': 6, 'P4': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P1': 6}, 'done_s': 10}), ('control 13', {'need': [['P5', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P1': 3, 'P2': 3, 'P3': 6, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P5': 0, 'P2': 0}, 'done_s': 5}), ('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('sampled regression 23', {'need': [['P3', 'N'], ['P4', 'N'], ['P1', 'R'], ['P6', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P4': 3, 'P5': 4, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P6': 3}, 'done_s': 6}), ('control 26', {'need': [['P1', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P5', 'P6'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 32', {'need': [['P2', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': ['P5', 'P6'], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6, 'P3': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})], [('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('boundary: single supply', {'need': [['P1', 'R'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': [], 'max_parallel': 1, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 5}, 'done_s': 10}), ('sampled regression 49', {'need': [['P5', 'R'], ['P3', 'N'], ['P1', 'N'], ['P4', 'R'], ['P2', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'R', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 3, 'P5': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0, 'P1': 0, 'P4': 3, 'P2': 5}, 'done_s': 10}), ('sampled regression 27', {'need': [['P4', 'R'], ['P2', 'R'], ['P6', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'N'}, 'locked': ['P3'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 4, 'P4': 3, 'P5': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P2': 3, 'P6': 6}, 'done_s': 11}), ('boundary: nothing to move', {'need': [['P1', 'N']], 'current': {'P1': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 34', {'need': [['P3', 'R']], 'current': {'P1': 'R', 'P3': 'N', 'P4': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P1': 6, 'P2': 3, 'P4': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0}, 'done_s': 5}), ('control 37', {'need': [['P5', 'R'], ['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 6, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0}, 'done_s': 5}), ('control 40', {'need': [['P5', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': ['P3'], 'max_parallel': 2, 'throw_s': {'P1': 4, 'P2': 6, 'P3': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})], [('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('regression: points with individual throw times', {'need': [['P4', 'R'], ['P5', 'N']], 'current': {'P4': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P5': 3}, 'done_s': 8}), ('sampled regression 65', {'need': [['P6', 'N']], 'current': {'P3': 'N', 'P4': 'N', 'P5': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P2': 6, 'P3': 4, 'P4': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P6': 0}, 'done_s': 3}), ('control 39', {'need': [['P4', 'N'], ['P3', 'R']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'R', 'P6': 'R'}, 'locked': ['P2'], 'max_parallel': 2, 'throw_s': {'P2': 6, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0}, 'done_s': 5}), ('boundary: locked point already in the right lie', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0}, 'done_s': 5}), ('control 45', {'need': [['P5', 'N'], ['P3', 'R'], ['P2', 'R'], ['P6', 'N'], ['P4', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P1', 'P2', 'P5'], 'max_parallel': 1, 'throw_s': {'P1': 6, 'P2': 4, 'P4': 6, 'P5': 3}, 'default_throw_s': 5}, {'result': 'blocked:P2', 'starts': {}, 'done_s': 0}), ('control 48', {'need': [['P3', 'R']], 'current': {'P1': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P4'], 'max_parallel': 1, 'throw_s': {'P4': 6, 'P5': 6, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0}, 'done_s': 5}), ('control 51', {'need': [['P6', 'R'], ['P5', 'N'], ['P1', 'R'], ['P4', 'N']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': ['P3'], 'max_parallel': 3, 'throw_s': {'P2': 6, 'P3': 6, 'P4': 6, 'P5': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})]]\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":"7631529585f3e052b57d4d2e342536bf5cdb781a37a4cbe2f5d54e422e54f14a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cur = x['current']\n    locked = set(x['locked'])\n    todo = []\n    for p, pos in x['need']:\n        if cur.get(p) == pos:\n            continue\n        if p in locked:\n            return {'result': 'blocked:' + p, 'starts': {}, 'done_s': 0}\n        todo.append(p)\n    slots = [0] * x['max_parallel']\n    starts = {}\n    for p in todo:\n        k = min(range(len(slots)), key=lambda i: (slots[i], i))\n        starts[p] = slots[k]\n        slots[k] += x['default_throw_s']\n    done = max(slots) if todo else 0\n    return {'result': 'set', 'starts': starts, 'done_s': done}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('boundary: locked point already in the right lie', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0}, 'done_s': 5}), ('sampled regression 1', {'need': [['P3', 'R'], ['P6', 'N'], ['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0, 'P6': 0, 'P1': 5}, 'done_s': 11}), ('boundary: undetected point', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P2': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0}, 'done_s': 5}), ('boundary: locked point needing to move', {'need': [['P1', 'R'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'blocked:P1', 'starts': {}, 'done_s': 0}), ('control 4', {'need': [['P1', 'N'], ['P5', 'N']], 'current': {'P1': 'N', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P3': 4, 'P5': 3, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 7', {'need': [['P6', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P4': 'R', 'P5': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('sampled regression 10', {'need': [['P3', 'R'], ['P4', 'N']], 'current': {'P2': 'N', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': ['P1', 'P5'], 'max_parallel': 3, 'throw_s': {'P2': 3, 'P4': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0}, 'done_s': 4})], [('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('boundary: undetected point', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P2': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0}, 'done_s': 5}), ('sampled regression 17', {'need': [['P2', 'N'], ['P5', 'N'], ['P4', 'N']], 'current': {'P1': 'R', 'P3': 'R', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P1': 3, 'P3': 3, 'P5': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0, 'P5': 5}, 'done_s': 11}), ('control 2', {'need': [['P4', 'R'], ['P6', 'R'], ['P5', 'R'], ['P2', 'N']], 'current': {'P1': 'N', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P1'], 'max_parallel': 3, 'throw_s': {'P1': 6, 'P3': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P6': 0, 'P5': 0, 'P2': 0}, 'done_s': 5}), ('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('control 12', {'need': [['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P6'], 'max_parallel': 2, 'throw_s': {'P2': 6, 'P4': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0}, 'done_s': 5}), ('control 15', {'need': [['P1', 'N'], ['P5', 'R'], ['P4', 'R'], ['P3', 'R'], ['P2', 'R']], 'current': {'P2': 'R', 'P4': 'R', 'P5': 'R', 'P6': 'N'}, 'locked': ['P1', 'P4'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P5': 4}, 'default_throw_s': 5}, {'result': 'blocked:P1', 'starts': {}, 'done_s': 0}), ('sampled regression 18', {'need': [['P2', 'N'], ['P3', 'R']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'N', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 6, 'P4': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0, 'P3': 0}, 'done_s': 6})], [('regression: points with individual throw times', {'need': [['P4', 'R'], ['P5', 'N']], 'current': {'P4': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P5': 3}, 'done_s': 8}), ('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('sampled regression 29', {'need': [['P4', 'N'], ['P2', 'N'], ['P1', 'N'], ['P5', 'N'], ['P6', 'R']], 'current': {'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P1': 4, 'P2': 3, 'P3': 6, 'P4': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P1': 6}, 'done_s': 10}), ('control 13', {'need': [['P5', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P1': 3, 'P2': 3, 'P3': 6, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P5': 0, 'P2': 0}, 'done_s': 5}), ('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('sampled regression 23', {'need': [['P3', 'N'], ['P4', 'N'], ['P1', 'R'], ['P6', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P4': 3, 'P5': 4, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P6': 3}, 'done_s': 6}), ('control 26', {'need': [['P1', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P5', 'P6'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 32', {'need': [['P2', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': ['P5', 'P6'], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6, 'P3': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})], [('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('boundary: single supply', {'need': [['P1', 'R'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': [], 'max_parallel': 1, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 5}, 'done_s': 10}), ('sampled regression 49', {'need': [['P5', 'R'], ['P3', 'N'], ['P1', 'N'], ['P4', 'R'], ['P2', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'R', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 3, 'P5': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0, 'P1': 0, 'P4': 3, 'P2': 5}, 'done_s': 10}), ('sampled regression 27', {'need': [['P4', 'R'], ['P2', 'R'], ['P6', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'N'}, 'locked': ['P3'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 4, 'P4': 3, 'P5': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P2': 3, 'P6': 6}, 'done_s': 11}), ('boundary: nothing to move', {'need': [['P1', 'N']], 'current': {'P1': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 34', {'need': [['P3', 'R']], 'current': {'P1': 'R', 'P3': 'N', 'P4': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P1': 6, 'P2': 3, 'P4': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0}, 'done_s': 5}), ('control 37', {'need': [['P5', 'R'], ['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 6, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0}, 'done_s': 5}), ('control 40', {'need': [['P5', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': ['P3'], 'max_parallel': 2, 'throw_s': {'P1': 4, 'P2': 6, 'P3': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})], [('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('regression: points with individual throw times', {'need': [['P4', 'R'], ['P5', 'N']], 'current': {'P4': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P5': 3}, 'done_s': 8}), ('sampled regression 65', {'need': [['P6', 'N']], 'current': {'P3': 'N', 'P4': 'N', 'P5': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P2': 6, 'P3': 4, 'P4': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P6': 0}, 'done_s': 3}), ('control 39', {'need': [['P4', 'N'], ['P3', 'R']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'R', 'P6': 'R'}, 'locked': ['P2'], 'max_parallel': 2, 'throw_s': {'P2': 6, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0}, 'done_s': 5}), ('boundary: locked point already in the right lie', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0}, 'done_s': 5}), ('control 45', {'need': [['P5', 'N'], ['P3', 'R'], ['P2', 'R'], ['P6', 'N'], ['P4', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P1', 'P2', 'P5'], 'max_parallel': 1, 'throw_s': {'P1': 6, 'P2': 4, 'P4': 6, 'P5': 3}, 'default_throw_s': 5}, {'result': 'blocked:P2', 'starts': {}, 'done_s': 0}), ('control 48', {'need': [['P3', 'R']], 'current': {'P1': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P4'], 'max_parallel': 1, 'throw_s': {'P4': 6, 'P5': 6, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0}, 'done_s': 5}), ('control 51', {'need': [['P6', 'R'], ['P5', 'N'], ['P1', 'R'], ['P4', 'N']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': ['P3'], 'max_parallel': 3, 'throw_s': {'P2': 6, 'P3': 6, 'P4': 6, 'P5': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})]]\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":"8e9ba0a611224e80b770122c575107824d28bc572b701e697b783d2a2d10893e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cur = x['current']\n    locked = set(x['locked'])\n    todo = []\n    for p, pos in x['need']:\n        if cur.get(p) == pos:\n            continue\n        if p in locked:\n            return {'result': 'blocked:' + p, 'starts': {}, 'done_s': 0}\n        todo.append(p)\n    slots = [0] * x['max_parallel']\n    starts = {}\n    for p in todo:\n        k = min(range(len(slots)), key=lambda i: (slots[i], i))\n        starts[p] = slots[k]\n        slots[k] += x['throw_s'][p] if p in x['throw_s'] else x['default_throw_s']\n    done = max(slots) if todo else 0\n    return {'result': 'set', 'starts': starts, 'done_s': done}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('boundary: locked point already in the right lie', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0}, 'done_s': 5}), ('sampled regression 1', {'need': [['P3', 'R'], ['P6', 'N'], ['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0, 'P6': 0, 'P1': 5}, 'done_s': 11}), ('boundary: undetected point', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P2': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0}, 'done_s': 5}), ('boundary: locked point needing to move', {'need': [['P1', 'R'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'blocked:P1', 'starts': {}, 'done_s': 0}), ('control 4', {'need': [['P1', 'N'], ['P5', 'N']], 'current': {'P1': 'N', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P3': 4, 'P5': 3, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 7', {'need': [['P6', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P4': 'R', 'P5': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('sampled regression 10', {'need': [['P3', 'R'], ['P4', 'N']], 'current': {'P2': 'N', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': ['P1', 'P5'], 'max_parallel': 3, 'throw_s': {'P2': 3, 'P4': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0}, 'done_s': 4})], [('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('boundary: undetected point', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P2': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0}, 'done_s': 5}), ('sampled regression 17', {'need': [['P2', 'N'], ['P5', 'N'], ['P4', 'N']], 'current': {'P1': 'R', 'P3': 'R', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P1': 3, 'P3': 3, 'P5': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0, 'P5': 5}, 'done_s': 11}), ('control 2', {'need': [['P4', 'R'], ['P6', 'R'], ['P5', 'R'], ['P2', 'N']], 'current': {'P1': 'N', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P1'], 'max_parallel': 3, 'throw_s': {'P1': 6, 'P3': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P6': 0, 'P5': 0, 'P2': 0}, 'done_s': 5}), ('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('control 12', {'need': [['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P6'], 'max_parallel': 2, 'throw_s': {'P2': 6, 'P4': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0}, 'done_s': 5}), ('control 15', {'need': [['P1', 'N'], ['P5', 'R'], ['P4', 'R'], ['P3', 'R'], ['P2', 'R']], 'current': {'P2': 'R', 'P4': 'R', 'P5': 'R', 'P6': 'N'}, 'locked': ['P1', 'P4'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P5': 4}, 'default_throw_s': 5}, {'result': 'blocked:P1', 'starts': {}, 'done_s': 0}), ('sampled regression 18', {'need': [['P2', 'N'], ['P3', 'R']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'N', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 6, 'P4': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0, 'P3': 0}, 'done_s': 6})], [('regression: points with individual throw times', {'need': [['P4', 'R'], ['P5', 'N']], 'current': {'P4': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P5': 3}, 'done_s': 8}), ('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('sampled regression 29', {'need': [['P4', 'N'], ['P2', 'N'], ['P1', 'N'], ['P5', 'N'], ['P6', 'R']], 'current': {'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P1': 4, 'P2': 3, 'P3': 6, 'P4': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P1': 6}, 'done_s': 10}), ('control 13', {'need': [['P5', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P1': 3, 'P2': 3, 'P3': 6, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P5': 0, 'P2': 0}, 'done_s': 5}), ('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('sampled regression 23', {'need': [['P3', 'N'], ['P4', 'N'], ['P1', 'R'], ['P6', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P4': 3, 'P5': 4, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P6': 3}, 'done_s': 6}), ('control 26', {'need': [['P1', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P5', 'P6'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 32', {'need': [['P2', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': ['P5', 'P6'], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6, 'P3': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})], [('regression: three points on two supplies', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 3, 'P2': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3}, 'done_s': 8}), ('boundary: single supply', {'need': [['P1', 'R'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': [], 'max_parallel': 1, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 5}, 'done_s': 10}), ('sampled regression 49', {'need': [['P5', 'R'], ['P3', 'N'], ['P1', 'N'], ['P4', 'R'], ['P2', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'R', 'P4': 'N', 'P5': 'R', 'P6': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 3, 'P5': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0, 'P1': 0, 'P4': 3, 'P2': 5}, 'done_s': 10}), ('sampled regression 27', {'need': [['P4', 'R'], ['P2', 'R'], ['P6', 'R']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'N'}, 'locked': ['P3'], 'max_parallel': 1, 'throw_s': {'P2': 3, 'P3': 4, 'P4': 3, 'P5': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P2': 3, 'P6': 6}, 'done_s': 11}), ('boundary: nothing to move', {'need': [['P1', 'N']], 'current': {'P1': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0}), ('control 34', {'need': [['P3', 'R']], 'current': {'P1': 'R', 'P3': 'N', 'P4': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P1': 6, 'P2': 3, 'P4': 4, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0}, 'done_s': 5}), ('control 37', {'need': [['P5', 'R'], ['P1', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P3': 6, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0}, 'done_s': 5}), ('control 40', {'need': [['P5', 'N']], 'current': {'P1': 'R', 'P2': 'N', 'P3': 'R', 'P4': 'R', 'P5': 'N', 'P6': 'R'}, 'locked': ['P3'], 'max_parallel': 2, 'throw_s': {'P1': 4, 'P2': 6, 'P3': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})], [('regression: long first throw then short ones', {'need': [['P1', 'R'], ['P2', 'R'], ['P3', 'R'], ['P4', 'R']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'N'}, 'locked': [], 'max_parallel': 2, 'throw_s': {'P1': 6, 'P2': 3, 'P3': 3, 'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P1': 0, 'P2': 0, 'P3': 3, 'P4': 6}, 'done_s': 9}), ('regression: points with individual throw times', {'need': [['P4', 'R'], ['P5', 'N']], 'current': {'P4': 'N', 'P5': 'R'}, 'locked': [], 'max_parallel': 1, 'throw_s': {'P4': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0, 'P5': 3}, 'done_s': 8}), ('sampled regression 65', {'need': [['P6', 'N']], 'current': {'P3': 'N', 'P4': 'N', 'P5': 'R', 'P6': 'R'}, 'locked': [], 'max_parallel': 3, 'throw_s': {'P2': 6, 'P3': 4, 'P4': 3, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P6': 0}, 'done_s': 3}), ('control 39', {'need': [['P4', 'N'], ['P3', 'R']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'R', 'P4': 'R', 'P5': 'R', 'P6': 'R'}, 'locked': ['P2'], 'max_parallel': 2, 'throw_s': {'P2': 6, 'P6': 4}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P4': 0}, 'done_s': 5}), ('boundary: locked point already in the right lie', {'need': [['P1', 'N'], ['P2', 'R']], 'current': {'P1': 'N', 'P2': 'N'}, 'locked': ['P1'], 'max_parallel': 2, 'throw_s': {}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P2': 0}, 'done_s': 5}), ('control 45', {'need': [['P5', 'N'], ['P3', 'R'], ['P2', 'R'], ['P6', 'N'], ['P4', 'N']], 'current': {'P1': 'N', 'P2': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P1', 'P2', 'P5'], 'max_parallel': 1, 'throw_s': {'P1': 6, 'P2': 4, 'P4': 6, 'P5': 3}, 'default_throw_s': 5}, {'result': 'blocked:P2', 'starts': {}, 'done_s': 0}), ('control 48', {'need': [['P3', 'R']], 'current': {'P1': 'N', 'P3': 'N', 'P4': 'R', 'P5': 'N', 'P6': 'N'}, 'locked': ['P4'], 'max_parallel': 1, 'throw_s': {'P4': 6, 'P5': 6, 'P6': 3}, 'default_throw_s': 5}, {'result': 'set', 'starts': {'P3': 0}, 'done_s': 5}), ('control 51', {'need': [['P6', 'R'], ['P5', 'N'], ['P1', 'R'], ['P4', 'N']], 'current': {'P1': 'R', 'P2': 'R', 'P3': 'N', 'P4': 'N', 'P5': 'N', 'P6': 'R'}, 'locked': ['P3'], 'max_parallel': 3, 'throw_s': {'P2': 6, 'P3': 6, 'P4': 6, 'P5': 6}, 'default_throw_s': 5}, {'result': 'set', 'starts': {}, 'done_s': 0})]]\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":"Stipulated toy interlocking contract for a bounded teaching model; it makes no claim of conformance to any railway signalling standard and omits real safety cases. 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-railway_interlocking_logic-sequential-point-throwing-throw-time-lookup","generated_at":"2026-09-29T14:47:51.180517+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Interlocking logic decides whether trains may be given authority; a wrong decision at this point either grants unsafe movements or strands traffic.","repair":"Use the per-point throw time, falling back to the default.","root_cause":"Every point is assumed to take the default throw time.","sha256":"1dc2ef0370d41bdb2c9dd749b16ef5926eee9a5240ef416def81775925125ba6","title":"Sequential point throwing under a power budget: throw time lookup · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.899,"exit_code":1,"observations":[{"actual":{"done_s":6,"result":"set","starts":{"P1":0,"P2":0,"P3":3}},"check":"regression: three points on two supplies","expected":{"done_s":8,"result":"set","starts":{"P1":0,"P2":0,"P3":3}},"passed":false},{"actual":{"done_s":0,"result":"set","starts":{"P2":0}},"check":"boundary: locked point already in the right lie","expected":{"done_s":5,"result":"set","starts":{"P2":0}},"passed":false},{"actual":{"done_s":6,"result":"set","starts":{"P1":0,"P3":0,"P6":0}},"check":"sampled regression 1","expected":{"done_s":11,"result":"set","starts":{"P1":5,"P3":0,"P6":0}},"passed":false},{"actual":{"done_s":0,"result":"set","starts":{"P1":0,"P2":0}},"check":"boundary: undetected point","expected":{"done_s":5,"result":"set","starts":{"P1":0,"P2":0}},"passed":false},{"actual":{"done_s":0,"result":"blocked:P1","starts":{}},"check":"boundary: locked point needing to move","expected":{"done_s":0,"result":"blocked:P1","starts":{}},"passed":true},{"actual":{"done_s":0,"result":"set","starts":{}},"check":"control 4","expected":{"done_s":0,"result":"set","starts":{}},"passed":true},{"actual":{"done_s":0,"result":"set","starts":{}},"check":"control 7","expected":{"done_s":0,"result":"set","starts":{}},"passed":true},{"actual":{"done_s":4,"result":"set","starts":{"P4":0}},"check":"sampled regression 10","expected":{"done_s":4,"result":"set","starts":{"P4":0}},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: three points on two supplies\", \"actual\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0, \"P3\": 3}, \"done_s\": 6}, \"expected\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0, \"P3\": 3}, \"done_s\": 8}, \"passed\": false}, {\"check\": \"boundary: locked point already in the right lie\", \"actual\": {\"result\": \"set\", \"starts\": {\"P2\": 0}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {\"P2\": 0}, \"done_s\": 5}, \"passed\": false}, {\"check\": \"sampled regression 1\", \"actual\": {\"result\": \"set\", \"starts\": {\"P3\": 0, \"P6\": 0, \"P1\": 0}, \"done_s\": 6}, \"expected\": {\"result\": \"set\", \"starts\": {\"P3\": 0, \"P6\": 0, \"P1\": 5}, \"done_s\": 11}, \"passed\": false}, {\"check\": \"boundary: undetected point\", \"actual\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0}, \"done_s\": 5}, \"passed\": false}, {\"check\": \"boundary: locked point needing to move\", \"actual\": {\"result\": \"blocked:P1\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"blocked:P1\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"sampled regression 10\", \"actual\": {\"result\": \"set\", \"starts\": {\"P4\": 0}, \"done_s\": 4}, \"expected\": {\"result\": \"set\", \"starts\": {\"P4\": 0}, \"done_s\": 4}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.006,"exit_code":1,"observations":[{"actual":{"done_s":10,"result":"set","starts":{"P1":0,"P2":0,"P3":5}},"check":"regression: three points on two supplies","expected":{"done_s":8,"result":"set","starts":{"P1":0,"P2":0,"P3":3}},"passed":false},{"actual":{"done_s":5,"result":"set","starts":{"P2":0}},"check":"boundary: locked point already in the right lie","expected":{"done_s":5,"result":"set","starts":{"P2":0}},"passed":true},{"actual":{"done_s":10,"result":"set","starts":{"P1":5,"P3":0,"P6":0}},"check":"sampled regression 1","expected":{"done_s":11,"result":"set","starts":{"P1":5,"P3":0,"P6":0}},"passed":false},{"actual":{"done_s":5,"result":"set","starts":{"P1":0,"P2":0}},"check":"boundary: undetected point","expected":{"done_s":5,"result":"set","starts":{"P1":0,"P2":0}},"passed":true},{"actual":{"done_s":0,"result":"blocked:P1","starts":{}},"check":"boundary: locked point needing to move","expected":{"done_s":0,"result":"blocked:P1","starts":{}},"passed":true},{"actual":{"done_s":0,"result":"set","starts":{}},"check":"control 4","expected":{"done_s":0,"result":"set","starts":{}},"passed":true},{"actual":{"done_s":0,"result":"set","starts":{}},"check":"control 7","expected":{"done_s":0,"result":"set","starts":{}},"passed":true},{"actual":{"done_s":5,"result":"set","starts":{"P4":0}},"check":"sampled regression 10","expected":{"done_s":4,"result":"set","starts":{"P4":0}},"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: three points on two supplies\", \"actual\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0, \"P3\": 5}, \"done_s\": 10}, \"expected\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0, \"P3\": 3}, \"done_s\": 8}, \"passed\": false}, {\"check\": \"boundary: locked point already in the right lie\", \"actual\": {\"result\": \"set\", \"starts\": {\"P2\": 0}, \"done_s\": 5}, \"expected\": {\"result\": \"set\", \"starts\": {\"P2\": 0}, \"done_s\": 5}, \"passed\": true}, {\"check\": \"sampled regression 1\", \"actual\": {\"result\": \"set\", \"starts\": {\"P3\": 0, \"P6\": 0, \"P1\": 5}, \"done_s\": 10}, \"expected\": {\"result\": \"set\", \"starts\": {\"P3\": 0, \"P6\": 0, \"P1\": 5}, \"done_s\": 11}, \"passed\": false}, {\"check\": \"boundary: undetected point\", \"actual\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0}, \"done_s\": 5}, \"expected\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0}, \"done_s\": 5}, \"passed\": true}, {\"check\": \"boundary: locked point needing to move\", \"actual\": {\"result\": \"blocked:P1\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"blocked:P1\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"sampled regression 10\", \"actual\": {\"result\": \"set\", \"starts\": {\"P4\": 0}, \"done_s\": 5}, \"expected\": {\"result\": \"set\", \"starts\": {\"P4\": 0}, \"done_s\": 4}, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.757,"exit_code":0,"observations":[{"actual":{"done_s":8,"result":"set","starts":{"P1":0,"P2":0,"P3":3}},"check":"regression: three points on two supplies","expected":{"done_s":8,"result":"set","starts":{"P1":0,"P2":0,"P3":3}},"passed":true},{"actual":{"done_s":5,"result":"set","starts":{"P2":0}},"check":"boundary: locked point already in the right lie","expected":{"done_s":5,"result":"set","starts":{"P2":0}},"passed":true},{"actual":{"done_s":11,"result":"set","starts":{"P1":5,"P3":0,"P6":0}},"check":"sampled regression 1","expected":{"done_s":11,"result":"set","starts":{"P1":5,"P3":0,"P6":0}},"passed":true},{"actual":{"done_s":5,"result":"set","starts":{"P1":0,"P2":0}},"check":"boundary: undetected point","expected":{"done_s":5,"result":"set","starts":{"P1":0,"P2":0}},"passed":true},{"actual":{"done_s":0,"result":"blocked:P1","starts":{}},"check":"boundary: locked point needing to move","expected":{"done_s":0,"result":"blocked:P1","starts":{}},"passed":true},{"actual":{"done_s":0,"result":"set","starts":{}},"check":"control 4","expected":{"done_s":0,"result":"set","starts":{}},"passed":true},{"actual":{"done_s":0,"result":"set","starts":{}},"check":"control 7","expected":{"done_s":0,"result":"set","starts":{}},"passed":true},{"actual":{"done_s":4,"result":"set","starts":{"P4":0}},"check":"sampled regression 10","expected":{"done_s":4,"result":"set","starts":{"P4":0}},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: three points on two supplies\", \"actual\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0, \"P3\": 3}, \"done_s\": 8}, \"expected\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0, \"P3\": 3}, \"done_s\": 8}, \"passed\": true}, {\"check\": \"boundary: locked point already in the right lie\", \"actual\": {\"result\": \"set\", \"starts\": {\"P2\": 0}, \"done_s\": 5}, \"expected\": {\"result\": \"set\", \"starts\": {\"P2\": 0}, \"done_s\": 5}, \"passed\": true}, {\"check\": \"sampled regression 1\", \"actual\": {\"result\": \"set\", \"starts\": {\"P3\": 0, \"P6\": 0, \"P1\": 5}, \"done_s\": 11}, \"expected\": {\"result\": \"set\", \"starts\": {\"P3\": 0, \"P6\": 0, \"P1\": 5}, \"done_s\": 11}, \"passed\": true}, {\"check\": \"boundary: undetected point\", \"actual\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0}, \"done_s\": 5}, \"expected\": {\"result\": \"set\", \"starts\": {\"P1\": 0, \"P2\": 0}, \"done_s\": 5}, \"passed\": true}, {\"check\": \"boundary: locked point needing to move\", \"actual\": {\"result\": \"blocked:P1\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"blocked:P1\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"control 4\", \"actual\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"control 7\", \"actual\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"expected\": {\"result\": \"set\", \"starts\": {}, \"done_s\": 0}, \"passed\": true}, {\"check\": \"sampled regression 10\", \"actual\": {\"result\": \"set\", \"starts\": {\"P4\": 0}, \"done_s\": 4}, \"expected\": {\"result\": \"set\", \"starts\": {\"P4\": 0}, \"done_s\": 4}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}