Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0 #119

Merged
merged 28 commits into from
Feb 10, 2024
Merged

6.0 #119

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5d7d68b
cost parameter update
rakow Nov 8, 2023
c01b548
set version back to 6.0
rakow Nov 8, 2023
f33caa8
refactor facility index helper class
rakow Nov 15, 2023
47dd873
fix last commit
rakow Nov 15, 2023
2a9c8b1
last update for config
rakow Dec 3, 2023
f206904
adding income distribution based on srv
rakow Jan 31, 2024
846322e
fix check style
rakow Jan 31, 2024
3bb5daf
made 10pct the default scenario size
rakow Jan 31, 2024
fc01dd6
update calib script
rakow Jan 31, 2024
cf63313
limit the minimum income
rakow Jan 31, 2024
b65e477
use regelsatz for minimum income
rakow Jan 31, 2024
4f584bc
fix checkstyle
rakow Jan 31, 2024
34eea60
fix style issue
rakow Jan 31, 2024
a8ba1e0
use same income distribution as in old model
rakow Jan 31, 2024
bd69497
remove duplicate code
rakow Jan 31, 2024
8ccb747
don't overwrite interaction params
rakow Feb 1, 2024
88a88b0
put updated costs into config
rakow Feb 4, 2024
d04701b
adding comment
rakow Feb 5, 2024
6f12e62
add xml comment
vsp-gleich Feb 6, 2024
8094c72
Merge branch 'main' into 6.0
rakow Feb 7, 2024
ccf93fc
simplify if statements
rakow Feb 7, 2024
3e31608
try noscan comments
rakow Feb 7, 2024
d13aa4c
remove unnecessary comments
rakow Feb 7, 2024
3f1cb73
update urls for 6.0 release
rakow Feb 7, 2024
5b3ec26
load all input files from public svn
vsp-gleich Feb 8, 2024
b1dade3
set TimeAllocationMutator to 900.0s as used in run scripts
vsp-gleich Feb 8, 2024
59097f7
Update berlin-v6.0.config.xml
rakow Feb 9, 2024
f5df433
Update README.md
mkreuschner Feb 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 18 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ This repository provides an open MATSim transport model for Berlin, provided by

Currently, there are multiple versions of the MATSim Open Berlin model:

### 25pct scenario (`input/v6.0`)
### 10pct scenario (`input/v6.0`)

This scenario contains a 25pct sample of the Greater Berlin population; road capacities are accordingly reduced. The scenario is calibrated taking into consideration the traffic counts, modal split and mode-specific trip distance distributions.
This scenario contains both 10pct and 1pct sample of the Greater Berlin population; road capacities are accordingly reduced. The scenario is calibrated taking into consideration the traffic counts, modal split and mode-specific trip distance distributions.


