The problem:
Multiple vehicles in multiple days meeting the location's time windows plan - obtaining territories.
Let's suppose there's a list of locations, each with specified time windows per day in a time frame of 4 to 8 weeks. Each location has a limitation, for example, available visits at Monday and Friday, 09:00 to 17:00. The frequency of visit may vary between 1 and 3 times per week.
The whole plan contains location data - required visits in the next 4/8 weeks. Example:
Week: 2, Location: 10001, Visit: 3 times, Days: Tuesday-Saturday-Sunday, Available times: 09:00-17:00.
Week: 3, Location: 10001, Visit: 2 times, Days: Monday-Sunday, Available times: 09:00-13:00.
This goes for every location within that 4/8 week mark. The algorithm should solve all locations(or most of them), and generate plan, based on which there will be territory division. In other words, I need some sort of clustering per regions based on the algorithm output.
Desired output:
The end product should be for example, based on ~20,000 locations the algorithm should create 15 regions. Each region should be coverable by one user (although locations can be dropped) within the cycle. The user within that territory should be able to cover all the locations(or most of them) daily.
One approach:
My first thought was to create a different plan for each day within that 8 weeks, then group the similar solutions together in a cluster, which will output the territory plan.
The downside of this approach might be if in two days, one location is included into a different territory. In that scenario, there might be conflict between deciding which location should be in which territory.
Another approach
Maybe VRPTW could do the job, but I'm not sure if that's efficient approach. Given the time windows, I could run a simple VRP with time windows of the whole cycle - representing the repeating locations as new ones with different work hours. At the end, the output could be a bunch of clusters by itself, with a risk that this might be totally mixed up.
The main idea
.. is to assign a whole territory to a single user, so that one user will cover only one region in that cycle. In the following 4/8 weeks he should cover all the needs in that region only.
Next steps
Next, route optimization can be done within each territory - some advanced TSP for the whole cycle.
Help
I understand that this is an advanced concept that is not supported by ORTools, but I have to figure a way to do this. What do you think is a feasible solution to this 'clustering' problem? Does anyone worked on something similar so far? What are your thoughts on best approach to this type of problem?
Thanks.