{"abstract":"Unordered registrations compare non-consecutive exams.","category":"Exam timetabling constraints","checks":8,"contract":"sits [student, exam, start, end], campus exam -> campus, travel \"X|Y\" -> minutes stored in either order. For each student's consecutive sittings by start, the needed gap is the travel time between different campuses (0 for the same campus); if the gap from previous end to next start is smaller, report [student, previous exam, next exam, shortfall].","evaluation_group":"w2-exam-timetabling-constraints-inter-campus-travel-gap","failed_approach":"Sorting by exam id is not chronological.","family":"w2-exam-timetabling-constraints-inter-campus-travel-gap-sitting-order","id":"FA-94621","implementations":{"attempt":{"sha256":"7f346b9557b5edbfd6936f24a1695d43f3f9a1028dcc42f67413b011152dc381","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, campus, travel):\n    by = {}\n    for st, ex, s, e in sits:\n        by.setdefault(st, []).append((s, e, ex))\n    out = []\n    for st in sorted(by):\n        seq = sorted(by[st], key=lambda t: t[2])\n        for (s1, e1, x1), (s2, e2, x2) in zip(seq, seq[1:]):\n            gap = s2 - e1\n            c1, c2 = campus[x1], campus[x2]\n            need = 0\n            if c1 != c2:\n                need = travel.get(c1 + '|' + c2, travel.get(c2 + '|' + c1, 0))\n            if gap < need:\n                out.append([st, x1, x2, need - gap])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: sitting order 1',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('regression variant: sitting order 2',\n   [[['s1', 'BIO130', 645, 735], ['s1', 'MATH101H', 735, 795], ['s1', 'CHEM120', 540, 630]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('partial repair guard 3',\n   [[['s4', 'ECON150', 899, 989], ['s2', 'CHEM120', 705, 795], ['s4', 'PHYS110', 540, 630],\n     ['s2', 'MATH101H', 600, 660], ['s4', 'BIO130', 794, 884], ['s2', 'PHYS110', 795, 915],\n     ['s4', 'CHEM120', 645, 765]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'PHYS110', 30], ['s4', 'PHYS110', 'CHEM120', 15]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 5',\n   [[['s4', 'PHYS110', 540, 660], ['s4', 'HIST140', 929, 1049], ['s4', 'MATH101H', 690, 810],\n     ['s4', 'BIO130', 839, 959]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'MATH101H', 'BIO130', 1], ['s4', 'BIO130', 'HIST140', 60]]),\n  ('normal control 6',\n   [[['s2', 'CHEM120', 540, 600], ['s3', 'CHEM120', 975, 1065], ['s3', 'ECON150', 600, 720],\n     ['s3', 'MATH101H', 765, 885], ['s2', 'MATH101', 645, 765]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'ECON150', 'MATH101H', 15]]),\n  ('normal control 7',\n   [[['s2', 'MATH101H', 975, 1095], ['s2', 'CHEM120', 540, 630], ['s2', 'MATH101', 795, 915],\n     ['s2', 'ECON150', 660, 750]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s4', 'MATH101', 691, 751], ['s4', 'PHYS110', 600, 660], ['s1', 'CHEM120', 600, 660],\n     ['s1', 'MATH101H', 689, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [])],\n [('regression: sitting order 1',\n   [[['s3', 'ECON150', 839, 929], ['s1', 'MATH101H', 540, 660], ['s3', 'CHEM120', 960, 1050],\n     ['s1', 'ECON150', 765, 885], ['s4', 'BIO130', 600, 660], ['s1', 'HIST140', 630, 750],\n     ['s3', 'MATH101', 750, 810], ['s4', 'ECON150', 660, 720], ['s3', 'BIO130', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101H', 'HIST140', 60], ['s1', 'HIST140', 'ECON150', 15]]),\n  ('regression variant: sitting order 2',\n   [[['s1', 'CHEM120', 810, 930], ['s3', 'MATH101H', 781, 901], ['s1', 'HIST140', 1094, 1184],\n     ['s1', 'PHYS110', 959, 1079], ['s1', 'BIO130', 600, 720], ['s3', 'HIST140', 691, 781],\n     ['s3', 'ECON150', 540, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('partial repair guard 3',\n   [[['s5', 'HIST140', 943, 1003], ['s5', 'MATH101H', 689, 809], ['s5', 'ECON150', 540, 660],\n     ['s4', 'PHYS110', 600, 660], ['s2', 'PHYS110', 750, 840], ['s2', 'ECON150', 870, 960],\n     ['s4', 'MATH101', 750, 840], ['s2', 'MATH101H', 600, 660], ['s5', 'MATH101', 838, 928],\n     ['s4', 'MATH101H', 690, 750]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'PHYS110', 'MATH101H', 30], ['s5', 'ECON150', 'MATH101H', 31]]),\n  ('boundary control 4', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('boundary control 5',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 6',\n   [[['s3', 'MATH101', 705, 825], ['s4', 'PHYS110', 660, 780], ['s4', 'MATH101', 989, 1049],\n     ['s4', 'CHEM120', 600, 660], ['s3', 'PHYS110', 840, 960], ['s4', 'HIST140', 809, 929],\n     ['s3', 'BIO130', 540, 660]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s1', 'HIST140', 735, 825], ['s1', 'PHYS110', 600, 720]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'PHYS110', 'HIST140', 15]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 944, 1034], ['s5', 'HIST140', 540, 600], ['s5', 'CHEM120', 796, 916],\n     ['s1', 'MATH101H', 824, 944], ['s5', 'PHYS110', 631, 691], ['s5', 'MATH101', 736, 826],\n     ['s3', 'HIST140', 540, 660], ['s1', 'MATH101', 600, 660], ['s1', 'ECON150', 689, 809],\n     ['s3', 'MATH101', 856, 946], ['s3', 'BIO130', 691, 811], ['s3', 'ECON150', 991, 1051]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'ECON150', 1], ['s1', 'ECON150', 'MATH101H', 15], ['s5', 'MATH101', 'CHEM120', 60]])],\n [('regression: sitting order 1',\n   [[['s5', 'CHEM120', 750, 870], ['s5', 'MATH101', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('regression variant: sitting order 2',\n   [[['s3', 'PHYS110', 600, 690], ['s4', 'PHYS110', 660, 720], ['s4', 'BIO130', 900, 990],\n     ['s3', 'HIST140', 750, 870], ['s3', 'CHEM120', 690, 780], ['s4', 'MATH101H', 780, 840],\n     ['s3', 'MATH101', 660, 720], ['s4', 'CHEM120', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'PHYS110', 'MATH101', 30], ['s3', 'MATH101', 'CHEM120', 90], ['s3', 'CHEM120', 'HIST140', 30],\n    ['s4', 'CHEM120', 'PHYS110', 60]]),\n  ('partial repair guard 3',\n   [[['s4', 'CHEM120', 869, 989], ['s4', 'HIST140', 600, 660], ['s4', 'BIO130', 750, 840],\n     ['s4', 'PHYS110', 1019, 1139]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'BIO130', 'CHEM120', 31], ['s4', 'CHEM120', 'PHYS110', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('boundary control 5', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('normal control 6',\n   [[['s4', 'ECON150', 600, 720], ['s5', 'CHEM120', 810, 900], ['s4', 'PHYS110', 900, 960],\n     ['s5', 'MATH101H', 600, 660], ['s4', 'HIST140', 749, 869], ['s5', 'BIO130', 630, 720],\n     ['s5', 'HIST140', 720, 810]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s4', 'ECON150', 'HIST140', 16], ['s5', 'MATH101H', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s5', 'MATH101', 749, 869], ['s5', 'PHYS110', 659, 779], ['s4', 'MATH101H', 660, 780],\n     ['s2', 'ECON150', 735, 855], ['s2', 'MATH101H', 600, 690], ['s4', 'PHYS110', 809, 899],\n     ['s4', 'MATH101', 600, 660], ['s5', 'HIST140', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s5', 'HIST140', 'PHYS110', 1], ['s5', 'PHYS110', 'MATH101', 30]]),\n  ('normal control 8',\n   [[['s2', 'HIST140', 885, 1005], ['s2', 'CHEM120', 975, 1065], ['s2', 'BIO130', 540, 660],\n     ['s2', 'MATH101', 705, 825]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'HIST140', 'CHEM120', 75]])],\n [('regression: sitting order 1',\n   [[['s2', 'MATH101', 915, 1035], ['s2', 'PHYS110', 735, 855], ['s2', 'ECON150', 600, 720],\n     ['s1', 'ECON150', 870, 930], ['s2', 'CHEM120', 1005, 1095], ['s1', 'MATH101', 780, 900],\n     ['s1', 'HIST140', 600, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 75], ['s2', 'MATH101', 'CHEM120', 90]]),\n  ('regression variant: sitting order 2',\n   [[['s5', 'PHYS110', 945, 1035], ['s1', 'PHYS110', 540, 630], ['s5', 'MATH101', 600, 720],\n     ['s1', 'HIST140', 660, 750], ['s5', 'HIST140', 765, 885]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 540, 660], ['s1', 'MATH101H', 719, 839], ['s1', 'HIST140', 689, 749],\n     ['s4', 'ECON150', 870, 930], ['s4', 'HIST140', 600, 690], ['s4', 'CHEM120', 735, 855],\n     ['s2', 'MATH101H', 660, 750], ['s2', 'MATH101', 720, 810], ['s4', 'BIO130', 930, 1020],\n     ['s1', 'MATH101', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'HIST140', 'MATH101H', 60], ['s2', 'BIO130', 'MATH101H', 30], ['s2', 'MATH101H', 'MATH101', 75],\n    ['s4', 'ECON150', 'BIO130', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('normal control 6',\n   [[['s5', 'ECON150', 540, 600], ['s5', 'PHYS110', 914, 974], ['s2', 'PHYS110', 990, 1110],\n     ['s2', 'HIST140', 1110, 1230], ['s1', 'BIO130', 631, 751], ['s5', 'MATH101H', 615, 735],\n     ['s2', 'MATH101', 600, 720], ['s1', 'ECON150', 540, 600], ['s2', 'MATH101H', 810, 930],\n     ['s5', 'MATH101', 764, 854]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'PHYS110', 'HIST140', 45], ['s5', 'MATH101H', 'MATH101', 16]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 540, 630], ['s4', 'ECON150', 750, 870], ['s4', 'BIO130', 540, 660],\n     ['s5', 'PHYS110', 690, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s3', 'ECON150', 570, 690], ['s3', 'CHEM120', 690, 810], ['s3', 'MATH101H', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'MATH101H', 'ECON150', 30], ['s3', 'ECON150', 'CHEM120', 60]])],\n [('regression: sitting order 1',\n   [[['s3', 'BIO130', 600, 720], ['s5', 'MATH101', 691, 781], ['s2', 'MATH101', 720, 810],\n     ['s2', 'CHEM120', 540, 630], ['s3', 'HIST140', 780, 900], ['s2', 'BIO130', 839, 899],\n     ['s5', 'ECON150', 600, 660], ['s2', 'HIST140', 899, 1019]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s2', 'BIO130', 'HIST140', 30]]),\n  ('regression variant: sitting order 2',\n   [[['s2', 'HIST140', 540, 660], ['s4', 'CHEM120', 720, 780], ['s1', 'MATH101', 690, 810],\n     ['s2', 'ECON150', 690, 810], ['s1', 'CHEM120', 540, 660], ['s4', 'MATH101H', 540, 630],\n     ['s1', 'PHYS110', 841, 901]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'HIST140', 'ECON150', 30]]),\n  ('partial repair guard 3',\n   [[['s2', 'HIST140', 630, 690], ['s2', 'CHEM120', 600, 660], ['s2', 'BIO130', 719, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 30], ['s2', 'HIST140', 'BIO130', 1]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s4', 'CHEM120', 600, 690], ['s4', 'MATH101H', 885, 945], ['s4', 'PHYS110', 974, 1064],\n     ['s4', 'ECON150', 705, 795]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('normal control 7',\n   [[['s1', 'PHYS110', 735, 795], ['s5', 'ECON150', 689, 779], ['s5', 'CHEM120', 809, 869],\n     ['s5', 'MATH101', 540, 660], ['s1', 'MATH101', 600, 720], ['s1', 'HIST140', 810, 870]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'PHYS110', 15], ['s1', 'PHYS110', 'HIST140', 15]]),\n  ('normal control 8',\n   [[['s3', 'PHYS110', 600, 690], ['s3', 'MATH101H', 825, 915], ['s1', 'MATH101H', 750, 810],\n     ['s1', 'CHEM120', 841, 901], ['s1', 'ECON150', 600, 660], ['s1', 'HIST140', 916, 1006],\n     ['s2', 'MATH101H', 540, 660], ['s2', 'BIO130', 630, 750], ['s3', 'BIO130', 750, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'CHEM120', 'HIST140', 15], ['s2', 'MATH101H', 'BIO130', 30]])]]\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":"0cf4a1af0fe4996a03a32806a46f10be2de644be9a0139570688c9c8e7eb83a8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, campus, travel):\n    by = {}\n    for st, ex, s, e in sits:\n        by.setdefault(st, []).append((s, e, ex))\n    out = []\n    for st in sorted(by):\n        seq = by[st]\n        for (s1, e1, x1), (s2, e2, x2) in zip(seq, seq[1:]):\n            gap = s2 - e1\n            c1, c2 = campus[x1], campus[x2]\n            need = 0\n            if c1 != c2:\n                need = travel.get(c1 + '|' + c2, travel.get(c2 + '|' + c1, 0))\n            if gap < need:\n                out.append([st, x1, x2, need - gap])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: sitting order 1',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('regression variant: sitting order 2',\n   [[['s1', 'BIO130', 645, 735], ['s1', 'MATH101H', 735, 795], ['s1', 'CHEM120', 540, 630]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('partial repair guard 3',\n   [[['s4', 'ECON150', 899, 989], ['s2', 'CHEM120', 705, 795], ['s4', 'PHYS110', 540, 630],\n     ['s2', 'MATH101H', 600, 660], ['s4', 'BIO130', 794, 884], ['s2', 'PHYS110', 795, 915],\n     ['s4', 'CHEM120', 645, 765]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'PHYS110', 30], ['s4', 'PHYS110', 'CHEM120', 15]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 5',\n   [[['s4', 'PHYS110', 540, 660], ['s4', 'HIST140', 929, 1049], ['s4', 'MATH101H', 690, 810],\n     ['s4', 'BIO130', 839, 959]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'MATH101H', 'BIO130', 1], ['s4', 'BIO130', 'HIST140', 60]]),\n  ('normal control 6',\n   [[['s2', 'CHEM120', 540, 600], ['s3', 'CHEM120', 975, 1065], ['s3', 'ECON150', 600, 720],\n     ['s3', 'MATH101H', 765, 885], ['s2', 'MATH101', 645, 765]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'ECON150', 'MATH101H', 15]]),\n  ('normal control 7',\n   [[['s2', 'MATH101H', 975, 1095], ['s2', 'CHEM120', 540, 630], ['s2', 'MATH101', 795, 915],\n     ['s2', 'ECON150', 660, 750]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s4', 'MATH101', 691, 751], ['s4', 'PHYS110', 600, 660], ['s1', 'CHEM120', 600, 660],\n     ['s1', 'MATH101H', 689, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [])],\n [('regression: sitting order 1',\n   [[['s3', 'ECON150', 839, 929], ['s1', 'MATH101H', 540, 660], ['s3', 'CHEM120', 960, 1050],\n     ['s1', 'ECON150', 765, 885], ['s4', 'BIO130', 600, 660], ['s1', 'HIST140', 630, 750],\n     ['s3', 'MATH101', 750, 810], ['s4', 'ECON150', 660, 720], ['s3', 'BIO130', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101H', 'HIST140', 60], ['s1', 'HIST140', 'ECON150', 15]]),\n  ('regression variant: sitting order 2',\n   [[['s1', 'CHEM120', 810, 930], ['s3', 'MATH101H', 781, 901], ['s1', 'HIST140', 1094, 1184],\n     ['s1', 'PHYS110', 959, 1079], ['s1', 'BIO130', 600, 720], ['s3', 'HIST140', 691, 781],\n     ['s3', 'ECON150', 540, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('partial repair guard 3',\n   [[['s5', 'HIST140', 943, 1003], ['s5', 'MATH101H', 689, 809], ['s5', 'ECON150', 540, 660],\n     ['s4', 'PHYS110', 600, 660], ['s2', 'PHYS110', 750, 840], ['s2', 'ECON150', 870, 960],\n     ['s4', 'MATH101', 750, 840], ['s2', 'MATH101H', 600, 660], ['s5', 'MATH101', 838, 928],\n     ['s4', 'MATH101H', 690, 750]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'PHYS110', 'MATH101H', 30], ['s5', 'ECON150', 'MATH101H', 31]]),\n  ('boundary control 4', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('boundary control 5',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 6',\n   [[['s3', 'MATH101', 705, 825], ['s4', 'PHYS110', 660, 780], ['s4', 'MATH101', 989, 1049],\n     ['s4', 'CHEM120', 600, 660], ['s3', 'PHYS110', 840, 960], ['s4', 'HIST140', 809, 929],\n     ['s3', 'BIO130', 540, 660]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s1', 'HIST140', 735, 825], ['s1', 'PHYS110', 600, 720]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'PHYS110', 'HIST140', 15]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 944, 1034], ['s5', 'HIST140', 540, 600], ['s5', 'CHEM120', 796, 916],\n     ['s1', 'MATH101H', 824, 944], ['s5', 'PHYS110', 631, 691], ['s5', 'MATH101', 736, 826],\n     ['s3', 'HIST140', 540, 660], ['s1', 'MATH101', 600, 660], ['s1', 'ECON150', 689, 809],\n     ['s3', 'MATH101', 856, 946], ['s3', 'BIO130', 691, 811], ['s3', 'ECON150', 991, 1051]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'ECON150', 1], ['s1', 'ECON150', 'MATH101H', 15], ['s5', 'MATH101', 'CHEM120', 60]])],\n [('regression: sitting order 1',\n   [[['s5', 'CHEM120', 750, 870], ['s5', 'MATH101', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('regression variant: sitting order 2',\n   [[['s3', 'PHYS110', 600, 690], ['s4', 'PHYS110', 660, 720], ['s4', 'BIO130', 900, 990],\n     ['s3', 'HIST140', 750, 870], ['s3', 'CHEM120', 690, 780], ['s4', 'MATH101H', 780, 840],\n     ['s3', 'MATH101', 660, 720], ['s4', 'CHEM120', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'PHYS110', 'MATH101', 30], ['s3', 'MATH101', 'CHEM120', 90], ['s3', 'CHEM120', 'HIST140', 30],\n    ['s4', 'CHEM120', 'PHYS110', 60]]),\n  ('partial repair guard 3',\n   [[['s4', 'CHEM120', 869, 989], ['s4', 'HIST140', 600, 660], ['s4', 'BIO130', 750, 840],\n     ['s4', 'PHYS110', 1019, 1139]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'BIO130', 'CHEM120', 31], ['s4', 'CHEM120', 'PHYS110', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('boundary control 5', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('normal control 6',\n   [[['s4', 'ECON150', 600, 720], ['s5', 'CHEM120', 810, 900], ['s4', 'PHYS110', 900, 960],\n     ['s5', 'MATH101H', 600, 660], ['s4', 'HIST140', 749, 869], ['s5', 'BIO130', 630, 720],\n     ['s5', 'HIST140', 720, 810]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s4', 'ECON150', 'HIST140', 16], ['s5', 'MATH101H', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s5', 'MATH101', 749, 869], ['s5', 'PHYS110', 659, 779], ['s4', 'MATH101H', 660, 780],\n     ['s2', 'ECON150', 735, 855], ['s2', 'MATH101H', 600, 690], ['s4', 'PHYS110', 809, 899],\n     ['s4', 'MATH101', 600, 660], ['s5', 'HIST140', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s5', 'HIST140', 'PHYS110', 1], ['s5', 'PHYS110', 'MATH101', 30]]),\n  ('normal control 8',\n   [[['s2', 'HIST140', 885, 1005], ['s2', 'CHEM120', 975, 1065], ['s2', 'BIO130', 540, 660],\n     ['s2', 'MATH101', 705, 825]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'HIST140', 'CHEM120', 75]])],\n [('regression: sitting order 1',\n   [[['s2', 'MATH101', 915, 1035], ['s2', 'PHYS110', 735, 855], ['s2', 'ECON150', 600, 720],\n     ['s1', 'ECON150', 870, 930], ['s2', 'CHEM120', 1005, 1095], ['s1', 'MATH101', 780, 900],\n     ['s1', 'HIST140', 600, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 75], ['s2', 'MATH101', 'CHEM120', 90]]),\n  ('regression variant: sitting order 2',\n   [[['s5', 'PHYS110', 945, 1035], ['s1', 'PHYS110', 540, 630], ['s5', 'MATH101', 600, 720],\n     ['s1', 'HIST140', 660, 750], ['s5', 'HIST140', 765, 885]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 540, 660], ['s1', 'MATH101H', 719, 839], ['s1', 'HIST140', 689, 749],\n     ['s4', 'ECON150', 870, 930], ['s4', 'HIST140', 600, 690], ['s4', 'CHEM120', 735, 855],\n     ['s2', 'MATH101H', 660, 750], ['s2', 'MATH101', 720, 810], ['s4', 'BIO130', 930, 1020],\n     ['s1', 'MATH101', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'HIST140', 'MATH101H', 60], ['s2', 'BIO130', 'MATH101H', 30], ['s2', 'MATH101H', 'MATH101', 75],\n    ['s4', 'ECON150', 'BIO130', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('normal control 6',\n   [[['s5', 'ECON150', 540, 600], ['s5', 'PHYS110', 914, 974], ['s2', 'PHYS110', 990, 1110],\n     ['s2', 'HIST140', 1110, 1230], ['s1', 'BIO130', 631, 751], ['s5', 'MATH101H', 615, 735],\n     ['s2', 'MATH101', 600, 720], ['s1', 'ECON150', 540, 600], ['s2', 'MATH101H', 810, 930],\n     ['s5', 'MATH101', 764, 854]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'PHYS110', 'HIST140', 45], ['s5', 'MATH101H', 'MATH101', 16]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 540, 630], ['s4', 'ECON150', 750, 870], ['s4', 'BIO130', 540, 660],\n     ['s5', 'PHYS110', 690, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s3', 'ECON150', 570, 690], ['s3', 'CHEM120', 690, 810], ['s3', 'MATH101H', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'MATH101H', 'ECON150', 30], ['s3', 'ECON150', 'CHEM120', 60]])],\n [('regression: sitting order 1',\n   [[['s3', 'BIO130', 600, 720], ['s5', 'MATH101', 691, 781], ['s2', 'MATH101', 720, 810],\n     ['s2', 'CHEM120', 540, 630], ['s3', 'HIST140', 780, 900], ['s2', 'BIO130', 839, 899],\n     ['s5', 'ECON150', 600, 660], ['s2', 'HIST140', 899, 1019]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s2', 'BIO130', 'HIST140', 30]]),\n  ('regression variant: sitting order 2',\n   [[['s2', 'HIST140', 540, 660], ['s4', 'CHEM120', 720, 780], ['s1', 'MATH101', 690, 810],\n     ['s2', 'ECON150', 690, 810], ['s1', 'CHEM120', 540, 660], ['s4', 'MATH101H', 540, 630],\n     ['s1', 'PHYS110', 841, 901]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'HIST140', 'ECON150', 30]]),\n  ('partial repair guard 3',\n   [[['s2', 'HIST140', 630, 690], ['s2', 'CHEM120', 600, 660], ['s2', 'BIO130', 719, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 30], ['s2', 'HIST140', 'BIO130', 1]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s4', 'CHEM120', 600, 690], ['s4', 'MATH101H', 885, 945], ['s4', 'PHYS110', 974, 1064],\n     ['s4', 'ECON150', 705, 795]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('normal control 7',\n   [[['s1', 'PHYS110', 735, 795], ['s5', 'ECON150', 689, 779], ['s5', 'CHEM120', 809, 869],\n     ['s5', 'MATH101', 540, 660], ['s1', 'MATH101', 600, 720], ['s1', 'HIST140', 810, 870]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'PHYS110', 15], ['s1', 'PHYS110', 'HIST140', 15]]),\n  ('normal control 8',\n   [[['s3', 'PHYS110', 600, 690], ['s3', 'MATH101H', 825, 915], ['s1', 'MATH101H', 750, 810],\n     ['s1', 'CHEM120', 841, 901], ['s1', 'ECON150', 600, 660], ['s1', 'HIST140', 916, 1006],\n     ['s2', 'MATH101H', 540, 660], ['s2', 'BIO130', 630, 750], ['s3', 'BIO130', 750, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'CHEM120', 'HIST140', 15], ['s2', 'MATH101H', 'BIO130', 30]])]]\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":"e17adf691ff16a2486bfef68e247c1d0883130b8ac998ef8567cea5e350b5040","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, campus, travel):\n    by = {}\n    for st, ex, s, e in sits:\n        by.setdefault(st, []).append((s, e, ex))\n    out = []\n    for st in sorted(by):\n        seq = sorted(by[st])\n        for (s1, e1, x1), (s2, e2, x2) in zip(seq, seq[1:]):\n            gap = s2 - e1\n            c1, c2 = campus[x1], campus[x2]\n            need = 0\n            if c1 != c2:\n                need = travel.get(c1 + '|' + c2, travel.get(c2 + '|' + c1, 0))\n            if gap < need:\n                out.append([st, x1, x2, need - gap])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: sitting order 1',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('regression variant: sitting order 2',\n   [[['s1', 'BIO130', 645, 735], ['s1', 'MATH101H', 735, 795], ['s1', 'CHEM120', 540, 630]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('partial repair guard 3',\n   [[['s4', 'ECON150', 899, 989], ['s2', 'CHEM120', 705, 795], ['s4', 'PHYS110', 540, 630],\n     ['s2', 'MATH101H', 600, 660], ['s4', 'BIO130', 794, 884], ['s2', 'PHYS110', 795, 915],\n     ['s4', 'CHEM120', 645, 765]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'PHYS110', 30], ['s4', 'PHYS110', 'CHEM120', 15]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 5',\n   [[['s4', 'PHYS110', 540, 660], ['s4', 'HIST140', 929, 1049], ['s4', 'MATH101H', 690, 810],\n     ['s4', 'BIO130', 839, 959]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'MATH101H', 'BIO130', 1], ['s4', 'BIO130', 'HIST140', 60]]),\n  ('normal control 6',\n   [[['s2', 'CHEM120', 540, 600], ['s3', 'CHEM120', 975, 1065], ['s3', 'ECON150', 600, 720],\n     ['s3', 'MATH101H', 765, 885], ['s2', 'MATH101', 645, 765]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'ECON150', 'MATH101H', 15]]),\n  ('normal control 7',\n   [[['s2', 'MATH101H', 975, 1095], ['s2', 'CHEM120', 540, 630], ['s2', 'MATH101', 795, 915],\n     ['s2', 'ECON150', 660, 750]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s4', 'MATH101', 691, 751], ['s4', 'PHYS110', 600, 660], ['s1', 'CHEM120', 600, 660],\n     ['s1', 'MATH101H', 689, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [])],\n [('regression: sitting order 1',\n   [[['s3', 'ECON150', 839, 929], ['s1', 'MATH101H', 540, 660], ['s3', 'CHEM120', 960, 1050],\n     ['s1', 'ECON150', 765, 885], ['s4', 'BIO130', 600, 660], ['s1', 'HIST140', 630, 750],\n     ['s3', 'MATH101', 750, 810], ['s4', 'ECON150', 660, 720], ['s3', 'BIO130', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101H', 'HIST140', 60], ['s1', 'HIST140', 'ECON150', 15]]),\n  ('regression variant: sitting order 2',\n   [[['s1', 'CHEM120', 810, 930], ['s3', 'MATH101H', 781, 901], ['s1', 'HIST140', 1094, 1184],\n     ['s1', 'PHYS110', 959, 1079], ['s1', 'BIO130', 600, 720], ['s3', 'HIST140', 691, 781],\n     ['s3', 'ECON150', 540, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('partial repair guard 3',\n   [[['s5', 'HIST140', 943, 1003], ['s5', 'MATH101H', 689, 809], ['s5', 'ECON150', 540, 660],\n     ['s4', 'PHYS110', 600, 660], ['s2', 'PHYS110', 750, 840], ['s2', 'ECON150', 870, 960],\n     ['s4', 'MATH101', 750, 840], ['s2', 'MATH101H', 600, 660], ['s5', 'MATH101', 838, 928],\n     ['s4', 'MATH101H', 690, 750]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'PHYS110', 'MATH101H', 30], ['s5', 'ECON150', 'MATH101H', 31]]),\n  ('boundary control 4', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('boundary control 5',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 6',\n   [[['s3', 'MATH101', 705, 825], ['s4', 'PHYS110', 660, 780], ['s4', 'MATH101', 989, 1049],\n     ['s4', 'CHEM120', 600, 660], ['s3', 'PHYS110', 840, 960], ['s4', 'HIST140', 809, 929],\n     ['s3', 'BIO130', 540, 660]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s1', 'HIST140', 735, 825], ['s1', 'PHYS110', 600, 720]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'PHYS110', 'HIST140', 15]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 944, 1034], ['s5', 'HIST140', 540, 600], ['s5', 'CHEM120', 796, 916],\n     ['s1', 'MATH101H', 824, 944], ['s5', 'PHYS110', 631, 691], ['s5', 'MATH101', 736, 826],\n     ['s3', 'HIST140', 540, 660], ['s1', 'MATH101', 600, 660], ['s1', 'ECON150', 689, 809],\n     ['s3', 'MATH101', 856, 946], ['s3', 'BIO130', 691, 811], ['s3', 'ECON150', 991, 1051]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'ECON150', 1], ['s1', 'ECON150', 'MATH101H', 15], ['s5', 'MATH101', 'CHEM120', 60]])],\n [('regression: sitting order 1',\n   [[['s5', 'CHEM120', 750, 870], ['s5', 'MATH101', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('regression variant: sitting order 2',\n   [[['s3', 'PHYS110', 600, 690], ['s4', 'PHYS110', 660, 720], ['s4', 'BIO130', 900, 990],\n     ['s3', 'HIST140', 750, 870], ['s3', 'CHEM120', 690, 780], ['s4', 'MATH101H', 780, 840],\n     ['s3', 'MATH101', 660, 720], ['s4', 'CHEM120', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'PHYS110', 'MATH101', 30], ['s3', 'MATH101', 'CHEM120', 90], ['s3', 'CHEM120', 'HIST140', 30],\n    ['s4', 'CHEM120', 'PHYS110', 60]]),\n  ('partial repair guard 3',\n   [[['s4', 'CHEM120', 869, 989], ['s4', 'HIST140', 600, 660], ['s4', 'BIO130', 750, 840],\n     ['s4', 'PHYS110', 1019, 1139]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'BIO130', 'CHEM120', 31], ['s4', 'CHEM120', 'PHYS110', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('boundary control 5', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('normal control 6',\n   [[['s4', 'ECON150', 600, 720], ['s5', 'CHEM120', 810, 900], ['s4', 'PHYS110', 900, 960],\n     ['s5', 'MATH101H', 600, 660], ['s4', 'HIST140', 749, 869], ['s5', 'BIO130', 630, 720],\n     ['s5', 'HIST140', 720, 810]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s4', 'ECON150', 'HIST140', 16], ['s5', 'MATH101H', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s5', 'MATH101', 749, 869], ['s5', 'PHYS110', 659, 779], ['s4', 'MATH101H', 660, 780],\n     ['s2', 'ECON150', 735, 855], ['s2', 'MATH101H', 600, 690], ['s4', 'PHYS110', 809, 899],\n     ['s4', 'MATH101', 600, 660], ['s5', 'HIST140', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s5', 'HIST140', 'PHYS110', 1], ['s5', 'PHYS110', 'MATH101', 30]]),\n  ('normal control 8',\n   [[['s2', 'HIST140', 885, 1005], ['s2', 'CHEM120', 975, 1065], ['s2', 'BIO130', 540, 660],\n     ['s2', 'MATH101', 705, 825]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'HIST140', 'CHEM120', 75]])],\n [('regression: sitting order 1',\n   [[['s2', 'MATH101', 915, 1035], ['s2', 'PHYS110', 735, 855], ['s2', 'ECON150', 600, 720],\n     ['s1', 'ECON150', 870, 930], ['s2', 'CHEM120', 1005, 1095], ['s1', 'MATH101', 780, 900],\n     ['s1', 'HIST140', 600, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 75], ['s2', 'MATH101', 'CHEM120', 90]]),\n  ('regression variant: sitting order 2',\n   [[['s5', 'PHYS110', 945, 1035], ['s1', 'PHYS110', 540, 630], ['s5', 'MATH101', 600, 720],\n     ['s1', 'HIST140', 660, 750], ['s5', 'HIST140', 765, 885]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 540, 660], ['s1', 'MATH101H', 719, 839], ['s1', 'HIST140', 689, 749],\n     ['s4', 'ECON150', 870, 930], ['s4', 'HIST140', 600, 690], ['s4', 'CHEM120', 735, 855],\n     ['s2', 'MATH101H', 660, 750], ['s2', 'MATH101', 720, 810], ['s4', 'BIO130', 930, 1020],\n     ['s1', 'MATH101', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'HIST140', 'MATH101H', 60], ['s2', 'BIO130', 'MATH101H', 30], ['s2', 'MATH101H', 'MATH101', 75],\n    ['s4', 'ECON150', 'BIO130', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('normal control 6',\n   [[['s5', 'ECON150', 540, 600], ['s5', 'PHYS110', 914, 974], ['s2', 'PHYS110', 990, 1110],\n     ['s2', 'HIST140', 1110, 1230], ['s1', 'BIO130', 631, 751], ['s5', 'MATH101H', 615, 735],\n     ['s2', 'MATH101', 600, 720], ['s1', 'ECON150', 540, 600], ['s2', 'MATH101H', 810, 930],\n     ['s5', 'MATH101', 764, 854]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'PHYS110', 'HIST140', 45], ['s5', 'MATH101H', 'MATH101', 16]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 540, 630], ['s4', 'ECON150', 750, 870], ['s4', 'BIO130', 540, 660],\n     ['s5', 'PHYS110', 690, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s3', 'ECON150', 570, 690], ['s3', 'CHEM120', 690, 810], ['s3', 'MATH101H', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s3', 'MATH101H', 'ECON150', 30], ['s3', 'ECON150', 'CHEM120', 60]])],\n [('regression: sitting order 1',\n   [[['s3', 'BIO130', 600, 720], ['s5', 'MATH101', 691, 781], ['s2', 'MATH101', 720, 810],\n     ['s2', 'CHEM120', 540, 630], ['s3', 'HIST140', 780, 900], ['s2', 'BIO130', 839, 899],\n     ['s5', 'ECON150', 600, 660], ['s2', 'HIST140', 899, 1019]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s2', 'BIO130', 'HIST140', 30]]),\n  ('regression variant: sitting order 2',\n   [[['s2', 'HIST140', 540, 660], ['s4', 'CHEM120', 720, 780], ['s1', 'MATH101', 690, 810],\n     ['s2', 'ECON150', 690, 810], ['s1', 'CHEM120', 540, 660], ['s4', 'MATH101H', 540, 630],\n     ['s1', 'PHYS110', 841, 901]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'HIST140', 'ECON150', 30]]),\n  ('partial repair guard 3',\n   [[['s2', 'HIST140', 630, 690], ['s2', 'CHEM120', 600, 660], ['s2', 'BIO130', 719, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 30], ['s2', 'HIST140', 'BIO130', 1]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s4', 'CHEM120', 600, 690], ['s4', 'MATH101H', 885, 945], ['s4', 'PHYS110', 974, 1064],\n     ['s4', 'ECON150', 705, 795]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('normal control 7',\n   [[['s1', 'PHYS110', 735, 795], ['s5', 'ECON150', 689, 779], ['s5', 'CHEM120', 809, 869],\n     ['s5', 'MATH101', 540, 660], ['s1', 'MATH101', 600, 720], ['s1', 'HIST140', 810, 870]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'PHYS110', 15], ['s1', 'PHYS110', 'HIST140', 15]]),\n  ('normal control 8',\n   [[['s3', 'PHYS110', 600, 690], ['s3', 'MATH101H', 825, 915], ['s1', 'MATH101H', 750, 810],\n     ['s1', 'CHEM120', 841, 901], ['s1', 'ECON150', 600, 660], ['s1', 'HIST140', 916, 1006],\n     ['s2', 'MATH101H', 540, 660], ['s2', 'BIO130', 630, 750], ['s3', 'BIO130', 750, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'CHEM120', 'HIST140', 15], ['s2', 'MATH101H', 'BIO130', 30]])]]\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 exam-timetabling rule set for a bounded model; it does not claim conformance with any institution's regulations or a benchmark specification, and it performs no search or optimisation. 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-exam-timetabling-constraints-inter-campus-travel-gap-sitting-order","generated_at":"2026-09-29T14:52:06.038718+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Multi-campus exam timetables must leave travel time between a student's consecutive sittings.","repair":"Sort each student's sittings by start.","root_cause":"Sittings are not sorted by start.","sha256":"aadea0e3a77474b6e89c4d8fd5185f74f9ab7c4e2d870caca47464bd856c08ea","title":"Consecutive sittings taken in registration order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.574,"exit_code":1,"observations":[{"actual":[],"check":"regression: sitting order 1","expected":[],"passed":true},{"actual":[["s1","BIO130","CHEM120",195]],"check":"regression variant: sitting order 2","expected":[],"passed":false},{"actual":[["s2","CHEM120","MATH101H",195],["s4","BIO130","CHEM120",239],["s4","ECON150","PHYS110",479]],"check":"partial repair guard 3","expected":[["s2","CHEM120","PHYS110",30],["s4","PHYS110","CHEM120",15]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[["s4","BIO130","HIST140",60],["s4","HIST140","MATH101H",359],["s4","MATH101H","PHYS110",270]],"check":"normal control 5","expected":[["s4","MATH101H","BIO130",1],["s4","BIO130","HIST140",60]],"passed":false},{"actual":[["s3","CHEM120","ECON150",465],["s3","ECON150","MATH101H",15]],"check":"normal control 6","expected":[["s3","ECON150","MATH101H",15]],"passed":false},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[["s4","MATH101","PHYS110",181]],"check":"normal control 8","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: sitting order 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression variant: sitting order 2\", \"actual\": [[\"s1\", \"BIO130\", \"CHEM120\", 195]], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s2\", \"CHEM120\", \"MATH101H\", 195], [\"s4\", \"BIO130\", \"CHEM120\", 239], [\"s4\", \"ECON150\", \"PHYS110\", 479]], \"expected\": [[\"s2\", \"CHEM120\", \"PHYS110\", 30], [\"s4\", \"PHYS110\", \"CHEM120\", 15]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [[\"s4\", \"BIO130\", \"HIST140\", 60], [\"s4\", \"HIST140\", \"MATH101H\", 359], [\"s4\", \"MATH101H\", \"PHYS110\", 270]], \"expected\": [[\"s4\", \"MATH101H\", \"BIO130\", 1], [\"s4\", \"BIO130\", \"HIST140\", 60]], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [[\"s3\", \"CHEM120\", \"ECON150\", 465], [\"s3\", \"ECON150\", \"MATH101H\", 15]], \"expected\": [[\"s3\", \"ECON150\", \"MATH101H\", 15]], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"s4\", \"MATH101\", \"PHYS110\", 181]], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.535,"exit_code":1,"observations":[{"actual":[["s1","B","A",280]],"check":"regression: sitting order 1","expected":[],"passed":false},{"actual":[["s1","MATH101H","CHEM120",255]],"check":"regression variant: sitting order 2","expected":[],"passed":false},{"actual":[["s2","CHEM120","MATH101H",195],["s4","ECON150","PHYS110",479],["s4","BIO130","CHEM120",239]],"check":"partial repair guard 3","expected":[["s2","CHEM120","PHYS110",30],["s4","PHYS110","CHEM120",15]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[["s4","HIST140","MATH101H",359],["s4","MATH101H","BIO130",1]],"check":"normal control 5","expected":[["s4","MATH101H","BIO130",1],["s4","BIO130","HIST140",60]],"passed":false},{"actual":[["s3","CHEM120","ECON150",465],["s3","ECON150","MATH101H",15]],"check":"normal control 6","expected":[["s3","ECON150","MATH101H",15]],"passed":false},{"actual":[["s2","MATH101H","CHEM120",585],["s2","MATH101","ECON150",285]],"check":"normal control 7","expected":[],"passed":false},{"actual":[["s4","MATH101","PHYS110",181]],"check":"normal control 8","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: sitting order 1\", \"actual\": [[\"s1\", \"B\", \"A\", 280]], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: sitting order 2\", \"actual\": [[\"s1\", \"MATH101H\", \"CHEM120\", 255]], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s2\", \"CHEM120\", \"MATH101H\", 195], [\"s4\", \"ECON150\", \"PHYS110\", 479], [\"s4\", \"BIO130\", \"CHEM120\", 239]], \"expected\": [[\"s2\", \"CHEM120\", \"PHYS110\", 30], [\"s4\", \"PHYS110\", \"CHEM120\", 15]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [[\"s4\", \"HIST140\", \"MATH101H\", 359], [\"s4\", \"MATH101H\", \"BIO130\", 1]], \"expected\": [[\"s4\", \"MATH101H\", \"BIO130\", 1], [\"s4\", \"BIO130\", \"HIST140\", 60]], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [[\"s3\", \"CHEM120\", \"ECON150\", 465], [\"s3\", \"ECON150\", \"MATH101H\", 15]], \"expected\": [[\"s3\", \"ECON150\", \"MATH101H\", 15]], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [[\"s2\", \"MATH101H\", \"CHEM120\", 585], [\"s2\", \"MATH101\", \"ECON150\", 285]], \"expected\": [], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [[\"s4\", \"MATH101\", \"PHYS110\", 181]], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.365,"exit_code":0,"observations":[{"actual":[],"check":"regression: sitting order 1","expected":[],"passed":true},{"actual":[],"check":"regression variant: sitting order 2","expected":[],"passed":true},{"actual":[["s2","CHEM120","PHYS110",30],["s4","PHYS110","CHEM120",15]],"check":"partial repair guard 3","expected":[["s2","CHEM120","PHYS110",30],["s4","PHYS110","CHEM120",15]],"passed":true},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[["s4","MATH101H","BIO130",1],["s4","BIO130","HIST140",60]],"check":"normal control 5","expected":[["s4","MATH101H","BIO130",1],["s4","BIO130","HIST140",60]],"passed":true},{"actual":[["s3","ECON150","MATH101H",15]],"check":"normal control 6","expected":[["s3","ECON150","MATH101H",15]],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: sitting order 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression variant: sitting order 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s2\", \"CHEM120\", \"PHYS110\", 30], [\"s4\", \"PHYS110\", \"CHEM120\", 15]], \"expected\": [[\"s2\", \"CHEM120\", \"PHYS110\", 30], [\"s4\", \"PHYS110\", \"CHEM120\", 15]], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [[\"s4\", \"MATH101H\", \"BIO130\", 1], [\"s4\", \"BIO130\", \"HIST140\", 60]], \"expected\": [[\"s4\", \"MATH101H\", \"BIO130\", 1], [\"s4\", \"BIO130\", \"HIST140\", 60]], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"s3\", \"ECON150\", \"MATH101H\", 15]], \"expected\": [[\"s3\", \"ECON150\", \"MATH101H\", 15]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}