Go to file
2024-04-02 08:30:53 +02:00
input_files Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05:00
.gitignore Update visualizer to remove none used links 2024-02-15 14:32:49 -05:00
main.py New jar to account for crs 2024-03-28 15:23:50 -04:00
matsim_engine.py Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05:00
matsim_visualizer.py Links outside viewport not considered for events 2024-03-12 13:33:23 -04:00
matsim-network-from-osm.jar New jar to account for crs 2024-03-28 15:23:50 -04:00
matsim.jar Basic python script 2024-01-15 12:31:41 -05:00
matsim.py New jar to account for crs 2024-03-28 15:23:50 -04:00
README.md Updated matsim example with docs 2024-02-14 17:26:20 -05:00
requirements.txt Update visualizer to remove none used links 2024-02-15 14:32:49 -05:00

MATSim Runner Script

Requirements

  • JDK 17
  • Python 3
  • Input file holding the network of the city (For example: merged-network.osm.pbf)
  • Input GeoJSON file with all buildings (For example: summerschool_all_buildings.geojson)

Goal

Estimate city pollution coming from people driving in vehicles.

Setup

Make sure to have JDK 17 installed and clone this repository.

Usage

The file main.py is essentially a replica from MEB workflow. It constructs a city and then allows the user to apply characteristics to that given city.

The additional steps from the MEB workflow are:

  1. Generate Matsim required xml files.
  2. Run Matsim analysis.
  3. Visualize Matsim results.

1- Generate Matsim Required XML Files

This step is done in matsim.py. The class was built to replicate the behavior of other HUB export factory classes. It takes in a city object, an output directory, and then generates all the xml files required by Matsim.

2- Run Matsim Analysis

This step is done in matsim_engine.py. It simply runs the matsim.jar while providing the config.xml file generated in the previous step.

3- Visualize Matsim Results

This step is done in matsim_visualizer.py. It takes in a network and events xml file generated by the previous step and then displays it on a graph. It then shows in heatmap style the change in traffic over time.