1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

illustrate FastRegret

This commit is contained in:
oblonski 2016-02-03 06:45:09 +01:00
parent bf402f7c69
commit 2b3fd0f3fa

View file

@ -104,7 +104,9 @@ public class MultipleDepotExample2 {
/* /*
* solve the problem * solve the problem
*/ */
VehicleRoutingAlgorithm vra = Jsprit.Builder.newInstance(vrp).setProperty(Jsprit.Parameter.THREADS, "5").buildAlgorithm(); VehicleRoutingAlgorithm vra = Jsprit.Builder.newInstance(vrp)
.setProperty(Jsprit.Parameter.FAST_REGRET, "true")
.setProperty(Jsprit.Parameter.THREADS, "5").buildAlgorithm();
vra.setMaxIterations(2000); vra.setMaxIterations(2000);
vra.getAlgorithmListeners().addListener(new StopWatch(), Priority.HIGH); vra.getAlgorithmListeners().addListener(new StopWatch(), Priority.HIGH);
vra.getAlgorithmListeners().addListener(new AlgorithmSearchProgressChartListener("output/progress.png")); vra.getAlgorithmListeners().addListener(new AlgorithmSearchProgressChartListener("output/progress.png"));