Number of vehicles vs computation time

Hi all and thank you for this great work.

I’ve been testing with Jsprit for a week now and I noticed that the more vehicles I add (with FleetSize.FINITE) the slower it becomes, I have 500 services and 100 vehicles.
I have tested with 74 jobs with the following number of vehicles, all start from the same place.

With 10 Vehicles, it takes 79 seconds,
With 20 Vehicles, it takes 378 seconds,
With 50 Vehicles, it takes 504 seconds,

I wonder if I’m doing something wrong ?

Thanks in advance,

No you don’t. Algorithm try to compute route for each vehicle, so more vehicles = more routes = more computation time. You can decrease time by adding more threads. Rule of thumb is route per thread. So If each vehicle need compute one route it will be computed on one thread => more thread, more parallel computation = less time.

1 Like