public class Plotter extends Object
Note that every item to be rendered need to have coordinates.
| Modifier and Type | Class and Description |
|---|---|
static class |
Plotter.Label
Label to label ID (=jobId), SIZE (=jobSize=jobCapacityDimensions)
|
| Constructor and Description |
|---|
Plotter(VehicleRoutingProblem vrp)
Constructs Plotter with problem.
|
Plotter(VehicleRoutingProblem vrp,
Collection<VehicleRoute> routes)
Constructs Plotter with problem and routes to render individual routes.
|
Plotter(VehicleRoutingProblem vrp,
VehicleRoutingProblemSolution solution)
Constructs Plotter with problem and solution to render them both.
|
| Modifier and Type | Method and Description |
|---|---|
Plotter |
invertCoordinates(boolean invert) |
BufferedImage |
plot(String pngFileName,
String plotTitle)
Plots problem and/or solution/routes.
|
Plotter |
plotShipments(boolean plotShipments)
Flag that indicates whether shipments should be rendered as well.
|
Plotter |
setBoundingBox(double minX,
double minY,
double maxX,
double maxY)
Sets a bounding box to zoom in to certain areas.
|
Plotter |
setLabel(Plotter.Label label)
Sets a label.
|
Plotter |
setScalingFactor(double scalingFactor) |
public Plotter(VehicleRoutingProblem vrp)
vrp - the routing problempublic Plotter(VehicleRoutingProblem vrp, VehicleRoutingProblemSolution solution)
vrp - the routing problemsolution - the solutionpublic Plotter(VehicleRoutingProblem vrp, Collection<VehicleRoute> routes)
vrp - the routing problemroutes - routespublic Plotter setScalingFactor(double scalingFactor)
public Plotter setLabel(Plotter.Label label)
label - of jobspublic Plotter invertCoordinates(boolean invert)
public Plotter setBoundingBox(double minX, double minY, double maxX, double maxY)
minX - lower left xminY - lower left ymaxX - upper right xmaxY - upper right ypublic Plotter plotShipments(boolean plotShipments)
plotShipments - flag to plot shipmentpublic BufferedImage plot(String pngFileName, String plotTitle)
pngFileName - - path and filenameplotTitle - - title that appears on top of imageCopyright © 2013–2019. All rights reserved.