matsim-proto/README.md

30 lines
1.6 KiB
Markdown
Raw 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-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.
The difference is in the implementation of MatSimEngine. This engine should create the following files:
- facilities.xml
- network.xml
- population.xml
- config.xml
Facilities and network are quite simple as the facilities file can be built from our city object and the network file can be built using a matsim utility along with OpenStreetMaps data. The population file must be generated via other ways and the config file can be generated once the first 3 files are created.
Additionally, it may be interesting to include public transport in the simulation. This is a potentially simple task. Montreal offers the GTFS files for its public transport for free and the project [PT2MATSim](https://github.com/matsim-org/pt2matsim) allows you to create the MatSim xml files from the initial GTFS files.
2024-01-15 12:31:41 -05:00
2024-02-01 14:50:05 -05:00
## Visualization
2024-01-15 12:31:41 -05:00
2024-02-01 14:50:05 -05:00
Given we want to be able to visualize the results similar to the way the Munich scenario did it: https://www.matsim.org/gallery/munich.
2024-02-01 14:50:05 -05:00
The repository also has the code to visualize these results. It's a very basic implementation, but it basically uses matplotlib and nx to plot the network and how much traffic exists on a given link at a given time.