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 .
📦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.
Copy your local path to this repository Then open the command prompt
cd %paste your pathconda env create -f conda/platoon_env.yamlActivate it:
conda activate platoon_envYou can then run the commands in the console.ipynb file
Copy your local path to this repository Open Anaconda navigator Open CMD.exe prompt and type
cd %paste your paththen type
conda env create -f conda/platoon_env.ymlActivate it:
conda activate platoon_envYou can then run the commands in the console.ipynb file
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.
This code is under licence EUPL-1.2.