Skip to content

Commit

Permalink
Merge branch 'master' into WeatherAnalysis
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 authored Oct 9, 2023
2 parents 22c9faf + 16d313e commit 8bd93f4
Show file tree
Hide file tree
Showing 20 changed files with 911 additions and 438 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ jobs:
path: staging

env:
MAVEN_OPTS: -Xmx10G
MAVEN_OPTS: -Xmx512m
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
MAVEN_OPTS: -Xmx10G
MAVEN_OPTS: -Xmx512m
38 changes: 38 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: The MATSim Open Kelheim Scenario
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Tilmann
family-names: Schlenther
email: [email protected]
affiliation: Technische Universität Berlin
orcid: 'https://orcid.org/0000-0001-6781-6918'
- given-names: Chengqi
family-names: Lu
email: [email protected]
affiliation: Technische Universität Berlin
- given-names: Christian
family-names: Rakow
email: [email protected]
affiliation: Technische Universität Berlin
- given-names: Simon
family-names: Meinhardt
email: [email protected]
affiliation: Technische Universität Berlin
- given-names: Kai
family-names: Nagel
email: [email protected]
affiliation: Technische Universität Berlin
orcid: 'https://orcid.org/0000-0003-2775-6898'
url: "https://github.com/matsim-scenarios/matsim-kelheim"
doi: 10.5281/zenodo.8322240
date-released: 2023-09-06
year: 2023
version: 3.0
license: AGPL-3.0
42 changes: 34 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

