Employee rostering involves planning under specific constraints. These constraints are categorized into the levels of importance:
- Hard (Critical)
- Soft (Non-critical)
Within each level, constraints have varying weights depending on their significance.
Parameters affecting the score


Constraint processing occurs separately for each level, starting from Hard. If any Hard constraints are violated, it indicates critical issues that need to be addressed.
A schedule is considered feasible if:
- it doesn’t violate any Hard constraints, meaning that its value is set to 0
- it doesn’t contain unassigned shifts
If the count of unassigned shifts is greater than 0, it indicates that there are still shifts left uncovered and the roster is incomplete.
When Soft constraints are violated, the schedule can still be considered feasible, but it may involve breaking some of the less critical constraints.
It’s important to note that a score that breaks 0 Hard constraints and 1,000,000 Soft constraints is superior to a score that breaks 1 Hard constraint and 0 Soft constraints.
Details and examples of the constraint levels:
Constraint levels | Condition | Examples | Constraint score signum | Details |
Hard | Must not be broken | Must-have skills for shift Must be of a particular employee category | Negative | The score is the sum of all negative constraints being broken, with a perfect score of 0. |
No overlapping shifts Max hours of work per day | ||||
Soft | Should not be broken if can be avoided | Undesired employee time slot Assigned employee is different from originally published one (change is published shift) | Negative | Negative and positive constraints of this level are combined and the final score can be positive, negative or 0. |
Should be fulfilled if possible | Good-to-have skills for the shift Desired employee time slot | Positive |