Constraint importance
Constraints can be configured with different levels of importance:Strict constraints
When a constraint is set toSTRICT importance, the solver will never violate it. These constraints act as hard requirements that must be satisfied for the roster to be valid. If the solver cannot satisfy all strict constraints, it will fail to generate a roster.
Importance levels
Alternatively, constraints can be assigned a regular importance level that indicates how strongly the solver should consider the rule:VERY_LOW, LOW, MEDIUM, HIGH, or VERY_HIGH.
The solver will attempt to satisfy constraints with higher importance levels more strongly, but may violate them if necessary to satisfy strict constraints or other higher-priority requirements.
Filters
Every constraint can receivefilters which allow you to make the constraint apply only to specific employees or shifts. This provides fine-grained control over which parts of your roster are affected by each constraint.
Filters can target entities in two ways:
- By ID: Specify exact IDs of employees or shifts that the constraint should apply to
- By labels: Specify labels that employees or shifts must have for the constraint to apply
"senior" working shifts with the label "night". This allows you to create complex, targeted rules for different groups of employees and shifts.
Available constraints
Employee Availability
Specify when employees are (preferably) available for work.
Employee Utilization
Control the minimum and maximum utilization of employees over specific
periods.
Cooldown
Define minimum rest periods between shifts for employees.
Consecutive
Control the minimum and maximum number of consecutive shifts.
Pattern
Define work patterns that employees should follow.
Periodic Rest
Ensure employees get rest periods at regular intervals.
Period Distribution
Control how work is distributed across different periods.
