Hello,

My company is organizing an internal competition to solve a real-life-inspired problem that involves optimally designing and assigning shifts for a number of employees. I know that most of my competitors in the challenge are going to go for a Mixed Integer-Linear Programming approach using CPLEX. I would like to see whether JaCoP can compete, and I am welcoming suggestions on how to model the problem and what search to use.

The problem is as follows (without going into too much detail). On the one hand, you have a number of employees (100), who are the resources. On the other hand, you have a demand curve, which gives the desired number of employees/resources for each 15-min time interval over a whole week. The goal is to design and assign shifts to the employees so as to cover the demand. There are labor law constraints on the shifts (min and max duration, min rest period between two shifts, necessity of a break in the middle of long shifts, maximum number of consecutive work days, maximum number of consecutive work days with a night shift...). The objective function is a weighted sum of multiple factors, including a measure of fairness, and the total amount of under- or over-coverage of the demand (so, the demand is a soft constraint).

I assume that the only way JaCoP could win over CPLEX is if I formulate the problem using global constraints. So I went through the catalog of global constraints supported by JaCoP, and one I thought could help might be the Geost constraint, where the objects would be the shifts (whose durations would be decision variables), to be laid out over the schedule (the matrix of time x employees). I could have a master search that tries to find the optimal number of shifts, and a slave search that would use the Geost constraint (and many others) to optimally size and schedule the shifts.

What do you think of my idea? Would you have suggestions on how to do it better?

Thanks a lot in advance.