mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add comments
This commit is contained in:
parent
37df98b542
commit
8b41c8d2d0
1 changed files with 10 additions and 1 deletions
|
|
@ -102,17 +102,26 @@ public class SimpleEnRoutePickupAndDeliveryExample {
|
||||||
*/
|
*/
|
||||||
VehicleRoutingProblemSolution bestSolution = Solutions.bestOf(solutions);
|
VehicleRoutingProblemSolution bestSolution = Solutions.bestOf(solutions);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* write out problem and solution to xml-file
|
||||||
|
*/
|
||||||
new VrpXMLWriter(problem, solutions).write("output/shipment-problem-with-solution.xml");
|
new VrpXMLWriter(problem, solutions).write("output/shipment-problem-with-solution.xml");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* print nRoutes and totalCosts of bestSolution
|
||||||
|
*/
|
||||||
SolutionPrinter.print(bestSolution);
|
SolutionPrinter.print(bestSolution);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* plot
|
* plot problem without solution
|
||||||
*/
|
*/
|
||||||
Plotter problemPlotter = new Plotter(problem);
|
Plotter problemPlotter = new Plotter(problem);
|
||||||
problemPlotter.plotShipments(true);
|
problemPlotter.plotShipments(true);
|
||||||
problemPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_problem.png", "en-route pickup and delivery");
|
problemPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_problem.png", "en-route pickup and delivery");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* plot problem with solution
|
||||||
|
*/
|
||||||
Plotter solutionPlotter = new Plotter(problem,Arrays.asList(Solutions.bestOf(solutions).getRoutes().iterator().next()));
|
Plotter solutionPlotter = new Plotter(problem,Arrays.asList(Solutions.bestOf(solutions).getRoutes().iterator().next()));
|
||||||
solutionPlotter.plotShipments(true);
|
solutionPlotter.plotShipments(true);
|
||||||
solutionPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");
|
solutionPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue