mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add bad job list
This commit is contained in:
parent
632a889c4b
commit
62331ccfd9
15 changed files with 167 additions and 117 deletions
|
|
@ -245,7 +245,7 @@ public class BicycleMessenger {
|
|||
VehicleRoutingTransportCosts routingCosts = new CrowFlyCosts(problemBuilder.getLocations()); //which is the default VehicleRoutingTransportCosts in builder above
|
||||
problemBuilder.setRoutingCost(routingCosts);
|
||||
//finally build the problem
|
||||
problemBuilder.addPenaltyVehicles(20.0,50000);
|
||||
// problemBuilder.addPenaltyVehicles(20.0,50000);
|
||||
VehicleRoutingProblem bicycleMessengerProblem = problemBuilder.build();
|
||||
|
||||
/*
|
||||
|
|
@ -272,10 +272,10 @@ public class BicycleMessenger {
|
|||
vraBuilder.addDefaultCostCalculators();
|
||||
vraBuilder.setStateAndConstraintManager(stateManager, constraintManager);
|
||||
VehicleRoutingAlgorithm algorithm = vraBuilder.build();
|
||||
algorithm.setNuOfIterations(2000);
|
||||
algorithm.setMaxIterations(2000);
|
||||
VariationCoefficientTermination prematureAlgorithmTermination = new VariationCoefficientTermination(200, 0.001);
|
||||
algorithm.setPrematureAlgorithmTermination(prematureAlgorithmTermination);
|
||||
algorithm.addListener(prematureAlgorithmTermination);
|
||||
// algorithm.setPrematureAlgorithmTermination(prematureAlgorithmTermination);
|
||||
// algorithm.addListener(prematureAlgorithmTermination);
|
||||
// algorithm.addListener(new AlgorithmSearchProgressChartListener("output/progress.png"));
|
||||
|
||||
//search
|
||||
|
|
@ -294,7 +294,8 @@ public class BicycleMessenger {
|
|||
|
||||
//and the problem as well as the solution
|
||||
Plotter plotter1 = new Plotter(bicycleMessengerProblem, Solutions.bestOf(solutions));
|
||||
plotter1.plotShipments(false);
|
||||
plotter1.setLabel(Plotter.Label.ID);
|
||||
plotter1.plotShipments(false);
|
||||
// plotter1.setBoundingBox(5000, 45500, 25000, 66500);
|
||||
plotter1.plot("output/bicycleMessengerSolution.png", "bicycleMessenger");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue