Skip to content

Commit

Permalink
made 10pct the default scenario size
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Jan 31, 2024
1 parent 846322e commit 3bb5daf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 59 deletions.
65 changes: 12 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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.

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,57 +109,17 @@ 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
Expand Down
8 changes: 4 additions & 4 deletions input/v6.0/berlin-v6.0.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<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 Down Expand Up @@ -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 Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion src/main/java/org/matsim/run/RunOpenBerlinScenario.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class RunOpenBerlinScenario extends MATSimApplication {
public static final String VERSION = "6.0";
public static final String CRS = "EPSG:25832";
@CommandLine.Mixin
private final SampleOptions sample = new SampleOptions(25, 10, 1);
private final SampleOptions sample = new SampleOptions( 10, 25, 1);

public RunOpenBerlinScenario() {
super(String.format("input/v%s/berlin-v%s.config.xml", VERSION, VERSION));
Expand Down

0 comments on commit 3bb5daf

Please sign in to comment.