{"abstract":"Only the first exam using an unpopular room pays its penalty.","category":"Exam timetabling constraints","checks":8,"contract":"Assignment rows [exam, room, period] (a split exam has one row per room; rows may repeat). Each exam pays its period penalty once per distinct period it occupies and each room penalty once per distinct (exam, room). Return [period penalty, room penalty, total].","contract_signature":"assign, ppen, rpen","evaluation_group":"w2-exam-timetabling-constraints-period-and-room-penalties","failed_approach":"Deduplicating by room and period lets exams sharing a room-period escape.","family":"w2-exam-timetabling-constraints-period-and-room-penalties-room-charge-key","id":"FA-94656","implementations":{"attempt":{"sha256":"3368c2a23559ab15e89517ad5c6005d3c369784d4ea3bfc1c6475b4ed37bcd60","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(assign, ppen, rpen):\n    seen_exam = set()\n    seen_room = set()\n    pp = rp = 0\n    for ex, r, p in assign:\n        if (ex, p) not in seen_exam:\n            seen_exam.add((ex, p))\n            pp += ppen[p]\n        if (r, p) not in seen_room:\n            seen_room.add((r, p))\n            rp += rpen[r]\n    return [pp, rp, pp + rp]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: room charge key 1', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}],\n   [4, 6, 10]),\n  ('regression variant: room charge key 2',\n   [[['PHYS110', 'R2', 2], ['CHEM120', 'R3', 1], ['MATH101H', 'R2', 3], ['CHEM120', 'R2', 3],\n     ['PHYS110', 'R1', 3], ['PHYS110', 'R2', 1]],\n    [10, 10, 5, 0], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [25, 11, 36]),\n  ('partial repair guard 3',\n   [[['PHYS110', 'R3', 0], ['MATH101H', 'R3', 0], ['CHEM120', 'R1', 0], ['MATH101H', 'R2', 0],\n     ['CHEM120', 'R3', 2]],\n    [5, 10, 5, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [20, 22, 42]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('normal control 5',\n   [[['MATH101H', 'R3', 1], ['MATH101', 'R1', 2], ['MATH101', 'R2', 1], ['CHEM120', 'R2', 2]], [1, 0, 0, 1],\n    {'R1': 0, 'R2': 3, 'R3': 7}],\n   [0, 13, 13]),\n  ('normal control 6',\n   [[['MATH101', 'R2', 2], ['CHEM120', 'R1', 1], ['MATH101H', 'R3', 0], ['MATH101', 'R1', 2],\n     ['MATH101', 'R2', 2]],\n    [0, 1, 0, 10], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [1, 10, 11]),\n  ('normal control 7',\n   [[['MATH101', 'R1', 2], ['MATH101H', 'R3', 3], ['PHYS110', 'R1', 3], ['MATH101H', 'R3', 2],\n     ['MATH101', 'R2', 0]],\n    [5, 10, 1, 1], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [9, 5, 14]),\n  ('normal control 8',\n   [[['MATH101H', 'R3', 1], ['CHEM120', 'R2', 0], ['CHEM120', 'R2', 0]], [5, 10, 0, 0],\n    {'R1': 0, 'R2': 3, 'R3': 2}],\n   [15, 5, 20])],\n [('regression: room charge key 1',\n   [[['CHEM120', 'R1', 2], ['CHEM120', 'R3', 2], ['PHYS110', 'R2', 1], ['PHYS110', 'R1', 3],\n     ['MATH101', 'R1', 1], ['MATH101H', 'R2', 0]],\n    [1, 1, 0, 10], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [13, 8, 21]),\n  ('regression variant: room charge key 2',\n   [[['PHYS110', 'R3', 0], ['PHYS110', 'R1', 2], ['MATH101', 'R1', 2], ['MATH101H', 'R2', 2],\n     ['MATH101H', 'R2', 3], ['MATH101', 'R3', 1], ['CHEM120', 'R3', 3], ['PHYS110', 'R3', 0]],\n    [1, 1, 5, 10], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [37, 24, 61]),\n  ('partial repair guard 3',\n   [[['MATH101', 'R2', 1], ['PHYS110', 'R3', 1], ['MATH101H', 'R1', 2], ['PHYS110', 'R3', 3]], [1, 5, 10, 0],\n    {'R1': 0, 'R2': 1, 'R3': 7}],\n   [20, 8, 28]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['CHEM120', 'R2', 3], ['PHYS110', 'R2', 2], ['PHYS110', 'R2', 2], ['CHEM120', 'R1', 2],\n     ['MATH101H', 'R2', 2], ['PHYS110', 'R1', 2], ['MATH101H', 'R2', 2], ['CHEM120', 'R1', 2]],\n    [10, 10, 5, 1], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [16, 9, 25]),\n  ('normal control 7',\n   [[['CHEM120', 'R2', 0], ['PHYS110', 'R2', 0]], [10, 10, 1, 10], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [20, 6, 26]),\n  ('normal control 8',\n   [[['CHEM120', 'R3', 3], ['MATH101H', 'R3', 2], ['MATH101H', 'R3', 2], ['MATH101H', 'R2', 3],\n     ['MATH101H', 'R3', 2]],\n    [5, 0, 5, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [15, 15, 30])],\n [('regression: room charge key 1',\n   [[['CHEM120', 'R2', 0], ['MATH101H', 'R1', 3], ['PHYS110', 'R2', 3], ['PHYS110', 'R2', 3],\n     ['PHYS110', 'R2', 3]],\n    [1, 1, 0, 1], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [3, 2, 5]),\n  ('regression variant: room charge key 2',\n   [[['MATH101', 'R2', 1], ['PHYS110', 'R1', 0], ['MATH101', 'R3', 1], ['MATH101', 'R1', 0],\n     ['CHEM120', 'R1', 0], ['MATH101H', 'R1', 0], ['MATH101H', 'R3', 1]],\n    [0, 1, 10, 5], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [2, 5, 7]),\n  ('partial repair guard 3',\n   [[['MATH101', 'R2', 3], ['MATH101', 'R2', 0], ['PHYS110', 'R1', 2], ['PHYS110', 'R3', 3],\n     ['MATH101H', 'R3', 2], ['CHEM120', 'R3', 1]],\n    [10, 5, 5, 10], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [45, 9, 54]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['CHEM120', 'R3', 1], ['CHEM120', 'R3', 3], ['PHYS110', 'R1', 3], ['CHEM120', 'R2', 2],\n     ['CHEM120', 'R3', 1]],\n    [0, 0, 0, 0], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [0, 3, 3]),\n  ('normal control 7',\n   [[['MATH101', 'R2', 1], ['MATH101', 'R1', 0], ['CHEM120', 'R2', 3], ['MATH101H', 'R2', 0],\n     ['MATH101', 'R2', 0]],\n    [0, 1, 10, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [6, 3, 9]),\n  ('normal control 8',\n   [[['MATH101H', 'R2', 3], ['PHYS110', 'R1', 3], ['MATH101', 'R1', 2], ['CHEM120', 'R2', 3]], [5, 10, 5, 0],\n    {'R1': 0, 'R2': 1, 'R3': 7}],\n   [5, 2, 7])],\n [('regression: room charge key 1',\n   [[['CHEM120', 'R1', 2], ['MATH101', 'R2', 3], ['PHYS110', 'R2', 1], ['CHEM120', 'R1', 2]], [10, 5, 5, 1],\n    {'R1': 0, 'R2': 3, 'R3': 7}],\n   [11, 6, 17]),\n  ('regression variant: room charge key 2',\n   [[['PHYS110', 'R1', 1], ['CHEM120', 'R3', 0], ['PHYS110', 'R1', 3], ['PHYS110', 'R3', 0],\n     ['CHEM120', 'R2', 1], ['PHYS110', 'R2', 0]],\n    [1, 10, 0, 0], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [22, 16, 38]),\n  ('partial repair guard 3',\n   [[['PHYS110', 'R2', 0], ['CHEM120', 'R1', 0], ['MATH101', 'R1', 2], ['MATH101H', 'R1', 0],\n     ['PHYS110', 'R2', 2], ['MATH101', 'R1', 0], ['MATH101', 'R3', 3]],\n    [10, 10, 5, 0], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [50, 8, 58]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['PHYS110', 'R3', 2], ['MATH101H', 'R2', 1], ['MATH101H', 'R2', 1], ['CHEM120', 'R3', 0],\n     ['MATH101', 'R3', 3], ['MATH101', 'R2', 2]],\n    [0, 5, 1, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [12, 23, 35]),\n  ('normal control 7',\n   [[['MATH101H', 'R1', 2], ['MATH101H', 'R3', 0], ['MATH101H', 'R1', 0], ['MATH101H', 'R1', 3],\n     ['PHYS110', 'R1', 3], ['PHYS110', 'R2', 1]],\n    [1, 10, 0, 10], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [31, 10, 41]),\n  ('normal control 8',\n   [[['CHEM120', 'R3', 3], ['PHYS110', 'R1', 2], ['PHYS110', 'R1', 2]], [0, 1, 10, 0],\n    {'R1': 0, 'R2': 1, 'R3': 7}],\n   [10, 7, 17])],\n [('regression: room charge key 1',\n   [[['PHYS110', 'R3', 2], ['CHEM120', 'R1', 2], ['MATH101', 'R1', 2], ['CHEM120', 'R3', 3],\n     ['CHEM120', 'R1', 3], ['CHEM120', 'R3', 3]],\n    [0, 0, 5, 1], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [16, 4, 20]),\n  ('regression variant: room charge key 2',\n   [[['CHEM120', 'R3', 3], ['MATH101', 'R2', 0], ['PHYS110', 'R2', 1], ['CHEM120', 'R2', 3],\n     ['PHYS110', 'R3', 0], ['CHEM120', 'R2', 3], ['MATH101H', 'R1', 3]],\n    [1, 10, 10, 5], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [22, 13, 35]),\n  ('partial repair guard 3',\n   [[['PHYS110', 'R1', 2], ['CHEM120', 'R2', 1], ['MATH101H', 'R3', 2], ['MATH101', 'R3', 0],\n     ['CHEM120', 'R2', 1], ['MATH101H', 'R3', 1]],\n    [10, 0, 10, 0], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [30, 7, 37]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['CHEM120', 'R1', 3], ['MATH101', 'R3', 1], ['MATH101', 'R2', 0], ['MATH101H', 'R1', 1],\n     ['MATH101', 'R2', 2]],\n    [0, 10, 5, 0], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [25, 3, 28]),\n  ('normal control 7',\n   [[['MATH101H', 'R3', 1], ['MATH101H', 'R1', 1]], [0, 5, 5, 5], {'R1': 0, 'R2': 3, 'R3': 2}], [5, 2, 7]),\n  ('normal control 8',\n   [[['PHYS110', 'R3', 2], ['MATH101H', 'R2', 1], ['MATH101H', 'R2', 1], ['CHEM120', 'R3', 0],\n     ['MATH101', 'R3', 3], ['MATH101', 'R2', 2]],\n    [0, 5, 1, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [12, 23, 35])]]\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":"96ddb8048e74c9d5d18e3010a6edac8359e83fc376a4cebaaf818f5c4b4bc925","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(assign, ppen, rpen):\n    seen_exam = set()\n    seen_room = set()\n    pp = rp = 0\n    for ex, r, p in assign:\n        if (ex, p) not in seen_exam:\n            seen_exam.add((ex, p))\n            pp += ppen[p]\n        if r not in seen_room:\n            seen_room.add(r)\n            rp += rpen[r]\n    return [pp, rp, pp + rp]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: room charge key 1', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}],\n   [4, 6, 10]),\n  ('regression variant: room charge key 2',\n   [[['PHYS110', 'R2', 2], ['CHEM120', 'R3', 1], ['MATH101H', 'R2', 3], ['CHEM120', 'R2', 3],\n     ['PHYS110', 'R1', 3], ['PHYS110', 'R2', 1]],\n    [10, 10, 5, 0], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [25, 11, 36]),\n  ('partial repair guard 3',\n   [[['PHYS110', 'R3', 0], ['MATH101H', 'R3', 0], ['CHEM120', 'R1', 0], ['MATH101H', 'R2', 0],\n     ['CHEM120', 'R3', 2]],\n    [5, 10, 5, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [20, 22, 42]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('normal control 5',\n   [[['MATH101H', 'R3', 1], ['MATH101', 'R1', 2], ['MATH101', 'R2', 1], ['CHEM120', 'R2', 2]], [1, 0, 0, 1],\n    {'R1': 0, 'R2': 3, 'R3': 7}],\n   [0, 13, 13]),\n  ('normal control 6',\n   [[['MATH101', 'R2', 2], ['CHEM120', 'R1', 1], ['MATH101H', 'R3', 0], ['MATH101', 'R1', 2],\n     ['MATH101', 'R2', 2]],\n    [0, 1, 0, 10], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [1, 10, 11]),\n  ('normal control 7',\n   [[['MATH101', 'R1', 2], ['MATH101H', 'R3', 3], ['PHYS110', 'R1', 3], ['MATH101H', 'R3', 2],\n     ['MATH101', 'R2', 0]],\n    [5, 10, 1, 1], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [9, 5, 14]),\n  ('normal control 8',\n   [[['MATH101H', 'R3', 1], ['CHEM120', 'R2', 0], ['CHEM120', 'R2', 0]], [5, 10, 0, 0],\n    {'R1': 0, 'R2': 3, 'R3': 2}],\n   [15, 5, 20])],\n [('regression: room charge key 1',\n   [[['CHEM120', 'R1', 2], ['CHEM120', 'R3', 2], ['PHYS110', 'R2', 1], ['PHYS110', 'R1', 3],\n     ['MATH101', 'R1', 1], ['MATH101H', 'R2', 0]],\n    [1, 1, 0, 10], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [13, 8, 21]),\n  ('regression variant: room charge key 2',\n   [[['PHYS110', 'R3', 0], ['PHYS110', 'R1', 2], ['MATH101', 'R1', 2], ['MATH101H', 'R2', 2],\n     ['MATH101H', 'R2', 3], ['MATH101', 'R3', 1], ['CHEM120', 'R3', 3], ['PHYS110', 'R3', 0]],\n    [1, 1, 5, 10], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [37, 24, 61]),\n  ('partial repair guard 3',\n   [[['MATH101', 'R2', 1], ['PHYS110', 'R3', 1], ['MATH101H', 'R1', 2], ['PHYS110', 'R3', 3]], [1, 5, 10, 0],\n    {'R1': 0, 'R2': 1, 'R3': 7}],\n   [20, 8, 28]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['CHEM120', 'R2', 3], ['PHYS110', 'R2', 2], ['PHYS110', 'R2', 2], ['CHEM120', 'R1', 2],\n     ['MATH101H', 'R2', 2], ['PHYS110', 'R1', 2], ['MATH101H', 'R2', 2], ['CHEM120', 'R1', 2]],\n    [10, 10, 5, 1], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [16, 9, 25]),\n  ('normal control 7',\n   [[['CHEM120', 'R2', 0], ['PHYS110', 'R2', 0]], [10, 10, 1, 10], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [20, 6, 26]),\n  ('normal control 8',\n   [[['CHEM120', 'R3', 3], ['MATH101H', 'R3', 2], ['MATH101H', 'R3', 2], ['MATH101H', 'R2', 3],\n     ['MATH101H', 'R3', 2]],\n    [5, 0, 5, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [15, 15, 30])],\n [('regression: room charge key 1',\n   [[['CHEM120', 'R2', 0], ['MATH101H', 'R1', 3], ['PHYS110', 'R2', 3], ['PHYS110', 'R2', 3],\n     ['PHYS110', 'R2', 3]],\n    [1, 1, 0, 1], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [3, 2, 5]),\n  ('regression variant: room charge key 2',\n   [[['MATH101', 'R2', 1], ['PHYS110', 'R1', 0], ['MATH101', 'R3', 1], ['MATH101', 'R1', 0],\n     ['CHEM120', 'R1', 0], ['MATH101H', 'R1', 0], ['MATH101H', 'R3', 1]],\n    [0, 1, 10, 5], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [2, 5, 7]),\n  ('partial repair guard 3',\n   [[['MATH101', 'R2', 3], ['MATH101', 'R2', 0], ['PHYS110', 'R1', 2], ['PHYS110', 'R3', 3],\n     ['MATH101H', 'R3', 2], ['CHEM120', 'R3', 1]],\n    [10, 5, 5, 10], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [45, 9, 54]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['CHEM120', 'R3', 1], ['CHEM120', 'R3', 3], ['PHYS110', 'R1', 3], ['CHEM120', 'R2', 2],\n     ['CHEM120', 'R3', 1]],\n    [0, 0, 0, 0], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [0, 3, 3]),\n  ('normal control 7',\n   [[['MATH101', 'R2', 1], ['MATH101', 'R1', 0], ['CHEM120', 'R2', 3], ['MATH101H', 'R2', 0],\n     ['MATH101', 'R2', 0]],\n    [0, 1, 10, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [6, 3, 9]),\n  ('normal control 8',\n   [[['MATH101H', 'R2', 3], ['PHYS110', 'R1', 3], ['MATH101', 'R1', 2], ['CHEM120', 'R2', 3]], [5, 10, 5, 0],\n    {'R1': 0, 'R2': 1, 'R3': 7}],\n   [5, 2, 7])],\n [('regression: room charge key 1',\n   [[['CHEM120', 'R1', 2], ['MATH101', 'R2', 3], ['PHYS110', 'R2', 1], ['CHEM120', 'R1', 2]], [10, 5, 5, 1],\n    {'R1': 0, 'R2': 3, 'R3': 7}],\n   [11, 6, 17]),\n  ('regression variant: room charge key 2',\n   [[['PHYS110', 'R1', 1], ['CHEM120', 'R3', 0], ['PHYS110', 'R1', 3], ['PHYS110', 'R3', 0],\n     ['CHEM120', 'R2', 1], ['PHYS110', 'R2', 0]],\n    [1, 10, 0, 0], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [22, 16, 38]),\n  ('partial repair guard 3',\n   [[['PHYS110', 'R2', 0], ['CHEM120', 'R1', 0], ['MATH101', 'R1', 2], ['MATH101H', 'R1', 0],\n     ['PHYS110', 'R2', 2], ['MATH101', 'R1', 0], ['MATH101', 'R3', 3]],\n    [10, 10, 5, 0], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [50, 8, 58]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['PHYS110', 'R3', 2], ['MATH101H', 'R2', 1], ['MATH101H', 'R2', 1], ['CHEM120', 'R3', 0],\n     ['MATH101', 'R3', 3], ['MATH101', 'R2', 2]],\n    [0, 5, 1, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [12, 23, 35]),\n  ('normal control 7',\n   [[['MATH101H', 'R1', 2], ['MATH101H', 'R3', 0], ['MATH101H', 'R1', 0], ['MATH101H', 'R1', 3],\n     ['PHYS110', 'R1', 3], ['PHYS110', 'R2', 1]],\n    [1, 10, 0, 10], {'R1': 0, 'R2': 3, 'R3': 7}],\n   [31, 10, 41]),\n  ('normal control 8',\n   [[['CHEM120', 'R3', 3], ['PHYS110', 'R1', 2], ['PHYS110', 'R1', 2]], [0, 1, 10, 0],\n    {'R1': 0, 'R2': 1, 'R3': 7}],\n   [10, 7, 17])],\n [('regression: room charge key 1',\n   [[['PHYS110', 'R3', 2], ['CHEM120', 'R1', 2], ['MATH101', 'R1', 2], ['CHEM120', 'R3', 3],\n     ['CHEM120', 'R1', 3], ['CHEM120', 'R3', 3]],\n    [0, 0, 5, 1], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [16, 4, 20]),\n  ('regression variant: room charge key 2',\n   [[['CHEM120', 'R3', 3], ['MATH101', 'R2', 0], ['PHYS110', 'R2', 1], ['CHEM120', 'R2', 3],\n     ['PHYS110', 'R3', 0], ['CHEM120', 'R2', 3], ['MATH101H', 'R1', 3]],\n    [1, 10, 10, 5], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [22, 13, 35]),\n  ('partial repair guard 3',\n   [[['PHYS110', 'R1', 2], ['CHEM120', 'R2', 1], ['MATH101H', 'R3', 2], ['MATH101', 'R3', 0],\n     ['CHEM120', 'R2', 1], ['MATH101H', 'R3', 1]],\n    [10, 0, 10, 0], {'R1': 0, 'R2': 3, 'R3': 2}],\n   [30, 7, 37]),\n  ('boundary control 4', [[['A', 'R1', 1], ['A', 'R2', 1]], [0, 5, 0, 0], {'R1': 0, 'R2': 3}], [5, 3, 8]),\n  ('boundary control 5', [[['A', 'R2', 0], ['B', 'R2', 0]], [2, 5, 0, 0], {'R1': 0, 'R2': 3}], [4, 6, 10]),\n  ('normal control 6',\n   [[['CHEM120', 'R1', 3], ['MATH101', 'R3', 1], ['MATH101', 'R2', 0], ['MATH101H', 'R1', 1],\n     ['MATH101', 'R2', 2]],\n    [0, 10, 5, 0], {'R1': 0, 'R2': 1, 'R3': 2}],\n   [25, 3, 28]),\n  ('normal control 7',\n   [[['MATH101H', 'R3', 1], ['MATH101H', 'R1', 1]], [0, 5, 5, 5], {'R1': 0, 'R2': 3, 'R3': 2}], [5, 2, 7]),\n  ('normal control 8',\n   [[['PHYS110', 'R3', 2], ['MATH101H', 'R2', 1], ['MATH101H', 'R2', 1], ['CHEM120', 'R3', 0],\n     ['MATH101', 'R3', 3], ['MATH101', 'R2', 2]],\n    [0, 5, 1, 5], {'R1': 0, 'R2': 1, 'R3': 7}],\n   [12, 23, 35])]]\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-period-and-room-penalties-room-charge-key","generated_at":"2026-09-29T14:52:06.477369+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Period and room preferences are soft costs that must not be multiplied by exam splitting.","root_cause":"Room charges are deduplicated by room alone.","sha256":"aa959764d7b7a125e4b40b5b32e3d42c8a15d1f48bf84990eb8993773244db43","title":"Room penalty charged once per room for all exams · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.576,"exit_code":1,"observations":[{"actual":[4,3,7],"check":"regression: room charge key 1","expected":[4,6,10],"passed":false},{"actual":[25,11,36],"check":"regression variant: room charge key 2","expected":[25,11,36],"passed":true},{"actual":[20,15,35],"check":"partial repair guard 3","expected":[20,22,42],"passed":false},{"actual":[5,3,8],"check":"boundary control 4","expected":[5,3,8],"passed":true},{"actual":[0,13,13],"check":"normal control 5","expected":[0,13,13],"passed":true},{"actual":[1,10,11],"check":"normal control 6","expected":[1,10,11],"passed":true},{"actual":[9,7,16],"check":"normal control 7","expected":[9,5,14],"passed":false},{"actual":[15,5,20],"check":"normal control 8","expected":[15,5,20],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: room charge key 1\", \"actual\": [4, 3, 7], \"expected\": [4, 6, 10], \"passed\": false}, {\"check\": \"regression variant: room charge key 2\", \"actual\": [25, 11, 36], \"expected\": [25, 11, 36], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [20, 15, 35], \"expected\": [20, 22, 42], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [5, 3, 8], \"expected\": [5, 3, 8], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [0, 13, 13], \"expected\": [0, 13, 13], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [1, 10, 11], \"expected\": [1, 10, 11], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [9, 7, 16], \"expected\": [9, 5, 14], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [15, 5, 20], \"expected\": [15, 5, 20], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.619,"exit_code":1,"observations":[{"actual":[4,3,7],"check":"regression: room charge key 1","expected":[4,6,10],"passed":false},{"actual":[25,5,30],"check":"regression variant: room charge key 2","expected":[25,11,36],"passed":false},{"actual":[20,8,28],"check":"partial repair guard 3","expected":[20,22,42],"passed":false},{"actual":[5,3,8],"check":"boundary control 4","expected":[5,3,8],"passed":true},{"actual":[0,10,10],"check":"normal control 5","expected":[0,13,13],"passed":false},{"actual":[1,10,11],"check":"normal control 6","expected":[1,10,11],"passed":true},{"actual":[9,5,14],"check":"normal control 7","expected":[9,5,14],"passed":true},{"actual":[15,5,20],"check":"normal control 8","expected":[15,5,20],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: room charge key 1\", \"actual\": [4, 3, 7], \"expected\": [4, 6, 10], \"passed\": false}, {\"check\": \"regression variant: room charge key 2\", \"actual\": [25, 5, 30], \"expected\": [25, 11, 36], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [20, 8, 28], \"expected\": [20, 22, 42], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [5, 3, 8], \"expected\": [5, 3, 8], \"passed\": true}, {\"check\": \"normal control 5\", \"actual\": [0, 10, 10], \"expected\": [0, 13, 13], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [1, 10, 11], \"expected\": [1, 10, 11], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [9, 5, 14], \"expected\": [9, 5, 14], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [15, 5, 20], \"expected\": [15, 5, 20], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}