From 97fa2a7639cd0004d8dbefca0b63b1b709f22f73 Mon Sep 17 00:00:00 2001 From: oblonski <4sschroeder@gmail.com> Date: Mon, 10 Feb 2014 18:01:23 +0100 Subject: [PATCH] some mod --- jsprit-examples/input/algorithmConfig_open.xml | 10 +++++----- .../main/java/jsprit/examples/BicycleMessenger.java | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/jsprit-examples/input/algorithmConfig_open.xml b/jsprit-examples/input/algorithmConfig_open.xml index 25c78f00..031f78f0 100755 --- a/jsprit-examples/input/algorithmConfig_open.xml +++ b/jsprit-examples/input/algorithmConfig_open.xml @@ -22,11 +22,11 @@ - 1000 + 20000 - false + true @@ -36,8 +36,8 @@ - 0.1 - 40 + 0.05 + 20 @@ -56,7 +56,7 @@ - + 0.3 diff --git a/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java b/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java index fbcc7ca9..cf66ee66 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java +++ b/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java @@ -8,6 +8,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; +import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener; import jsprit.analysis.toolbox.GraphStreamViewer; import jsprit.analysis.toolbox.GraphStreamViewer.Label; import jsprit.analysis.toolbox.Plotter; @@ -226,7 +227,7 @@ public class BicycleMessenger { problemBuilder.addConstraint(new ThreeTimesLessThanBestDirectRouteConstraint(nearestMessengers, routingCosts, stateManager)); problemBuilder.addConstraint(new IgnoreMessengerThatCanNeverMeetTimeRequirements(nearestMessengers, routingCosts)); - problemBuilder.addPenaltyVehicles(10.0,50000); + problemBuilder.addPenaltyVehicles(20.0,50000); //finally build the problem VehicleRoutingProblem bicycleMessengerProblem = problemBuilder.build(); @@ -238,8 +239,8 @@ public class BicycleMessenger { VehicleRoutingAlgorithm algorithm = VehicleRoutingAlgorithms.readAndCreateAlgorithm(bicycleMessengerProblem,"input/algorithmConfig_open.xml", stateManager); //if you want, terminate it after 1000 iterations with no change // algorithm.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(1000)); -// algorithm.addListener(new AlgorithmSearchProgressChartListener("output/progress.png")); - algorithm.setNuOfIterations(2000); + algorithm.addListener(new AlgorithmSearchProgressChartListener("output/progress.png")); +// algorithm.setNuOfIterations(2000); Collection solutions = algorithm.searchSolutions(); //this is just to ensure that solution meet the above constraints