diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/network/params/ApplyNetworkParams.java b/contribs/application/src/main/java/org/matsim/application/prepare/network/params/ApplyNetworkParams.java index 48f6310fad0..deef01dfe5e 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/network/params/ApplyNetworkParams.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/network/params/ApplyNetworkParams.java @@ -98,7 +98,13 @@ public Integer call() throws Exception { for (Link link : network.getLinks().values()) { Feature ft = features.get(link.getId()); - applyChanges(link, ft.junctionType(), ft.features()); + + try { + applyChanges(link, ft.junctionType(), ft.features()); + } catch (IllegalArgumentException e) { + warn++; + log.warn("Error processing link {}", link.getId(), e); + } } log.warn("Observed {} warnings out of {} links", warn, network.getLinks().size()); @@ -132,7 +138,7 @@ private void applyChanges(Link link, String junctionType, Object2DoubleMap 0.6; // Motorways are kept at their max theoretical capacity case "priority" -> type.startsWith("motorway") ? 1 : 0.8; - default -> throw new IllegalArgumentException("Unknown type: " + junctionType); + default -> 0; }; if (perLane < cap * threshold) {