0
votes

I'm just trying to figure out which kind of algorithm I should use in my case (employee scheduling)

Say I have a shift, with n employees scheduled on the shift. By default, they are scheduled onto the shift based on their availability. For instance, I can have a shift be from 1 pm to 11 pm, with 2 employees working from 1 pm to 9 pm. In this scenario, there is no coverage between 9 pm and 11 pm

I want to move the employees around so that I try to maximise the shift's coverage; e.g. in the previous example, I would have 1 employee from 1 pm to 9 pm, and the other one from 3 pm to 11 pm.

To get to the stage where I already have employees assigned to shifts, I used the tabu search algorithm, but in this scenario, I assume there would be something more fitted to use?

Thanks !

1
What are the characteristics of a worker? - Beta
They have their availability defined for each day (e.g. available from 8 am to 5 pm), and they may be working on some other shifts before or after the shift for which I'm trying to optimise coverage. They also have a minimum/maximum number of hours worked per week (but I can ignore this for now). Other than that, nothing that would impact on assigning a worker on a different timeframe, on the same shift - David
Can you swap a worker on the shift with one not on the shift? - Beta
I'd prefer not to. To get to the point where I want to optimise coverage for all shifts, a scheduling phase already took place to assign employees to the schedule's shifts based on various constraints (employee availability/preferences, number of staff required, ...), using the tabu search algorithm. Now, for each shift, I just want to shuffle around the employees assigned to that shift to optimise the coverage (and I'm aware that by doing this after the first scheduling phase, each shift might not have enough employees to have 100 % coverage) - David
And a worker must not work more than 8 hours during this shift? And that time must be in one contiguous period (not e.g. 1:00-5:00,6:00-10:00)? And there are no other restrictions? - Beta

1 Answers

1
votes

I would suggest a brute force algorithm of your own creation. Cater for processing all the combinations, and then reject the impossible or undesirable ones. The reason for this is you will probably have custom caveats on your particular Shift system. Then you can plug in your own factors (Rest between shifts, shifts starting early / finishing late, shifts across midnight or overlapping, payment for staff higher on some shifts, reduction of staff costs, etc)... Its a bit like the Travelling Salesman algorithm of which there is nothing better than brute force despite some algorithms being faster or more elegant than others simply as they eliminate combinations sooner in the process. When you end up with 1 or more viable combinations, then the choice can be arbitrary - but obviously will affect the future shifts.