Algorithms – Creating an Automatic Staff Scheduling Feature

algorithms

Imagine a small local business (in my case a dog daycare) with a few dozen part-time employees . The goal is to automatically create weekly staff schedules. My question is about what algorithmic approaches to explore for this problem.

There are many constraints to keep in mind, chiefly (1) the availability of the staff and (2) the needs of each shift, not just how many staff for each shift but the skills needed for each shift (e.g. for a certain shift, you may need someone who knows how to drive to do pick-ups/drop-off of dogs, for another, someone who know how to give dogs baths, etc).

Other constraints include things like avoiding or requiring certain staff combos — perhaps due to personality conflicts on one hand, or need for training by osmosis from a senior to junior staff on the other.

Also, there are preferences to take into account. Some staff prefer mornings, some two days in a row rather than say Monday and Thursday, etc. We know we can't always accommodate everyone's preferences. In fact we have a hierarchy of which employees get first dibs on their choices.

I have a hunch that there is a way to reduce or express this problem into an existing, already solved algorithm. But I don't know which algorithms to explore. Which existing, specific algorithms would be most promising?

Best Answer

Algorithms such as Local Search (Tabu Search, Simulated Annealing, Late Acceptance) work very well on such problems.

As Bob suggests, if you're working in Java, take a look at OptaPlanner (open source). See this video on employee rostering.

Related Topic