From ec848a75d20773fbc5b139a91ccc3ff1363b2b0e Mon Sep 17 00:00:00 2001 From: tschlenther Date: Fri, 13 Oct 2023 16:06:38 +0200 Subject: [PATCH 1/2] include freight and drt in mode-filter for output geojson network --- .../application/prepare/network/CreateGeoJsonNetwork.java | 2 +- .../src/main/java/org/matsim/simwrapper/SimWrapperRunner.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/network/CreateGeoJsonNetwork.java b/contribs/application/src/main/java/org/matsim/application/prepare/network/CreateGeoJsonNetwork.java index dc770d9c607..5d4a67851ff 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/network/CreateGeoJsonNetwork.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/network/CreateGeoJsonNetwork.java @@ -45,7 +45,7 @@ public class CreateGeoJsonNetwork implements MATSimAppCommand { @CommandLine.Option(names = "--match-id", description = "Pattern to filter links by id") private String matchId; - @CommandLine.Option(names = "--mode-filter", split = ",", defaultValue = "car", + @CommandLine.Option(names = "--mode-filter", split = ",", defaultValue = "car,freight,drt", description = "Only keep links if they have one of the specified modes. Specify 'none' to disable.") private Set modes; diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperRunner.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperRunner.java index a13b02dc168..d276e4528f7 100644 --- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperRunner.java +++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperRunner.java @@ -30,6 +30,10 @@ public class SimWrapperRunner implements MATSimAppCommand { @CommandLine.Option(names = "--exclude", split = ",", description = "Exclusion that will be added to the config.") private Set exclude; + public static void main(String[] args) { + new SimWrapperRunner().execute(args); + } + @Override public Integer call() throws Exception { for (Path input : inputPaths) { From 0bfff0630021eb15fed6562644f620d8250cdffe Mon Sep 17 00:00:00 2001 From: tschlenther Date: Fri, 13 Oct 2023 16:08:33 +0200 Subject: [PATCH 2/2] fix: look for implementations of DashboardProvider.class --- .../src/main/java/org/matsim/simwrapper/SimWrapperListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperListener.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperListener.java index d672a774df6..2b056c444c3 100644 --- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperListener.java +++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperListener.java @@ -109,7 +109,7 @@ private List loadProvider(ImmutableSet c List result = new ArrayList<>(); for (ClassPath.ClassInfo info : classes) { Class clazz = info.load(); - if (clazz.isAssignableFrom(DashboardProvider.class)) { + if (DashboardProvider.class.isAssignableFrom(clazz)) { try { Constructor c = clazz.getDeclaredConstructor(); DashboardProvider o = (DashboardProvider) c.newInstance();