# Context-Aware Enhanced Application-Specific Handover in 5G V2X Networks
## 3 Connection-Aware Policy Mechanism (CAP)  
In 5G V2X networks, it is critical to guarantee uninterrupted connectivity. Vehicles always move and interact with different network nodes; therefore, an effective handover mechanism is essential. Conventional handover methods frequently fall short of the dynamic demands of contemporary V2X applications. In this scenario, the TOPSIS-Based Connection Context-Aware Policy Mechanism (CAP) is utilized, providing an advanced method to improve handover through the utilization of several network connection quality parameters and the dynamic modification of their weights according to the connection context. The mechanism is intended to be deployed using the Edge Computing paradigm, which is a distributed approach that localizes computation and data management. Implementing this type of computing model allows the mechanism to be deployed near the location where it is most needed (end-user devices) to process data closer to where it originates. This results in reduced latency, optimized data processing and transmission, reliable decision-making, scalable handling of data loads, connection-context awareness, and lower power consumption. The Connection-Aware Policy (CAP) algorithm is presented below (Algorithm 1), followed by Figure 2, which illustrates the conceptual visualization of the CAP mechanism.  
\begin{table}
\begin{tabular}{c  
```
1 Model the network grid
2 Identify UEs and plot their movements in network grid sector
3 Input: - List of SCs in UE Sector ID No (m, n) = ([x/20], [y/20]) - User Connection Context (e.g., AR, VIDEO, AUDIO)
4 Output: List of Filtered SCs
5 Set initial parameter weights (W) based on UE context  Example:  If context == \"AR\" \(\rightarrow\) W = [RSSI = 0.1, SINR = 0.1, BER = 0.1, Delay = 0.3, PLR = 0.2, DataRate = 0.2]  If context == \"VIDEO\" \(\rightarrow\) W = [RSSI = 0.2, SINR = 0.2, BER = 0.1, Delay = 0.1, PLR = 0.2, DataRate = 0.3]  If context == \"AUDIO\" \(\rightarrow\) W = [RSSI = 0.3, SINR = 0.3, BER = 0.1, Delay = 0.2, PLR = 0.1, DataRate = 0.0]
6 whileList of SCs[i] <= List of SCs[max] do
7 Extract parameter (RSSI, SINR, BER, Delay, PLR, DataRate) values from SCs[i]
8 Construct decision matrix X
9 Store parameter values of SCs[i] and normalize the weights in \(X_{\text{ij}}\)
10 Formulate the decision matrix \(X=X^{-}_{\text{ij}}\)* W\({}_{\text{j}}\) using dynamically adjusted weights W
11 Calculate Performance Index (PI) P\({}_{\text{i}}\) = \(\surd\)(\(\Sigma\)X\({}_{\text{ij}}\)\({}^{2}\)), j = 1,...,6
12 end while
13 Rank SCs based on Performance Index R\({}_{\text{n}}\) = arg max P\({}_{\text{i}}\)(i)
14 Filter top n percentage of SCs (20%) Top[0.2 \(\times\) n](Cranked)
15 Calculate Stay Time Assigned STA = d/v
16 Calculate Stay Time (ST) for SCs ST\({}_{\text{i}}\) = STA \(-\) (C\({}_{\text{i}}\) + R\({}_{\text{i}}\))
17 for all SCs in Top[0.2 \(\times\) n](Cranked)
18 while HO required = true and Current SC = None
19 if Detected Context \(\
eq\) Previous Context then
20 Update W
21 Recompute X\({}_{\text{ij}}\) and PI for Current SCs using updated W
22 Query SC Load
23 if SC Load < Max SC Load then
24 if ST <= STA then
25 Current SC = SC
26 Increment SC Load by 1
27 Decrement ST by 1
28 else
29 Current SC = None
30 end if
31 end while
32 end for
```  
**Algorithm 1**The Connection-Aware Policy Mechanism (CAP) Algorithm