From 7a651b4891c4d5d10d622d08c746a819497c10c1 Mon Sep 17 00:00:00 2001 From: Axel HUYNH-PHUC Date: Thu, 7 Feb 2019 19:35:02 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c4e6675..3da5354 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ which when the pollution rate exceeds a certain threshold in these then we act o # How to run This application can be launched from an IDE, or from a shell (linux, Windows, MacOS). -You will need a config.json configuration file (see [default_config.json](https://github.com/Ahp06/SUMO_Emissions/blob/master/sumo_project/configs/default_config.json) for a template) and a simulation file. +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. You can use your own scenario file (osm.sumocfg file), see : [SUMO Tutorials](http://sumo.dlr.de/wiki/Tutorials). **With a Shell:** @@ -25,19 +25,19 @@ You can use your own scenario file (osm.sumocfg file), see : [SUMO Tutorials](ht Create a data dump from simulation directory : -![](https://github.com/Ahp06/SUMO_Emissions/blob/master/sumo_project/files/imgs/runner_new_dump.PNG) +```py ./runner.py -new_dump dump -areas 10 -simulation_dir [PATH_TO_SIMUL_DIR]``` -This command will create new dump called "dump" from the simulation directory "mysimulationdir" with a 10x10 grid. +This command will create new dump called "dump" from the simulation directory chosen with a 10x10 grid. Run simulations in parallel with multiple configuration files : -![](https://github.com/Ahp06/SUMO_Emissions/blob/master/sumo_project/files/imgs/runner_run_ex.PNG) +```py ./runner.py -run dump -c [PATH_TO_CONFIG1] [PATH_TO_CONFIG2] -save -csv``` This command will run a simulation dump "dump" with the configuration file(s) "config1" and "config2" with CSV data export and logs backup. From a folder which contains multiple configuration files : -![](https://github.com/Ahp06/SUMO_Emissions/blob/master/sumo_project/files/imgs/runner_cdir.PNG) +```py ./runner.py -run dump -c_dir [PATH_TO_CONFIG_DIR] -save -csv``` From 8abe41b78217940eb1252839cacae8fa74489bf0 Mon Sep 17 00:00:00 2001 From: Axel HUYNH-PHUC Date: Thu, 7 Feb 2019 19:48:45 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3da5354..9b25b84 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,30 @@ You can use your own scenario file (osm.sumocfg file), see : [SUMO Tutorials](ht **With a Shell:** -![](https://github.com/Ahp06/SUMO_Emissions/blob/master/sumo_project/files/imgs/runner_help.PNG) +``` +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 +``` Create a data dump from simulation directory : @@ -40,4 +63,6 @@ From a folder which contains multiple configuration files : ```py ./runner.py -run dump -c_dir [PATH_TO_CONFIG_DIR] -save -csv``` +Log and csv files will be written in a sub folder of the simulation folder. +