From b3cc891cc5b94a5ee2785bd2bab36b9a64314a30 Mon Sep 17 00:00:00 2001 From: oblonski <4sschroeder@gmail.com> Date: Thu, 3 Jul 2014 10:05:17 +0200 Subject: [PATCH] plot solution as well --- .../jsprit/examples/TransportOfDisabledPeople.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java b/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java index 65576ac1..df21df4b 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java +++ b/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java @@ -215,14 +215,12 @@ public class TransportOfDisabledPeople { problemPlotter.plotShipments(true); problemPlotter.setLabel(jsprit.analysis.toolbox.Plotter.Label.SIZE); problemPlotter.plot("output/transportOfDisabledPeopleExample_problem.png", "disabled people tp"); -// -// /* -// * plot problem with solution -// */ -// Plotter solutionPlotter = new Plotter(problem,Arrays.asList(Solutions.bestOf(solutions).getRoutes().iterator().next())); -// solutionPlotter.plotShipments(true); -// solutionPlotter.plot("output/enRoutePickupAndDeliveryWithMultipleLocationsExample_solution.png", "en-route pickup and delivery"); - + + Plotter solutionPlotter = new Plotter(problem,Solutions.bestOf(solutions)); + solutionPlotter.plotShipments(true); + solutionPlotter.setLabel(jsprit.analysis.toolbox.Plotter.Label.SIZE); + solutionPlotter.plot("output/transportOfDisabledPeopleExample_solution.png", "disabled people tp"); + new GraphStreamViewer(problem).labelWith(Label.ID).setRenderDelay(100).setRenderShipments(true).display(); new GraphStreamViewer(problem,Solutions.bestOf(solutions)).labelWith(Label.ACTIVITY).setRenderDelay(100).setRenderShipments(true).display();