pickups_and_deliveries_solomon_c101.xml 的 jsprit 解决方案的最佳迭代次数是多少?

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

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

我们使用上面的代码计算要完成的迭代次数以找到 vra 解决方案。 在 jsprit 的示例中,我可以将 250 视为硬编码值。 我的问题是什么是最优值。 在执行之间是否有任何解决方案?我不想等待 250 次迭代。这可能吗?

这实际上取决于您的问题大小。我的建议是设置一个合理的大 maxIterations 并为算法定义添加终止标准。

下面的配置根据迭代提前终止算法,没有任何改进。

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