#subject to max_y {d in dag, a in arbetare}:
#sum{s in skift} y[d,s,a]<=1;
subject to work_8h_shift_1 {d in dag,m in sentsomfan, a in arbetare}:
x[d,m,a]<=y[d,m,a]+x[d,m-1,a];
subject to work_8h_shift_2 {d in dag,m in sentsomfan, a in arbetare}:
x[d,m-1,a]+y[d,m,a]<=1;
#subject to work_8h_shift_3 {d in dag, m in mittpadagen, a in arbetare}:
#32*y[d,m,a]<=sum{t in 0..31} x[d,m+t,a];
subject to work_8h_shift_3_1 {m in mittpadagen, a in arbetare}:
32*y[1,m,a]<=sum{t in 0..31} x[1,m+t,a];
subject to work_8h_shift_3_2 {m in mittpadagen, a in arbetare}:
32*y[2,m,a]<=sum{t in 0..31} x[2,m+t,a];
subject to work_8h_shift_3_3 {m in mittpadagen, a in arbetare}:
32*y[3,m,a]<=sum{t in 0..31} x[3,m+t,a];
subject to work_8h_shift_3_4 {m in mittpadagen, a in arbetare}:
32*y[4,m,a]<=sum{t in 0..31} x[4,m+t,a];
#subject to work_8h_shift_3_5 {m in mittpadagen, a in arbetare}:
#32*y[5,m,a]<=sum{t in 0..31} x[5,m+t,a];
#subject to work_8h_shift_3_6 {m in mittpadagen, a in arbetare}:
#32*y[6,m,a]<=sum{t in 0..31} x[6,m+t,a];
subject to work_8h_shift_4 {d in dag,a in arbetare}:
32*x[d,1,a]<=sum{t in 0..31} x[d,1+t,a];
subject to work_8h_shift_5 {d in dag,i in 0..30, a in arbetare}:
32*y[d,53+i,a]<=sum{t in 0..(30-i)} x[d,53+t,a];
As you can see I have made some simplifications. But I indeed still seem to have the same problem that you mentioned. I spoke to my professor aswell and he said that the exact same thing. I tried to set different costs on each individual but doesn't seem to work, do you have any tips how to solve this? If you want I can of course email the files to you.
best rgds
William