2019-01-17 17:10:43 +00:00
# SUMO Emissions
2019-01-17 17:09:41 +00:00
This "Proof of concept" aims to simulate the impact that connected vehicles and smart urban infrastructure would have on pollutant emissions.
Using the SUMO simulator, we developed several parameters and measures using Traci to act on the road infrastructure and vehicles.
We imagined that for a map of a given city, the city would be divided into areas,
which when the pollution rate exceeds a certain threshold in these then we act on the infrastructure and the vehicles present in this zone.
2019-01-20 08:45:45 +00:00
![](https://github.com/Ahp06/SUMO_Emissions/blob/master/sumo_project/files/imgs/simulation_example.PNG)
2019-01-17 17:09:41 +00:00
# Prerequisites:
2019-01-20 10:58:45 +00:00
* Python >3.7 : https://www.python.org/downloads/
* External Python librairies : shapely, parse, jsonpickle : ``` > pip install [LIBRARY_NAME] ```
2019-02-06 16:50:01 +00:00
* SUMO 1.0.0 : http://sumo.dlr.de/wiki/Downloads
2019-01-17 17:09:41 +00:00
# How to run
2019-01-24 10:44:26 +00:00
This application can be launched from an IDE, or from a shell (linux, Windows, MacOS).
2019-02-07 18:35:02 +00:00
You will need a config.json configuration file (see [default_config.json ](https://github.com/Ahp06/SUMO_Emissions/wiki/Configuration-file ) for a template) and a simulation file.
2019-01-17 17:09:41 +00:00
You can use your own scenario file (osm.sumocfg file), see : [SUMO Tutorials ](http://sumo.dlr.de/wiki/Tutorials ).
**With a Shell:**
2019-02-07 18:48:45 +00:00
```
usage: runner.py [-h] [-new_dump NEW_DUMP] [-areas AREAS]
[-simulation_dir SIMULATION_DIR] [-run RUN]
[-c config1 [config2 ...]] [-c_dir C_DIR] [-save] [-csv]
optional arguments:
-h, --help show this help message and exit
-new_dump NEW_DUMP, --new_dump NEW_DUMP
Load and create a new data dump with the configuration
file chosen
-areas AREAS, --areas AREAS
Will create a grid with "areas x areas" areas
-simulation_dir SIMULATION_DIR, --simulation_dir SIMULATION_DIR
Choose the simulation directory
-run RUN, --run RUN Run a simulation process with the dump chosen
-c config1 [config2 ...], --c config1 [config2 ...]
Choose your(s) configuration file(s) from your working
directory
-c_dir C_DIR, --c_dir C_DIR
Choose a directory which contains your(s)
configuration file(s)
-save, --save Save the logs into the logs folder
-csv, --csv Export all data emissions into a CSV file
```
2019-01-17 17:09:41 +00:00
2019-01-22 14:52:18 +00:00
Create a data dump from simulation directory :
2019-01-17 17:09:41 +00:00
2019-02-07 18:35:02 +00:00
```py ./runner.py -new_dump dump -areas 10 -simulation_dir [PATH_TO_SIMUL_DIR]```
2019-01-20 10:48:37 +00:00
2019-02-07 18:35:02 +00:00
This command will create new dump called "dump" from the simulation directory chosen with a 10x10 grid.
2019-01-22 14:52:18 +00:00
Run simulations in parallel with multiple configuration files :
2019-02-07 18:35:02 +00:00
```py ./runner.py -run dump -c [PATH_TO_CONFIG1] [PATH_TO_CONFIG2] -save -csv```
2019-01-22 14:52:18 +00:00
This command will run a simulation dump "dump" with the configuration file(s) "config1" and "config2"
2019-01-20 15:16:09 +00:00
with CSV data export and logs backup.
2019-01-24 10:42:56 +00:00
From a folder which contains multiple configuration files :
2019-02-07 18:35:02 +00:00
```py ./runner.py -run dump -c_dir [PATH_TO_CONFIG_DIR] -save -csv```
2019-01-24 10:42:56 +00:00
2019-02-07 18:48:45 +00:00
Log and csv files will be written in a sub folder of the simulation folder.
2019-01-24 10:42:56 +00:00