From 18042e71c1e88fd3d410869dfed027787a999272 Mon Sep 17 00:00:00 2001 From: namdre Date: Fri, 17 Apr 2020 09:29:27 +0200 Subject: [PATCH] addendum refs #6852 (do not write output for internal edges when running with --no-internal-links) --- src/microsim/output/MSFullExport.cpp | 3 +++ src/microsim/output/MSXMLRawOut.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/microsim/output/MSFullExport.cpp b/src/microsim/output/MSFullExport.cpp index 500d7578a608..9b6aed4aedb5 100644 --- a/src/microsim/output/MSFullExport.cpp +++ b/src/microsim/output/MSFullExport.cpp @@ -90,6 +90,9 @@ MSFullExport::writeEdge(OutputDevice& of) { const MSEdgeVector& edges = ec.getEdges(); for (MSEdgeVector::const_iterator e = edges.begin(); e != edges.end(); ++e) { MSEdge& edge = **e; + if (!MSGlobals::gUsingInternalLanes && !edge.isNormal()) { + continue; + } of.openTag("edge").writeAttr("id", edge.getID()).writeAttr("traveltime", edge.getCurrentTravelTime()); const std::vector& lanes = edge.getLanes(); for (std::vector::const_iterator lane = lanes.begin(); lane != lanes.end(); ++lane) { diff --git a/src/microsim/output/MSXMLRawOut.cpp b/src/microsim/output/MSXMLRawOut.cpp index ce7b46bd0e23..609032a76694 100644 --- a/src/microsim/output/MSXMLRawOut.cpp +++ b/src/microsim/output/MSXMLRawOut.cpp @@ -59,6 +59,9 @@ MSXMLRawOut::write(OutputDevice& of, const MSEdgeControl& ec, void MSXMLRawOut::writeEdge(OutputDevice& of, const MSEdge& edge, SUMOTime timestep) { + if (!MSGlobals::gUsingInternalLanes && !edge.isNormal()) { + return; + } //en bool dump = !MSGlobals::gOmitEmptyEdgesOnDump; if (!dump) {