[![Build Status](https://github.com/matsim-scenarios/matsim-kelheim/actions/workflows/build.yaml/badge.svg)](https://github.com/matsim-scenarios/matsim-kelheim/actions/workflows/build.yaml)
![license](https://img.shields.io/github/license/matsim-scenarios/matsim-kelheim.svg)
[![DOI (v3.0)](https://zenodo.org/badge/360167859.svg)](https://zenodo.org/badge/latestdoi/360167859)
![JDK](https://img.shields.io/badge/JDK-17+-green.svg)

![Kelheim MATSim network and agents](visualization-kelheim.png "Kelheim MATSim network and agents")






### About this project

This repository provides an open MATSim transport model for Kelheim, provided by the [Transport Systems Planning and Transport Telematics group](https://www.vsp.tu-berlin.de) of [Technische Universität Berlin](http://www.tu-berlin.de).
This repository provides an open MATSim transport model for Kelheim, provided by the [Transport Systems Planning and Transport Telematics group](https://www.tu.berlin/vsp) of [Technische Universität Berlin](http://www.tu-berlin.de).

<a rel="TU Berlin" href="https://www.vsp.tu-berlin.de"><img src="https://svn.vsp.tu-berlin.de/repos/public-svn/ueber_uns/logo/TUB_Logo.png" width="15%" height="15%"/></a>

Expand All @@ -24,9 +29,11 @@ The **MATSim input files, output files, analysis data and visualizations** are l

**Other data files**, in particular in `original-input-data`, have their own individual licenses that need to be individually clarified with the copyright holders.

### Note
The input plans (person transport demand) for this project were generated based on data provided by [Senozon AG](https://senozon.com/).

### Note (where to find input and output)

Handling of large files within git is not without problems (git lfs files are not included in the zip download; we have to pay; ...). In consequence, large files, both on the input and on the output side, reside at https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/kelheim .
Handling of large files within git is not without problems (git lfs files are not included in the zip download; we have to pay; ...). In consequence, large files, both on the input and on the output side, reside at [the public matsim-kelheim data repo](https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/kelheim).

----
### Run the MATSim Kelheim scenario
Expand All @@ -42,7 +49,8 @@ It can be used by using either of these methods:

1. Set up the project in your IDE.
1. Make sure the project is configured as maven project.
1. Run the JAVA class `src/main/java/org/matsim/run/RunKelheimScenario.java` with the following program argument `run`. Add '--1pct' for test runs with a smaller sample size.
1. Run the JAVA class `src/main/java/org/matsim/run/RunKelheimScenario.java` with the following program argument `run`.
1. Add '--1pct' for test runs with a smaller sample size. Be aware that the model is calibrated with 25 pct, and outputs for 1 pct might be a little off.
1. "Open" the output directory. You can drag files into VIA as was already done above.
1. Edit the config file or adjust the run class. Re-run MATSim.

Expand All @@ -51,8 +59,26 @@ It can be used by using either of these methods:

1. Open the cmd and go to your project directory
2. Build the scenario using `mvnw package`. Add the option `-Dskiptests=true` in order to skip tests and speed up the process.
3. There should be a file directly in the `matsim-kelheim` directory with name approximately as `matsim-kelheim-2.x.jar`.
4. Run this file from the command line using `java -jar matsim-kelheim-2.x.jar --help` to see all possible options.
3. There should be a file directly in the `matsim-kelheim` directory with name approximately as `matsim-kelheim-3.x-SNAPSHOT-<commitId>.jar`.
4. Run this file from the command line using `java -jar matsim-kelheim-3.x-SNAPSHOT-<commitId>.jar --help` to see all possible options.
1. For example, one can disable lanes or run smaller sample sizes using the available options
5. Start this scenario using the default config by running `java -jar matsim-kelheim-2.x.jar`.
6. "Open" the output directory. You can drag files into VIA as was already done above.
5. Start this scenario using the default config by running `java -jar matsim-kelheim-3.x-SNAPSHOT-<commitId>.jar`.
1. If you want to run the scenario somewhere else, e.g. on a computation cluster, make sure to not only copy the jar but also the 'input' directory and put it right next to the jar.
6. "Open" the output directory.
1. You can drag files into VIA as was already done above.
2. You can also browse the output directory on vsp.berlin/simwrapper and analyze some of your results with interactive dashboards.

----
### Results and analysis

Here are the most common ways to analyse and visualize the results (and inputs):

1. [Simunto VIA](https://www.simunto.com/via/)
2. [SimWrapper](https://www.vsp.berlin/simwrapper)
1. (use Google for the best experience)
2. Browse your local output directory or [the public matsim-kelheim data repo](https://vsp.berlin/simwrapper/public/de/kelheim)
2. Explore and create many interactive visualisations and dashboards
3. Analysis the output .csv tables using the R language and [the matsim-r package](https://github.com/matsim-vsp/matsim-r)

If you have questions, feel free to contact us [(VSP)](https://www.tu.berlin/vsp) any time :)

134 changes: 69 additions & 65 deletions input/test.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
<param name="stuckTime" value="30.0"/>
<param name="trafficDynamics" value="kinematicWaves"/>
<param name="linkDynamics" value="FIFO"/>
<param name="useLanes" value="false" />
<param name="simStarttimeInterpretation" value="onlyUseStarttime" />
<param name="useLanes" value="false"/>

<param name="vehiclesSource" value="modeVehicleTypesFromVehiclesData"/>
<param name="insertingWaitingVehiclesBeforeDrivingVehicles" value="true"/>
</module>
Expand All @@ -87,56 +87,56 @@
<param name="endValue" value="0.01" />
</parameterset>
</module>
<module name="strategy" >
<!-- the external executable will be called with a config file as argument. This is the pathname to a possible skeleton config, to which additional information will be added. Can be null. -->
<param name="ExternalExeConfigTemplate" value="null" />
<!-- time out value (in seconds) after which matsim will consider the external strategy as failed -->
<param name="ExternalExeTimeOut" value="3600" />
<!-- root directory for temporary files generated by the external executable. Provided as a service; I don't think this is used by MATSim. -->
<param name="ExternalExeTmpFileRootDir" value="null" />
<!-- fraction of iterations where innovative strategies are switched off. Something like 0.8 should be good. E.g. if you run from iteration 400 to iteration 500, innovation is switched off at iteration 480 -->
<param name="fractionOfIterationsToDisableInnovation" value="0.9" />
<!-- maximum number of plans per agent. ``0'' means ``infinity''. Currently (2010), ``5'' is a good number -->
<param name="maxAgentPlanMemorySize" value="5" />
<!-- strategyName of PlanSelector for plans removal. Possible defaults: WorstPlanSelector SelectRandom SelectExpBetaForRemoval ChangeExpBetaForRemoval PathSizeLogitSelectorForRemoval . The current default, WorstPlanSelector is not a good choice from a discrete choice theoretical perspective. Alternatives, however, have not been systematically tested. kai, feb'12 -->
<param name="planSelectorForRemoval" value="WorstPlanSelector" />
<parameterset type="strategysettings">
<param name="strategyName" value="ChangeExpBeta"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.85"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="ReRoute"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.10"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="SubtourModeChoice"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.10"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="TimeAllocationMutator"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.10"/>
</parameterset>
<module name="strategy">
<param name="fractionOfIterationsToDisableInnovation" value="0.9"/>
<parameterset type="strategysettings">
<param name="strategyName" value="ChangeExpBeta"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.85"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="ReRoute"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.10"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="SubtourModeChoice"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.10"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="TimeAllocationMutator"/>
<param name="subpopulation" value="person"/>
<param name="weight" value="0.10"/>
</parameterset>

<parameterset type="strategysettings">
<param name="strategyName" value="ChangeExpBeta"/>
<param name="subpopulation" value="freight"/>
<param name="weight" value="0.95"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="ReRoute"/>
<param name="subpopulation" value="freight"/>
<param name="weight" value="0.05"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="ChangeExpBeta"/>
<param name="subpopulation" value="freight"/>
<param name="weight" value="0.95"/>
</parameterset>
<parameterset type="strategysettings">
<param name="strategyName" value="ReRoute"/>
<param name="subpopulation" value="freight"/>
<param name="weight" value="0.05"/>
</parameterset>
</module>

<module name="subtourModeChoice">
<param name="chainBasedModes" value="car,bike"/>
<param name="modes" value="car,pt,bike,walk,ride"/>
<param name="considerCarAvailability" value="true"/>
<param name="behavior" value="betweenAllAndFewerConstraints"/>
<param name="probaForRandomSingleTripMode" value="0.5"/>
<param name="coordDistance" value="100"/>
</module>

<module name="changeMode">
<param name="modes" value="car,pt,bike,walk,ride" />
<param name="ignoreCarAvailability" value="false" />
<!--
<module name="informedModeChoice">
<param name="modes" value="car,ride,pt,bike,walk"/>
<param name="topK" value="5"/>
</module>
-->

<module name="transitRouter">
<param name="extensionRadius" value="500.0"/>
Expand All @@ -145,11 +145,12 @@
<module name="travelTimeCalculator">
<param name="analyzedModes" value="car,freight"/>

<param name="separateModes" value="true"/>
<!-- Not implemented for link2link routing -->
<param name="separateModes" value="false"/>

<!-- Needed for lane specific routing times -->
<param name="calculateLinkToLinkTravelTimes" value="false" />
<param name="calculateLinkTravelTimes" value="true" />
<param name="calculateLinkToLinkTravelTimes" value="false"/>
<param name="calculateLinkTravelTimes" value="true"/>
</module>

<module name="vspExperimental">
Expand All @@ -158,46 +159,48 @@

<module name="planCalcScore">
<param name="fractionOfIterationsToStartScoreMSA" value="0.9"/>
<param name="writeExperiencedPlans" value="true"/>

<parameterset type="scoringParameters">
<!-- mode ASCs come from auto-calibration-->
<param name="waitingPt" value="-1.6"/>

<parameterset type="modeParams" >
<!-- [utils] alternative-specific constant. Normally per trip, but that is probably buggy for multi-leg trips. -->
<param name="constant" value="-0.6188560361725759" />
<!-- [unit_of_money/day] Fixed cost of mode, per day. -->
<param name="constant" value="0.10908902922956654" />
<param name="dailyMonetaryConstant" value="-5.3" />
<!-- [utils] daily utility constant. default=0 to be backwards compatible -->
<param name="dailyUtilityConstant" value="0.0" />
<!-- [utils/m] utility of traveling (e.g. walking or driving) per m, normally negative. this is on top of the time (dis)utility. -->
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<!-- [utils/hr] additional marginal utility of traveling. normally negative. this comes on top of the opportunity cost of time -->
<param name="marginalUtilityOfTraveling_util_hr" value="-1.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-0.0" />
<param name="mode" value="car" />
<!-- [unit_of_money/m] conversion of distance into money. Normally negative. -->
<param name="monetaryDistanceRate" value="-2.0E-4" />
</parameterset>
<parameterset type="modeParams" >
<param name="constant" value="-4.801748111266097" />
<param name="constant" value="-0.44874536876610344" />
<param name="dailyMonetaryConstant" value="-0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-12.0" />
<param name="mode" value="ride" />
<param name="monetaryDistanceRate" value="-2.0E-4" />
</parameterset>
<parameterset type="modeParams" >
<param name="constant" value="1.2853647551988518" />
<param name="dailyMonetaryConstant" value="-2.3" />
<param name="constant" value="0.0449751479497542" />
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-5.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-0.0" />
<param name="mode" value="pt" />
<param name="monetaryDistanceRate" value="0.0" />
</parameterset>
<parameterset type="modeParams" >
<param name="constant" value="-3.3303143774781314" />
<param name="constant" value="-0.9059637590522914" />
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-10.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-3.0" />
<param name="mode" value="bike" />
<param name="monetaryDistanceRate" value="0.0" />
</parameterset>
Expand All @@ -206,7 +209,7 @@
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-15.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-0.0" />
<param name="mode" value="walk" />
<param name="monetaryDistanceRate" value="0.0" />
</parameterset>
Expand All @@ -215,10 +218,11 @@
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-10.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="-0.0" />
<param name="mode" value="freight" />
<param name="monetaryDistanceRate" value="-0.002" />
</parameterset>

</parameterset>
</module>

Expand Down
Loading

0 comments on commit 8bd93f4

Please sign in to comment.