## Licenses
Expand All @@ -34,12 +34,12 @@ Handling of large files within git is not without problems (git lfs files are no
----
## Simple things (without installing/running MATSim)

### Movies
### Use SimWrapper dashboards

1. Go to https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/
1. Decide for a scenario that you find interesting (e.g. `berlin-v6.0`) and go into that directory.
1. Inside there, look for an `output-*` directory that you find interesting and go into that directory.
1. Inside there, look for `movie-*` files. You can't watch them directly, but there are various ways to download them. You can watch them then. Try that.
1. Open SimWrapper at https://simwrapper.github.io/site/ .
1. Select Explore Data Sources -> VSP Public-SVN .
1. Navigate to de -> berlin -> berlin-v6.0 (https://simwrapper.github.io/site/public/de/berlin/berlin-v6.0).
1. Enjoy the dashboards and visualizations.

### Run VIA on output files

Expand Down Expand Up @@ -80,17 +80,16 @@ This will update your repository to the newest version.

----
## Run the MATSim Berlin scenario ...

(Requires either cloning or downloading the repository.)

<details>
<summary>
<h3>... using a runnable jar file</h3>
</summary>
(Requires either cloning or downloading the repository.)
</summary>

1. Depending on the version of matsim-berlin you have selected, you might have to create the jar file yourself.
1. **For version v5.4 or earlier:** <br/>
There should be a file directly in the `matsim-berlin` directory with name approximately as `matsim-berlin-5.x-jar-with-dependencies.jar`.
1. **For version v5.5 or later:** <br/>
You can build an executable jar-file by executing one of the following commands in the top directory.
1. Depending on the version of matsim-berlin you have selected, you might have to create the jar file yourself.
1. You can build an executable jar-file by executing one of the following commands in the top directory.
This will download all necessary dependencies (it might take a while the first time it is run) and dump the jar into the top directory.
1. `./mvnw clean package -DskipTests=true`
1. or on Windows: `mvnw.cmd clean package -DskipTests=true`
Expand All @@ -110,55 +109,20 @@ java -jar [FILENAME].jar
<summary>
<h3>... using an IDE, e.g. Eclipse, IntelliJ - Alternative 1: use cloned/downloaded matsim-berlin repository</h3>
</summary>
(Requires either cloning or downloading the repository.)

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/RunOpenBerlinScenario.java` or `src/main/java/org/matsim/gui/RunOpenBerlinScenarioGUI.java`.
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.
</details>
<details>
<summary><h3>... using an IDE, e.g. Eclipse, IntelliJ - Alternative 2: use matsim-berlin as a maven dependency</h3></summary>

1. Clone the matsim-example-project: https://github.com/matsim-org/matsim-example-project
2. Add a maven dependency to the open berlin project by writing the following to the pom file:

```xml
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
```

```xml
<dependency>
<groupId>com.github.matsim-scenarios</groupId>
<artifactId>matsim-berlin</artifactId>
<version>5.6</version>
</dependency>
```

3. Write your own run class and make sure to execute the required public methods in RunBerlinScenario:

```
Config config = RunBerlinScenario.prepareConfig( args ) ;
// possibly modify config here

Scenario scenario = RunBerlinScenario.prepareScenario( config ) ;
// possibly modify scenario here

Controler controler = RunBerlinScenario.prepareControler( scenario ) ;
// possibly modify controler here, e.g. add your own module

controler.run

```
</details>

---
## More information

For more information about the scenario generation, see VSP working paper # 19-01 under https://www.vsp.tu-berlin.de/publications/vspwp .

For more information about MATSim, see here: https://www.matsim.org/

## Internal documentation

Internal documentation can be found here:
https://docs.google.com/document/d/133CuXaMuWL0NcstyFHodk4y7J5yFLy9nrLtbBVpNWzM/edit?usp=drive_link
57 changes: 30 additions & 27 deletions input/v6.0/berlin-v6.0.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<!DOCTYPE config SYSTEM "http://www.matsim.org/files/dtd/config_v2.dtd">
<config>
<module name="TimeAllocationMutator">
<param name="mutationRange" value="1800.0"/>
<param name="mutationRange" value="900.0"/>
</module>
<module name="controler">
<param name="lastIteration" value="500"/>
<param name="overwriteFiles" value="failIfDirectoryExists"/>
<param name="runId" value="berlin-v6.0"/>
<param name="outputDirectory" value="./output/berlin-v6.0-25pct"/>
<param name="outputDirectory" value="./output/berlin-v6.0-10pct"/>
<param name="writeEventsInterval" value="100"/>
<param name="writePlansInterval" value="100"/>
<param name="routingAlgorithmType" value="SpeedyALT"/>
Expand All @@ -19,24 +19,24 @@
<param name="numberOfThreads" value="16"/>
</module>
<module name="network">
<param name="inputNetworkFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-network-with-pt.xml.gz"/>
<param name="inputNetworkFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-network-with-pt.xml.gz"/>
</module>
<module name="plans">
<param name="inputPlansFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-25pct.plans.xml.gz"/>
<param name="inputPlansFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-10pct.plans-initial.xml.gz"/>
<param name="removingUnnecessaryPlanAttributes" value="true"/>
</module>
<module name="vehicles">
<param name="vehiclesFile"
value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v5.5-10pct/input/berlin-v5-mode-vehicle-types.xml"/>
</module>
<module name="transit">
<param name="transitScheduleFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-transitSchedule.xml.gz"/>
<param name="transitScheduleFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-transitSchedule.xml.gz"/>
<param name="useTransit" value="true"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-transitVehicles.xml.gz"/>
<param name="vehiclesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-transitVehicles.xml.gz"/>
</module>
<module name="facilities">
<param name="facilitiesSource" value="fromFile"/>
<param name="inputFacilitiesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0-pre/input/berlin-v6.0-facilities.xml.gz"/>
<param name="inputFacilitiesFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-facilities.xml.gz"/>
</module>
<module name="planscalcroute">
<param name="networkModes" value="car,freight,ride"/>
Expand All @@ -54,8 +54,8 @@
</module>
<module name="qsim">
<param name="mainMode" value="car,freight"/>
<param name="flowCapacityFactor" value="0.25"/>
<param name="storageCapacityFactor" value="0.25"/>
<param name="flowCapacityFactor" value="0.1"/>
<param name="storageCapacityFactor" value="0.1"/>
<param name="numberOfThreads" value="12"/>
<param name="startTime" value="00:00:00"/>
<param name="endTime" value="36:00:00"/>
Expand Down Expand Up @@ -86,7 +86,7 @@
<param name="context" value="" />
<param name="mapCenter" value="13.39,52.51" />
<param name="mapZoomLevel" value="9.1" />
<param name="sampleSize" value="0.25" />
<param name="sampleSize" value="0.1" />
<param name="shp" value="./area/area.shp" />
</parameterset>
</module>
Expand All @@ -108,33 +108,36 @@
<parameterset type="scoringParameters">
<param name="marginalUtilityOfMoney" value="1.0"/>
<!-- car prices 2012->2022: inflation (110.2-91.7)/91.7 = 0.2017448
Euro/day: 11.76*(1+0.2017448) = 14.13252
Euro/m: 0.00022*(1+0.2017448) = 0.0002643839 -->

<!-- 6 -> inflation adjusted -->
Euro/m: 0.000124*(1+0.2017448) = 0.00014901635 -->
<!-- 6.0 -> inflation adjusted (2017->2022) -->
<param name="performing" value="6.88"/>

<parameterset type="modeParams">
<param name="constant" value="-0.30077680258110934" />
<param name="dailyMonetaryConstant" value="-14.1" />
<param name="dailyUtilityConstant" value="10.98" />
<param name="marginalUtilityOfDistance_util_m" value="1.4E-4" />
<param name="constant" value="-0.0755500887608388" />
<!-- result of the calibration, lower than full vehicle ownership cost which gave too unattractive car mode in calibration -->
<param name="dailyMonetaryConstant" value="-3.0" />
<param name="dailyUtilityConstant" value="0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<param name="marginalUtilityOfTraveling_util_hr" value="0.0" />
<param name="monetaryDistanceRate" value="-2.6E-4" />
<!-- only petrol price 2022, other cost components were excluded -->
<param name="monetaryDistanceRate" value="-1.49E-4" />
<param name="mode" value="car" />
</parameterset>
<parameterset type="modeParams">
<param name="constant" value="-1.1996407419918727" />
<param name="constant" value="-1.9859492397945049" />
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="3.5E-4" />
<!-- (alpha+gamma)*beta_performing+(alpha+1)*mgl_util_travelling_car -->
<param name="marginalUtilityOfTraveling_util_hr" value="-10.32" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
<!-- alpha=1, gamma=0 -->
<!-- (alpha+gamma)*beta_performing+(alpha+1)*car_marginalUtilityOfDistance_util_m -->
<param name="marginalUtilityOfTraveling_util_hr" value="-6.88" />
<!-- alpha*car_monetaryDistanceRate -->
<param name="monetaryDistanceRate" value="-1.49E-4" />
<param name="mode" value="ride" />
</parameterset>
<parameterset type="modeParams">
<param name="constant" value="-0.38627376236312827" />
<!-- 4-trips AB 10Euro -> 2.5 Eu/trip. yearly 761 Eu / 250 days = 3.04 Eu/day -->
<param name="constant" value="-0.4241511885826721" />
<!-- 2022: 4-trips AB 10Euro -> 2.5 Eu/trip. yearly 761 Eu / 250 days = 3.04 Eu/day -->
<param name="dailyMonetaryConstant" value="-3.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
Expand All @@ -143,7 +146,7 @@
<param name="mode" value="pt" />
</parameterset>
<parameterset type="modeParams">
<param name="constant" value="-2.1384635949005277" />
<param name="constant" value="-2.3715451400624588" />
<param name="dailyMonetaryConstant" value="0.0" />
<param name="dailyUtilityConstant" value="0.0" />
<param name="marginalUtilityOfDistance_util_m" value="0.0" />
Expand Down Expand Up @@ -173,7 +176,7 @@
</module>

<module name="counts">
<param name="inputCountsFile" value="./berlin-v6.0-counts-car-vmz.xml.gz"/>
<param name="inputCountsFile" value="https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v6.0/input/berlin-v6.0-counts-car-vmz.xml.gz"/>
</module>

<module name="ReplanningAnnealer" >
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.matsim-scenarios</groupId>
<artifactId>matsim-berlin</artifactId>
<version>6.0-pre</version>
<version>6.0</version>

<name>MATSim Open Berlin scenario</name>
<description>MATSim Open Berlin scenario</description>
Expand Down Expand Up @@ -348,7 +348,7 @@
<goal>shade</goal>
</goals>
<configuration>
<outputFile>${project.basedir}/${project.build.finalName}.jar</outputFile>
<outputFile>${project.basedir}/${project.build.finalName}-${git.commit.id.describe-short}.jar</outputFile>
<transformers>
<!-- This bit sets the main class for the executable jar as you otherwise would with the assembly plugin -->
<transformer
Expand Down

This file was deleted.

5 changes: 2 additions & 3 deletions src/main/java/org/matsim/legacy/run/RunBerlinScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@
import org.matsim.core.utils.geometry.transformations.TransformationFactory;
import org.matsim.extensions.pt.PtExtensionsConfigGroup;
import org.matsim.extensions.pt.routing.EnhancedRaptorIntermodalAccessEgress;
import org.matsim.legacy.prepare.population.AssignIncome;
import org.matsim.legacy.run.drt.OpenBerlinIntermodalPtDrtRouterAnalysisModeIdentifier;
import org.matsim.legacy.run.drt.RunDrtOpenBerlinScenario;
import org.matsim.prepare.population.AssignIncome;
import playground.vsp.scoring.IncomeDependentUtilityOfMoneyPersonScoringParameters;

import java.io.IOException;
import java.util.*;

import static org.matsim.core.config.groups.ControlerConfigGroup.RoutingAlgorithmType.FastAStarLandmarks;
Expand Down Expand Up @@ -194,7 +193,7 @@ public static Scenario prepareScenario( Config config ) {
downsample(scenario.getPopulation().getPersons(), berlinCfg.getPopulationDownsampleFactor());
}

AssignIncome.assignIncomeToPersonSubpopulationAccordingToGermanyAverage(scenario.getPopulation());
AssignIncome.assignIncomeToPersons(scenario.getPopulation());
return scenario;
}

Expand Down
Loading
Loading