I’m looking for a strategy to determine the optimal max iterations value “vra.setMaxIterations(maxIterations)” : trade-off between best final results and lowest time to process jsprit.
I guess it depends on the used algorithm and the number of visited node, am i correct?
For instance, it is not necessary to use a high max iterations for simple problem.
No answer, nevermind, max iterations is an algo parameter…
By the way, on jpsrit 1.6.2, to build a problem :
final VehicleRoutingProblem vrp = vrpBuilder.build();
final VehicleRoutingAlgorithmBuilder vraBuilder = new VehicleRoutingAlgorithmBuilder(vrp, xml_file);
On jsprit 1.7.0, VehicleRoutingAlgorithmBuilder doesn’t exist anymore, did you remove xml configuration way? Now the appropriate way is to configure algo by coding?
Unfortunately, you need to find out yourself. Just conduct a sensitivity study based on your problems with varying max iterations. For very simple problems, you dont need many iterations. However, you can also use a number of termination strategies you can find here: jsprit/jsprit-core/src/main/java/com/graphhopper/jsprit/core/algorithm/termination at master · graphhopper/jsprit · GitHub. For example, VariationCoefficientTermination terminates the algo if variations of costs of found solutions are less than a threshold variation.