Reputation: 3
How to optimize on number of vehicles utilized and optimize on vehicles with best fit for CVRP, with no Timewindow constraints.
For example --
I am running 10990 Kg load with 15 vehicles (5 vehicles each of capacities 3000Kg, 750Kg and 7500Kg). I have disabled rule for distanceFromLastCustomerToDepot.
When I run it with optaplanner examples as is, it chooses, 3 vehicles of 7500 kgs each.
Since load is 10990Kg, I expect it to fit in 2 vehicles with 7500kg or may be with 3 vehicles of 7500 + 3000 + 750?
How to optimize on this along with distance traveled?
Upvotes: 0
Views: 215
Reputation: 27312
Add a hard constraint or a heavy weighted soft constraint that penalize the number of vehicles used.
That being said, there is research that suggests that in some case, even with that constraint, local search can have trouble cutting down the number of vehicles, especially that last vehicle. Custom, course-grained moves should overcome that decently. But in practice, for convenience, people often just run a second solver which enforces one vehicle less by simply having less vehicles to start with.
Upvotes: 0