Go to file
2024-02-14 16:54:41 -05:00
__pycache__ Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05:00
input_files Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05:00
output_files add gitignore and requirements.txt 2024-02-05 08:17:15 +01:00
.gitignore Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05:00
main.py Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05: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 Visualizer cleanup 2024-02-14 16:54:41 -05:00
matsim-network-from-osm.jar Network osm file from open street maps 2024-01-26 15:09:43 -05:00
matsim.jar Basic python script 2024-01-15 12:31:41 -05:00
matsim.py Finish base code and keep input building file and network file 2024-02-14 14:27:10 -05:00
README.md Better readme 2024-02-01 14:50:05 -05:00
requirements.txt Updated requirements 2024-02-14 16:54:21 -05:00

MATSim Runner Script

Requirements

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 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 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.