From 401afad4471c0bf6556dcc22bd2268504822ca70 Mon Sep 17 00:00:00 2001 From: oblonski <4sschroeder@gmail.com> Date: Fri, 25 Oct 2013 22:16:05 +0200 Subject: [PATCH] make Plotter plot shipments optionally --- jsprit-analysis/src/main/java/analysis/Plotter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jsprit-analysis/src/main/java/analysis/Plotter.java b/jsprit-analysis/src/main/java/analysis/Plotter.java index 32e56739..8de712fd 100644 --- a/jsprit-analysis/src/main/java/analysis/Plotter.java +++ b/jsprit-analysis/src/main/java/analysis/Plotter.java @@ -83,6 +83,8 @@ public class Plotter { private VehicleRoutingProblemSolution solution; private boolean plotSolutionAsWell = false; + + private boolean plotShipments = true; public void setShowFirstActivity(boolean show){ showFirstActivity = show; @@ -330,6 +332,7 @@ public class Plotter { private XYSeriesCollection makeShipmentSeries(Collection jobs, Map labels) throws NoLocationFoundException{ XYSeriesCollection coll = new XYSeriesCollection(); + if(!plotShipments) return coll; int sCounter = 1; String ship = "shipment"; boolean first = true; @@ -470,4 +473,8 @@ public class Plotter { }; } + public void plotShipments(boolean plotShipments) { + this.plotShipments = plotShipments; + } + }