broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    routes = x['routes']
    name = x['request']
    if name not in routes:
        return 'unknown-route'
    if name in x['locked']:
        return 'already-set'
    req = routes[name]
    occ = set(x['occupied'])
    if any(s in occ for s in req['sections']):
        return 'occupied'
    for other in sorted(x['locked']):
        o = routes[other]
        mine = set(req['sections'])
        theirs = set(o['sections'])
        shared = (mine & (theirs | set(o['overlap']))) | (set(req['overlap']) & theirs)
        if o['dir'] != req['dir']:
            return 'opposing:' + other
        if shared:
            return 'section-conflict:' + other
        for p, pos in sorted(req['points'].items()):
            if p in o['points'] and o['points'][p] != pos:
                return 'point-conflict:' + other
    return 'granted'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('boundary: shared point in the same lie', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('sampled regression 18', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6', 'S11-S12', 'S3-S5'], 'occupied': ['J'], 'request': 'S6-S2'}, 'section-conflict:S8-S6'), ('boundary: overlaps overlapping each other', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('boundary: train standing in the second path section', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['B'], 'request': 'S1-S3'}, 'occupied'), ('control 1', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S1-S4', 'S7-S2'], 'occupied': [], 'request': 'S7-S2'}, 'already-set'), ('control 4', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S4'], 'occupied': ['G', 'K'], 'request': 'S13-S14'}, 'point-conflict:S1-S4'), ('control 7', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9', 'S13-S14', 'S11-S12'], 'occupied': [], 'request': 'S99-S1'}, 'unknown-route')], [('regression: opposite direction elsewhere on the layout', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6'], 'occupied': [], 'request': 'S11-S12'}, 'granted'), ('boundary: overlaps overlapping each other', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('sampled regression 77', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S7-S2', 'S1-S4'], 'occupied': [], 'request': 'S11-S12'}, 'granted'), ('control 13', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6', 'S13-S14', 'S4-S9'], 'occupied': [], 'request': 'S1-S3'}, 'opposing:S8-S6'), ('boundary: shared point in the same lie', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('control 12', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['G'], 'request': 'S11-S12'}, 'granted'), ('control 15', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['B'], 'request': 'S10-S7'}, 'granted'), ('sampled regression 18', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6', 'S11-S12', 'S3-S5'], 'occupied': ['J'], 'request': 'S6-S2'}, 'section-conflict:S8-S6')], [('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('boundary: overlap overlapping another path', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S1-S3'}, 'section-conflict:S3-S5'), ('sampled regression 24', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S7-S2'], 'occupied': ['A', 'D'], 'request': 'S11-S12'}, 'granted'), ('control 29', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S13-S14'], 'occupied': ['K'], 'request': 'S8-S6'}, 'opposing:S13-S14'), ('boundary: overlaps overlapping each other', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('control 23', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9'], 'occupied': [], 'request': 'S3-S5'}, 'section-conflict:S4-S9'), ('control 26', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S13-S14'], 'occupied': ['B', 'D', 'H'], 'request': 'S13-S14'}, 'already-set'), ('control 32', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['L'], 'request': 'S8-S6'}, 'granted')], [('regression: opposite direction elsewhere on the layout', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6'], 'occupied': [], 'request': 'S11-S12'}, 'granted'), ('boundary: opposing movement into the same path', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S3'], 'occupied': [], 'request': 'S6-S2'}, 'opposing:S1-S3'), ('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('control 45', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S1-S4', 'S1-S3'], 'occupied': ['E'], 'request': 'S7-S2'}, 'opposing:S1-S3'), ('boundary: re-request of a set route under a train', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S3'], 'occupied': ['A'], 'request': 'S1-S3'}, 'already-set'), ('control 34', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9', 'S1-S3'], 'occupied': [], 'request': 'S1-S3'}, 'already-set'), ('control 37', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9'], 'occupied': [], 'request': 'S99-S1'}, 'unknown-route'), ('control 40', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['D'], 'request': 'S3-S5'}, 'granted')], [('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('boundary: shared point in the same lie', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('sampled regression 42', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S10-S7', 'S7-S2', 'S3-S5'], 'occupied': ['E'], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('sampled regression 78', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2', 'S11-S12'], 'occupied': ['C', 'G', 'L'], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('boundary: re-request of a set route under a train', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S3'], 'occupied': ['A'], 'request': 'S1-S3'}, 'already-set'), ('control 45', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S1-S4', 'S1-S3'], 'occupied': ['E'], 'request': 'S7-S2'}, 'opposing:S1-S3'), ('control 48', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['K'], 'request': 'S13-S14'}, 'granted'), ('control 51', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['F'], 'request': 'S6-S2'}, 'granted')]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    routes = x['routes']
    name = x['request']
    if name not in routes:
        return 'unknown-route'
    if name in x['locked']:
        return 'already-set'
    req = routes[name]
    occ = set(x['occupied'])
    if any(s in occ for s in req['sections']):
        return 'occupied'
    for other in sorted(x['locked']):
        o = routes[other]
        mine = set(req['sections'])
        theirs = set(o['sections'])
        shared = (mine & (theirs | set(o['overlap']))) | (set(req['overlap']) & theirs)
        if shared and o['dir'] == req['dir']:
            return 'opposing:' + other
        if shared:
            return 'section-conflict:' + other
        for p, pos in sorted(req['points'].items()):
            if p in o['points'] and o['points'][p] != pos:
                return 'point-conflict:' + other
    return 'granted'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('boundary: shared point in the same lie', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('sampled regression 18', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6', 'S11-S12', 'S3-S5'], 'occupied': ['J'], 'request': 'S6-S2'}, 'section-conflict:S8-S6'), ('boundary: overlaps overlapping each other', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('boundary: train standing in the second path section', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['B'], 'request': 'S1-S3'}, 'occupied'), ('control 1', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S1-S4', 'S7-S2'], 'occupied': [], 'request': 'S7-S2'}, 'already-set'), ('control 4', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S4'], 'occupied': ['G', 'K'], 'request': 'S13-S14'}, 'point-conflict:S1-S4'), ('control 7', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9', 'S13-S14', 'S11-S12'], 'occupied': [], 'request': 'S99-S1'}, 'unknown-route')], [('regression: opposite direction elsewhere on the layout', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6'], 'occupied': [], 'request': 'S11-S12'}, 'granted'), ('boundary: overlaps overlapping each other', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('sampled regression 77', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S7-S2', 'S1-S4'], 'occupied': [], 'request': 'S11-S12'}, 'granted'), ('control 13', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6', 'S13-S14', 'S4-S9'], 'occupied': [], 'request': 'S1-S3'}, 'opposing:S8-S6'), ('boundary: shared point in the same lie', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('control 12', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['G'], 'request': 'S11-S12'}, 'granted'), ('control 15', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['B'], 'request': 'S10-S7'}, 'granted'), ('sampled regression 18', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6', 'S11-S12', 'S3-S5'], 'occupied': ['J'], 'request': 'S6-S2'}, 'section-conflict:S8-S6')], [('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('boundary: overlap overlapping another path', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S1-S3'}, 'section-conflict:S3-S5'), ('sampled regression 24', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S7-S2'], 'occupied': ['A', 'D'], 'request': 'S11-S12'}, 'granted'), ('control 29', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S13-S14'], 'occupied': ['K'], 'request': 'S8-S6'}, 'opposing:S13-S14'), ('boundary: overlaps overlapping each other', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('control 23', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9'], 'occupied': [], 'request': 'S3-S5'}, 'section-conflict:S4-S9'), ('control 26', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S13-S14'], 'occupied': ['B', 'D', 'H'], 'request': 'S13-S14'}, 'already-set'), ('control 32', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['L'], 'request': 'S8-S6'}, 'granted')], [('regression: opposite direction elsewhere on the layout', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S8-S6'], 'occupied': [], 'request': 'S11-S12'}, 'granted'), ('boundary: opposing movement into the same path', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S3'], 'occupied': [], 'request': 'S6-S2'}, 'opposing:S1-S3'), ('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('control 45', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S1-S4', 'S1-S3'], 'occupied': ['E'], 'request': 'S7-S2'}, 'opposing:S1-S3'), ('boundary: re-request of a set route under a train', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S3'], 'occupied': ['A'], 'request': 'S1-S3'}, 'already-set'), ('control 34', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9', 'S1-S3'], 'occupied': [], 'request': 'S1-S3'}, 'already-set'), ('control 37', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S4-S9'], 'occupied': [], 'request': 'S99-S1'}, 'unknown-route'), ('control 40', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['D'], 'request': 'S3-S5'}, 'granted')], [('regression: points agree between two locked routes', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2'], 'occupied': [], 'request': 'S13-S14'}, 'granted'), ('boundary: shared point in the same lie', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5'], 'occupied': [], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('sampled regression 42', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S10-S7', 'S7-S2', 'S3-S5'], 'occupied': ['E'], 'request': 'S13-S14'}, 'section-conflict:S3-S5'), ('sampled regression 78', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S6-S2', 'S11-S12'], 'occupied': ['C', 'G', 'L'], 'request': 'S7-S2'}, 'section-conflict:S6-S2'), ('boundary: re-request of a set route under a train', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S1-S3'], 'occupied': ['A'], 'request': 'S1-S3'}, 'already-set'), ('control 45', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': ['S3-S5', 'S1-S4', 'S1-S3'], 'occupied': ['E'], 'request': 'S7-S2'}, 'opposing:S1-S3'), ('control 48', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['K'], 'request': 'S13-S14'}, 'granted'), ('control 51', {'routes': {'S1-S3': {'sections': ['A', 'B'], 'overlap': ['C'], 'points': {'P1': 'N'}, 'dir': 'up'}, 'S1-S4': {'sections': ['A', 'D'], 'overlap': ['E'], 'points': {'P1': 'R'}, 'dir': 'up'}, 'S3-S5': {'sections': ['C', 'F'], 'overlap': ['G'], 'points': {'P2': 'N'}, 'dir': 'up'}, 'S6-S2': {'sections': ['B', 'A'], 'overlap': ['H'], 'points': {'P1': 'N'}, 'dir': 'down'}, 'S7-S2': {'sections': ['D', 'A'], 'overlap': ['H'], 'points': {'P1': 'R'}, 'dir': 'down'}, 'S8-S6': {'sections': ['F', 'C'], 'overlap': ['B'], 'points': {'P2': 'N'}, 'dir': 'down'}, 'S4-S9': {'sections': ['E', 'G'], 'overlap': ['K'], 'points': {'P2': 'R', 'P3': 'N'}, 'dir': 'up'}, 'S10-S7': {'sections': ['G', 'E'], 'overlap': ['D'], 'points': {'P3': 'N'}, 'dir': 'down'}, 'S11-S12': {'sections': ['J'], 'overlap': ['K'], 'points': {'P3': 'R'}, 'dir': 'up'}, 'S13-S14': {'sections': ['L'], 'overlap': ['C'], 'points': {'P1': 'N', 'P4': 'R'}, 'dir': 'up'}}, 'locked': [], 'occupied': ['F'], 'request': 'S6-S2'}, 'granted')]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Routes in the opposite direction anywhere on the layout block each other and opposing routes are misreported.

x has a route table (sections, overlap sections, required point positions, direction), the locked routes, occupied sections and a requested route. Return unknown-route, already-set, occupied (any path section occupied), opposing:<r> (shared path/overlap with an opposite-direction locked route), section-conflict:<r>, point-conflict:<r> (a shared point needed in the other position) or granted. Locked routes are examined in sorted order. Overlap may overlap another overlap.

split: open-access