Skip to content

Commit

Permalink
Merge branch 'main' into parkingCapacitiesSimulationEndTime
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorRyb authored May 28, 2024
2 parents c0754cb + 3556501 commit c42b414
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions input/v1.3/leipzig-v1.3.1-10pct.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>
<module name="timeAllocationMutator">
<param name="mutationRange" value="7200.0"/>
<param name="mutationRange" value="900.0"/>
</module>

<module name="controller">
Expand Down Expand Up @@ -63,10 +63,10 @@
<module name="qsim">
<param name="startTime" value="00:00:00"/>
<param name="endTime" value="36:00:00"/>
<param name="flowCapacityFactor" value="0.25"/>
<param name="flowCapacityFactor" value="0.1"/>
<param name="mainMode" value="car,freight"/>
<param name="numberOfThreads" value="8"/>
<param name="storageCapacityFactor" value="0.25"/>
<param name="storageCapacityFactor" value="0.1"/>
<param name="stuckTime" value="30.0"/>
<param name="trafficDynamics" value="kinematicWaves"/>
<param name="useLanes" value="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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");

{
Expand Down

0 comments on commit c42b414

Please sign in to comment.