matsim-proto/README.md
2024-02-14 17:26:20 -05:00

35 lines
1.4 KiB
Markdown

# MATSim Runner Script
## Requirements
- [x] [JDK 17](https://www.oracle.com/java/technologies/downloads/#java17)
- [x] Python 3
- [x] Input file holding the network of the city (For example: merged-network.osm.pbf)
- [x] 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.