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) 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 @@ - + - + diff --git a/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java b/src/main/java/org/matsim/analysis/emissions/RunOfflineAirPollutionAnalysisByVehicleCategory.java index 9fd0eee..03f905d 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; @@ -42,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; @@ -149,8 +147,17 @@ public Integer call() throws Exception { Scenario scenario = ScenarioUtils.loadScenario(config); - // network - new VspHbefaRoadTypeMapping().addHbefaMappings(scenario.getNetwork()); + // 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); + } + } + + OsmHbefaMapping.build().addHbefaMappings(scenario.getNetwork()); log.info("Using integrated road types"); {