mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
improve visualization
This commit is contained in:
parent
0717f5dd66
commit
f0c6d15852
9 changed files with 294 additions and 210 deletions
|
|
@ -9,6 +9,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter.Print;
|
||||
|
|
@ -264,6 +265,7 @@ public class BicycleMessenger {
|
|||
|
||||
SolutionPrinter.print(bicycleMessengerProblem, Solutions.bestOf(solutions), Print.VERBOSE);
|
||||
|
||||
GraphStreamViewer.display(bicycleMessengerProblem, Solutions.bestOf(solutions), 100);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.Arrays;
|
|||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.SolutionPlotter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.analysis.toolbox.StopWatch;
|
||||
|
|
@ -141,6 +142,7 @@ public class MultipleDepotExampleWithPenaltyVehicles {
|
|||
SolutionPrinter.print(vrp,Solutions.bestOf(solutions),Print.VERBOSE);
|
||||
SolutionPlotter.plotSolutionAsPNG(vrp, Solutions.bestOf(solutions), "output/p08_solution.png", "p08");
|
||||
|
||||
new GraphStreamViewer(vrp,Solutions.bestOf(solutions)).setRenderDelay(50).display();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.io.File;
|
|||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.analysis.toolbox.Plotter.Label;
|
||||
import jsprit.analysis.toolbox.SolutionPlotter;
|
||||
|
|
@ -106,7 +107,7 @@ public class PickupAndDeliveryExample2 {
|
|||
plotter.setShowFirstActivity(true);
|
||||
plotter.plot("output/pd_christophides_vrpnc1_solution.png","pd_vrpnc1");
|
||||
|
||||
|
||||
GraphStreamViewer.display(vrp, solution, 100);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.io.File;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter.Print;
|
||||
|
|
@ -128,6 +129,7 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
|
|||
solutionPlotter.plotShipments(true);
|
||||
solutionPlotter.plot("output/simpleEnRoutePickupAndDeliveryExample_solution.png", "en-route pickup and delivery");
|
||||
|
||||
GraphStreamViewer.display(problem, bestSolution, 100);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package jsprit.examples;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.GraphStream;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.analysis.toolbox.SolutionPlotter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
|
|
@ -101,7 +101,7 @@ public class SolomonExample {
|
|||
|
||||
// GraphStream.display(vrp,100);
|
||||
|
||||
GraphStream.display(vrp,solution);
|
||||
GraphStreamViewer.display(vrp,solution);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package jsprit.examples;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.GraphStream;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.SolutionPlotter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
|
|
@ -95,7 +95,7 @@ public class SolomonOpenExample {
|
|||
SolutionPlotter.plotSolutionAsPNG(vrp, solution, "output/solomon_C101_open_solution.png","C101");
|
||||
|
||||
|
||||
GraphStream.display(vrp, solution, 50, false);
|
||||
GraphStreamViewer.display(vrp, solution, 50, false);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,16 +20,13 @@ import java.io.File;
|
|||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.AlgorithmSearchProgressChartListener;
|
||||
import jsprit.analysis.toolbox.GraphStream;
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.analysis.toolbox.Plotter.Label;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter.Print;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.analysis.toolbox.SolutionPrinter.Print;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.selector.SelectBest;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.VehicleRoutingProblem.Constraint;
|
||||
import jsprit.core.problem.constraint.ServiceDeliveriesFirstConstraint;
|
||||
import jsprit.core.problem.io.VrpXMLReader;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
|
@ -105,7 +102,7 @@ public class VRPWithBackhaulsExample {
|
|||
// plotter.setShowFirstActivity(true);
|
||||
// plotter.plot("output/vrpwbh_solomon_r101_solution.png","vrpwbh_r101");
|
||||
|
||||
GraphStream.display(vrp, solution, 100, true);
|
||||
GraphStreamViewer.display(vrp, solution, 100);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue