Skip to content

Platoon detection algorithm and analysis examples taken from the article "Identifying platoons in traffic: towards an assessment of ACC platoons impacts"

Notifications You must be signed in to change notification settings

EMob-Lab/platoon_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADAS vs HDV impact on platoons

This reposit contains code to detect platoons in the TGSIM I294 L1 dataset. Data can be downloaded at https://data.transportation.gov/Automobiles/Third-Generation-Simulation-Data-TGSIM-I-294-L1-Tr/7zjf-a4zf/about_data .

File structure

📦Mother folder
 ┣ 📂conda
 ┃ ┗ 📜env.yaml
 ┣ 📂data #folder to be created to insert TGSIM L1 dataset in it
 ┣ 📂src
 ┃ ┣ 📂DTW
 ┃ ┣ 📂images
 ┃ ┣ 📂string_dtw
 ┃ ┗ 📂platoons
 ┣ 📂src
 ┃ ┣ 📜add_leader.py
 ┃ ┣ 📜add_traffic_indicators.py
 ┃ ┣ 📜analyze_gaps.py
 ┃ ┣ 📜analyze_platoon_life.py
 ┃ ┣ 📜compare_DTW_ACC_HDV.py
 ┃ ┣ 📜compute_half_life.py
 ┃ ┣ 📜detect_string_instability_platoon.py
 ┃ ┣ 📜examine_string_instability.py
 ┃ ┣ 📜slice_per_recording.py
 ┃ ┣ 📜test_CF.py
 ┃ ┗ 📜test_platoon.py
 ┣ 📜.gitignore
 ┣ 📜README.md
 ┗ 📜console.ipynb

To install the necessary packages follow the following guidelines, be aware that they differ whether you are a Windows user or a Unix kernel-based OS user.

In addition to run the R code you need to install a valid verion of the R software. It is strongly advised to run the entire code using VS code to have all the files in a same working environement.

Unix distributions/MacOS installation

Copy your local path to this repository Then open the command prompt

cd %paste your path
conda env create -f conda/platoon_env.yaml

Activate it:

conda activate platoon_env

You can then run the commands in the console.ipynb file

Windows installation

Copy your local path to this repository Open Anaconda navigator Open CMD.exe prompt and type

cd %paste your path

then type

conda env create -f conda/platoon_env.yml

Activate it:

conda activate platoon_env

You can then run the commands in the console.ipynb file

How to use this code

You have two chaoices, either reuse the results and recreate the analysis results or launch the platoon detection and recreate all inputs for results analysis.
Once you have downloaded the data, we suggest you to create a 'data' folder and to place the data in it.
The code is run from the 'Console.ipynb' notebook.

Sourcecode can be changed, the python files are in the 'src' folder.

Licence

This code is under licence EUPL-1.2.

About

Platoon detection algorithm and analysis examples taken from the article "Identifying platoons in traffic: towards an assessment of ACC platoons impacts"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published