This study is published in the journal "Transportation Research Part C: Emerging Technologies" with gold open access, available at https://doi.org/10.1016/j.trc.2023.104289.
This study presents a new method to infer the average two-dimensional (2D) spacing between interacting vehicles in urban traffic from trajectory data. In this context, 2D spacing reflects the amount of road space consumed by pairs of interacting vehicles, and is related to 2D density at the macroscopic level. Due to complex interaction and conflicts in urban traffic, the inherent assumptions in traditional traffic flow models, such as unidirectional flow and homogeneity, are often violated. Such violation challenges direct measurement of urban vehicle spacing. The proposed method addresses this challenge by focusing on the relative movement between interacting vehicles and aggregating the accumulated presence of vehicles in similar scenarios. We apply the method to a large-scale urban trajectory dataset called pNEUMA, and validate the consistency of the method through bootstrapping. By applying the method we obtain a new empirical relation between the average 2D spacing and the relative speeds between interacting vehicles. There are similarities between this empirical relation with the classical Fundamental Diagram of traffic flow in terms of shape and interpretation, and so we term it the "interaction Fundamental Diagram" (iFD). However, there are also key differences. The iFD does not represent steady-state (homogeneous and stationary) longitudinal behaviour; it describes the average amount of road space needed for vehicle interactions at different relative speeds. We believe these iFD relations contribute to understanding vehicle interaction in urban traffic, and can offer new insights for designing safer and more efficient urban intersections.
tqdm
, numpy
, pandas
,pytables
, scipy
, pyproj=3.2.0
, joblib
, matplotlib
, shapely
, scikit-learn
Step 1. Download raw data from https://open-traffic.epfl.ch/index.php/downloads/ and save them in the folder "RawDatasets".
Step 2. Run Preprocessing.py
in the folder Code
first to preprocess the rawdata.
Step 3. Use IntersectionDetection.py
and IntersectionData.ipynb
in the folder Code
to identify and select intersections in the pNEUMA dataset.
Step 4. Run Sampling_exp1-2.py
, Sampling_exp3.ipynb
, and Sampling_exp4.py
in the folder Code
to transform coordinates, and sample vehicle pairs for different experiments.
Step 5. Run Experiments.py
to repeat our experiments in the article.
* DriverSpaceInference.py
is the library including classes and functions for the experiments
* We run the experiments in Linux with a cluster of CPUs. To be run on other OSs may need adjustments regarding the number of cores for parallel processing.
Step 1. Save raw data in the folder "RawDatasets".
Step 2. Create code to align the format of the new dataset to the format of the data to be saved in the folder "InputData".
Step 3. Design your application according to the code in Experiments.py
.
@article{Jiao2023,
doi = {10.1016/j.trc.2023.104289},
year = {2023},
month = oct,
publisher = {Elsevier {BV}},
volume = {155},
pages = {104289},
author = {Yiru Jiao and Simeon C. Calvert and Sander {van Cranenburgh} and Hans {van Lint}},
title = {Inferring vehicle spacing in urban traffic from trajectory data},
journal = {Transportation Research Part C: Emerging Technologies}
}