Rules Reference

This page provides a comprehensive list of all available rules in the system, their purpose, parameters, and examples. For an introduction to rule basics, including Hard vs. Soft Constraints and Rule Scope, please see the Rule Basics page.

Staffing Requirements

Each shift is assigned to x people. (A1)

Make sure a specific number ('x') of people work each chosen shift daily.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • zeroForUnselectedDates: For staffing level rules (A1), if true, sets the required staff count to zero for dates *not* selected in the rule's date scope. (Boolean: true/false)

Each shift is assigned to x to y people. (A2)

Set a minimum ('x') and maximum ('y') number of people for each chosen shift daily.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • y: A second numerical value (e.g., a time frame in days, or a range limit).

Sum of shifts is equal to x people. (A3)

Make sure the total staff count across several chosen shifts adds up to 'x' daily.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).

Sum of shifts should be between x and y (A4)

Keep the total staff count across several chosen shifts between 'x' and 'y' daily.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • y: A second numerical value (e.g., a time frame in days, or a range limit).

Workload & Limits

Each person works at least x shifts every y days. (B1)

Set a minimum number ('x') of chosen shifts each person must work within any 'y'-day timeframe. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • y: A second numerical value (e.g., a time frame in days, or a range limit).

Each person works at most x shifts every y days. (B2)

Set a maximum number ('x') of chosen shifts each person can work within any 'y'-day timeframe. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • y: A second numerical value (e.g., a time frame in days, or a range limit).

Each person works at least x days every y days. (B3)

Ensure each person works on at least 'x' different days (regardless of shifts per day) within any 'y'-day timeframe. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • y: A second numerical value (e.g., a time frame in days, or a range limit).

Each person works at most x days every y days. (B4)

Limit each person to working on no more than 'x' different days (regardless of shifts per day) within any 'y'-day timeframe. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • y: A second numerical value (e.g., a time frame in days, or a range limit).

Each person works exactly x shifts in total. (B5)

Assign exactly 'x' chosen shifts to each person over the whole schedule. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).

Each person works at least x shifts in total. (B6)

Ensure each person works at least 'x' chosen shifts over the whole schedule. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).

Each person works at most x shifts in total. (B7)

Limit each person to a maximum of 'x' chosen shifts over the whole schedule. You can set 'x' individually per person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).

Leave & Requests

Shift must not be assigned on their leaves. (C1)

Don't schedule specific shifts on days marked as unavailable (like leave days) in selected date columns.

Parameters:

  • dateLabel: Select one or more 'Dates' type columns from your Staff Details. The rule will reference the dates marked in these columns.

Shift must not be assigned within x days before their leaves. (C2)

Avoid scheduling specific shifts for 'x' days leading up to unavailable days (like leave) marked in date columns. Inclusive of the date of leave.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • dateLabel: Select one or more 'Dates' type columns from your Staff Details. The rule will reference the dates marked in these columns.
  • inclusive_of_the_date: For rules referencing dates (like leave), specifies if the rule includes the leave/request date itself. (Boolean: true/false)

Shift must not be assigned within x days after their leaves. (C3)

Avoid scheduling specific shifts for 'x' days following unavailable days (like leave) marked in date columns. Inclusive of the date of leave.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • dateLabel: Select one or more 'Dates' type columns from your Staff Details. The rule will reference the dates marked in these columns.
  • inclusive_of_the_date: For rules referencing dates (like leave), specifies if the rule includes the leave/request date itself. (Boolean: true/false)

Shift must be assigned on request. (C4)

Schedule specific shifts on days marked as requested in selected date columns.

Parameters:

  • dateLabel: Select one or more 'Dates' type columns from your Staff Details. The rule will reference the dates marked in these columns.

Shift must be assigned x days before date labels. (C5)

Schedule specific shifts 'x' days before days marked in selected date columns.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • dateLabel: Select one or more 'Dates' type columns from your Staff Details. The rule will reference the dates marked in these columns.
  • inclusive_of_the_date: For rules referencing dates (like leave), specifies if the rule includes the leave/request date itself. (Boolean: true/false)

Shift must be assigned x days after date labels. (C6)

