Teacher constraints

Minimize teacher gaps in a school timetable

A free period between two lessons is usually a workload issue, not a clash. Here is how to shrink gaps without breaking availability or room rules.

Juho Isola, Smootables founder

Constraint recipe

A teacher gap is a free period between two lessons on the same day. If a teacher has lessons in periods 1 and 4, the empty periods 2 and 3 are gaps, including when period 4 is their last lesson that day. Only time before the first lesson, lunch, and time after the final lesson are excluded. Too many gaps waste paid time. Rule out double-bookings and unavailable periods first, then tighten gap preferences or move lessons.

Key takeaways

  • Count gaps between lessons, including before the last lesson of the day.
  • Fix clashes and unavailable periods before chasing zero gaps.
  • Part-time days and specialist rooms often force gaps.
  • Tighten gap preferences only after the timetable is valid.

When gaps matter

One idle period between lessons may be fine. Five on the same day may break local workload policy. Gaps cost staff time, but they do not stop the timetable from running. They are different from a clash, where the same teacher is assigned to two classes at once.

Treat gaps as a quality target unless your policy makes a specific gap illegal. A **hard** rule cannot be broken; a **soft** rule is a preference your system can bend when something more important blocks it.

What keeps gaps in place

Teachers who work only two or three days leave fewer slots to pack lessons tightly. Double periods and lab blocks need adjacent time, which can open holes elsewhere on the day. Team teaching needs every assigned teacher free in the same period, which shrinks options for the whole group.

See soft constraints when you want quality preferences that can give way to clashes, rooms, and availability.

What to do next

Work through this list in order so you do not chase an impossible zero-gap target.

  1. Filter by each teacher and count free periods between lessons on the same day.
  2. Check for double-bookings and lessons in periods marked unavailable.
  3. Note lessons tied to part-time days, team teaching, double periods, or specialist rooms.
  4. Decide whether tighter days matter more than subject spread or student day shape.
  5. Raise the gap preference or move pinned lessons, then regenerate or rebuild.
  6. Record teachers where availability or a room limit explains the remaining gap.

Common mistakes

  • Treating every gap as a clash or data error
  • Pinning lessons early, then blaming the generator for gaps the pins created
  • Demanding zero gaps while part-time staff work only a few days each week

In Smootables

Teacher Gaps is a school-wide preference weight, not a rule that blocks generation.

A gap is a free period between two lessons on the same day. Empty slots between earlier lessons and the last lesson of the day count. Only time before the first lesson, lunch, and time after the final lesson are excluded. Smootables treats gaps as something to reduce when you want tighter days, not as a clash that makes a timetable invalid.

Open Settings → Timetabling and raise Teacher Gaps (0 to 200). Zero turns the preference off. A higher number asks the generator to pack each teacher's day more tightly when rooms, availability, and other rules still allow it.

  1. Run Generate timetable only after clashes and room rules already look feasible.
  2. Compare Teacher gaps in the analysis summary across two runs before committing to a heavy weight.

Quick answers

Are teacher gaps hard or soft constraints?

Usually soft. A double-booking or unavailable period is hard; an idle period between valid lessons is normally a workload quality issue.

Why won't the generator remove every gap?

Another rule may leave no compact placement. Check part-time days, team teaching, double periods, and specialist rooms before raising the gap weight again.

See how Smootables fits your school's constraints

Book a walkthrough. We will review your teacher load, rooms, and scheduling rules and show how they work in Smootables.