FA-94466 / Exam timetabling constraints / Open access
Empty exam rooms staffed with an invigilator · case 01
Rooms with no candidates consume invigilators.
ROOT CAUSE
The room loop staffs every room with at least one invigilator.
THE FAILURE
The room loop staffs every room with at least one invigilator.
Unsuccessful approach: Computing the ratio for empty rooms still adds the access-arrangement invigilator to them.
Case contract
rooms [room, venue, candidates, has access-arrangement candidate]. A room with candidates needs ceil(candidates / ratio) invigilators plus one if it has an access arrangement; an empty room needs none. Each venue with any invigilators also needs one chief invigilator. Return [per room, per venue including chief, grand total].
Why this case matters
Invigilation staffing follows directly from the room plan of a timetable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rooms, ratio):
per = {}
venue = {}
for r, v, n, acc in rooms:
k = 0
if n >= 0:
k = max(1, -(-n // ratio))
if acc:
k += 1
per[r] = k
venue.setdefault(v, 0)
venue[v] += k
for v in venue:
if venue[v] > 0:
venue[v] += 1
return [per, venue, sum(venue.values())]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: empty room 1', [[['R1', 'main', 0, True]], 30], [{'R1': 0}, {'main': 0}, 0]),
('regression variant: empty room 2',
[[['R0', 'main', 31, False], ['R1', 'lab', 30, False], ['R2', 'annex', 1, False],
['R3', 'annex', 25, False], ['R4', 'main', 0, False]],
25],
[{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 1, 'R4': 0}, {'main': 3, 'lab': 3, 'annex': 3}, 9]),
('partial repair guard 3', [[['R0', 'main', 0, True], ['R1', 'lab', 30, False]], 30],
[{'R0': 0, 'R1': 1}, {'main': 0, 'lab': 2}, 2]),
('boundary control 4', [[['R1', 'main', 0, False], ['R2', 'annex', 5, False]], 30],
[{'R1': 0, 'R2': 1}, {'main': 0, 'annex': 2}, 2]),
('normal control 5',
[[['R0', 'main', 25, False], ['R1', 'lab', 0, True], ['R2', 'lab', 0, False], ['R3', 'annex', 30, True],
['R4', 'main', 25, False]],
30],
[{'R0': 1, 'R1': 0, 'R2': 0, 'R3': 2, 'R4': 1}, {'main': 3, 'lab': 0, 'annex': 3}, 6]),
('normal control 6', [[['R0', 'annex', 0, False]], 25], [{'R0': 0}, {'annex': 0}, 0]),
('normal control 7',
[[['R0', 'annex', 0, False], ['R1', 'lab', 30, False], ['R2', 'main', 25, False], ['R3', 'lab', 60, False],
['R4', 'lab', 61, True]],
30],
[{'R0': 0, 'R1': 1, 'R2': 1, 'R3': 2, 'R4': 4}, {'annex': 0, 'lab': 8, 'main': 2}, 10]),
('normal control 8',
[[['R0', 'lab', 0, True], ['R1', 'lab', 0, False], ['R2', 'annex', 31, True], ['R3', 'annex', 0, False]],
25],
[{'R0': 0, 'R1': 0, 'R2': 3, 'R3': 0}, {'lab': 0, 'annex': 4}, 4])],
[('regression: empty room 1', [[['R1', 'main', 0, False], ['R2', 'annex', 5, False]], 30],
[{'R1': 0, 'R2': 1}, {'main': 0, 'annex': 2}, 2]),
('regression variant: empty room 2',
[[['R0', 'annex', 15, False], ['R1', 'main', 0, False], ['R2', 'main', 61, False]], 25],
[{'R0': 1, 'R1': 0, 'R2': 3}, {'annex': 2, 'main': 4}, 6]),
('partial repair guard 3',
[[['R0', 'lab', 0, True], ['R1', 'lab', 0, False], ['R2', 'annex', 31, True], ['R3', 'annex', 0, False]],
25],
[{'R0': 0, 'R1': 0, 'R2': 3, 'R3': 0}, {'lab': 0, 'annex': 4}, 4]),
('boundary control 4', [[['R1', 'main', 31, False]], 30], [{'R1': 2}, {'main': 3}, 3]),
('normal control 5',
[[['R0', 'lab', 1, False], ['R1', 'main', 60, False], ['R2', 'annex', 15, False],
['R3', 'main', 15, False]],
25],
[{'R0': 1, 'R1': 3, 'R2': 1, 'R3': 1}, {'lab': 2, 'main': 5, 'annex': 2}, 9]),
('normal control 6', [[['R0', 'main', 61, False], ['R1', 'lab', 25, True], ['R2', 'main', 0, False]], 25],
[{'R0': 3, 'R1': 2, 'R2': 0}, {'main': 4, 'lab': 3}, 7]),
('normal control 7',
[[['R0', 'main', 0, True], ['R1', 'lab', 1, False], ['R2', 'main', 60, True], ['R3', 'annex', 60, False]],
30],
[{'R0': 0, 'R1': 1, 'R2': 3, 'R3': 2}, {'main': 4, 'lab': 2, 'annex': 3}, 9]),
('normal control 8',
[[['R0', 'lab', 31, False], ['R1', 'lab', 30, False], ['R2', 'annex', 30, False],
['R3', 'main', 61, False]],
25],
[{'R0': 2, 'R1': 2, 'R2': 2, 'R3': 3}, {'lab': 5, 'annex': 3, 'main': 4}, 12])],
[('regression: empty room 1', [[['R0', 'lab', 0, False]], 25], [{'R0': 0}, {'lab': 0}, 0]),
('regression variant: empty room 2', [[['R0', 'main', 60, False], ['R1', 'main', 0, True]], 25],
[{'R0': 3, 'R1': 0}, {'main': 4}, 4]),
('partial repair guard 3',
[[['R0', 'annex', 0, True], ['R1', 'main', 0, False], ['R2', 'annex', 25, False]], 25],
[{'R0': 0, 'R1': 0, 'R2': 1}, {'annex': 2, 'main': 0}, 2]),
('boundary control 4', [[['R1', 'main', 12, True], ['R2', 'main', 40, False]], 25],
[{'R1': 2, 'R2': 2}, {'main': 5}, 5]),
('normal control 5', [[['R0', 'lab', 0, False], ['R1', 'lab', 0, False]], 30],
[{'R0': 0, 'R1': 0}, {'lab': 0}, 0]),
('normal control 6',
[[['R0', 'main', 30, True], ['R1', 'annex', 61, False], ['R2', 'main', 0, True], ['R3', 'main', 30, True]],
30],
[{'R0': 2, 'R1': 3, 'R2': 0, 'R3': 2}, {'main': 5, 'annex': 4}, 9]),
('normal control 7',
[[['R0', 'main', 60, False], ['R1', 'main', 0, False], ['R2', 'lab', 15, True],
['R3', 'annex', 30, False]],
30],
[{'R0': 2, 'R1': 0, 'R2': 2, 'R3': 1}, {'main': 3, 'lab': 3, 'annex': 2}, 8]),
('normal control 8', [[['R0', 'main', 60, True], ['R1', 'lab', 61, False], ['R2', 'lab', 25, False]], 30],
[{'R0': 3, 'R1': 3, 'R2': 1}, {'main': 4, 'lab': 5}, 9])],
[('regression: empty room 1',
[[['R0', 'main', 0, False], ['R1', 'main', 60, False], ['R2', 'main', 0, False],
['R3', 'annex', 30, False]],
30],
[{'R0': 0, 'R1': 2, 'R2': 0, 'R3': 1}, {'main': 3, 'annex': 2}, 5]),
('regression variant: empty room 2',
[[['R0', 'main', 25, False], ['R1', 'lab', 0, False], ['R2', 'main', 1, False], ['R3', 'main', 60, True],
['R4', 'main', 15, True]],
25],
[{'R0': 1, 'R1': 0, 'R2': 1, 'R3': 4, 'R4': 2}, {'main': 9, 'lab': 0}, 9]),
('partial repair guard 3',
[[['R0', 'annex', 1, True], ['R1', 'annex', 25, False], ['R2', 'lab', 0, True], ['R3', 'lab', 30, False]],
30],
[{'R0': 2, 'R1': 1, 'R2': 0, 'R3': 1}, {'annex': 4, 'lab': 2}, 6]),
('boundary control 4', [[['R1', 'main', 0, True]], 30], [{'R1': 0}, {'main': 0}, 0]),
('normal control 5',
[[['R0', 'main', 60, True], ['R1', 'lab', 30, False], ['R2', 'lab', 0, False], ['R3', 'main', 0, False]],
25],
[{'R0': 4, 'R1': 2, 'R2': 0, 'R3': 0}, {'main': 5, 'lab': 3}, 8]),
('normal control 6',
[[['R0', 'main', 31, False], ['R1', 'annex', 0, False], ['R2', 'lab', 0, False],
['R3', 'annex', 0, False]],
25],
[{'R0': 2, 'R1': 0, 'R2': 0, 'R3': 0}, {'main': 3, 'annex': 0, 'lab': 0}, 3]),
('normal control 7', [[['R0', 'main', 15, False], ['R1', 'annex', 60, False]], 30],
[{'R0': 1, 'R1': 2}, {'main': 2, 'annex': 3}, 5]),
('normal control 8', [[['R0', 'main', 60, False], ['R1', 'lab', 61, False], ['R2', 'lab', 61, False]], 30],
[{'R0': 2, 'R1': 3, 'R2': 3}, {'main': 3, 'lab': 7}, 10])],
[('regression: empty room 1', [[['R0', 'main', 0, False], ['R1', 'annex', 60, True]], 25],
[{'R0': 0, 'R1': 4}, {'main': 0, 'annex': 5}, 5]),
('regression variant: empty room 2',
[[['R0', 'lab', 15, True], ['R1', 'annex', 60, False], ['R2', 'lab', 30, False], ['R3', 'main', 0, False]],
30],
[{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 0}, {'lab': 4, 'annex': 3, 'main': 0}, 7]),
('partial repair guard 3',
[[['R0', 'lab', 25, False], ['R1', 'lab', 60, False], ['R2', 'main', 1, False], ['R3', 'main', 31, True],
['R4', 'main', 0, True]],
25],
[{'R0': 1, 'R1': 3, 'R2': 1, 'R3': 3, 'R4': 0}, {'lab': 5, 'main': 5}, 10]),
('boundary control 4', [[['R1', 'main', 30, False]], 30], [{'R1': 1}, {'main': 2}, 2]),
('normal control 5',
[[['R0', 'annex', 0, False], ['R1', 'main', 30, True], ['R2', 'annex', 15, False],
['R3', 'main', 1, False]],
25],
[{'R0': 0, 'R1': 3, 'R2': 1, 'R3': 1}, {'annex': 2, 'main': 5}, 7]),
('normal control 6',
[[['R0', 'main', 0, True], ['R1', 'lab', 1, False], ['R2', 'main', 60, True], ['R3', 'annex', 60, False]],
30],
[{'R0': 0, 'R1': 1, 'R2': 3, 'R3': 2}, {'main': 4, 'lab': 2, 'annex': 3}, 9]),
('normal control 7',
[[['R0', 'annex', 61, True], ['R1', 'lab', 0, False], ['R2', 'annex', 60, True], ['R3', 'lab', 25, False]],
30],
[{'R0': 4, 'R1': 0, 'R2': 3, 'R3': 1}, {'annex': 8, 'lab': 2}, 10]),
('normal control 8', [[['R0', 'main', 31, False], ['R1', 'main', 0, True]], 30],
[{'R0': 2, 'R1': 0}, {'main': 3}, 3])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: empty room 1 | [{'R1': 2}, {'main': 3}, 3] | [{'R1': 0}, {'main': 0}, 0] | Failed |
| regression variant: empty room 2 | [{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 1, 'R4': 1}, {'annex': 3, 'lab': 3, 'main': 4}, 10] | [{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 1, 'R4': 0}, {'annex': 3, 'lab': 3, 'main': 3}, 9] | Failed |
| partial repair guard 3 | [{'R0': 2, 'R1': 1}, {'lab': 2, 'main': 3}, 5] | [{'R0': 0, 'R1': 1}, {'lab': 2, 'main': 0}, 2] | Failed |
| boundary control 4 | [{'R1': 1, 'R2': 1}, {'annex': 2, 'main': 2}, 4] | [{'R1': 0, 'R2': 1}, {'annex': 2, 'main': 0}, 2] | Failed |
| normal control 5 | [{'R0': 1, 'R1': 2, 'R2': 1, 'R3': 2, 'R4': 1}, {'annex': 3, 'lab': 4, 'main': 3}, 10] | [{'R0': 1, 'R1': 0, 'R2': 0, 'R3': 2, 'R4': 1}, {'annex': 3, 'lab': 0, 'main': 3}, 6] | Failed |
| normal control 6 | [{'R0': 1}, {'annex': 2}, 2] | [{'R0': 0}, {'annex': 0}, 0] | Failed |
| normal control 7 | [{'R0': 1, 'R1': 1, 'R2': 1, 'R3': 2, 'R4': 4}, {'annex': 2, 'lab': 8, 'main': 2}, 12] | [{'R0': 0, 'R1': 1, 'R2': 1, 'R3': 2, 'R4': 4}, {'annex': 0, 'lab': 8, 'main': 2}, 10] | Failed |
| normal control 8 | [{'R0': 2, 'R1': 1, 'R2': 3, 'R3': 1}, {'annex': 5, 'lab': 4}, 9] | [{'R0': 0, 'R1': 0, 'R2': 3, 'R3': 0}, {'annex': 4, 'lab': 0}, 4] | Failed |
SHA-256 / 7198cb046672fac36345ddbce063e53f02b80ea2aefa7e209bd4528ee7604e72
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rooms, ratio):
per = {}
venue = {}
for r, v, n, acc in rooms:
k = 0
if n >= 0:
k = -(-n // ratio)
if acc:
k += 1
per[r] = k
venue.setdefault(v, 0)
venue[v] += k
for v in venue:
if venue[v] > 0:
venue[v] += 1
return [per, venue, sum(venue.values())]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: empty room 1', [[['R1', 'main', 0, True]], 30], [{'R1': 0}, {'main': 0}, 0]),
('regression variant: empty room 2',
[[['R0', 'main', 31, False], ['R1', 'lab', 30, False], ['R2', 'annex', 1, False],
['R3', 'annex', 25, False], ['R4', 'main', 0, False]],
25],
[{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 1, 'R4': 0}, {'main': 3, 'lab': 3, 'annex': 3}, 9]),
('partial repair guard 3', [[['R0', 'main', 0, True], ['R1', 'lab', 30, False]], 30],
[{'R0': 0, 'R1': 1}, {'main': 0, 'lab': 2}, 2]),
('boundary control 4', [[['R1', 'main', 0, False], ['R2', 'annex', 5, False]], 30],
[{'R1': 0, 'R2': 1}, {'main': 0, 'annex': 2}, 2]),
('normal control 5',
[[['R0', 'main', 25, False], ['R1', 'lab', 0, True], ['R2', 'lab', 0, False], ['R3', 'annex', 30, True],
['R4', 'main', 25, False]],
30],
[{'R0': 1, 'R1': 0, 'R2': 0, 'R3': 2, 'R4': 1}, {'main': 3, 'lab': 0, 'annex': 3}, 6]),
('normal control 6', [[['R0', 'annex', 0, False]], 25], [{'R0': 0}, {'annex': 0}, 0]),
('normal control 7',
[[['R0', 'annex', 0, False], ['R1', 'lab', 30, False], ['R2', 'main', 25, False], ['R3', 'lab', 60, False],
['R4', 'lab', 61, True]],
30],
[{'R0': 0, 'R1': 1, 'R2': 1, 'R3': 2, 'R4': 4}, {'annex': 0, 'lab': 8, 'main': 2}, 10]),
('normal control 8',
[[['R0', 'lab', 0, True], ['R1', 'lab', 0, False], ['R2', 'annex', 31, True], ['R3', 'annex', 0, False]],
25],
[{'R0': 0, 'R1': 0, 'R2': 3, 'R3': 0}, {'lab': 0, 'annex': 4}, 4])],
[('regression: empty room 1', [[['R1', 'main', 0, False], ['R2', 'annex', 5, False]], 30],
[{'R1': 0, 'R2': 1}, {'main': 0, 'annex': 2}, 2]),
('regression variant: empty room 2',
[[['R0', 'annex', 15, False], ['R1', 'main', 0, False], ['R2', 'main', 61, False]], 25],
[{'R0': 1, 'R1': 0, 'R2': 3}, {'annex': 2, 'main': 4}, 6]),
('partial repair guard 3',
[[['R0', 'lab', 0, True], ['R1', 'lab', 0, False], ['R2', 'annex', 31, True], ['R3', 'annex', 0, False]],
25],
[{'R0': 0, 'R1': 0, 'R2': 3, 'R3': 0}, {'lab': 0, 'annex': 4}, 4]),
('boundary control 4', [[['R1', 'main', 31, False]], 30], [{'R1': 2}, {'main': 3}, 3]),
('normal control 5',
[[['R0', 'lab', 1, False], ['R1', 'main', 60, False], ['R2', 'annex', 15, False],
['R3', 'main', 15, False]],
25],
[{'R0': 1, 'R1': 3, 'R2': 1, 'R3': 1}, {'lab': 2, 'main': 5, 'annex': 2}, 9]),
('normal control 6', [[['R0', 'main', 61, False], ['R1', 'lab', 25, True], ['R2', 'main', 0, False]], 25],
[{'R0': 3, 'R1': 2, 'R2': 0}, {'main': 4, 'lab': 3}, 7]),
('normal control 7',
[[['R0', 'main', 0, True], ['R1', 'lab', 1, False], ['R2', 'main', 60, True], ['R3', 'annex', 60, False]],
30],
[{'R0': 0, 'R1': 1, 'R2': 3, 'R3': 2}, {'main': 4, 'lab': 2, 'annex': 3}, 9]),
('normal control 8',
[[['R0', 'lab', 31, False], ['R1', 'lab', 30, False], ['R2', 'annex', 30, False],
['R3', 'main', 61, False]],
25],
[{'R0': 2, 'R1': 2, 'R2': 2, 'R3': 3}, {'lab': 5, 'annex': 3, 'main': 4}, 12])],
[('regression: empty room 1', [[['R0', 'lab', 0, False]], 25], [{'R0': 0}, {'lab': 0}, 0]),
('regression variant: empty room 2', [[['R0', 'main', 60, False], ['R1', 'main', 0, True]], 25],
[{'R0': 3, 'R1': 0}, {'main': 4}, 4]),
('partial repair guard 3',
[[['R0', 'annex', 0, True], ['R1', 'main', 0, False], ['R2', 'annex', 25, False]], 25],
[{'R0': 0, 'R1': 0, 'R2': 1}, {'annex': 2, 'main': 0}, 2]),
('boundary control 4', [[['R1', 'main', 12, True], ['R2', 'main', 40, False]], 25],
[{'R1': 2, 'R2': 2}, {'main': 5}, 5]),
('normal control 5', [[['R0', 'lab', 0, False], ['R1', 'lab', 0, False]], 30],
[{'R0': 0, 'R1': 0}, {'lab': 0}, 0]),
('normal control 6',
[[['R0', 'main', 30, True], ['R1', 'annex', 61, False], ['R2', 'main', 0, True], ['R3', 'main', 30, True]],
30],
[{'R0': 2, 'R1': 3, 'R2': 0, 'R3': 2}, {'main': 5, 'annex': 4}, 9]),
('normal control 7',
[[['R0', 'main', 60, False], ['R1', 'main', 0, False], ['R2', 'lab', 15, True],
['R3', 'annex', 30, False]],
30],
[{'R0': 2, 'R1': 0, 'R2': 2, 'R3': 1}, {'main': 3, 'lab': 3, 'annex': 2}, 8]),
('normal control 8', [[['R0', 'main', 60, True], ['R1', 'lab', 61, False], ['R2', 'lab', 25, False]], 30],
[{'R0': 3, 'R1': 3, 'R2': 1}, {'main': 4, 'lab': 5}, 9])],
[('regression: empty room 1',
[[['R0', 'main', 0, False], ['R1', 'main', 60, False], ['R2', 'main', 0, False],
['R3', 'annex', 30, False]],
30],
[{'R0': 0, 'R1': 2, 'R2': 0, 'R3': 1}, {'main': 3, 'annex': 2}, 5]),
('regression variant: empty room 2',
[[['R0', 'main', 25, False], ['R1', 'lab', 0, False], ['R2', 'main', 1, False], ['R3', 'main', 60, True],
['R4', 'main', 15, True]],
25],
[{'R0': 1, 'R1': 0, 'R2': 1, 'R3': 4, 'R4': 2}, {'main': 9, 'lab': 0}, 9]),
('partial repair guard 3',
[[['R0', 'annex', 1, True], ['R1', 'annex', 25, False], ['R2', 'lab', 0, True], ['R3', 'lab', 30, False]],
30],
[{'R0': 2, 'R1': 1, 'R2': 0, 'R3': 1}, {'annex': 4, 'lab': 2}, 6]),
('boundary control 4', [[['R1', 'main', 0, True]], 30], [{'R1': 0}, {'main': 0}, 0]),
('normal control 5',
[[['R0', 'main', 60, True], ['R1', 'lab', 30, False], ['R2', 'lab', 0, False], ['R3', 'main', 0, False]],
25],
[{'R0': 4, 'R1': 2, 'R2': 0, 'R3': 0}, {'main': 5, 'lab': 3}, 8]),
('normal control 6',
[[['R0', 'main', 31, False], ['R1', 'annex', 0, False], ['R2', 'lab', 0, False],
['R3', 'annex', 0, False]],
25],
[{'R0': 2, 'R1': 0, 'R2': 0, 'R3': 0}, {'main': 3, 'annex': 0, 'lab': 0}, 3]),
('normal control 7', [[['R0', 'main', 15, False], ['R1', 'annex', 60, False]], 30],
[{'R0': 1, 'R1': 2}, {'main': 2, 'annex': 3}, 5]),
('normal control 8', [[['R0', 'main', 60, False], ['R1', 'lab', 61, False], ['R2', 'lab', 61, False]], 30],
[{'R0': 2, 'R1': 3, 'R2': 3}, {'main': 3, 'lab': 7}, 10])],
[('regression: empty room 1', [[['R0', 'main', 0, False], ['R1', 'annex', 60, True]], 25],
[{'R0': 0, 'R1': 4}, {'main': 0, 'annex': 5}, 5]),
('regression variant: empty room 2',
[[['R0', 'lab', 15, True], ['R1', 'annex', 60, False], ['R2', 'lab', 30, False], ['R3', 'main', 0, False]],
30],
[{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 0}, {'lab': 4, 'annex': 3, 'main': 0}, 7]),
('partial repair guard 3',
[[['R0', 'lab', 25, False], ['R1', 'lab', 60, False], ['R2', 'main', 1, False], ['R3', 'main', 31, True],
['R4', 'main', 0, True]],
25],
[{'R0': 1, 'R1': 3, 'R2': 1, 'R3': 3, 'R4': 0}, {'lab': 5, 'main': 5}, 10]),
('boundary control 4', [[['R1', 'main', 30, False]], 30], [{'R1': 1}, {'main': 2}, 2]),
('normal control 5',
[[['R0', 'annex', 0, False], ['R1', 'main', 30, True], ['R2', 'annex', 15, False],
['R3', 'main', 1, False]],
25],
[{'R0': 0, 'R1': 3, 'R2': 1, 'R3': 1}, {'annex': 2, 'main': 5}, 7]),
('normal control 6',
[[['R0', 'main', 0, True], ['R1', 'lab', 1, False], ['R2', 'main', 60, True], ['R3', 'annex', 60, False]],
30],
[{'R0': 0, 'R1': 1, 'R2': 3, 'R3': 2}, {'main': 4, 'lab': 2, 'annex': 3}, 9]),
('normal control 7',
[[['R0', 'annex', 61, True], ['R1', 'lab', 0, False], ['R2', 'annex', 60, True], ['R3', 'lab', 25, False]],
30],
[{'R0': 4, 'R1': 0, 'R2': 3, 'R3': 1}, {'annex': 8, 'lab': 2}, 10]),
('normal control 8', [[['R0', 'main', 31, False], ['R1', 'main', 0, True]], 30],
[{'R0': 2, 'R1': 0}, {'main': 3}, 3])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: empty room 1 | [{'R1': 1}, {'main': 2}, 2] | [{'R1': 0}, {'main': 0}, 0] | Failed |
| regression variant: empty room 2 | [{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 1, 'R4': 0}, {'annex': 3, 'lab': 3, 'main': 3}, 9] | [{'R0': 2, 'R1': 2, 'R2': 1, 'R3': 1, 'R4': 0}, {'annex': 3, 'lab': 3, 'main': 3}, 9] | Passed |
| partial repair guard 3 | [{'R0': 1, 'R1': 1}, {'lab': 2, 'main': 2}, 4] | [{'R0': 0, 'R1': 1}, {'lab': 2, 'main': 0}, 2] | Failed |
| boundary control 4 | [{'R1': 0, 'R2': 1}, {'annex': 2, 'main': 0}, 2] | [{'R1': 0, 'R2': 1}, {'annex': 2, 'main': 0}, 2] | Passed |
| normal control 5 | [{'R0': 1, 'R1': 1, 'R2': 0, 'R3': 2, 'R4': 1}, {'annex': 3, 'lab': 2, 'main': 3}, 8] | [{'R0': 1, 'R1': 0, 'R2': 0, 'R3': 2, 'R4': 1}, {'annex': 3, 'lab': 0, 'main': 3}, 6] | Failed |
| normal control 6 | [{'R0': 0}, {'annex': 0}, 0] | [{'R0': 0}, {'annex': 0}, 0] | Passed |
| normal control 7 | [{'R0': 0, 'R1': 1, 'R2': 1, 'R3': 2, 'R4': 4}, {'annex': 0, 'lab': 8, 'main': 2}, 10] | [{'R0': 0, 'R1': 1, 'R2': 1, 'R3': 2, 'R4': 4}, {'annex': 0, 'lab': 8, 'main': 2}, 10] | Passed |
| normal control 8 | [{'R0': 1, 'R1': 0, 'R2': 3, 'R3': 0}, {'annex': 4, 'lab': 2}, 6] | [{'R0': 0, 'R1': 0, 'R2': 3, 'R3': 0}, {'annex': 4, 'lab': 0}, 4] | Failed |
SHA-256 / f4247a2f33119bfa15594bb9ce0f1c771317b41be7e9bcc841c0ce7e97e2aacb
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:52:04.609989+00:00.
Case digest / 32ebd9ad52b9813f4d91e302f9ed1fad4f1e7f0cf4c7752191d45498f0b96461