From cc76aa780c01646b46b8a946df236ba55513783e Mon Sep 17 00:00:00 2001 From: rakow Date: Sat, 16 Mar 2024 12:02:14 +0100 Subject: [PATCH 1/5] set default scaling to 0.1 --- input/v1.3/leipzig-v1.3.1-10pct.config.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/input/v1.3/leipzig-v1.3.1-10pct.config.xml b/input/v1.3/leipzig-v1.3.1-10pct.config.xml index 0877ae1..2903f81 100644 --- a/input/v1.3/leipzig-v1.3.1-10pct.config.xml +++ b/input/v1.3/leipzig-v1.3.1-10pct.config.xml @@ -2,7 +2,7 @@ - + @@ -63,10 +63,10 @@ - + - + From 5e00faa388cab84fd0b7229ed252c889fbb6ded1 Mon Sep 17 00:00:00 2001 From: GregorRyb Date: Tue, 19 Mar 2024 16:38:57 +0100 Subject: [PATCH 2/5] change hbefa network mapping --- .../RunOfflineAirPollutionAnalysisByVehicleCategory.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java index 9fd0eee..b392356 100644 --- a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java +++ b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java @@ -26,10 +26,7 @@ import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.network.Link; import org.matsim.application.MATSimAppCommand; -import org.matsim.contrib.emissions.EmissionModule; -import org.matsim.contrib.emissions.HbefaVehicleCategory; -import org.matsim.contrib.emissions.Pollutant; -import org.matsim.contrib.emissions.VspHbefaRoadTypeMapping; +import org.matsim.contrib.emissions.*; import org.matsim.contrib.emissions.analysis.EmissionsOnLinkEventHandler; import org.matsim.contrib.emissions.utils.EmissionsConfigGroup; import org.matsim.contrib.emissions.utils.EmissionsConfigGroup.DetailedVsAverageLookupBehavior; @@ -150,7 +147,7 @@ public Integer call() throws Exception { Scenario scenario = ScenarioUtils.loadScenario(config); // network - new VspHbefaRoadTypeMapping().addHbefaMappings(scenario.getNetwork()); + new OsmHbefaMapping().addHbefaMappings(scenario.getNetwork()); log.info("Using integrated road types"); { From 30ccd0d6ec494d7a6296260af7e2b4dab2643410 Mon Sep 17 00:00:00 2001 From: rakow Date: Wed, 20 Mar 2024 10:16:43 +0100 Subject: [PATCH 3/5] fix for osm types in air pollution --- ...OfflineAirPollutionAnalysisByVehicleCategory.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java index b392356..2b03f08 100644 --- a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java +++ b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java @@ -39,6 +39,7 @@ import org.matsim.core.events.EventsUtils; import org.matsim.core.events.MatsimEventsReader; import org.matsim.core.events.algorithms.EventWriterXML; +import org.matsim.core.network.NetworkUtils; import org.matsim.core.scenario.ScenarioUtils; import org.matsim.vehicles.EngineInformation; import org.matsim.vehicles.VehicleType; @@ -146,7 +147,16 @@ public Integer call() throws Exception { Scenario scenario = ScenarioUtils.loadScenario(config); - // network + // Set correct link types for osm mapping + for (Link link : scenario.getNetwork().getLinks().values()) { + String type = NetworkUtils.getHighwayType(link); + if ("unclassified".equals(type)) { + link.getAttributes().removeAttribute("type"); + } else { + link.getAttributes().putAttribute("type", type); + } + } + new OsmHbefaMapping().addHbefaMappings(scenario.getNetwork()); log.info("Using integrated road types"); From 758a31ecaeec77b2c016049a176e2fd2cd0a5590 Mon Sep 17 00:00:00 2001 From: rakow Date: Wed, 20 Mar 2024 10:39:43 +0100 Subject: [PATCH 4/5] use osm mapping correctly --- .../RunOfflineAirPollutionAnalysisByVehicleCategory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java index 2b03f08..03f905d 100644 --- a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java +++ b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java @@ -157,7 +157,7 @@ public Integer call() throws Exception { } } - new OsmHbefaMapping().addHbefaMappings(scenario.getNetwork()); + OsmHbefaMapping.build().addHbefaMappings(scenario.getNetwork()); log.info("Using integrated road types"); { From 5d66830a93b85d5c46d46b8f1c46111a69503b98 Mon Sep 17 00:00:00 2001 From: tschlenther Date: Thu, 2 May 2024 18:01:48 +0200 Subject: [PATCH 5/5] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1fad62d..3319b6a 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,7 @@ It can be used by using either of these methods: 4. Run this file from the command line using the exact file name, e.g. `java -jar matsim-leipzig-1.3-0263af8.jar --help` to see all possible options. 5. Start this scenario using the default config by running `java -jar matsim-leipzig-1.3-0263af8.jar run` 6. "Open" the output directory. You can drag files into VIA as was already done above. + + +### Internal Documentation +See [GoogleDoc](https://docs.google.com/document/d/1ypFhU0r_yca8hCFehRS6gEzBWwqoiGTIT21UFtYk3Rk/edit#heading=h.o1koupu6c302)