{"abstract":"Rescheduling suggestions move exams further than necessary.","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":"The absolute gap is not the missing time.","family":"w2-exam-timetabling-constraints-inter-campus-travel-gap-shortfall-amount","id":"FA-94626","implementations":{"attempt":{"sha256":"8e4afc0e4ad2c93103b05775d49dc873fd9a25b7dec15fe0f5058e9778283931","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, abs(gap)])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: shortfall amount 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('regression variant: shortfall amount 2',\n   [[['s1', 'ECON150', 600, 720], ['s4', 'PHYS110', 600, 720], ['s4', 'BIO130', 765, 825],\n     ['s4', 'CHEM120', 854, 974], ['s1', 'MATH101', 540, 630], ['s4', 'MATH101H', 989, 1109]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 90], ['s4', 'BIO130', 'CHEM120', 16], ['s4', 'CHEM120', 'MATH101H', 45]]),\n  ('partial repair guard 3',\n   [[['s4', 'BIO130', 960, 1020], ['s4', 'MATH101', 600, 690], ['s5', 'MATH101H', 735, 825],\n     ['s3', 'PHYS110', 959, 1049], ['s3', 'ECON150', 659, 779], ['s3', 'MATH101H', 869, 959],\n     ['s5', 'PHYS110', 825, 915], ['s4', 'MATH101H', 780, 900], ['s3', 'BIO130', 540, 630],\n     ['s4', 'PHYS110', 1050, 1110], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s3', 'BIO130', 'ECON150', 1], ['s3', 'MATH101H', 'PHYS110', 30], ['s5', 'CHEM120', 'MATH101H', 30],\n    ['s5', 'MATH101H', 'PHYS110', 30]]),\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   [[['s3', 'HIST140', 600, 660], ['s3', 'MATH101H', 705, 825]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s1', 'MATH101', 600, 660], ['s1', 'BIO130', 691, 781], ['s1', 'PHYS110', 812, 872]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 600, 690], ['s2', 'HIST140', 808, 868], ['s4', 'PHYS110', 871, 961],\n     ['s2', 'CHEM120', 719, 779], ['s4', 'MATH101', 540, 600], ['s4', 'MATH101H', 645, 735],\n     ['s3', 'CHEM120', 600, 720], ['s4', 'CHEM120', 780, 840], ['s3', 'BIO130', 690, 750]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s2', 'PHYS110', 'CHEM120', 16], ['s2', 'CHEM120', 'HIST140', 16], ['s3', 'CHEM120', 'BIO130', 30],\n    ['s4', 'CHEM120', 'PHYS110', 14]])],\n [('regression: shortfall amount 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('regression variant: shortfall amount 2',\n   [[['s1', 'ECON150', 540, 660], ['s4', 'BIO130', 690, 810], ['s4', 'PHYS110', 870, 960],\n     ['s1', 'BIO130', 630, 720], ['s4', 'MATH101H', 1020, 1140], ['s4', 'HIST140', 600, 690],\n     ['s1', 'MATH101', 751, 841]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'BIO130', 60], ['s4', 'HIST140', 'BIO130', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'PHYS110', 631, 721], ['s2', 'ECON150', 736, 856], ['s2', 'HIST140', 540, 600],\n     ['s2', 'BIO130', 887, 977]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s2', 'PHYS110', 'ECON150', 45]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 5',\n   [[['s2', 'BIO130', 870, 930], ['s1', 'MATH101', 600, 720], ['s3', 'MATH101', 630, 720],\n     ['s2', 'CHEM120', 540, 660], ['s1', 'MATH101H', 780, 870], ['s3', 'MATH101H', 540, 630],\n     ['s2', 'HIST140', 945, 1005], ['s2', 'PHYS110', 750, 810], ['s1', 'HIST140', 915, 975]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'HIST140', 15], ['s2', 'BIO130', 'HIST140', 30]]),\n  ('normal control 6',\n   [[['s1', 'CHEM120', 540, 630], ['s1', 'MATH101H', 630, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s5', 'ECON150', 600, 720], ['s3', 'ECON150', 735, 855], ['s5', 'CHEM120', 690, 750],\n     ['s2', 'CHEM120', 600, 720], ['s5', 'BIO130', 750, 810], ['s5', 'PHYS110', 825, 885],\n     ['s2', 'BIO130', 690, 750], ['s3', 'CHEM120', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'BIO130', 30], ['s5', 'ECON150', 'CHEM120', 30]]),\n  ('normal control 8',\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 [('regression: shortfall amount 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: shortfall amount 2',\n   [[['s3', 'ECON150', 780, 840], ['s4', 'MATH101H', 600, 720], ['s3', 'HIST140', 600, 720],\n     ['s4', 'HIST140', 1050, 1110], ['s4', 'CHEM120', 870, 990], ['s4', 'BIO130', 780, 900],\n     ['s2', 'HIST140', 705, 795], ['s2', 'CHEM120', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 15], ['s4', 'BIO130', 'CHEM120', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'ECON150', 540, 660], ['s4', 'BIO130', 690, 810], ['s4', 'PHYS110', 870, 960],\n     ['s1', 'BIO130', 630, 720], ['s4', 'MATH101H', 1020, 1140], ['s4', 'HIST140', 600, 690],\n     ['s1', 'MATH101', 751, 841]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'BIO130', 60], ['s4', 'HIST140', 'BIO130', 60]]),\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, 660], ['s2', 'PHYS110', 690, 780], ['s4', 'MATH101H', 675, 765],\n     ['s4', 'MATH101', 780, 840], ['s2', 'CHEM120', 540, 660], ['s4', 'BIO130', 840, 960]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'ECON150', 'MATH101H', 15], ['s4', 'MATH101', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s2', 'BIO130', 750, 810], ['s2', 'MATH101', 600, 690], ['s2', 'ECON150', 839, 899],\n     ['s1', 'CHEM120', 630, 690], ['s1', 'ECON150', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'CHEM120', 60], ['s2', 'BIO130', 'ECON150', 31]]),\n  ('normal control 8',\n   [[['s3', 'MATH101H', 795, 915], ['s3', 'HIST140', 944, 1064], ['s3', 'PHYS110', 600, 690],\n     ['s3', 'MATH101', 690, 780]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s3', 'PHYS110', 'MATH101', 30]])],\n [('regression: shortfall amount 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: shortfall amount 2',\n   [[['s2', 'PHYS110', 660, 750], ['s5', 'ECON150', 600, 720], ['s3', 'MATH101H', 540, 630],\n     ['s3', 'HIST140', 645, 705], ['s5', 'BIO130', 720, 840], ['s2', 'ECON150', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'ECON150', 'PHYS110', 45], ['s3', 'MATH101H', 'HIST140', 15], ['s5', 'ECON150', 'BIO130', 45]]),\n  ('partial repair guard 3',\n   [[['s1', 'CHEM120', 765, 825], ['s1', 'MATH101', 600, 720], ['s1', 'ECON150', 825, 945]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'CHEM120', 'ECON150', 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   [[['s2', 'HIST140', 540, 660], ['s5', 'CHEM120', 962, 1022], ['s4', 'ECON150', 540, 600],\n     ['s5', 'MATH101', 721, 811], ['s5', 'ECON150', 842, 962], ['s5', 'HIST140', 600, 690],\n     ['s4', 'HIST140', 645, 765], ['s4', 'MATH101', 960, 1020], ['s4', 'MATH101H', 855, 945],\n     ['s2', 'PHYS110', 691, 781]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'MATH101H', 'MATH101', 15], ['s5', 'ECON150', 'CHEM120', 30]]),\n  ('normal control 7',\n   [[['s4', 'CHEM120', 600, 660], ['s4', 'PHYS110', 690, 780]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s3', 'MATH101H', 600, 690], ['s5', 'CHEM120', 540, 660], ['s5', 'HIST140', 795, 915],\n     ['s5', 'BIO130', 660, 780], ['s3', 'HIST140', 719, 839], ['s3', 'PHYS110', 869, 959]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'CHEM120', 'BIO130', 60], ['s5', 'BIO130', 'HIST140', 30]])],\n [('regression: shortfall amount 1',\n   [[['s4', 'MATH101', 630, 720], ['s2', 'PHYS110', 615, 675], ['s2', 'MATH101H', 645, 765],\n     ['s4', 'MATH101H', 540, 600], ['s4', 'BIO130', 751, 841], ['s2', 'CHEM120', 825, 945],\n     ['s2', 'MATH101', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'PHYS110', 15], ['s2', 'PHYS110', 'MATH101H', 30]]),\n  ('regression variant: shortfall amount 2',\n   [[['s5', 'BIO130', 930, 1050], ['s5', 'PHYS110', 810, 900], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'PHYS110', 'BIO130', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 931, 1051], ['s5', 'PHYS110', 630, 720], ['s1', 'CHEM120', 841, 961],\n     ['s5', 'BIO130', 540, 600], ['s2', 'MATH101', 840, 900], ['s1', 'MATH101', 600, 660],\n     ['s1', 'MATH101H', 691, 811], ['s5', 'HIST140', 690, 780], ['s2', 'HIST140', 720, 780],\n     ['s5', 'CHEM120', 811, 931], ['s2', 'ECON150', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'MATH101H', 'CHEM120', 30], ['s1', 'CHEM120', 'PHYS110', 90], ['s5', 'PHYS110', 'HIST140', 30]]),\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   [[['s3', 'MATH101', 600, 720], ['s5', 'BIO130', 540, 660], ['s5', 'MATH101H', 690, 750],\n     ['s3', 'MATH101H', 720, 840]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\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   [[['s5', 'PHYS110', 675, 735], ['s5', 'BIO130', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 30}],\n   [])]]\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":"cd31510d8a4068535ccdc90a3e3be472c8e7c8c4eebd0fa678d9eef14fa883a4","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])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: shortfall amount 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('regression variant: shortfall amount 2',\n   [[['s1', 'ECON150', 600, 720], ['s4', 'PHYS110', 600, 720], ['s4', 'BIO130', 765, 825],\n     ['s4', 'CHEM120', 854, 974], ['s1', 'MATH101', 540, 630], ['s4', 'MATH101H', 989, 1109]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 90], ['s4', 'BIO130', 'CHEM120', 16], ['s4', 'CHEM120', 'MATH101H', 45]]),\n  ('partial repair guard 3',\n   [[['s4', 'BIO130', 960, 1020], ['s4', 'MATH101', 600, 690], ['s5', 'MATH101H', 735, 825],\n     ['s3', 'PHYS110', 959, 1049], ['s3', 'ECON150', 659, 779], ['s3', 'MATH101H', 869, 959],\n     ['s5', 'PHYS110', 825, 915], ['s4', 'MATH101H', 780, 900], ['s3', 'BIO130', 540, 630],\n     ['s4', 'PHYS110', 1050, 1110], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s3', 'BIO130', 'ECON150', 1], ['s3', 'MATH101H', 'PHYS110', 30], ['s5', 'CHEM120', 'MATH101H', 30],\n    ['s5', 'MATH101H', 'PHYS110', 30]]),\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   [[['s3', 'HIST140', 600, 660], ['s3', 'MATH101H', 705, 825]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s1', 'MATH101', 600, 660], ['s1', 'BIO130', 691, 781], ['s1', 'PHYS110', 812, 872]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 600, 690], ['s2', 'HIST140', 808, 868], ['s4', 'PHYS110', 871, 961],\n     ['s2', 'CHEM120', 719, 779], ['s4', 'MATH101', 540, 600], ['s4', 'MATH101H', 645, 735],\n     ['s3', 'CHEM120', 600, 720], ['s4', 'CHEM120', 780, 840], ['s3', 'BIO130', 690, 750]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s2', 'PHYS110', 'CHEM120', 16], ['s2', 'CHEM120', 'HIST140', 16], ['s3', 'CHEM120', 'BIO130', 30],\n    ['s4', 'CHEM120', 'PHYS110', 14]])],\n [('regression: shortfall amount 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('regression variant: shortfall amount 2',\n   [[['s1', 'ECON150', 540, 660], ['s4', 'BIO130', 690, 810], ['s4', 'PHYS110', 870, 960],\n     ['s1', 'BIO130', 630, 720], ['s4', 'MATH101H', 1020, 1140], ['s4', 'HIST140', 600, 690],\n     ['s1', 'MATH101', 751, 841]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'BIO130', 60], ['s4', 'HIST140', 'BIO130', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'PHYS110', 631, 721], ['s2', 'ECON150', 736, 856], ['s2', 'HIST140', 540, 600],\n     ['s2', 'BIO130', 887, 977]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s2', 'PHYS110', 'ECON150', 45]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 5',\n   [[['s2', 'BIO130', 870, 930], ['s1', 'MATH101', 600, 720], ['s3', 'MATH101', 630, 720],\n     ['s2', 'CHEM120', 540, 660], ['s1', 'MATH101H', 780, 870], ['s3', 'MATH101H', 540, 630],\n     ['s2', 'HIST140', 945, 1005], ['s2', 'PHYS110', 750, 810], ['s1', 'HIST140', 915, 975]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'HIST140', 15], ['s2', 'BIO130', 'HIST140', 30]]),\n  ('normal control 6',\n   [[['s1', 'CHEM120', 540, 630], ['s1', 'MATH101H', 630, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s5', 'ECON150', 600, 720], ['s3', 'ECON150', 735, 855], ['s5', 'CHEM120', 690, 750],\n     ['s2', 'CHEM120', 600, 720], ['s5', 'BIO130', 750, 810], ['s5', 'PHYS110', 825, 885],\n     ['s2', 'BIO130', 690, 750], ['s3', 'CHEM120', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'BIO130', 30], ['s5', 'ECON150', 'CHEM120', 30]]),\n  ('normal control 8',\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 [('regression: shortfall amount 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: shortfall amount 2',\n   [[['s3', 'ECON150', 780, 840], ['s4', 'MATH101H', 600, 720], ['s3', 'HIST140', 600, 720],\n     ['s4', 'HIST140', 1050, 1110], ['s4', 'CHEM120', 870, 990], ['s4', 'BIO130', 780, 900],\n     ['s2', 'HIST140', 705, 795], ['s2', 'CHEM120', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 15], ['s4', 'BIO130', 'CHEM120', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'ECON150', 540, 660], ['s4', 'BIO130', 690, 810], ['s4', 'PHYS110', 870, 960],\n     ['s1', 'BIO130', 630, 720], ['s4', 'MATH101H', 1020, 1140], ['s4', 'HIST140', 600, 690],\n     ['s1', 'MATH101', 751, 841]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'BIO130', 60], ['s4', 'HIST140', 'BIO130', 60]]),\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, 660], ['s2', 'PHYS110', 690, 780], ['s4', 'MATH101H', 675, 765],\n     ['s4', 'MATH101', 780, 840], ['s2', 'CHEM120', 540, 660], ['s4', 'BIO130', 840, 960]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'ECON150', 'MATH101H', 15], ['s4', 'MATH101', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s2', 'BIO130', 750, 810], ['s2', 'MATH101', 600, 690], ['s2', 'ECON150', 839, 899],\n     ['s1', 'CHEM120', 630, 690], ['s1', 'ECON150', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'CHEM120', 60], ['s2', 'BIO130', 'ECON150', 31]]),\n  ('normal control 8',\n   [[['s3', 'MATH101H', 795, 915], ['s3', 'HIST140', 944, 1064], ['s3', 'PHYS110', 600, 690],\n     ['s3', 'MATH101', 690, 780]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s3', 'PHYS110', 'MATH101', 30]])],\n [('regression: shortfall amount 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: shortfall amount 2',\n   [[['s2', 'PHYS110', 660, 750], ['s5', 'ECON150', 600, 720], ['s3', 'MATH101H', 540, 630],\n     ['s3', 'HIST140', 645, 705], ['s5', 'BIO130', 720, 840], ['s2', 'ECON150', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'ECON150', 'PHYS110', 45], ['s3', 'MATH101H', 'HIST140', 15], ['s5', 'ECON150', 'BIO130', 45]]),\n  ('partial repair guard 3',\n   [[['s1', 'CHEM120', 765, 825], ['s1', 'MATH101', 600, 720], ['s1', 'ECON150', 825, 945]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'CHEM120', 'ECON150', 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   [[['s2', 'HIST140', 540, 660], ['s5', 'CHEM120', 962, 1022], ['s4', 'ECON150', 540, 600],\n     ['s5', 'MATH101', 721, 811], ['s5', 'ECON150', 842, 962], ['s5', 'HIST140', 600, 690],\n     ['s4', 'HIST140', 645, 765], ['s4', 'MATH101', 960, 1020], ['s4', 'MATH101H', 855, 945],\n     ['s2', 'PHYS110', 691, 781]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'MATH101H', 'MATH101', 15], ['s5', 'ECON150', 'CHEM120', 30]]),\n  ('normal control 7',\n   [[['s4', 'CHEM120', 600, 660], ['s4', 'PHYS110', 690, 780]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s3', 'MATH101H', 600, 690], ['s5', 'CHEM120', 540, 660], ['s5', 'HIST140', 795, 915],\n     ['s5', 'BIO130', 660, 780], ['s3', 'HIST140', 719, 839], ['s3', 'PHYS110', 869, 959]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'CHEM120', 'BIO130', 60], ['s5', 'BIO130', 'HIST140', 30]])],\n [('regression: shortfall amount 1',\n   [[['s4', 'MATH101', 630, 720], ['s2', 'PHYS110', 615, 675], ['s2', 'MATH101H', 645, 765],\n     ['s4', 'MATH101H', 540, 600], ['s4', 'BIO130', 751, 841], ['s2', 'CHEM120', 825, 945],\n     ['s2', 'MATH101', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'PHYS110', 15], ['s2', 'PHYS110', 'MATH101H', 30]]),\n  ('regression variant: shortfall amount 2',\n   [[['s5', 'BIO130', 930, 1050], ['s5', 'PHYS110', 810, 900], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'PHYS110', 'BIO130', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 931, 1051], ['s5', 'PHYS110', 630, 720], ['s1', 'CHEM120', 841, 961],\n     ['s5', 'BIO130', 540, 600], ['s2', 'MATH101', 840, 900], ['s1', 'MATH101', 600, 660],\n     ['s1', 'MATH101H', 691, 811], ['s5', 'HIST140', 690, 780], ['s2', 'HIST140', 720, 780],\n     ['s5', 'CHEM120', 811, 931], ['s2', 'ECON150', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'MATH101H', 'CHEM120', 30], ['s1', 'CHEM120', 'PHYS110', 90], ['s5', 'PHYS110', 'HIST140', 30]]),\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   [[['s3', 'MATH101', 600, 720], ['s5', 'BIO130', 540, 660], ['s5', 'MATH101H', 690, 750],\n     ['s3', 'MATH101H', 720, 840]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\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   [[['s5', 'PHYS110', 675, 735], ['s5', 'BIO130', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 30}],\n   [])]]\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":"9a710a97f6f5468444096157dc8c9417e25b35a099eda9b8b6e65405d6c45723","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: shortfall amount 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('regression variant: shortfall amount 2',\n   [[['s1', 'ECON150', 600, 720], ['s4', 'PHYS110', 600, 720], ['s4', 'BIO130', 765, 825],\n     ['s4', 'CHEM120', 854, 974], ['s1', 'MATH101', 540, 630], ['s4', 'MATH101H', 989, 1109]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 90], ['s4', 'BIO130', 'CHEM120', 16], ['s4', 'CHEM120', 'MATH101H', 45]]),\n  ('partial repair guard 3',\n   [[['s4', 'BIO130', 960, 1020], ['s4', 'MATH101', 600, 690], ['s5', 'MATH101H', 735, 825],\n     ['s3', 'PHYS110', 959, 1049], ['s3', 'ECON150', 659, 779], ['s3', 'MATH101H', 869, 959],\n     ['s5', 'PHYS110', 825, 915], ['s4', 'MATH101H', 780, 900], ['s3', 'BIO130', 540, 630],\n     ['s4', 'PHYS110', 1050, 1110], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s3', 'BIO130', 'ECON150', 1], ['s3', 'MATH101H', 'PHYS110', 30], ['s5', 'CHEM120', 'MATH101H', 30],\n    ['s5', 'MATH101H', 'PHYS110', 30]]),\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   [[['s3', 'HIST140', 600, 660], ['s3', 'MATH101H', 705, 825]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s1', 'MATH101', 600, 660], ['s1', 'BIO130', 691, 781], ['s1', 'PHYS110', 812, 872]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 600, 690], ['s2', 'HIST140', 808, 868], ['s4', 'PHYS110', 871, 961],\n     ['s2', 'CHEM120', 719, 779], ['s4', 'MATH101', 540, 600], ['s4', 'MATH101H', 645, 735],\n     ['s3', 'CHEM120', 600, 720], ['s4', 'CHEM120', 780, 840], ['s3', 'BIO130', 690, 750]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s2', 'PHYS110', 'CHEM120', 16], ['s2', 'CHEM120', 'HIST140', 16], ['s3', 'CHEM120', 'BIO130', 30],\n    ['s4', 'CHEM120', 'PHYS110', 14]])],\n [('regression: shortfall amount 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('regression variant: shortfall amount 2',\n   [[['s1', 'ECON150', 540, 660], ['s4', 'BIO130', 690, 810], ['s4', 'PHYS110', 870, 960],\n     ['s1', 'BIO130', 630, 720], ['s4', 'MATH101H', 1020, 1140], ['s4', 'HIST140', 600, 690],\n     ['s1', 'MATH101', 751, 841]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'BIO130', 60], ['s4', 'HIST140', 'BIO130', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'PHYS110', 631, 721], ['s2', 'ECON150', 736, 856], ['s2', 'HIST140', 540, 600],\n     ['s2', 'BIO130', 887, 977]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s2', 'PHYS110', 'ECON150', 45]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 5',\n   [[['s2', 'BIO130', 870, 930], ['s1', 'MATH101', 600, 720], ['s3', 'MATH101', 630, 720],\n     ['s2', 'CHEM120', 540, 660], ['s1', 'MATH101H', 780, 870], ['s3', 'MATH101H', 540, 630],\n     ['s2', 'HIST140', 945, 1005], ['s2', 'PHYS110', 750, 810], ['s1', 'HIST140', 915, 975]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'HIST140', 15], ['s2', 'BIO130', 'HIST140', 30]]),\n  ('normal control 6',\n   [[['s1', 'CHEM120', 540, 630], ['s1', 'MATH101H', 630, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 7',\n   [[['s5', 'ECON150', 600, 720], ['s3', 'ECON150', 735, 855], ['s5', 'CHEM120', 690, 750],\n     ['s2', 'CHEM120', 600, 720], ['s5', 'BIO130', 750, 810], ['s5', 'PHYS110', 825, 885],\n     ['s2', 'BIO130', 690, 750], ['s3', 'CHEM120', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'BIO130', 30], ['s5', 'ECON150', 'CHEM120', 30]]),\n  ('normal control 8',\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 [('regression: shortfall amount 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: shortfall amount 2',\n   [[['s3', 'ECON150', 780, 840], ['s4', 'MATH101H', 600, 720], ['s3', 'HIST140', 600, 720],\n     ['s4', 'HIST140', 1050, 1110], ['s4', 'CHEM120', 870, 990], ['s4', 'BIO130', 780, 900],\n     ['s2', 'HIST140', 705, 795], ['s2', 'CHEM120', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 15], ['s4', 'BIO130', 'CHEM120', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'ECON150', 540, 660], ['s4', 'BIO130', 690, 810], ['s4', 'PHYS110', 870, 960],\n     ['s1', 'BIO130', 630, 720], ['s4', 'MATH101H', 1020, 1140], ['s4', 'HIST140', 600, 690],\n     ['s1', 'MATH101', 751, 841]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'BIO130', 60], ['s4', 'HIST140', 'BIO130', 60]]),\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, 660], ['s2', 'PHYS110', 690, 780], ['s4', 'MATH101H', 675, 765],\n     ['s4', 'MATH101', 780, 840], ['s2', 'CHEM120', 540, 660], ['s4', 'BIO130', 840, 960]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'ECON150', 'MATH101H', 15], ['s4', 'MATH101', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s2', 'BIO130', 750, 810], ['s2', 'MATH101', 600, 690], ['s2', 'ECON150', 839, 899],\n     ['s1', 'CHEM120', 630, 690], ['s1', 'ECON150', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'ECON150', 'CHEM120', 60], ['s2', 'BIO130', 'ECON150', 31]]),\n  ('normal control 8',\n   [[['s3', 'MATH101H', 795, 915], ['s3', 'HIST140', 944, 1064], ['s3', 'PHYS110', 600, 690],\n     ['s3', 'MATH101', 690, 780]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s3', 'PHYS110', 'MATH101', 30]])],\n [('regression: shortfall amount 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: shortfall amount 2',\n   [[['s2', 'PHYS110', 660, 750], ['s5', 'ECON150', 600, 720], ['s3', 'MATH101H', 540, 630],\n     ['s3', 'HIST140', 645, 705], ['s5', 'BIO130', 720, 840], ['s2', 'ECON150', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'ECON150', 'PHYS110', 45], ['s3', 'MATH101H', 'HIST140', 15], ['s5', 'ECON150', 'BIO130', 45]]),\n  ('partial repair guard 3',\n   [[['s1', 'CHEM120', 765, 825], ['s1', 'MATH101', 600, 720], ['s1', 'ECON150', 825, 945]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'CHEM120', 'ECON150', 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   [[['s2', 'HIST140', 540, 660], ['s5', 'CHEM120', 962, 1022], ['s4', 'ECON150', 540, 600],\n     ['s5', 'MATH101', 721, 811], ['s5', 'ECON150', 842, 962], ['s5', 'HIST140', 600, 690],\n     ['s4', 'HIST140', 645, 765], ['s4', 'MATH101', 960, 1020], ['s4', 'MATH101H', 855, 945],\n     ['s2', 'PHYS110', 691, 781]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'MATH101H', 'MATH101', 15], ['s5', 'ECON150', 'CHEM120', 30]]),\n  ('normal control 7',\n   [[['s4', 'CHEM120', 600, 660], ['s4', 'PHYS110', 690, 780]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 30}],\n   []),\n  ('normal control 8',\n   [[['s3', 'MATH101H', 600, 690], ['s5', 'CHEM120', 540, 660], ['s5', 'HIST140', 795, 915],\n     ['s5', 'BIO130', 660, 780], ['s3', 'HIST140', 719, 839], ['s3', 'PHYS110', 869, 959]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'CHEM120', 'BIO130', 60], ['s5', 'BIO130', 'HIST140', 30]])],\n [('regression: shortfall amount 1',\n   [[['s4', 'MATH101', 630, 720], ['s2', 'PHYS110', 615, 675], ['s2', 'MATH101H', 645, 765],\n     ['s4', 'MATH101H', 540, 600], ['s4', 'BIO130', 751, 841], ['s2', 'CHEM120', 825, 945],\n     ['s2', 'MATH101', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'PHYS110', 15], ['s2', 'PHYS110', 'MATH101H', 30]]),\n  ('regression variant: shortfall amount 2',\n   [[['s5', 'BIO130', 930, 1050], ['s5', 'PHYS110', 810, 900], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'PHYS110', 'BIO130', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 931, 1051], ['s5', 'PHYS110', 630, 720], ['s1', 'CHEM120', 841, 961],\n     ['s5', 'BIO130', 540, 600], ['s2', 'MATH101', 840, 900], ['s1', 'MATH101', 600, 660],\n     ['s1', 'MATH101H', 691, 811], ['s5', 'HIST140', 690, 780], ['s2', 'HIST140', 720, 780],\n     ['s5', 'CHEM120', 811, 931], ['s2', 'ECON150', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'MATH101H', 'CHEM120', 30], ['s1', 'CHEM120', 'PHYS110', 90], ['s5', 'PHYS110', 'HIST140', 30]]),\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   [[['s3', 'MATH101', 600, 720], ['s5', 'BIO130', 540, 660], ['s5', 'MATH101H', 690, 750],\n     ['s3', 'MATH101H', 720, 840]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\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   [[['s5', 'PHYS110', 675, 735], ['s5', 'BIO130', 540, 630]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 30}],\n   [])]]\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-shortfall-amount","generated_at":"2026-09-29T14:52:06.079962+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":"Shortfall is needed gap minus actual gap.","root_cause":"The shortfall ignores the existing gap.","sha256":"16b36f07ae83576c9b3237b0d6849696a1f730d7a9974d22d759acc15f274b90","title":"Travel shortfall reported as the full travel time · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.262,"exit_code":1,"observations":[{"actual":[["s1","A","B",29]],"check":"regression: shortfall amount 1","expected":[["s1","A","B",1]],"passed":false},{"actual":[["s1","MATH101","ECON150",30],["s4","BIO130","CHEM120",29],["s4","CHEM120","MATH101H",15]],"check":"regression variant: shortfall amount 2","expected":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"passed":false},{"actual":[["s3","BIO130","ECON150",29],["s3","MATH101H","PHYS110",0],["s5","CHEM120","MATH101H",15],["s5","MATH101H","PHYS110",0]],"check":"partial repair guard 3","expected":[["s3","BIO130","ECON150",1],["s3","MATH101H","PHYS110",30],["s5","CHEM120","MATH101H",30],["s5","MATH101H","PHYS110",30]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[["s2","PHYS110","CHEM120",29],["s2","CHEM120","HIST140",29],["s3","CHEM120","BIO130",30],["s4","CHEM120","PHYS110",31]],"check":"normal control 8","expected":[["s2","PHYS110","CHEM120",16],["s2","CHEM120","HIST140",16],["s3","CHEM120","BIO130",30],["s4","CHEM120","PHYS110",14]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: shortfall amount 1\", \"actual\": [[\"s1\", \"A\", \"B\", 29]], \"expected\": [[\"s1\", \"A\", \"B\", 1]], \"passed\": false}, {\"check\": \"regression variant: shortfall amount 2\", \"actual\": [[\"s1\", \"MATH101\", \"ECON150\", 30], [\"s4\", \"BIO130\", \"CHEM120\", 29], [\"s4\", \"CHEM120\", \"MATH101H\", 15]], \"expected\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s3\", \"BIO130\", \"ECON150\", 29], [\"s3\", \"MATH101H\", \"PHYS110\", 0], [\"s5\", \"CHEM120\", \"MATH101H\", 15], [\"s5\", \"MATH101H\", \"PHYS110\", 0]], \"expected\": [[\"s3\", \"BIO130\", \"ECON150\", 1], [\"s3\", \"MATH101H\", \"PHYS110\", 30], [\"s5\", \"CHEM120\", \"MATH101H\", 30], [\"s5\", \"MATH101H\", \"PHYS110\", 30]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"s2\", \"PHYS110\", \"CHEM120\", 29], [\"s2\", \"CHEM120\", \"HIST140\", 29], [\"s3\", \"CHEM120\", \"BIO130\", 30], [\"s4\", \"CHEM120\", \"PHYS110\", 31]], \"expected\": [[\"s2\", \"PHYS110\", \"CHEM120\", 16], [\"s2\", \"CHEM120\", \"HIST140\", 16], [\"s3\", \"CHEM120\", \"BIO130\", 30], [\"s4\", \"CHEM120\", \"PHYS110\", 14]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.037,"exit_code":1,"observations":[{"actual":[["s1","A","B",30]],"check":"regression: shortfall amount 1","expected":[["s1","A","B",1]],"passed":false},{"actual":[["s1","MATH101","ECON150",60],["s4","BIO130","CHEM120",45],["s4","CHEM120","MATH101H",60]],"check":"regression variant: shortfall amount 2","expected":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"passed":false},{"actual":[["s3","BIO130","ECON150",30],["s3","MATH101H","PHYS110",30],["s5","CHEM120","MATH101H",45],["s5","MATH101H","PHYS110",30]],"check":"partial repair guard 3","expected":[["s3","BIO130","ECON150",1],["s3","MATH101H","PHYS110",30],["s5","CHEM120","MATH101H",30],["s5","MATH101H","PHYS110",30]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[["s2","PHYS110","CHEM120",45],["s2","CHEM120","HIST140",45],["s3","CHEM120","BIO130",0],["s4","CHEM120","PHYS110",45]],"check":"normal control 8","expected":[["s2","PHYS110","CHEM120",16],["s2","CHEM120","HIST140",16],["s3","CHEM120","BIO130",30],["s4","CHEM120","PHYS110",14]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: shortfall amount 1\", \"actual\": [[\"s1\", \"A\", \"B\", 30]], \"expected\": [[\"s1\", \"A\", \"B\", 1]], \"passed\": false}, {\"check\": \"regression variant: shortfall amount 2\", \"actual\": [[\"s1\", \"MATH101\", \"ECON150\", 60], [\"s4\", \"BIO130\", \"CHEM120\", 45], [\"s4\", \"CHEM120\", \"MATH101H\", 60]], \"expected\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s3\", \"BIO130\", \"ECON150\", 30], [\"s3\", \"MATH101H\", \"PHYS110\", 30], [\"s5\", \"CHEM120\", \"MATH101H\", 45], [\"s5\", \"MATH101H\", \"PHYS110\", 30]], \"expected\": [[\"s3\", \"BIO130\", \"ECON150\", 1], [\"s3\", \"MATH101H\", \"PHYS110\", 30], [\"s5\", \"CHEM120\", \"MATH101H\", 30], [\"s5\", \"MATH101H\", \"PHYS110\", 30]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"s2\", \"PHYS110\", \"CHEM120\", 45], [\"s2\", \"CHEM120\", \"HIST140\", 45], [\"s3\", \"CHEM120\", \"BIO130\", 0], [\"s4\", \"CHEM120\", \"PHYS110\", 45]], \"expected\": [[\"s2\", \"PHYS110\", \"CHEM120\", 16], [\"s2\", \"CHEM120\", \"HIST140\", 16], [\"s3\", \"CHEM120\", \"BIO130\", 30], [\"s4\", \"CHEM120\", \"PHYS110\", 14]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.66,"exit_code":0,"observations":[{"actual":[["s1","A","B",1]],"check":"regression: shortfall amount 1","expected":[["s1","A","B",1]],"passed":true},{"actual":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"check":"regression variant: shortfall amount 2","expected":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"passed":true},{"actual":[["s3","BIO130","ECON150",1],["s3","MATH101H","PHYS110",30],["s5","CHEM120","MATH101H",30],["s5","MATH101H","PHYS110",30]],"check":"partial repair guard 3","expected":[["s3","BIO130","ECON150",1],["s3","MATH101H","PHYS110",30],["s5","CHEM120","MATH101H",30],["s5","MATH101H","PHYS110",30]],"passed":true},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[["s2","PHYS110","CHEM120",16],["s2","CHEM120","HIST140",16],["s3","CHEM120","BIO130",30],["s4","CHEM120","PHYS110",14]],"check":"normal control 8","expected":[["s2","PHYS110","CHEM120",16],["s2","CHEM120","HIST140",16],["s3","CHEM120","BIO130",30],["s4","CHEM120","PHYS110",14]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: shortfall amount 1\", \"actual\": [[\"s1\", \"A\", \"B\", 1]], \"expected\": [[\"s1\", \"A\", \"B\", 1]], \"passed\": true}, {\"check\": \"regression variant: shortfall amount 2\", \"actual\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"expected\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s3\", \"BIO130\", \"ECON150\", 1], [\"s3\", \"MATH101H\", \"PHYS110\", 30], [\"s5\", \"CHEM120\", \"MATH101H\", 30], [\"s5\", \"MATH101H\", \"PHYS110\", 30]], \"expected\": [[\"s3\", \"BIO130\", \"ECON150\", 1], [\"s3\", \"MATH101H\", \"PHYS110\", 30], [\"s5\", \"CHEM120\", \"MATH101H\", 30], [\"s5\", \"MATH101H\", \"PHYS110\", 30]], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[\"s2\", \"PHYS110\", \"CHEM120\", 16], [\"s2\", \"CHEM120\", \"HIST140\", 16], [\"s3\", \"CHEM120\", \"BIO130\", 30], [\"s4\", \"CHEM120\", \"PHYS110\", 14]], \"expected\": [[\"s2\", \"PHYS110\", \"CHEM120\", 16], [\"s2\", \"CHEM120\", \"HIST140\", 16], [\"s3\", \"CHEM120\", \"BIO130\", 30], [\"s4\", \"CHEM120\", \"PHYS110\", 14]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}