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

make Plotter plot shipments optionally

This commit is contained in:
oblonski 2013-10-25 22:16:05 +02:00
parent 5bd72e2bd9
commit 401afad447

View file

@ -83,6 +83,8 @@ public class Plotter {
private VehicleRoutingProblemSolution solution; private VehicleRoutingProblemSolution solution;
private boolean plotSolutionAsWell = false; private boolean plotSolutionAsWell = false;
private boolean plotShipments = true;
public void setShowFirstActivity(boolean show){ public void setShowFirstActivity(boolean show){
showFirstActivity = show; showFirstActivity = show;
@ -330,6 +332,7 @@ public class Plotter {
private XYSeriesCollection makeShipmentSeries(Collection<Job> jobs, Map<XYDataItem, String> labels) throws NoLocationFoundException{ private XYSeriesCollection makeShipmentSeries(Collection<Job> jobs, Map<XYDataItem, String> labels) throws NoLocationFoundException{
XYSeriesCollection coll = new XYSeriesCollection(); XYSeriesCollection coll = new XYSeriesCollection();
if(!plotShipments) return coll;
int sCounter = 1; int sCounter = 1;
String ship = "shipment"; String ship = "shipment";
boolean first = true; boolean first = true;
@ -470,4 +473,8 @@ public class Plotter {
}; };
} }
public void plotShipments(boolean plotShipments) {
this.plotShipments = plotShipments;
}
} }