FAILURE MAP
← Case archive

FA-94411 / Exam timetabling constraints / Open access

Exams placed smallest first · case 01

Large exams are left for last and fail to find rooms.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The placement order sorts by ascending size.

THE FAILURE

The placement order sorts by ascending size.

Unsuccessful approach: Sorting by duration ignores exam size.

Case contract

exams [id, size, duration, splittable], rooms [id, capacity]. Exams are placed largest first (ties by id). A room is compatible if empty or holding only exams of the same duration. Place whole in the compatible room with the least sufficient remaining capacity (ties by id); else if splittable and compatible rooms have enough total space, fill them by descending remaining capacity (ties by id), skipping full rooms; else unplaced. Return placements and unplaced ids.

Why this case matters

Room allocation rules (mixed durations, best fit, splitting) are the second hard-constraint family of exam timetabling.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(exams, rooms):
    rem = {r: c for r, c in rooms}
    dur = {}
    place = {}
    unplaced = []
    for eid, size, d, split in sorted(exams, key=lambda x: (x[1], x[0])):
        ok = [r for r in rem if dur.get(r, d) == d]
        fit = [r for r in ok if rem[r] >= size]
        if fit:
            r = min(fit, key=lambda r: (rem[r], r))
            place[eid] = [[r, size]]
            rem[r] -= size
            dur[r] = d
            continue
        if split and sum(rem[r] for r in ok) >= size:
            parts = []
            left = size
            for r in sorted(ok, key=lambda r: (-rem[r], r)):
                if left == 0:
                    break
                take = min(rem[r], left)
                parts.append([r, take])
                rem[r] -= take
                dur[r] = d
                left -= take
            place[eid] = parts
            continue
        unplaced.append(eid)
    return {'placed': place, 'unplaced': unplaced}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: placement order 1',
   [[['A', 40, 120, False], ['B', 20, 120, False]], [['R1', 60], ['R2', 40]]],
   {'placed': {'A': [['R2', 40]], 'B': [['R1', 20]]}, 'unplaced': []}),
  ('regression variant: placement order 2',
   [[['E0', 80, 120, True], ['E1', 80, 120, True], ['E2', 20, 180, True], ['E3', 10, 90, True],
     ['E4', 80, 180, True]],
    [['R0', 50], ['R1', 60], ['R2', 60]]],
   {'placed': {'E0': [['R1', 60], ['R2', 20]], 'E1': [['R0', 50], ['R2', 30]]},
    'unplaced': ['E4', 'E2', 'E3']}),
  ('normal control 3', [[['E0', 45, 180, True], ['E1', 60, 120, True]], [['R0', 20], ['R1', 40]]],
   {'placed': {'E1': [['R1', 40], ['R0', 20]]}, 'unplaced': ['E0']}),
  ('normal control 4',
   [[['E0', 20, 120, False], ['E1', 20, 180, False], ['E2', 30, 180, False]], [['R0', 50], ['R1', 30]]],
   {'placed': {'E2': [['R1', 30]], 'E0': [['R0', 20]]}, 'unplaced': ['E1']}),
  ('normal control 5',
   [[['E0', 30, 120, True], ['E1', 20, 120, True], ['E2', 10, 180, False], ['E3', 60, 120, False]],
    [['R0', 20], ['R1', 60], ['R2', 20], ['R3', 50]]],
   {'placed': {'E3': [['R1', 60]], 'E0': [['R3', 30]], 'E1': [['R0', 20]], 'E2': [['R2', 10]]},
    'unplaced': []}),
  ('normal control 6',
   [[['E0', 30, 90, True], ['E1', 30, 120, True], ['E2', 80, 120, False]],
    [['R0', 60], ['R1', 50], ['R2', 20], ['R3', 40]]],
   {'placed': {'E0': [['R3', 30]], 'E1': [['R1', 30]]}, 'unplaced': ['E2']}),
  ('normal control 7',
   [[['E0', 45, 90, False], ['E1', 20, 120, True], ['E2', 30, 120, True], ['E3', 20, 180, True]],
    [['R0', 50], ['R1', 60]]],
   {'placed': {'E0': [['R0', 45]], 'E2': [['R1', 30]], 'E1': [['R1', 20]]}, 'unplaced': ['E3']}),
  ('normal control 8',
   [[['E0', 10, 120, False], ['E1', 10, 120, True], ['E2', 45, 120, True]],
    [['R0', 40], ['R1', 40], ['R2', 40], ['R3', 50]]],
   {'placed': {'E2': [['R3', 45]], 'E0': [['R0', 10]], 'E1': [['R0', 10]]}, 'unplaced': []})],
 [('regression: placement order 1',
   [[['E0', 45, 90, False], ['E1', 45, 120, False], ['E2', 80, 120, True], ['E3', 80, 180, True],
     ['E4', 30, 180, False]],
    [['R0', 50], ['R1', 50], ['R2', 50], ['R3', 30]]],
   {'placed': {'E2': [['R0', 50], ['R1', 30]], 'E3': [['R2', 50], ['R3', 30]]},
    'unplaced': ['E0', 'E1', 'E4']}),
  ('regression variant: placement order 2',
   [[['E0', 80, 120, True], ['E1', 10, 120, False], ['E2', 80, 90, False], ['E3', 45, 120, True]],
    [['R0', 50], ['R1', 20], ['R2', 40]]],
   {'placed': {'E0': [['R0', 50], ['R2', 30]], 'E1': [['R2', 10]]}, 'unplaced': ['E2', 'E3']}),
  ('boundary control 3', [[['A', 50, 120, True]], [['R1', 30], ['R2', 20]]],
   {'placed': {'A': [['R1', 30], ['R2', 20]]}, 'unplaced': []}),
  ('normal control 4', [[['E0', 45, 120, True], ['E1', 30, 180, True]], [['R0', 20], ['R1', 50], ['R2', 30]]],
   {'placed': {'E0': [['R1', 45]], 'E1': [['R2', 30]]}, 'unplaced': []}),
  ('normal control 5',
   [[['E0', 45, 90, False], ['E1', 60, 120, False], ['E2', 60, 90, True], ['E3', 10, 90, True]],
    [['R0', 30], ['R1', 40], ['R2', 40], ['R3', 60]]],
   {'placed': {'E1': [['R3', 60]], 'E2': [['R1', 40], ['R2', 20]], 'E3': [['R2', 10]]}, 'unplaced': ['E0']}),
  ('normal control 6',
   [[['E0', 20, 90, False], ['E1', 10, 180, True], ['E2', 45, 120, True]], [['R0', 20], ['R1', 40]]],
   {'placed': {'E2': [['R1', 40], ['R0', 5]]}, 'unplaced': ['E0', 'E1']}),
  ('normal control 7',
   [[['E0', 20, 120, False], ['E1', 20, 120, True]], [['R0', 60], ['R1', 50], ['R2', 40], ['R3', 30]]],
   {'placed': {'E0': [['R3', 20]], 'E1': [['R2', 20]]}, 'unplaced': []}),
  ('normal control 8',
   [[['E0', 10, 180, True], ['E1', 10, 120, True], ['E2', 45, 120, False], ['E3', 80, 90, False]],
    [['R0', 50], ['R1', 60]]],
   {'placed': {'E2': [['R0', 45]], 'E0': [['R1', 10]]}, 'unplaced': ['E3', 'E1']})],
 [('regression: placement order 1',
   [[['E0', 30, 90, True], ['E1', 45, 90, True], ['E2', 20, 90, False]],
    [['R0', 60], ['R1', 30], ['R2', 30]]],
   {'placed': {'E1': [['R0', 45]], 'E0': [['R1', 30]], 'E2': [['R2', 20]]}, 'unplaced': []}),
  ('regression variant: placement order 2',
   [[['E0', 10, 180, False], ['E1', 20, 120, False], ['E2', 45, 120, False]],
    [['R0', 30], ['R1', 20], ['R2', 40]]],
   {'placed': {'E1': [['R1', 20]], 'E0': [['R0', 10]]}, 'unplaced': ['E2']}),
  ('partial repair guard 3',
   [[['E0', 30, 180, True], ['E1', 80, 120, True], ['E2', 10, 120, False], ['E3', 30, 120, True],
     ['E4', 80, 180, True]],
    [['R0', 30], ['R1', 40], ['R2', 20]]],
   {'placed': {'E1': [['R1', 40], ['R0', 30], ['R2', 10]], 'E2': [['R2', 10]]},
    'unplaced': ['E4', 'E0', 'E3']}),
  ('boundary control 4', [[['A', 30, 120, True], ['B', 30, 120, True]], [['R1', 30], ['R2', 40]]],
   {'placed': {'A': [['R1', 30]], 'B': [['R2', 30]]}, 'unplaced': []}),
  ('normal control 5',
   [[['E0', 45, 120, False], ['E1', 45, 90, False], ['E2', 80, 90, True], ['E3', 60, 90, False],
     ['E4', 80, 180, True]],
    [['R0', 60], ['R1', 20], ['R2', 20]]],
   {'placed': {'E2': [['R0', 60], ['R1', 20]]}, 'unplaced': ['E4', 'E3', 'E0', 'E1']}),
  ('normal control 6',
   [[['E0', 10, 90, True], ['E1', 10, 120, True], ['E2', 45, 180, True], ['E3', 60, 120, False]],
    [['R0', 40], ['R1', 20]]],
   {'placed': {'E2': [['R0', 40], ['R1', 5]]}, 'unplaced': ['E3', 'E0', 'E1']}),
  ('normal control 7',
   [[['E0', 10, 120, False], ['E1', 80, 180, True], ['E2', 20, 90, True]],
    [['R0', 30], ['R1', 40], ['R2', 60]]],
   {'placed': {'E1': [['R2', 60], ['R1', 20]], 'E2': [['R0', 20]]}, 'unplaced': ['E0']}),
  ('normal control 8',
   [[['E0', 60, 120, False], ['E1', 45, 180, True], ['E2', 60, 180, True], ['E3', 30, 120, True],
     ['E4', 20, 180, True]],
    [['R0', 40], ['R1', 60]]],
   {'placed': {'E0': [['R1', 60]], 'E3': [['R0', 30]]}, 'unplaced': ['E2', 'E1', 'E4']})],
 [('regression: placement order 1',
   [[['E0', 10, 120, True], ['E1', 80, 120, True], ['E2', 45, 180, False], ['E3', 60, 120, True]],
    [['R0', 40], ['R1', 30], ['R2', 60]]],
   {'placed': {'E1': [['R2', 60], ['R0', 20]], 'E0': [['R0', 10]]}, 'unplaced': ['E3', 'E2']}),
  ('regression variant: placement order 2',
   [[['E0', 80, 120, False], ['E1', 60, 180, True], ['E2', 60, 180, False], ['E3', 30, 120, False],
     ['E4', 60, 120, True]],
    [['R0', 50], ['R1', 50], ['R2', 40], ['R3', 50]]],
   {'placed': {'E1': [['R0', 50], ['R1', 10]], 'E4': [['R3', 50], ['R2', 10]], 'E3': [['R2', 30]]},
    'unplaced': ['E0', 'E2']}),
  ('partial repair guard 3',
   [[['E0', 80, 120, True], ['E1', 20, 120, False], ['E2', 45, 180, False], ['E3', 30, 120, True],
     ['E4', 45, 90, True]],
    [['R0', 50], ['R1', 60], ['R2', 30]]],
   {'placed': {'E0': [['R1', 60], ['R0', 20]], 'E3': [['R0', 30]], 'E1': [['R2', 20]]},
    'unplaced': ['E2', 'E4']}),
  ('boundary control 4', [[['A', 50, 120, True]], [['R1', 30], ['R2', 19]]],
   {'placed': {}, 'unplaced': ['A']}),
  ('normal control 5',
   [[['E0', 20, 120, False], ['E1', 80, 180, False], ['E2', 20, 90, True], ['E3', 10, 120, False]],
    [['R0', 50], ['R1', 50], ['R2', 50]]],
   {'placed': {'E0': [['R0', 20]], 'E2': [['R1', 20]], 'E3': [['R0', 10]]}, 'unplaced': ['E1']}),
  ('normal control 6',
   [[['E0', 10, 180, False], ['E1', 10, 120, True]], [['R0', 20], ['R1', 30], ['R2', 60]]],
   {'placed': {'E0': [['R0', 10]], 'E1': [['R1', 10]]}, 'unplaced': []}),
  ('normal control 7',
   [[['E0', 80, 180, True], ['E1', 10, 180, True], ['E2', 60, 90, False], ['E3', 30, 120, True]],
    [['R0', 30], ['R1', 40]]],
   {'placed': {'E3': [['R0', 30]], 'E1': [['R1', 10]]}, 'unplaced': ['E0', 'E2']}),
  ('normal control 8',
   [[['E0', 20, 90, True], ['E1', 10, 120, True], ['E2', 30, 90, True]],
    [['R0', 30], ['R1', 30], ['R2', 50]]],
   {'placed': {'E2': [['R0', 30]], 'E0': [['R1', 20]], 'E1': [['R2', 10]]}, 'unplaced': []})],
 [('regression: placement order 1',
   [[['E0', 80, 90, False], ['E1', 60, 120, True], ['E2', 80, 120, True], ['E3', 60, 120, True],
     ['E4', 30, 180, False]],
    [['R0', 20], ['R1', 20], ['R2', 20], ['R3', 40]]],
   {'placed': {'E2': [['R3', 40], ['R0', 20], ['R1', 20]]}, 'unplaced': ['E0', 'E1', 'E3', 'E4']}),
  ('regression variant: placement order 2',
   [[['E0', 30, 120, False], ['E1', 30, 120, True], ['E2', 45, 120, True], ['E3', 45, 180, True],
     ['E4', 20, 90, True]],
    [['R0', 40], ['R1', 40]]],
   {'placed': {'E2': [['R0', 40], ['R1', 5]], 'E0': [['R1', 30]]}, 'unplaced': ['E3', 'E1', 'E4']}),
  ('partial repair guard 3',
   [[['E0', 80, 120, False], ['E1', 10, 120, True], ['E2', 60, 180, True], ['E3', 20, 120, False]],
    [['R0', 60], ['R1', 60], ['R2', 20], ['R3', 40]]],
   {'placed': {'E2': [['R0', 60]], 'E3': [['R2', 20]], 'E1': [['R3', 10]]}, 'unplaced': ['E0']}),
  ('boundary control 4', [[['A', 30, 120, False], ['B', 30, 90, False]], [['R1', 60]]],
   {'placed': {'A': [['R1', 30]]}, 'unplaced': ['B']}),
  ('normal control 5', [[['E0', 80, 120, False], ['E1', 30, 120, True]], [['R0', 50], ['R1', 50]]],
   {'placed': {'E1': [['R0', 30]]}, 'unplaced': ['E0']}),
  ('normal control 6', [[['E0', 20, 90, True], ['E1', 60, 90, False]], [['R0', 60], ['R1', 50]]],
   {'placed': {'E1': [['R0', 60]], 'E0': [['R1', 20]]}, 'unplaced': []}),
  ('normal control 7',
   [[['E0', 80, 120, False], ['E1', 30, 90, False], ['E2', 60, 180, False]],
    [['R0', 30], ['R1', 30], ['R2', 50], ['R3', 20]]],
   {'placed': {'E1': [['R0', 30]]}, 'unplaced': ['E0', 'E2']}),
  ('normal control 8',
   [[['E0', 80, 120, False], ['E1', 20, 120, True], ['E2', 20, 120, False], ['E3', 45, 120, True],
     ['E4', 30, 120, True]],
    [['R0', 60], ['R1', 50]]],
   {'placed': {'E3': [['R1', 45]], 'E4': [['R0', 30]], 'E1': [['R0', 20]]}, 'unplaced': ['E0', 'E2']})]]
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 fixtureActualExpectedOutcome
regression: placement order 1{'placed': {'A': [['R1', 40]], 'B': [['R2', 20]]}, 'unplaced': []}{'placed': {'A': [['R2', 40]], 'B': [['R1', 20]]}, 'unplaced': []}Failed
regression variant: placement order 2{'placed': {'E2': [['R1', 20]], 'E3': [['R0', 10]], 'E4': [['R2', 60], ['R1', 20]]}, 'unplaced': ['E0', 'E1']}{'placed': {'E0': [['R1', 60], ['R2', 20]], 'E1': [['R0', 50], ['R2', 30]]}, 'unplaced': ['E4', 'E2', 'E3']}Failed
normal control 3{'placed': {'E0': [['R1', 40], ['R0', 5]]}, 'unplaced': ['E1']}{'placed': {'E1': [['R1', 40], ['R0', 20]]}, 'unplaced': ['E0']}Failed
normal control 4{'placed': {'E0': [['R1', 20]], 'E1': [['R0', 20]], 'E2': [['R0', 30]]}, 'unplaced': []}{'placed': {'E0': [['R0', 20]], 'E2': [['R1', 30]]}, 'unplaced': ['E1']}Failed
normal control 5{'placed': {'E0': [['R3', 30]], 'E1': [['R2', 20]], 'E2': [['R0', 10]], 'E3': [['R1', 60]]}, 'unplaced': []}{'placed': {'E0': [['R3', 30]], 'E1': [['R0', 20]], 'E2': [['R2', 10]], 'E3': [['R1', 60]]}, 'unplaced': []}Failed
normal control 6{'placed': {'E0': [['R3', 30]], 'E1': [['R1', 30]]}, 'unplaced': ['E2']}{'placed': {'E0': [['R3', 30]], 'E1': [['R1', 30]]}, 'unplaced': ['E2']}Passed
normal control 7{'placed': {'E1': [['R0', 20]], 'E2': [['R0', 30]], 'E3': [['R1', 20]]}, 'unplaced': ['E0']}{'placed': {'E0': [['R0', 45]], 'E1': [['R1', 20]], 'E2': [['R1', 30]]}, 'unplaced': ['E3']}Failed
normal control 8{'placed': {'E0': [['R0', 10]], 'E1': [['R0', 10]], 'E2': [['R3', 45]]}, 'unplaced': []}{'placed': {'E0': [['R0', 10]], 'E1': [['R0', 10]], 'E2': [['R3', 45]]}, 'unplaced': []}Passed

SHA-256 / b2653615d67e14edcf2e0efe7f8fc3c3061d4fffffeea6b09f37580a84689091

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(exams, rooms):
    rem = {r: c for r, c in rooms}
    dur = {}
    place = {}
    unplaced = []
    for eid, size, d, split in sorted(exams, key=lambda x: (-x[2], x[0])):
        ok = [r for r in rem if dur.get(r, d) == d]
        fit = [r for r in ok if rem[r] >= size]
        if fit:
            r = min(fit, key=lambda r: (rem[r], r))
            place[eid] = [[r, size]]
            rem[r] -= size
            dur[r] = d
            continue
        if split and sum(rem[r] for r in ok) >= size:
            parts = []
            left = size
            for r in sorted(ok, key=lambda r: (-rem[r], r)):
                if left == 0:
                    break
                take = min(rem[r], left)
                parts.append([r, take])
                rem[r] -= take
                dur[r] = d
                left -= take
            place[eid] = parts
            continue
        unplaced.append(eid)
    return {'placed': place, 'unplaced': unplaced}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: placement order 1',
   [[['A', 40, 120, False], ['B', 20, 120, False]], [['R1', 60], ['R2', 40]]],
   {'placed': {'A': [['R2', 40]], 'B': [['R1', 20]]}, 'unplaced': []}),
  ('regression variant: placement order 2',
   [[['E0', 80, 120, True], ['E1', 80, 120, True], ['E2', 20, 180, True], ['E3', 10, 90, True],
     ['E4', 80, 180, True]],
    [['R0', 50], ['R1', 60], ['R2', 60]]],
   {'placed': {'E0': [['R1', 60], ['R2', 20]], 'E1': [['R0', 50], ['R2', 30]]},
    'unplaced': ['E4', 'E2', 'E3']}),
  ('normal control 3', [[['E0', 45, 180, True], ['E1', 60, 120, True]], [['R0', 20], ['R1', 40]]],
   {'placed': {'E1': [['R1', 40], ['R0', 20]]}, 'unplaced': ['E0']}),
  ('normal control 4',
   [[['E0', 20, 120, False], ['E1', 20, 180, False], ['E2', 30, 180, False]], [['R0', 50], ['R1', 30]]],
   {'placed': {'E2': [['R1', 30]], 'E0': [['R0', 20]]}, 'unplaced': ['E1']}),
  ('normal control 5',
   [[['E0', 30, 120, True], ['E1', 20, 120, True], ['E2', 10, 180, False], ['E3', 60, 120, False]],
    [['R0', 20], ['R1', 60], ['R2', 20], ['R3', 50]]],
   {'placed': {'E3': [['R1', 60]], 'E0': [['R3', 30]], 'E1': [['R0', 20]], 'E2': [['R2', 10]]},
    'unplaced': []}),
  ('normal control 6',
   [[['E0', 30, 90, True], ['E1', 30, 120, True], ['E2', 80, 120, False]],
    [['R0', 60], ['R1', 50], ['R2', 20], ['R3', 40]]],
   {'placed': {'E0': [['R3', 30]], 'E1': [['R1', 30]]}, 'unplaced': ['E2']}),
  ('normal control 7',
   [[['E0', 45, 90, False], ['E1', 20, 120, True], ['E2', 30, 120, True], ['E3', 20, 180, True]],
    [['R0', 50], ['R1', 60]]],
   {'placed': {'E0': [['R0', 45]], 'E2': [['R1', 30]], 'E1': [['R1', 20]]}, 'unplaced': ['E3']}),
  ('normal control 8',
   [[['E0', 10, 120, False], ['E1', 10, 120, True], ['E2', 45, 120, True]],
    [['R0', 40], ['R1', 40], ['R2', 40], ['R3', 50]]],
   {'placed': {'E2': [['R3', 45]], 'E0': [['R0', 10]], 'E1': [['R0', 10]]}, 'unplaced': []})],
 [('regression: placement order 1',
   [[['E0', 45, 90, False], ['E1', 45, 120, False], ['E2', 80, 120, True], ['E3', 80, 180, True],
     ['E4', 30, 180, False]],
    [['R0', 50], ['R1', 50], ['R2', 50], ['R3', 30]]],
   {'placed': {'E2': [['R0', 50], ['R1', 30]], 'E3': [['R2', 50], ['R3', 30]]},
    'unplaced': ['E0', 'E1', 'E4']}),
  ('regression variant: placement order 2',
   [[['E0', 80, 120, True], ['E1', 10, 120, False], ['E2', 80, 90, False], ['E3', 45, 120, True]],
    [['R0', 50], ['R1', 20], ['R2', 40]]],
   {'placed': {'E0': [['R0', 50], ['R2', 30]], 'E1': [['R2', 10]]}, 'unplaced': ['E2', 'E3']}),
  ('boundary control 3', [[['A', 50, 120, True]], [['R1', 30], ['R2', 20]]],
   {'placed': {'A': [['R1', 30], ['R2', 20]]}, 'unplaced': []}),
  ('normal control 4', [[['E0', 45, 120, True], ['E1', 30, 180, True]], [['R0', 20], ['R1', 50], ['R2', 30]]],
   {'placed': {'E0': [['R1', 45]], 'E1': [['R2', 30]]}, 'unplaced': []}),
  ('normal control 5',
   [[['E0', 45, 90, False], ['E1', 60, 120, False], ['E2', 60, 90, True], ['E3', 10, 90, True]],
    [['R0', 30], ['R1', 40], ['R2', 40], ['R3', 60]]],
   {'placed': {'E1': [['R3', 60]], 'E2': [['R1', 40], ['R2', 20]], 'E3': [['R2', 10]]}, 'unplaced': ['E0']}),
  ('normal control 6',
   [[['E0', 20, 90, False], ['E1', 10, 180, True], ['E2', 45, 120, True]], [['R0', 20], ['R1', 40]]],
   {'placed': {'E2': [['R1', 40], ['R0', 5]]}, 'unplaced': ['E0', 'E1']}),
  ('normal control 7',
   [[['E0', 20, 120, False], ['E1', 20, 120, True]], [['R0', 60], ['R1', 50], ['R2', 40], ['R3', 30]]],
   {'placed': {'E0': [['R3', 20]], 'E1': [['R2', 20]]}, 'unplaced': []}),
  ('normal control 8',
   [[['E0', 10, 180, True], ['E1', 10, 120, True], ['E2', 45, 120, False], ['E3', 80, 90, False]],
    [['R0', 50], ['R1', 60]]],
   {'placed': {'E2': [['R0', 45]], 'E0': [['R1', 10]]}, 'unplaced': ['E3', 'E1']})],
 [('regression: placement order 1',
   [[['E0', 30, 90, True], ['E1', 45, 90, True], ['E2', 20, 90, False]],
    [['R0', 60], ['R1', 30], ['R2', 30]]],
   {'placed': {'E1': [['R0', 45]], 'E0': [['R1', 30]], 'E2': [['R2', 20]]}, 'unplaced': []}),
  ('regression variant: placement order 2',
   [[['E0', 10, 180, False], ['E1', 20, 120, False], ['E2', 45, 120, False]],
    [['R0', 30], ['R1', 20], ['R2', 40]]],
   {'placed': {'E1': [['R1', 20]], 'E0': [['R0', 10]]}, 'unplaced': ['E2']}),
  ('partial repair guard 3',
   [[['E0', 30, 180, True], ['E1', 80, 120, True], ['E2', 10, 120, False], ['E3', 30, 120, True],
     ['E4', 80, 180, True]],
    [['R0', 30], ['R1', 40], ['R2', 20]]],
   {'placed': {'E1': [['R1', 40], ['R0', 30], ['R2', 10]], 'E2': [['R2', 10]]},
    'unplaced': ['E4', 'E0', 'E3']}),
  ('boundary control 4', [[['A', 30, 120, True], ['B', 30, 120, True]], [['R1', 30], ['R2', 40]]],
   {'placed': {'A': [['R1', 30]], 'B': [['R2', 30]]}, 'unplaced': []}),
  ('normal control 5',
   [[['E0', 45, 120, False], ['E1', 45, 90, False], ['E2', 80, 90, True], ['E3', 60, 90, False],
     ['E4', 80, 180, True]],
    [['R0', 60], ['R1', 20], ['R2', 20]]],
   {'placed': {'E2': [['R0', 60], ['R1', 20]]}, 'unplaced': ['E4', 'E3', 'E0', 'E1']}),
  ('normal control 6',
   [[['E0', 10, 90, True], ['E1', 10, 120, True], ['E2', 45, 180, True], ['E3', 60, 120, False]],
    [['R0', 40], ['R1', 20]]],
   {'placed': {'E2': [['R0', 40], ['R1', 5]]}, 'unplaced': ['E3', 'E0', 'E1']}),
  ('normal control 7',
   [[['E0', 10, 120, False], ['E1', 80, 180, True], ['E2', 20, 90, True]],
    [['R0', 30], ['R1', 40], ['R2', 60]]],
   {'placed': {'E1': [['R2', 60], ['R1', 20]], 'E2': [['R0', 20]]}, 'unplaced': ['E0']}),
  ('normal control 8',
   [[['E0', 60, 120, False], ['E1', 45, 180, True], ['E2', 60, 180, True], ['E3', 30, 120, True],
     ['E4', 20, 180, True]],
    [['R0', 40], ['R1', 60]]],
   {'placed': {'E0': [['R1', 60]], 'E3': [['R0', 30]]}, 'unplaced': ['E2', 'E1', 'E4']})],
 [('regression: placement order 1',
   [[['E0', 10, 120, True], ['E1', 80, 120, True], ['E2', 45, 180, False], ['E3', 60, 120, True]],
    [['R0', 40], ['R1', 30], ['R2', 60]]],
   {'placed': {'E1': [['R2', 60], ['R0', 20]], 'E0': [['R0', 10]]}, 'unplaced': ['E3', 'E2']}),
  ('regression variant: placement order 2',
   [[['E0', 80, 120, False], ['E1', 60, 180, True], ['E2', 60, 180, False], ['E3', 30, 120, False],
     ['E4', 60, 120, True]],
    [['R0', 50], ['R1', 50], ['R2', 40], ['R3', 50]]],
   {'placed': {'E1': [['R0', 50], ['R1', 10]], 'E4': [['R3', 50], ['R2', 10]], 'E3': [['R2', 30]]},
    'unplaced': ['E0', 'E2']}),
  ('partial repair guard 3',
   [[['E0', 80, 120, True], ['E1', 20, 120, False], ['E2', 45, 180, False], ['E3', 30, 120, True],
     ['E4', 45, 90, True]],
    [['R0', 50], ['R1', 60], ['R2', 30]]],
   {'placed': {'E0': [['R1', 60], ['R0', 20]], 'E3': [['R0', 30]], 'E1': [['R2', 20]]},
    'unplaced': ['E2', 'E4']}),
  ('boundary control 4', [[['A', 50, 120, True]], [['R1', 30], ['R2', 19]]],
   {'placed': {}, 'unplaced': ['A']}),
  ('normal control 5',
   [[['E0', 20, 120, False], ['E1', 80, 180, False], ['E2', 20, 90, True], ['E3', 10, 120, False]],
    [['R0', 50], ['R1', 50], ['R2', 50]]],
   {'placed': {'E0': [['R0', 20]], 'E2': [['R1', 20]], 'E3': [['R0', 10]]}, 'unplaced': ['E1']}),
  ('normal control 6',
   [[['E0', 10, 180, False], ['E1', 10, 120, True]], [['R0', 20], ['R1', 30], ['R2', 60]]],
   {'placed': {'E0': [['R0', 10]], 'E1': [['R1', 10]]}, 'unplaced': []}),
  ('normal control 7',
   [[['E0', 80, 180, True], ['E1', 10, 180, True], ['E2', 60, 90, False], ['E3', 30, 120, True]],
    [['R0', 30], ['R1', 40]]],
   {'placed': {'E3': [['R0', 30]], 'E1': [['R1', 10]]}, 'unplaced': ['E0', 'E2']}),
  ('normal control 8',
   [[['E0', 20, 90, True], ['E1', 10, 120, True], ['E2', 30, 90, True]],
    [['R0', 30], ['R1', 30], ['R2', 50]]],
   {'placed': {'E2': [['R0', 30]], 'E0': [['R1', 20]], 'E1': [['R2', 10]]}, 'unplaced': []})],
 [('regression: placement order 1',
   [[['E0', 80, 90, False], ['E1', 60, 120, True], ['E2', 80, 120, True], ['E3', 60, 120, True],
     ['E4', 30, 180, False]],
    [['R0', 20], ['R1', 20], ['R2', 20], ['R3', 40]]],
   {'placed': {'E2': [['R3', 40], ['R0', 20], ['R1', 20]]}, 'unplaced': ['E0', 'E1', 'E3', 'E4']}),
  ('regression variant: placement order 2',
   [[['E0', 30, 120, False], ['E1', 30, 120, True], ['E2', 45, 120, True], ['E3', 45, 180, True],
     ['E4', 20, 90, True]],
    [['R0', 40], ['R1', 40]]],
   {'placed': {'E2': [['R0', 40], ['R1', 5]], 'E0': [['R1', 30]]}, 'unplaced': ['E3', 'E1', 'E4']}),
  ('partial repair guard 3',
   [[['E0', 80, 120, False], ['E1', 10, 120, True], ['E2', 60, 180, True], ['E3', 20, 120, False]],
    [['R0', 60], ['R1', 60], ['R2', 20], ['R3', 40]]],
   {'placed': {'E2': [['R0', 60]], 'E3': [['R2', 20]], 'E1': [['R3', 10]]}, 'unplaced': ['E0']}),
  ('boundary control 4', [[['A', 30, 120, False], ['B', 30, 90, False]], [['R1', 60]]],
   {'placed': {'A': [['R1', 30]]}, 'unplaced': ['B']}),
  ('normal control 5', [[['E0', 80, 120, False], ['E1', 30, 120, True]], [['R0', 50], ['R1', 50]]],
   {'placed': {'E1': [['R0', 30]]}, 'unplaced': ['E0']}),
  ('normal control 6', [[['E0', 20, 90, True], ['E1', 60, 90, False]], [['R0', 60], ['R1', 50]]],
   {'placed': {'E1': [['R0', 60]], 'E0': [['R1', 20]]}, 'unplaced': []}),
  ('normal control 7',
   [[['E0', 80, 120, False], ['E1', 30, 90, False], ['E2', 60, 180, False]],
    [['R0', 30], ['R1', 30], ['R2', 50], ['R3', 20]]],
   {'placed': {'E1': [['R0', 30]]}, 'unplaced': ['E0', 'E2']}),
  ('normal control 8',
   [[['E0', 80, 120, False], ['E1', 20, 120, True], ['E2', 20, 120, False], ['E3', 45, 120, True],
     ['E4', 30, 120, True]],
    [['R0', 60], ['R1', 50]]],
   {'placed': {'E3': [['R1', 45]], 'E4': [['R0', 30]], 'E1': [['R0', 20]]}, 'unplaced': ['E0', 'E2']})]]
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 fixtureActualExpectedOutcome
regression: placement order 1{'placed': {'A': [['R2', 40]], 'B': [['R1', 20]]}, 'unplaced': []}{'placed': {'A': [['R2', 40]], 'B': [['R1', 20]]}, 'unplaced': []}Passed
regression variant: placement order 2{'placed': {'E2': [['R0', 20]], 'E4': [['R1', 60], ['R2', 20]]}, 'unplaced': ['E0', 'E1', 'E3']}{'placed': {'E0': [['R1', 60], ['R2', 20]], 'E1': [['R0', 50], ['R2', 30]]}, 'unplaced': ['E4', 'E2', 'E3']}Failed
normal control 3{'placed': {'E0': [['R1', 40], ['R0', 5]]}, 'unplaced': ['E1']}{'placed': {'E1': [['R1', 40], ['R0', 20]]}, 'unplaced': ['E0']}Failed
normal control 4{'placed': {'E1': [['R1', 20]], 'E2': [['R0', 30]]}, 'unplaced': ['E0']}{'placed': {'E0': [['R0', 20]], 'E2': [['R1', 30]]}, 'unplaced': ['E1']}Failed
normal control 5{'placed': {'E0': [['R3', 30]], 'E1': [['R2', 20]], 'E2': [['R0', 10]], 'E3': [['R1', 60]]}, 'unplaced': []}{'placed': {'E0': [['R3', 30]], 'E1': [['R0', 20]], 'E2': [['R2', 10]], 'E3': [['R1', 60]]}, 'unplaced': []}Failed
normal control 6{'placed': {'E0': [['R1', 30]], 'E1': [['R3', 30]]}, 'unplaced': ['E2']}{'placed': {'E0': [['R3', 30]], 'E1': [['R1', 30]]}, 'unplaced': ['E2']}Failed
normal control 7{'placed': {'E1': [['R1', 20]], 'E2': [['R1', 30]], 'E3': [['R0', 20]]}, 'unplaced': ['E0']}{'placed': {'E0': [['R0', 45]], 'E1': [['R1', 20]], 'E2': [['R1', 30]]}, 'unplaced': ['E3']}Failed
normal control 8{'placed': {'E0': [['R0', 10]], 'E1': [['R0', 10]], 'E2': [['R3', 45]]}, 'unplaced': []}{'placed': {'E0': [['R0', 10]], 'E1': [['R0', 10]], 'E2': [['R3', 45]]}, 'unplaced': []}Passed

SHA-256 / ee2dbae955fe0fb68bd6ad8a37090fe97fb4377aa3b25f93bcec6e54d283fcec

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.073945+00:00.

Case digest / 7d026f671e9f387b70bb7cd54bf681bb9a9c6a1eeb41a729240fba7e0126e829