Authors: Giuliano Cornacchia, Matteo Böhm, Giovanni Mauro, Mirco Nanni, Dino Pedreschi, and Luca Pappalardo.
Article available here.
Simulation results data available at https://doi.org/10.6084/m9.figshare.c.6104511.v1
In this repository you can find the Python code to replicate the analysis of our work regarding the impact of navigation apps on the urban sustainability.
Giuliano Cornacchia, Matteo Böhm, Giovanni Mauro, Mirco Nanni, Dino Pedreschi, and Luca Pappalardo. 2022. How routing strategies impact urban emissions. In Proceedings of the 30th International Conference on Advances in Geographic Information Systems (SIGSPATIAL '22). Association for Computing Machinery, New York, NY, USA, Article 42, 1–4. https://doi.org/10.1145/3557915.3560977
If you use the code in this repository, please cite our paper:
@inproceedings{10.1145/3557915.3560977,
author = {Cornacchia, Giuliano and B\"{o}hm, Matteo and Mauro, Giovanni and Nanni, Mirco and Pedreschi, Dino and Pappalardo, Luca},
title = {How Routing Strategies Impact Urban Emissions},
year = {2022},
isbn = {9781450395298},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3557915.3560977},
doi = {10.1145/3557915.3560977},
articleno = {42},
numpages = {4},
keywords = {urban sustainability, navigation systems, human mobility, social AI, routing, traffic simulation, vehicular traffic},
location = {Seattle, Washington},
series = {SIGSPATIAL '22}
}
Navigation apps use routing algorithms to suggest the best path to reach a user's desired destination. Although undoubtedly useful, navigation apps' impact on the urban environment (e.g., carbon dioxide emissions and population exposure to pollution) is still largely unclear. In this work, we design a simulation framework to assess the impact of routing algorithms on carbon dioxide emissions within an urban environment. Using APIs from TomTom and OpenStreetMap, we find that settings in which either all vehicles or none of them follow a navigation app's suggestion lead to the worst impact in terms of CO$_2$ emissions. In contrast, when just a portion (around half) of vehicles follow these suggestions, and some degree of randomness is added to the remaining vehicles' paths, we observe a reduction in the overall CO$_2$ emissions over the road network. Our work is a first step towards designing next-generation routing principles that may increase urban well-being while satisfying individual needs.
Please always refer to the SUMO Installation page for the latest installation instructions.
To install SUMO on Windows it is necessary to download the installer here and run the executable.
To install SUMO on Linux is it necessary to execute the following commands:
sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools sumo-doc
SUMO can be installed on macOS via Homebrew.
You can install and update Homebrew as following:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew update
brew install --cask xquartz
To install SUMO:
brew tap dlr-ts/sumo
brew install sumo
After installing SUMO you must configure your PATH
and SUMO_HOME
environment variables.
Suppose you installed SUMO at /your/path/to/sumo-<version>
- On the Windows search box search for "Edit the system environment variables" option and open it;
- Under user variables select
PATH
and click Edit. If no such variable exists you must create it with the New-Button; - Append
;/your/path/to/sumo-<version>/bin
to the end of thePATH
value (do not delete the existing values); - Under user variables select
SUMO_HOME
and click Edit. If no such variable exists you must create it with the New-Button; - Set
/your/path/to/sumo-<version>
as the value of theSUMO_HOME
variable.
- Open a file explorer and go to
/home/YOUR_NAME/
; - Open the file named
.bashrc
with a text editor; - Place this code export
SUMO_HOME="/your/path/to/sumo-<version>/"
somewhere in the file and save; - Reboot your computer.
First you need to determine which shell (bash or zsh) you are currently working with. In a terminal, type ps -p $$
.
In a Terminal, execute the following steps:
- Run the command
open ~/.zshrc
, this will open the.zshrc
file in TextEdit; - Add the following line to that document:
export SUMO_HOME="/your/path/to/sumo-<version>"
and save it; - Apply the changes by entering:
source ~/.zshrc
.
In a Terminal, execute the following steps:
- Run the command
open ~/.bash_profile
, this will open the.bash_profile
file in TextEdit; - Add the following line to that document:
export SUMO_HOME="/your/path/to/sumo-<version>"
and save it; - Apply the changes by entering:
source ~/.bash_profile
.
-
src/
folder:0_prepare_Milan_GPS_dataset.ipynb
: notebook for cleaning, preprocessing and segmenting the Milan GPS track dataset available here.1_create_od_matrix.ipynb
: notebook for creating the Origin Destination matrix (See Sec. 3.2 of our paper).2_create_mobility_demand.ipynb
: notebook for generating the Mobility Demand (See Sec. 3.2 of our paper).3{a,b,c}_create_routed_paths{duarouter,osm,tomtom}.ipynb
: notebook for creating the multiset of routed path for duarouter (a), OpenStreetMap (b), and TomTom (c). The paths are expressed as sequences of GPS points that require a map-matching (See Sec. 3.3 of our paper).4{a,b}_map_matching_{osm,tomtom}.ipynb
: notebook for map-matching the sequences of GPS points into a sequence of SUMO edges withinh the road network for OpenStreetMap (a) and TomTom (b).5{a,b}_create_mixed_routed_paths_{osm,tomtom}.ipynb
: notebook for creating the different routed paths that represent different percentage of routed vehicles for OpenStreetMap (a) and TomTom (b).6a_experiments.ipynb
: notebook that takes as input a set of routed paths and performs the simulation described in Sec. 4 of our paper.6b_results.ipynb
: notebook that computes the results of the main experiment.7_create_mixed_routed_paths_w_factor.ipynb
: notebook for creating mixed routed paths considering several values for the randomness parameter w.8a_experiments_w_factor.ipynb
: notebook that takes as input a set of mixed routed paths for different values of w and performs the simulation described in the subsection "Impact of randomization." of our paper.8b_results_w_factor.ipynb
: notebook that computes the results of the w factor experiment.9a_paper_figures.ipynb
: notebook that generates the figures used in the paper.9b_paper_maps.ipynb
: notebook that generates the maps used in the paper.
fitting.py
: python utility functions for fitting the truncated power-law from the CO2 emissions.mapmatch.py
: python utility functions for map matching GPS points to edges in the SUMO road network.plot_utils.py
: python utility functions for generating the figures.preprocess_utils.py
: python utility functions for the preprocessing of the GPS dataset.result_utils.py
: python utility functions for computing the results.utils.py
: python utility functions for the TraffiCO2 framework.
-
sumo_simulation_scripts/
folder:run_sumo.py
: python script for simulating the mobility described by a multiset of routed paths within a road network. It outputs the CO2 emissions (at edge and vehicle level), vehicles' GPS trajectory, and vehicles' travel time.sim_utils_sumo.py
: python utility functions used inrun_sumo.py
.
-
sumo_simulation_data/
folder:mobility_demands/
: this folder contains the Mobility Demands generated with the notebook2_create_mobility_demand.ipynb
.routed_paths/
: this folder contains the Routed Paths generated with the notebook3{a,b,c}_create_routed_paths{duarouter,osm,tomtom}.ipynb
.milan_road_network.net.xml
: xml file containing the preprocessed SUMO road network of Milan (Italy) used in our experiments.config_init_traci.rou.xml, config_init_traci.sumocfg
two config files for the librarytraci
that allows to control simulation aspects at runtime.
-
sim_outputs/
folder contains the outputs of the SUMO simulation performed with the notebooks6a_experiments.ipynb
and8a_experiments_w_factor.ipynb
.