# The Traffic Adaptive Data Dissemination (TrAD) Protocol for both Urban and Highway Scenarios
## 3 Traffic Adaptive Data Dissemination
### Broadcast Suppression Technique
#### 3.1.1 Vector-Angle-Based Cluster Classification Mechanism  
A lightweight and flexible classification algorithm is designed, which only utilizes the position information rather than the digital road map. Therefore, it requires less computational power and fits more complex road topologies. Vector angle is used to identify whether the vehicles belong to a directional cluster or not. Algorithm 1 describes the steps used to classify directional clusters.  
```
0: the sender S receives a data message
0: the position of the sender S and its neighbors N (S)
1:whileN (S) \(\
eq\)\(\varnothing\)do
2:for i = 1 to num[N (S)], d = 1 do
3:N (S) = N (S) - \(\{\mathrm{n}_{i}\}\)\(\Leftarrow\) eliminate \(\mathrm{n}_{i}\) from N (S)
4:C\({}_{d}\) \(\leftarrow\) n\({}_{i}\)\(\Leftarrow\) sort n\({}_{i}\) into directional cluster C\({}_{d}\)
5:for j = i to num [N (S)] do
6:if (n\({}_{i}\)Sn\({}_{j}\)\(<\)\(\alpha\)) then
7:C\({}_{d}\) \(\leftarrow\) n\({}_{j}\)\(\Leftarrow\) sort n\({}_{j}\) into the same C\({}_{d}\) of n\({}_{i}\)
8:N (S) = N (S) - \(\{\mathrm{n}_{j}\}\)
9:endif
10: j++
11:endfor
12: save C\({}_{d}\) into cluster buffer
13: d++
14:endfor
15:endwhile
```  
**Algorithm 1**Vector-angle-based cluster classification algorithm The cluster classification operation is conducted as follows: In the well-connected network regime of Figure 1, the sender or transmitter \(S\) extracts the first neighbor N1 from its neighbor list and classifies N1 into the directional cluster C\({}_{1}\).  
Knowing the \(N1\) and \(N2\) coordinates, the angle \(\alpha_{1}\) between \(\overset{\rightarrow}{SN1}\) and \(\overset{\rightarrow}{SN2}\) can be obtained from their dot product (\(\alpha_{1}\in[0,\,\pi]\)). The algorithm compares \(\alpha_{1}\) with a threshold angle \(\alpha\), e.g., \(\alpha=10^{\circ}\). If the angle \(\alpha_{1}\) is less than \(\alpha\), the neighbor \(N2\) is classified in the directional cluster C\({}_{1}\). If not, the neighbor \(N2\) still remains in the neighbor list for the next step. In the case of Figure 1, \(\alpha_{1}<\alpha\), so \(N2\in\) C\({}_{1}\). This process continues until all neighbors have been checked. Therefore, a group of vehicles C\({}_{1}\) that are located in the similar direction as \(N1\) is identified. The members of C\({}_{1}\) are saved in a cluster buffer and eliminated from the next classification step. The classification will be carried out in a continuous process until all neighbors have been classified into respective directional clusters.  
The classification result of TrAD in the case of well-connected network illustrated by the Figure 1 is C\({}_{1}\) = {\(N1\), \(N2\)}; C\({}_{2}\) = {\(N3\), \(N4\)}; C\({}_{3}\) = {\(N5\), \(N6\)}; C\({}_{4}\) = {\(N7\), \(N8\)}; C\({}_{5}\) = {\(N9\), \(N10\)}; C\({}_{6}\) = {\(N11\), \(N12\)}. Vehicles located in the similar direction with respect to \(S\) are exactly classified in the same directional cluster. Moreover, the AMD classification result is also illustrated in Figure 1. AMD divides the radio range into four equal sectors, _i.e._, D1, D2, D3 and D4. Notice that the AMD classification result is not accurate. The C\({}_{2}\)= {\(N3\), \(N4\)} and C\({}_{3}\)= {\(N5\), \(N6\)} are combined into sector D1, and the C\({}_{5}\) = {\(N9\), \(N10\)} and C\({}_{6}\) = {\(N11\), \(N12\)} are mixed into sector D3. Furthermore, the vehicle \(N3\) and \(N9\) are ambiguous on the boundary of sectors. The result proves that the directional sector classification of AMD is not appropriate for the irregular road topology.