What is the optimal number of iterations for jsprit solution for pickups_and_deliveries_solomon_c101.xml?

749 views Asked by At

VehicleRoutingAlgorithm vra = vraBuilder.build(); vra.setMaxIterations(250);

We use the above code for number of iterations to be done to find vra solution. in the examples in jsprit I can see 250 as a hard coded value. My question is what is the optimal value for that. Is there any option to have solution in between the execution? I don't want to wait 250 number of iterations. Is that possible?

1

There are 1 answers

1
Stanley On BEST ANSWER

It really depends on your problem size. My suggestion is to set a reasonable large maxIterations and define add termination criterion to the algorithm.

The configuration below terminates the algorithm prematurely based on iterations without any improvement.

VehicleRoutingAlgorithm vra = vraBuilder.build(); 
vra.setMaxIterations(250);
vra.addTerminationCriterion(new IterationWithoutImprovementTermination(500));