mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
issue #63 - very basic version of GraphStreamViewer
This commit is contained in:
parent
439ee29895
commit
8e862b524e
4 changed files with 134 additions and 249 deletions
|
|
@ -108,7 +108,7 @@ public class PickupAndDeliveryExample2 {
|
|||
plotter.plot("output/pd_christophides_vrpnc1_solution.png","pd_vrpnc1");
|
||||
|
||||
|
||||
new GraphStreamViewer(vrp, solution).setRenderDelay(100).labelWith(jsprit.analysis.toolbox.GraphStreamViewer.Label.ID).display();
|
||||
new GraphStreamViewer(vrp, solution).setRenderDelay(100).display();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
|
|||
solutionPlotter.plotShipments(true);
|
||||
solutionPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");
|
||||
|
||||
new GraphStreamViewer(problem, bestSolution).setRenderDelay(100).display();
|
||||
new GraphStreamViewer(problem, bestSolution).setRenderShipments(true).setRenderDelay(100).display();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package jsprit.examples;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.SolutionPlotter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter.Print;
|
||||
|
|
@ -103,7 +104,9 @@ public class SimpleExample {
|
|||
/*
|
||||
* plot
|
||||
*/
|
||||
SolutionPlotter.plotSolutionAsPNG(problem, bestSolution, "output/solution.png", "solution");
|
||||
// SolutionPlotter.plotSolutionAsPNG(problem, bestSolution, "output/solution.png", "solution");
|
||||
|
||||
new GraphStreamViewer(problem, bestSolution).display();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue