Better readme

This commit is contained in:
Ruben1729 2024-02-01 14:50:05 -05:00
parent 43118d203e
commit fe002788f5

View File

@ -3,20 +3,27 @@
- [x] [JDK 17](https://www.oracle.com/java/technologies/downloads/#java17)
- [x] Python 3
## Goal
Estimate city pollution coming from people driving in vehicles.
## Setup
Make sure to have JDK 17 installed and clone this repository.
## Usage
Run the script:
```shell
python main.py
```
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.
If you wish to specify another configuration file other than the default scenario given, you may do it by providing it as a second argument:
```shell
python main.py path/to/config.xml
```
The difference is in the implementation of MatSimEngine. This engine should create the following files:
- facilities.xml
- network.xml
- population.xml
- config.xml
Two scenarios are provided in this repository: equil, sioux. The output for that given simulation will be in the output folder.
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.
https://www.matsim.org/gallery/munich
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.
## Visualization
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.
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.