Key takeaways
- Soft constraints are goals with penalty costs, never guarantees.
- The solver minimises total penalty, so weights decide which preference loses a conflict.
- Equal weights on everything is the same as no priorities at all.
- Some solvers treat soft rules as hard and relax them when stuck; know which yours does.
The penalty model
Every soft violation carries a cost, and the solver minimises the total. That single sentence explains most solver behaviour that looks mysterious: a preference was violated because honouring it cost more elsewhere.
It also explains why soft constraints are goals rather than guarantees. The output to review is not whether violations exist; it is whether the violations that exist are the cheap ones.
The standard soft set
These recur across schools; the weights differ by policy.
- Spread a subject's lessons across the week
- Core subjects in morning periods
- Minimise teacher gaps and idle periods
- Cap consecutive teaching periods and daily totals
- Keep teacher days compact
- Avoid named subjects in the last period
Tuning weights without chasing noise
Tune to policy first, then to evidence.
- Write down which preferences the school ranks above which; that ordering is the policy.
- Set weights to match the ordering, with real gaps between tiers.
- Run, then review violations by cost: are the expensive preferences intact?
- Adjust one weight per iteration; parallel changes hide causality.
- Stop when remaining violations are ones the school accepts, and record that acceptance.
- Re-tune when policy changes, not when one loud complaint arrives.
How to do this in Smootables: six weights from 0 to 200
Solver Settings
Adjust how the timetable solver prioritizes different constraints. Each weight can be set between 0 and 200.
Student Gaps
Minimize idle time between lessons for students. Higher = fewer gaps.
0Teacher Gaps
Minimize idle time between lessons for teachers. Higher = fewer gaps.
120Student Daily Balance
Spread student lessons evenly across days. Higher = more balanced.
100Solver Settings holds six weighted preferences: Student Gaps, Teacher Gaps, Student Daily Balance, Teacher Daily Balance, Subject Spread, and Morning Preference. Each runs 0 to 200, a weight of 0 disables the constraint, and the built-in guidance reads 50 as low, 100 as medium, 200 as high priority. By default only Morning Preference is enabled; the other five start at 0, so a balance or gap preference counts only once you weight it.
The weights drive the solver's second phase: hard constraints are satisfied first, then the soft preferences are optimised. Placement-level wishes (specific weekdays, morning or afternoon, all lessons on the same day) are set per placement under Schedule preferences rather than school-wide.
Equal penalties, unreadable results
When every preference carries the same weight, the solver still trades, but the trades stop meaning anything. Review becomes archaeology: nobody can say whether a violated preference lost fairly or was never really ranked.
Sourced practice notes one more pattern: some solvers treat soft constraints as hard and relax them only when stuck. Know which behaviour your tool has before you interpret its output. How gaps and balance land on individual teachers is covered in fair distribution; the recipe-level walkthrough for the gap weight is minimising teacher gaps, and for spread it is spreading lessons across the week.
Questions planners ask about soft constraints
Why did the solver ignore a preference we set?
It did not ignore it; it priced it. Some other combination of preferences cost less to satisfy. If the preference should win those trades, raise its weight. If it must always win, it may belong in the hard set.
Should every preference get a weight?
Only the ones the school actually holds. A preference nobody defends still steers the solver away from grids someone might have preferred. Fewer, deliberate weights make results easier to explain.
Whose preferences win when teachers and students conflict?
Whoever the weights say. Teacher-gap minimisation and student daily balance can pull in opposite directions, and the weight ratio decides the trade. That is a policy choice to make openly, not a solver default to discover later.