Shift N' Tab Shift N' Tab - 1 month ago 8
C# Question

3-Shift Employee Scheduling 24/7 Pattern

I have a problem creating 3-shift scheduling for my application that run on top of .Net C#.

To define the problem we need to determine the shift and the number of employee/s(eN).

Now the client has only 3 default shift which are:


  1. Morning - 8:00am to 4:00pm

  2. Swing - 4:00pm to 12:00am

  3. Graveyard - 12:00am to 8:00am



And their total of employee is LEAST 7 employees

Now how can i accommodate all employees in a week or 7 days with a balance shift personnel each day regardless of employee numbers and each should shuffle when every time one employee has a day-off. And I would like that every employee should have a day-off per week.

To clarify the problem here is my illustration:

In this case we will have a 7 Employees in each day for the whole week. Employee should shuffle whenever one employee is day-off to balance healthy shifting process.

DAY 1 - 7
---------------------------
Morning | 2 Employees
Swing | 2 Employees
Graveyard | 2 Employees
Day-Off | 1 Employee


Another example:

Now we will have 8 Employees. To balance the shift personnel i would like to do this pattern:

DAY 1
---------------------------
Morning | 3 Employees
Swing | 2 Employees
Graveyard | 2 Employees
Day-Off | 1 Employee

DAY 2
---------------------------
Morning | 2 Employees
Swing | 2 Employees
Graveyard | 3 Employees
Day-Off | 1 Employee

DAY 3
---------------------------
Morning | 2 Employees
Swing | 3 Employees
Graveyard | 2 Employees
Day-Off | 1 Employee

DAY 4
---------------------------
Morning | 2 Employees
Swing | 2 Employees
Graveyard | 2 Employees
Day-Off | 2 Employee

DAY 5
---------------------------
Morning | 2 Employees
Swing | 3 Employees
Graveyard | 2 Employees
Day-Off | 1 Employee

DAY 6
---------------------------
Morning | 3 Employees
Swing | 2 Employees
Graveyard | 2 Employees
Day-Off | 1 Employee

DAY 7
---------------------------
Morning | 2 Employees
Swing | 2 Employees
Graveyard | 3 Employees
Day-Off | 1 Employee


But the system must not only limited to 7 or 8 employee it should be dynamic in accommodating regardless of the number of employeee.

Here is a logical sequence of shifts:

Morning | Swing | Graveyard | Day-Off
Morning ✔ ✔
Swing ✔ ✔ ✔
Graveyard ✔ ✔ ✔ ✔
Day-Off ✔ ✔ ✔






NOTE: I don't ask for code for to create such a pattern, I would like you to help me comes up with a solution or dynamic helpful pattern that will help me solve this one.


I googled and search every scheduling site but it doesn't provide necessary idea or answer.'

Your HELP is highly appreciated.

Answer

When I worked close with an OPS team they had a simple pattern, but they done scheduling manually. How they worked was:

Employee 1: 
  Week 1: Morning
  Week 2: Swing
  Week 3: Graveyard

Employee 2:
  Week 1:  Morning
  Week 2:  Graveyard
  Week 3:  Swing

This meant that employees did not work with somebody 2 consecutive weeks, and had a fixed pattern.

In our case it was more complex as they worked 5 days and then had 2 days off, except night shift/graveyard which worked 4 days (due to extra time required to recover, extra fatigue, and after working graveyard you can't work until the next day (so graveyard to swing or morning meant that you had an extra day).

What ever your shift pattern there will be a minimum number of people you need and a maximum. After the max, people end up with more time off. Then you need to consider other factors such as illness, holidays etc.

In our case what we done was that we had extra people to cover these factors. So that the Swing & Graveyard had a max number of people (2 people) and any 'left over' were put onto the day shift, as in our case there was more work during the day so more than 2 people were needed anyway.

So you would need to decide what happens if you have more than the max number of employees, or you have illness, holidays etc. (A question to the business)

My suggestion would be to work out your min and max numbers for your shift pattern, then map it out on pen and paper (or excel!), then add extra people and see how to schedule them. Then once you know this then you have your model and can code it.

You might also need a way to override this manually, so for example change employee1 to employee7 in case of illness. Then you have the nightmare of rescheduling, to determine what impact this has.

If I map this into Excel, using 8 employees then I get the following;

Schedule

Here, I have highlighted "Fred" and you can see the pattern as he goes through the weeks. But, for every employee over your minimum (7) then you end up with more days off and a long pattern. E.g. 9 people = 3 people off and a 9 week pattern.

In the end, you you know the business rules that have to be applied such as amount of time between shifts, days off per week, what to do in case of illness, holiday etc.

You could of course adjust this to be a 6 day week or a 5 day week as needed. And rather than giving people a whole week off, then on these weeks they are 'extra' resources assign to the day shift.

Comments