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

modified method .plotShipments(..) in analysis.toolbox.Plotter to allow

chaining
This commit is contained in:
oblonski 2014-05-07 10:00:02 +02:00
parent 0bcfc142d5
commit 40a1e45a0d

View file

@ -105,21 +105,6 @@ public class Plotter {
private BoundingBox boundingBox = null; private BoundingBox boundingBox = null;
public Plotter setShowFirstActivity(boolean show){
showFirstActivity = show;
return this;
}
public Plotter setLabel(Label label){
this.label = label;
return this;
}
public Plotter setBoundingBox(double minX, double minY, double maxX, double maxY){
boundingBox = new BoundingBox(minX,minY,maxX,maxY);
return this;
}
public Plotter(VehicleRoutingProblem vrp) { public Plotter(VehicleRoutingProblem vrp) {
super(); super();
this.vrp = vrp; this.vrp = vrp;
@ -139,6 +124,26 @@ public class Plotter {
plotSolutionAsWell = true; plotSolutionAsWell = true;
} }
public Plotter setShowFirstActivity(boolean show){
showFirstActivity = show;
return this;
}
public Plotter setLabel(Label label){
this.label = label;
return this;
}
public Plotter setBoundingBox(double minX, double minY, double maxX, double maxY){
boundingBox = new BoundingBox(minX,minY,maxX,maxY);
return this;
}
public Plotter plotShipments(boolean plotShipments) {
this.plotShipments = plotShipments;
return this;
}
public void plot(String pngFileName, String plotTitle){ public void plot(String pngFileName, String plotTitle){
String filename = pngFileName; String filename = pngFileName;
if(!pngFileName.endsWith(".png")) filename += ".png"; if(!pngFileName.endsWith(".png")) filename += ".png";
@ -576,8 +581,4 @@ public class Plotter {
// }; // };
} }
public void plotShipments(boolean plotShipments) {
this.plotShipments = plotShipments;
}
} }