From 8b41c8d2d0056be63bf8fefcdec043cf745eb29b Mon Sep 17 00:00:00 2001 From: Stefan Schroeder <4sschroeder@gmail.com> Date: Tue, 26 Nov 2013 15:47:25 +0100 Subject: [PATCH] add comments --- .../SimpleEnRoutePickupAndDeliveryExample.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java index ff23e046..cdb2e7b6 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java @@ -102,17 +102,26 @@ public class SimpleEnRoutePickupAndDeliveryExample { */ VehicleRoutingProblemSolution bestSolution = Solutions.bestOf(solutions); + /* + * write out problem and solution to xml-file + */ new VrpXMLWriter(problem, solutions).write("output/shipment-problem-with-solution.xml"); + /* + * print nRoutes and totalCosts of bestSolution + */ SolutionPrinter.print(bestSolution); /* - * plot + * plot problem without solution */ Plotter problemPlotter = new Plotter(problem); problemPlotter.plotShipments(true); 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())); solutionPlotter.plotShipments(true); solutionPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");