From 78d51ed067bba23051cf2f369256019feb7cff1a Mon Sep 17 00:00:00 2001 From: Markus Straub Date: Tue, 5 Mar 2024 09:11:14 +0100 Subject: [PATCH] write linkstats to output folder (if linkstats were written in the last iteration) --- .../java/org/matsim/analysis/LinkStatsControlerListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matsim/src/main/java/org/matsim/analysis/LinkStatsControlerListener.java b/matsim/src/main/java/org/matsim/analysis/LinkStatsControlerListener.java index 771b2dc2b95..42ff155f702 100644 --- a/matsim/src/main/java/org/matsim/analysis/LinkStatsControlerListener.java +++ b/matsim/src/main/java/org/matsim/analysis/LinkStatsControlerListener.java @@ -112,6 +112,9 @@ public void notifyIterationStarts(IterationStartsEvent event) { @Override public void notifyShutdown(ShutdownEvent event) { + if (createLinkStatsInIteration(event.getIteration())) { + linkStats.writeFile(this.controlerIO.getOutputFilename(Controler.DefaultFiles.linkstats)); + } String fileName = this.controlerIO.getOutputFilename(Controler.DefaultFiles.linkscsv); CSVFormat format = CSVFormat.DEFAULT.builder()