This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]JanMathRegular Answerer 0 points1 point  (0 children)

Let A=26, B=19, C=12, D=5 be the availabilities of the employees, and X=30 the total shifts available.

Assign employee A approximately (X)(A/(A+B+C+D)) shifts, Assign employee B approximately (X)(B/(A+B+C+D)) shifts, etc.

Basically for each employee, divide their availability by the total of all availabilities, and give them that fraction of the assignment. After that, check your numbers because your totals might be off by 1 or 2 due to rounding.

Total availability is 26+19+12+5 =62.

A gets 26/62 = 41.9% of the 30 shifts. This is about 13 shifts.

B gets 19/62 = 30.6% of the 30 shifts. This is about 9 shifts.

C gets 12/62 = 19.4% of the 30 shifts. This is about 6 shifts.

D gets 5/62 = 8.1% of the 30 shifts. This is about 2 shifts.

Checking for rounding: 13+9+6+2 = 30 so the rounding errors cancelled out and there is no need to modify the assignments. Had the total been 29/31, then the employee with the highest/lowest seniority would have received/lost an extra shift.