I'm using Optaplanner VRP tool to solve some VRP instances. Is there a way to view the number of vehicles being used in real-time? Also, what algorithm does Optaplanner employ for solving VRP?
Thanks, Mayank
I'm using Optaplanner VRP tool to solve some VRP instances. Is there a way to view the number of vehicles being used in real-time? Also, what algorithm does Optaplanner employ for solving VRP?
Thanks, Mayank
When you're listening to new best solution events in real time (Solver.addSolverListener
), it's straightforward to determine the number of vehicles used, by iterating all Vehicle
instances and checking if nextVisit
isn't null
.
Note that if you want to minimize the number of vehicle used, you'll need to add a hard or softt constraint for that, which is simple: when Vehicle(nextVisit != null) then addHard(-1); end
As for the algorithm used to solve VRP: check the solver config XML. We support many algo's, in the vrp benchmark config XML we let them battle against each other to determine the best algo for production.