Following this great answer to a previous question of mine, I'm now wondering if it is possible to give weights to each one of the hours so as to force shifts to gravitate towards high-weighted hours, i.e. rush hours.
The cost of an assignment is given arbitrarily by a number of weights; one for each hour. fyr @Anatolii
@Laurent Perron: What I tried to do is the following: Assuming that each driver has a capacity of 2, then total capacity per shift cannot exceed the max capacity. How's that sound?
for shift_id in range(num_shifts):
model.Add(
sum(driver_shifts[(driver_id, shift_id)] for driver_id in range(num_drivers)) * 2 <=
weights[shift_id])