mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
play
This commit is contained in:
parent
4d8f31fb64
commit
8ca6966d95
1 changed files with 1 additions and 2 deletions
|
|
@ -206,7 +206,7 @@ public class BicycleMessenger {
|
||||||
stateManager.addStateUpdater(new UpdateLatestActivityStartTimes(stateManager, routingCosts, nearestMessengers));
|
stateManager.addStateUpdater(new UpdateLatestActivityStartTimes(stateManager, routingCosts, nearestMessengers));
|
||||||
|
|
||||||
//create your algorithm
|
//create your algorithm
|
||||||
VehicleRoutingAlgorithm algorithm = VehicleRoutingAlgorithms.readAndCreateAlgorithm(bicycleMessengerProblem,"input/algorithmConfig_open.xml", stateManager);
|
VehicleRoutingAlgorithm algorithm = VehicleRoutingAlgorithms.readAndCreateAlgorithm(bicycleMessengerProblem,4,"input/algorithmConfig_open.xml", stateManager);
|
||||||
//if you want, terminate it after 1000 iterations with no change
|
//if you want, terminate it after 1000 iterations with no change
|
||||||
algorithm.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(1000));
|
algorithm.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(1000));
|
||||||
// algorithm.addListener(new AlgorithmSearchProgressChartListener("output/progress.png"));
|
// algorithm.addListener(new AlgorithmSearchProgressChartListener("output/progress.png"));
|
||||||
|
|
@ -216,7 +216,6 @@ public class BicycleMessenger {
|
||||||
//this is just to ensure that solution meet the above constraints
|
//this is just to ensure that solution meet the above constraints
|
||||||
validateSolution(Solutions.bestOf(solutions), bicycleMessengerProblem, nearestMessengers);
|
validateSolution(Solutions.bestOf(solutions), bicycleMessengerProblem, nearestMessengers);
|
||||||
|
|
||||||
SolutionPrinter.print(Solutions.bestOf(solutions));
|
|
||||||
SolutionPrinter.print(bicycleMessengerProblem, Solutions.bestOf(solutions), Print.VERBOSE);
|
SolutionPrinter.print(bicycleMessengerProblem, Solutions.bestOf(solutions), Print.VERBOSE);
|
||||||
|
|
||||||
//you may want to plot the problem
|
//you may want to plot the problem
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue