# Improving Freight Traffic Efficiency at Urban Intersections Using Heavy Vehicle Platooning
## 3 Methodology
### Step 1--Platoon Identification
#### 3.1.1 Queue Length Estimation  
HCV platoons are identified by analyzing data from individual connected HCVs, using headway and spacing thresholds to determine if vehicles are part of a platoon. The process involves identifying stationary and moving platoons, with data from connected HCVs used to anticipate queues. The developed algorithm assumes the availability of real-time location and speed of connected HCVs and a penetration ratio. To construct a comprehensive picture of traffic conditions at the intersection, four assumptions are made:  
1. At each time step, it is possible to gather data on the location and velocity of every individual CV.
2. When a CV is not in a queue, it is always moving at a speed higher than the speed at which it would come to a stop.
3. Stopped CVs near the intersection will leave a reasonable spacing headway with the preceding vehicle.
4. The last reported stopped connected CV on an approach is the last vehicle in the queue. The estimation of queue length involves acquiring data of all connected HCVs, categorizing them based on their speed, and estimating the length of the queue when no stopped connected HCVs are observed or when at least one is observed.  
Figure 4 illustrates a visual representation of the queue-estimation algorithm. The algorithm receives as input a collection of projected arrival times at the intersection stop line  
for all detected connected HCVs within a designated zone surrounding the intersection. This list of vehicles and their anticipated arrival times is updated at every time step.  
Data from stopped connected HCVs is utilized to identify the existence of conventional heavy vehicles positioned downstream of a stopped connected HCV. The presence of such traditional vehicles is inferred when the distance between a stationary connected HCV and the intersection stop bar or the closest downstream connected HCV in the same lane exceeds a vehicle length, indicating the potential presence of a non-connected heavy vehicle. Conventional heavy vehicles identified in this manner are then incorporated into the vehicle set considered by the algorithm.  
To estimate the conventional heavy vehicles located between connected HCVs or between a connected HCV and the stop line, Equations (2) and (3) can be employed, respectively. These equations provide a mathematical framework for estimating the number and position of conventional heavy vehicles, further enhancing the algorithm's ability to optimize traffic flow in mixed-traffic environments.  
\[\mathbf{n}_{\text{con}}\,=\,\left[\,\frac{\mathbf{x}_{c}-(\mathbf{x}_{c^{\prime}}+\mathbf{l}_{ c})}{\mathbf{l}_{c}}\,\right] \tag{2}\]  
\[\mathbf{n}_{\text{con}}\,=\,\left[\,\frac{\mathbf{x}_{c}}{\mathbf{l}_{c}}\,\right] \tag{3}\]  
where \(\mathbf{x}_{c}\) is the distance of the connected HCV labeled as (\(\mathbf{c}\)) to the downstream end of the intersection, and \(\mathbf{x}_{c^{\prime}}\) is the distance of the preceding connected HCV labeled as (\(\mathbf{c^{\prime}}\)) to the downstream end of the intersection. \(\mathbf{l}_{c}\) represents the average spacing between vehicles.