I have been thinking about an optimal solution for a real-world problem but just haven’t had any time to have a crack at it. A friend at work suggested I should put it up as a challenge and see who is the ultimate programmer.
A manager has allocated Shifts to their Staff for a given week.
Can you allocate the same shifts to different people for a lower wage cost?
Staff have Availability which is what shifts they are available for each day of the week.
They also have a Wage category which based on the day of the week and the Shift will give you the DayWage or cost of that shift.
For instance, a Wage might be $19/hour, but on Saturdays, after 7pm, over 8 hours in day etc it could be different.
Can you implement an Optimiser that calculates a cheaper combination that is still valid? Download the intelliJ project now!
I have tried porting across to Java the essence of the problem. The major component that is missing is that Wages have a end-of-week processing. For instance, if a Staff member works over 38 hours in the week, any further hours worked will get at time and a half. I think this adds too much complexity to the scenario and for now have left it out for now.