Shifts and cycle shifts
A shift is a time period in which an employee works. Each shift has a name in WoShi. An employee may only work one shift per day, though the shift can be split into two parts, separated by a vacant period. If a shift begins on a certain day, but ends on the following day, it still counts as a shift which belongs to he first day (the day on which it started) - A worker may therefore start a new shift on the same day on which he ended a shift that started on the previous day.
Example:
7:00 - 12:00........................... morning shift
12:00 - 19:00 . ....................... afternoon shift
9:00 - 13:00 in 15:00 - 19:00 ... interrupted shift
22:00 - 6:00 ........................... night shift
There is always a daily resting period between two consecutive shifts. In the image above, there is a 19 hour resting period between two 7 am to noon shifts.
A cycle of work days can have any combination of shift types. Examples:
5 consecutive days of 7 am to noon shifts
4 consecutive days of interrupted shifts ( 9 am to 1 pm and 3 pm to 7 pm).
2 days of 7 am to noon shifts followed by 2 days of noon to 7 pm shifts
3 days of 7 am to noon shifts followed by 2 days of interrupted shifts (9 am to 1 pm and 3 pm to 7 pm)
2 days of 8:30 am to 3 pm shifts followed by 2 days of noon to 7 pm shifts.
There is always a weekly resting period between to consecutive shift cycles.
Example1:
5 days of 6 am to 2 pm shifts
weekly resting period
5 days of 2 pm to 10 pm shifts
Example 2:
2 days of 8:30 am to 3 pm shifts, then 2 days of noon to 7 pm shifts
weekly resting period
3 days of interrupted shifts (9 am to 1 pm and 2:30 pm to 6 pm)
Sequential work and changing shifts
A working period (a series of shifts - workdays) is considered to be continuous, when the resting period (the pause between two shifts - workdays) between the shifts is equal to or smaller than the maximum number of daily resting hours. We call this a cycle of shifts. Between two shift cycles, there is a weekly resting period. How do we direct the program to appropriately distribute shifts among consecutive days, and correctly place the weekly resting period? How do we arrange the shifts - e.g. morning and afternoon shifts to fit the required daily resting period between each two?
The four criteria directing WoShi towards the desired result:
The minimal number of consecutive work days
The maximal number of consecutive work days
The daily resting period
The weekly resting period
The minimum and maximum number of consecutive work days determine the length (in days) of intervals between two consecutive weekly resting periods. The maximal daily resting period must be shorter than the minimal weekly resting period.
1. Minimal number of consecutive work days
Determines the number of consecutive days an employee must work. Full-time employees usually have a mostly uninterrupted series of work days, followed by a series of free days. Part-time employees can have shorter series of consecutive work days interrupted by shorter periods of consecutive free days.
2. Maximal number of consecutive work days
Determines the maximal number of consecutive days an employee may work before having a weekly resting period.
3. Daily resting period
The minimal end maximal number of consecutive work days delimit the time period between two weekly resting periods. The daily resting period determines the minimal and maximal resting period between two shifts, that is between two consecutive work days. Minimal resting periods are usually regulated by law.
4. Weekly resting period
The weekly resting period determines the minimum and maximum resting period between two consecutive shift cycles. The weekly resting period must be between the minimal and maximal number of consecutive work days.
Example - Daily resting period
The table below lists the requirements that bind the schedule represented in the above diagram.
Example 1 - the first cycle of work days (see lines 1-3 in the above diagram) should contain a single type of shift (7am - noon):
The employee may work at least 3 and at most 6 consecutive 7am-to-noon shifts. Note that the night shift is not compatible with such a configuration, since a night shift would have to start on the same day as the 7am-to-noon shift.
Example 2 - the second cycle of work days (see lines 4-5 in the above diagram) should contain any mixture of shifts:
The employee works at least 4, and at most 6 consecutive, varying shifts.
Example - Weekly resting period
The most obvious (and most important) function of the weekly resting period is, of course, to assign proper lengths of free time at the end of each shift cycle to each employee. There is, however, another purpose that can be served by altering the length of the weekly resting period. The weekly resting period can be used to determine which shift will begin a new shift cycle, depending on which shift ended the preceding shift cycle. This is achieved by tuning the gap between two shift cycles so that it will fit, for example, between a morning and a night shift, but not between a morning and an afternoon shift. (This is similar to what is achieved more directly in the "Alternate" section of the New Schedule input form.)
The minimum weekly resting period must be longer than the maximum daily resting period. The image below shows examples of different shifts and cycles:
third row - the cycle of shifts is three days long, followed by the resting period
rows 1, 2 and 5 - the cycle of shifts is 3 days long
rows 4 and 6 - the cycle of shifts is 4 days long
All these examples, except for the third, fit the following requirements:
the smallest allowed number of consecutive work days is 3.
the biggest allowed number of consecutive work days is 6.
Examples
The image below shows 6 examples of weekly resting periods
Example 1
We wish to end the first cycle with a morning shift, and begin the next cycle with an afternoon shift.
Example 2
We employ a student, who is going to work between 20 and 100 hours per month. This means that we need to set a very high maximum weekly resting period, since he might not work each of the 20 work days that are in one month.
In such a case, we set the maximum weekly resting period to 160 hours.