Skip to content

HERMES, a tool to ease simulation of road networks with different ATIS systems.

License

Notifications You must be signed in to change notification settings

xfontes42/hermes-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermes: A Tool for Event-driven Meso Simulation of ATIS

Systems Modelling & Simulation: The Sharing of Traffic Knowledge

Usage

usage: main.py [-h] [-n N] [-r R] [-thr THRESH] [-tmax MAX_TIME]
               [-atis ATIS_P] [-p TPEAK_MEAN TPEAK_STD] [-o SAVE_PATH] [-ap]
               [-ar] [-aa] [-v]

Systems Modelling and Simulation

optional arguments:
  -h, --help            show this help message and exit
  -n N, --num_actors N  number of vehicles/actors to generate per simulation
                        run
  -r R, --runs R        number of times to run the simulation for
  -thr THRESH, --congestion_threshold THRESH
                        threshold when to consider a link congested,
                        volume/capacity
  -tmax MAX_TIME, --max_run_time MAX_TIME
                        max time of each simulation run (in hours)
  -atis ATIS_P, --atis_percentage ATIS_P
                        percentage of vehicles using the ATIS system
  -p TPEAK_MEAN TPEAK_STD, --peak TPEAK_MEAN TPEAK_STD
                        mean and standard deviation of a normal distribution
                        that represents a peak in traffic
  -o SAVE_PATH, --out_file SAVE_PATH
                        place to save the result of running the simulations
  -ap, --atis-prevision
                        ATIS will make use of predictions to estimate the
                        fastest route
  -ar, --atis-real      ATIS will make use of real times to estimate the
                        fastest route
  -aa, --atis-adherence
                        ATIS will make use of other atis users' data to
                        estimate the fastest route
  -v, --verbose         allow helpful prints to be displayed
  -pl, --plots          display plots at the end of the simulation regarding
                        the network occupation

S'more details

Advanced traveller information systems (ATIS) have seen a recent surge in popularity among urban users. These systems have the ability to considerably increase traffic flow, across a city's streets but are limited by their penetration ratio among the city's population.

In this work we simulate a road network where different levels of information percolation are tested. The analogy with real life is to assess the extend to which an ATIS can improve total travel time and road utilization, and quantify this usefulness by means of improvements of traffic flow on several metrics.

We out here trying to revolutionize traffic y'all.

Reproducing Paper Experiments

In the paper, three scenarios are analysed: a normal scenario, a accident scenario and a saturated scenario, using the Adherence ATIS. In the matrix below, when can observe the command used to run the correspondent experiment and its results.

Scenario Command Global Actors distribution Actors by Edge distribution Note
Normal Scenario python src/main.py -r 100 -atis 0.3 -aa Normal Global Normal Scenario -
Accident Scenario python src/main.py -r 100 -atis 0.3 -aa Accident Global Accident Scenario Create an AccidentEvent at 10:00 in edge (3, 6) with factor 0.2 in simulator.py, function create_accident_events()
Saturated Scenairo python src/main.py -r 100 -atis 0.3 -aa -n 900 Saturated Global Saturated Scenario -

Additionally, to be able to evaluate the tool performance when varying certain parameters, such as the atis percentage, a tool wrapper was developed in the file plotter.py.

This wrapper can be used as in:

usage: plotter.py [-h] [-i INPUT] [-o OUTPUT]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        File where the run stats will be saved
  -o OUTPUT, --output OUTPUT
                        Output directory for the plots

The obtained graphs when running it are:

Real ATIS Prevision ATIS Adherence ATIS
Varying Atis Percentage Real Atis Prevision Atis Adherence Atis
Varying Total Actors in Simulation Real Atis_nVehicles_cropped Prevision Atis_nVehicles_cropped Adherence Atis_nVehicles_cropped

Dependencies

  • NetworkX: Used for modelling the road network.
  • Numpy: Used for data handling.
  • Pandas: Used for data handling.
  • Seaborn: Used data visualization.
  • Matplotlib: Used for data visualization.

To install the dependencies, one must run the following commands in a terminal containing python3:

  • In Mac/ Linux:
python3  -m venv venv
. venv/bin/activate
pip install -r requirements.txt
python3 generator.py
  • Windows:
py -3 -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
py -3 generator.py

In the end you can deactivate the virtual environment by running:

deactivate

Demo Video here

Contributors

About

HERMES, a tool to ease simulation of road networks with different ATIS systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages