Timetable Won't Solve? How to Find the Conflicting Rules
When a timetable won't solve: run capacity pre-checks, find the minimal conflict set, relax one rule at a time. Common culprits and infeasible vs timeout.
Keyi Timetabling · Updated
When a timetable won't solve, first run capacity checks to rule out resources that simply don't add up, then find the minimal conflict set — a group of rules that cannot all hold, where removing any one lets the rest be satisfied — and relax one of those rules at a time.
Step 1: capacity pre-checks
Many infeasible timetables are not caused by clever rules but by plain arithmetic. Before solving, check:
- Teacher load: does each teacher's weekly lesson count exceed their available periods (total periods minus unavailable times)?
- Class load: does a class need more lessons per week than there are slots in the timetable?
- Rooms: do labs, gyms or other specialist rooms get requested more times in a period than you actually have?
- Unavailable times: do leave, part-time contracts or fixed meetings squeeze a teacher's options too far?
These can be caught with simple counts, without waiting for the solver to fail.
Common culprits
- A heavily loaded teacher who also has several fixed-time requirements, leaving no room to move;
- Too many "not first period" or "not last period" rules that together leave very few usable slots;
- Too few labs or sports facilities, forcing science and PE into a handful of periods;
- Consecutive-period demands hitting day boundaries — for example a triple lesson when the morning only has two periods and the afternoon is taken by other rules.
What a minimal conflict set is
With hundreds of rules, "which rule is wrong?" is nearly impossible to answer by eye. A minimal conflict set narrows it down: these rules together are guaranteed to fail, but remove any one of them and the rest can hold. It is usually only a few rules, so the person in charge can see at once which one to relax.
Proven infeasible vs timed out
Treat these differently:
- Proven infeasible: the system has proved that no timetable exists under the current rules; you must change rules or resources;
- Timed out: no solution was found within the time limit, which does not mean none exists. Allow more time, simplify the model, or turn some requirements into soft rules.
Treating a timeout as infeasibility leads people to delete rules that never needed deleting.
A repair strategy
- Turn "nice to have" requirements into soft rules with weights;
- From the minimal conflict set, relax the rule with the least impact and solve again;
- Change one rule at a time and keep a record so you can roll back;
- Genuine shortages of teachers or rooms have to be fixed in staffing and facilities.
More answers in the FAQ.
How Keyi handles it
- Runs a pre-solve health check that flags capacity problems such as lesson load and rooms;
- When infeasible, returns the minimal set of rules that cannot hold together instead of a bare "failed";
- Clearly distinguishes proven infeasibility from timeout;
- Keeps hard and soft rules separate, with weights on soft rules;
- The AI assistant (Chinese or English) proposes changes based on the conflict, which take effect only after you confirm.
Stuck on a timetable? Bring your data and book a demo.