matsim-proto/README.md

35 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2024-01-15 12:31:41 -05:00
# MATSim Runner Script
## Requirements
2024-01-15 12:33:08 -05:00
- [x] [JDK 17](https://www.oracle.com/java/technologies/downloads/#java17)
2024-01-15 12:31:41 -05:00
- [x] Python 3
2024-02-14 17:26:20 -05:00
- [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)
2024-01-15 12:31:41 -05:00
2024-02-01 14:50:05 -05:00
## Goal
Estimate city pollution coming from people driving in vehicles.
2024-01-15 12:31:41 -05:00
## Setup
Make sure to have JDK 17 installed and clone this repository.
## Usage
2024-02-01 14:50:05 -05:00
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.
2024-02-14 17:26:20 -05:00
The additional steps from the MEB workflow are:
1. Generate Matsim required xml files.
2. Run Matsim analysis.
3. Visualize Matsim results.
2024-02-01 14:50:05 -05:00
2024-02-14 17:26:20 -05:00
### 1- Generate Matsim Required XML Files
2024-02-01 14:50:05 -05:00
2024-02-14 17:26:20 -05:00
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.
2024-01-15 12:31:41 -05:00
2024-02-14 17:26:20 -05:00
### 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.
2024-01-15 12:31:41 -05:00