Schedule specific shifts 'x' days after days marked in selected date columns.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).
  • dateLabel: Select one or more 'Dates' type columns from your Staff Details. The rule will reference the dates marked in these columns.
  • inclusive_of_the_date: For rules referencing dates (like leave), specifies if the rule includes the leave/request date itself. (Boolean: true/false)

Staff Assignment

Staff can only work in shift types (D1)

Limit certain staff members to only work specific types of shifts.

Parameters:

  • shiftTypes: Select one or more specific Shift Types that this rule applies to. If left blank, it may apply to all or any shift depending on the rule.

Staff can never work in shift types (D2)

Limit certain staff members to never work specific types of shifts.

Parameters:

  • shiftTypes: Select one or more specific Shift Types that this rule applies to. If left blank, it may apply to all or any shift depending on the rule.

Fairness & Grouping

This group of staff should not work on the same day. (E1)

Prevent people within a defined group from working on the same day.

Parameters:

  • persons: Select one or more specific staff members or groups (if defined) that this rule applies to. If left blank, it may apply to all staff.

Staff group A and group B should not work on the same day. (E2)

Prevent people from Group A and Group B from working on the same day.

Parameters:

  • groupA: Select a group of staff members for the first part of a comparative rule.
  • groupB: Select a group of staff members for the second part of a comparative rule.

This group of staff should work on the same day. (E5)

Make sure people within a defined group work together on the same day.

Parameters:

  • persons: Select one or more specific staff members or groups (if defined) that this rule applies to. If left blank, it may apply to all staff.

Staff group A and group B should work on the same day. (E6)

Make sure people from Group A and Group B work together on the same day.

Parameters:

  • groupA: Select a group of staff members for the first part of a comparative rule.
  • groupB: Select a group of staff members for the second part of a comparative rule.

Shift Count Difference between this group of staff <= x. (E3)

Keep the difference in total shifts worked between any two people in a group less than or equal to 'x'.

Parameters:

  • persons: Select one or more specific staff members or groups (if defined) that this rule applies to. If left blank, it may apply to all staff.
  • x: A numerical value (e.g., number of shifts, days, or a limit).

Staff group A should have fewer shifts than staff group B. (E4)

Make sure people in Group A work fewer shifts overall compared to people in Group B.

Parameters:

  • groupA: Select a group of staff members for the first part of a comparative rule.
  • groupB: Select a group of staff members for the second part of a comparative rule.

Shift Sequencing

Post shift day off. (F1)

Guarantee a day off right after certain shifts. Optionally, set this day off 'x' days later.

Parameters:

  • shiftTypes: Select one or more specific Shift Types that this rule applies to. If left blank, it may apply to all or any shift depending on the rule.
  • x: A numerical value (e.g., number of shifts, days, or a limit).

Pre shift day off. (F2)

Guarantee a day off right before certain shifts. Optionally, set this day off 'x' days earlier.

Parameters:

  • shiftTypes: Select one or more specific Shift Types that this rule applies to. If left blank, it may apply to all or any shift depending on the rule.
  • x: A numerical value (e.g., number of shifts, days, or a limit).

Post shift assign duty. (F3)

Schedule specific shifts right after certain trigger shifts. Optionally, schedule them 'x' days later.

Parameters:

  • shiftTypes: Select one or more specific Shift Types that this rule applies to. If left blank, it may apply to all or any shift depending on the rule.
  • x: A numerical value (e.g., number of shifts, days, or a limit).

Pre shift assign duty. (F4)

Schedule specific shifts right before certain trigger shifts. Optionally, schedule them 'x' days earlier.

Parameters:

  • shiftTypes: Select one or more specific Shift Types that this rule applies to. If left blank, it may apply to all or any shift depending on the rule.
  • x: A numerical value (e.g., number of shifts, days, or a limit).

Optimization Objectives

Minimize the shift count difference for each person. (G1)

(Goal) Aim for fairness by minimizing the difference in total shifts worked among all staff.

Parameters:

This rule has no specific parameters.

Try spacing out shifts x days apart (G2)

(Goal) Try to space out specific shifts by at least 'x' days for each person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).

Try clustering shifts x days close (G3)

(Goal) Try to group specific shifts close together, within 'x' days, for each person.

Parameters:

  • x: A numerical value (e.g., number of shifts, days, or a limit).