General information only. This explains a scheduling term. It is not legal advice: the rules that bind you come from the law, your agreements and your contracts.

Understanding constraints

Rules come from the law, agreements, contracts and good practice. They interact, so a change to one shift can break a rule on another.

Hard vs soft constraints

  • Hard: must hold in every roster, such as legal rest.
  • Soft: kept where possible, such as wishes.
  • Make a rule hard only when the roster cannot break it.

Types of constraints

  • Who: roles, skills and availability.
  • How much: hours, days in a row and nights.
  • When: rest between shifts and days off.
  • With whom: pairing and worker selection.

Common mistakes

  • Making wishes hard rules, so shifts stay open.
  • Rules that clash with each other.
  • Checking rules on new shifts but not on moved ones.

How Chrona does it

Auto Schedule, a constraint solver built on Timefold, keeps every Must rule. It leaves a shift open rather than break one, and keeps Should rules where it can.

Rules have two levels, Must and Should. Your agreements hold rules on rest, hours, overtime, nights and weekends, each with its level and clause.

Step by step in the docs

Key takeaways

  • Constraints are the rules a roster must or should keep.
  • Hard constraints never break; soft ones are weighed.
  • Chrona calls them Must and Should rules.

Questions

What is the difference between a hard and a soft constraint?

A hard constraint must hold in every roster. A soft one is kept where possible.

Why do shifts stay open when the rules are strict?

No worker can take them without breaking a hard rule. Leaving them open shows the gap.

What is a constraint solver?

Software that finds a roster keeping every hard rule and scoring best on the soft ones.

Can a planner break a rule by hand?

In Chrona, a change by hand that breaks a Must rest, days in a row or Rotation rule gets a warning.

The word comes from Timefold, the planning engine Auto Schedule is built on. See the source