1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

plot solution as well

This commit is contained in:
oblonski 2014-07-03 10:05:17 +02:00
parent 8d04e90725
commit b3cc891cc5

View file

@ -215,14 +215,12 @@ public class TransportOfDisabledPeople {
problemPlotter.plotShipments(true); problemPlotter.plotShipments(true);
problemPlotter.setLabel(jsprit.analysis.toolbox.Plotter.Label.SIZE); problemPlotter.setLabel(jsprit.analysis.toolbox.Plotter.Label.SIZE);
problemPlotter.plot("output/transportOfDisabledPeopleExample_problem.png", "disabled people tp"); problemPlotter.plot("output/transportOfDisabledPeopleExample_problem.png", "disabled people tp");
//
// /* Plotter solutionPlotter = new Plotter(problem,Solutions.bestOf(solutions));
// * plot problem with solution solutionPlotter.plotShipments(true);
// */ solutionPlotter.setLabel(jsprit.analysis.toolbox.Plotter.Label.SIZE);
// Plotter solutionPlotter = new Plotter(problem,Arrays.asList(Solutions.bestOf(solutions).getRoutes().iterator().next())); solutionPlotter.plot("output/transportOfDisabledPeopleExample_solution.png", "disabled people tp");
// solutionPlotter.plotShipments(true);
// solutionPlotter.plot("output/enRoutePickupAndDeliveryWithMultipleLocationsExample_solution.png", "en-route pickup and delivery");
new GraphStreamViewer(problem).labelWith(Label.ID).setRenderDelay(100).setRenderShipments(true).display(); 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(); new GraphStreamViewer(problem,Solutions.bestOf(solutions)).labelWith(Label.ACTIVITY).setRenderDelay(100).setRenderShipments(true).display();