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

update example

This commit is contained in:
oblonski 2016-08-04 09:34:03 +02:00
parent acb82f6646
commit a96719fde2

View file

@ -19,6 +19,7 @@ package com.graphhopper.jsprit.examples;
import com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer; import com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer;
import com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.Label; import com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.Label;
import com.graphhopper.jsprit.analysis.toolbox.Plotter;
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm; import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit; import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.algorithm.box.SchrimpfFactory; import com.graphhopper.jsprit.core.algorithm.box.SchrimpfFactory;
@ -106,8 +107,11 @@ public class SimpleExample {
/* /*
* plot * plot
*/ */
// SolutionPlotter.plotSolutionAsPNG(problem, bestSolution, "output/solution.png", "solution"); new Plotter(problem,bestSolution).plot("output/plot.png","simple example");
/*
render problem and solution with GraphStream
*/
new GraphStreamViewer(problem, bestSolution).labelWith(Label.ID).setRenderDelay(200).display(); new GraphStreamViewer(problem, bestSolution).labelWith(Label.ID).setRenderDelay(200).display();
} }