I need to model collection routes for a single truck in several cities. Working time is from 08:00 - 12:00, then 13:00 - 15:00. Break is from 12:00 - 13:00. To simulate that, I created a "Routes" sheet with 3 routes , all with EarliestStartTime 08:00 and MaxTotalTime 7. Breaks refer to each route with TimeWindowStart 12:00 and TimeWindowEnd 13:00.
Because I only have one truck, the routes are supposed to reflect days. I made three of them to exclude the possibility that points are left out for exceeding the total time.
My problem is that the most optimal solution would be the one that uses the least amount of routes (days in my case). However, if I use three routes for a city in which one or two is enough, VRP will adjust the solution so that all three are used.
My current workaround is estimating how many routes I will need and giving VRP only these, but I'm not always correct and need to spend more time and credits re-running them. AssignmentRule only excludes or includes a route but doesn't allow for prioritisation.
Is there really no possibility of making VRP model the least possible amount of routes?
Thank you in advance.
Solved! Go to Solution.
Try adding a high value such as 1000 to FixedCost for each route. This would indicate to the solver that there is a cost to starting a new route and should help reduce the number of routes that are started.
Try adding a high value such as 1000 to FixedCost for each route. This would indicate to the solver that there is a cost to starting a new route and should help reduce the number of routes that are started.
Thank you so much, Heather! This solved it!