I'm using OR-Tools' VRP solver (in Python) to schedule vehicle routes for the following problem:
There is a list of customer locations that must be visited within a given week (Mon-Sun), but we don't care which day they're visited.
We have multiple teams available to send out each day to customers (each team has one vehicle), and we can send any team to any customer.
Therefore, in my model, a "vehicle" is defined as a team-day; e.g., Team 1 on Monday is a vehicle, and Team 2 on Tuesday is treated as a separate vehicle, etc. So if there are 6 teams and 7 days in the week, I tell the solver I have 42 vehicles available to cover all of the locations. I'm optimizing travel times and each of these "vehicles" may have a different maximum travel time, as a team's availability varies from day to day.
I have all of this working with OR-Tools.
In some of my test cases, where the total available time significantly exceeds the demand, the solution returned includes some vehicles that assigned an empty route (i.e. a team has a day off). This is fine, but often the unassigned day is in the middle of the week. So the solution might give Team 1 customers on Mon, Tues, Wed, Sat, and Sun, and leave Team 1 unassigned on Thur and Fri.
I would prefer to front-load the work week, so in this scenario if possible I'd like Team 1 to work on Mon-Fri and have Sat/Sun off. Is there a way to include this (soft) constraint in OR-Tools?
It's not a matter of just swapping one day's schedule for another, because the team might be available for fewer hours on one day vs. another. e.g. If a team's availability is this
Mon: 6 hours Tues: 6 hours Wed: 8 hours
and the solver returns a solution with the following travel times
Mon: 0 hours Tues: 0 hours Wed: 8 hours
I would prefer it to return Mon: 6 hours Tues: 2+ hours Wed: 0 hours
I'm envisioning this might be solved by "prioritizing" vehicles (Team-1-Monday and Team-2-Monday have priority over Team-1-Tuesday and Team-2-Tuesday when assigning locations, for example), but I'm not sure how to specify this in OR-Tools.