From 3b1ee1bbc4bfbd4c3993c67a19c2fdcd9d386239 Mon Sep 17 00:00:00 2001 From: rakow Date: Tue, 5 Nov 2024 15:26:36 +0100 Subject: [PATCH] ignore service links for counts matching --- .../java/org/matsim/prepare/counts/CreateCountsFromVMZ.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/matsim/prepare/counts/CreateCountsFromVMZ.java b/src/main/java/org/matsim/prepare/counts/CreateCountsFromVMZ.java index 0dc9f1db..eb94a627 100644 --- a/src/main/java/org/matsim/prepare/counts/CreateCountsFromVMZ.java +++ b/src/main/java/org/matsim/prepare/counts/CreateCountsFromVMZ.java @@ -89,7 +89,10 @@ private void matchWithNetwork(Path network) throws TransformException, IOExcepti { Network unfiltered = NetworkUtils.readNetwork(network.toString()); NetworkFilterManager manager = new NetworkFilterManager(unfiltered, new NetworkConfigGroup()); + + // Some links can not be matched manager.addLinkFilter(l -> !l.getId().toString().startsWith("pt_")); + manager.addLinkFilter(l -> !NetworkUtils.getHighwayType(l).equals("service")); net = manager.applyFilters(); }