Hard constraints reference
Hard constraints reference
None of these are configured on the Constraints page — see Hard vs. soft
constraints for why. This page explains what each one does, using
the same ID you'll see if you ever hit a real conflict: if generation fails with INFEASIBLE,
each part of the explanation is tagged with exactly the ID used here (H1, H4, P1, and so on)
— there's no separate internal numbering to translate.
An explanation only ever lists the settings you control — Locked Time Slots, unavailable periods,
Blocks and so on (see When generation fails). The rules that
always hold, like H1 (no double-booking), H5 (breaks) and P1 (day boundaries), show up
as the reason why those settings clash ("both are for 9A", "which is a break"), and as the tag
on an entry that says how many times a week a lesson runs (H1). Timetables made before
September 2026 may still show the older labels H1.1/H1.2/H1.3 (a room, teacher or class
double-booked) and STRUCT (a lesson has to be scheduled exactly once).
H1 — Resource Uniqueness
At any given moment, one teacher can only be in one place, one class can only be in one lesson, and one room can only hold one lesson (co-teaching and multi-class lessons don't get an exception here — see Creating Lessons's "combined session" section for how a shared lesson is still only one booking, not several simultaneous ones). This is checked independently per room, per teacher, and per class at every slot.
If you violate it: you can't — this is why the solver exists. If your input data makes it
unavoidable (e.g. two lessons that both lock the same teacher to the same slot), generation goes
INFEASIBLE and the explanation names the lessons involved and the teacher, class or room they
share.
H2 — Room Capacity
A room can only host a lesson whose combined class size (summed across every leaf group/subgroup
attending) is no larger than the room's capacity. See Class Groups, Years &
Subgroups for how a parent group's "size" is really the sum of its
children for this purpose.
H3 — Room Tags
If a lesson has Required Room Tags set, only a room carrying every one of those tags is eligible — see Adding Rooms. H2 and H3 are checked independently (a room failing either one is ruled out for that lesson), so an explanation can tell you which one actually applies rather than a single generic "unsuitable" message.
H4 — Teacher Unavailability
A teacher's unavailable periods (Adding Teachers) are completely off-limits for any lesson that teacher is on — including every teacher in a co-taught lesson, not just the first one listed.
H5 — Lunch Break
Any Period whose type is BREAK (Setting up Periods) can never hold a
lesson, for anyone. This is really just "the whole school is simultaneously unavailable" for that
slot.
H6 — Locked Lessons
A lesson's Locked Time Slots (Creating Lessons) force one of its instances into that exact slot, always. Unlike a preference, missing one isn't an option — if a locked slot can't be honored (e.g. it collides with something else pinned to the same place), generation fails rather than silently placing the lesson elsewhere.
H7 — Blocks
Lessons sharing the same non-empty Block value are forced to start at the exact same period —
rooms, teachers, and durations may all differ, only the start time is synced. See the parallel
electives worked example for a full walkthrough, including
what happens when block members have mismatched Count values.
H8 — Manual Instance Lock
Distinct from H6: this pins one specific instance of a lesson to an exact (room, slot) pair, rather than pinning "some instance" to one of a list of candidate slots without specifying a room. You never set this directly — it's created automatically by the saved-timetable editor's "Lock & Re-solve" feature for whichever cells are still locked when you trigger a re-solve.
H9 — Department Meetings
Every teacher who's a member of a Department is blocked from every one of that department's meeting slots — mechanically identical to H4 (Teacher Unavailability), just derived from department membership instead of a per-teacher list. A teacher who isn't a department member is completely unaffected, even at that same slot.
P1 — Double Periods (day-boundary protection)
Any lesson with Duration greater than 1 always occupies that many consecutive periods on a
single day — the solver will never let a 2-period lesson start in the last period of Monday and
spill into Tuesday's first period. This is enforced as a genuine hard constraint (it zeroes out
any start slot where the lesson's duration window would cross into the next day), not something
that just happens to work out most of the time.