Rule schema
object
Used to set targets and limits on the number of consecutive shifts that an employee works.
Maximum consecutive shifts
To limit the maximum number of consecutive shifts or days an employee can work, use themax property in the targets object. This limit can only be enforced with STRICT importance, meaning the solver will never violate it.
Minimum consecutive shifts
To encourage employees to work a minimum number of consecutive shifts, use themin property in the targets object. This is treated as a target rather than a strict requirement, so the solver will try to achieve it but may not always succeed.
Combining minimum and maximum
You can combine bothmin and max targets in a single rule to create a preferred range of consecutive work periods. Note that when using max, the importance must be STRICT for the maximum limit to be enforced. The minimum target will be treated as a target that the solver will try to achieve.
Filtering by employees and shifts
You can combine both employee and shift filters to create very specific rules for certain groups of employees working certain types of shifts.Metrics
The following status metric is available for tracking on Consecutive rules:| Metric key | Description |
|---|
