## 3 System Model Overview
Based on Equation (3), the head vehicle is selected, whereas the total sum of \(\alpha+\beta+\gamma=1\). \[V=(\alpha s+\beta h+\gamma c)\diagup d \tag{3}\]  
The working of proposed routing protocol has been discussed in detail in the following subsection. In this section, firstly, the working of the proposed scheme is explained in detail. Secondly, the algorithms have been discussed. Lastly, the implementation of the proposed scheme in various scenarios has been explained. Algorithm 1 explains the head vehicle selection in the cluster, and Algorithm 2 elaborates the working of the proposed routing protocol on disruptive communication links. The working of proposed scheme is discussed below. ```
Input: Speed s, Hop-count h, Similar cached content c and Distance d Output: Head vehicle \(HV\) selection
1\(\text{v}_{n}\) exchange HP
2\(\text{v}_{i}\) maintain HP entries in NIT
3 Calculate \(V\)=\((\alpha*s+\beta*h+\gamma*c)/d\)
4 Compare \(V\) on \(\text{v}_{i}\)
5 Send \(V\), HV_id and C_id\(\longrightarrow\) RSU
6 RSU Save information \(\longrightarrow\)\(CIT\)
7 if\(\text{v}_{i}\)<\(V_{i+1}\)then
8 Select \(\text{v}_{i+1}\) as \(HV\)
9 else
10 Select \(\text{v}_{i}\) as \(HV\)
```  
**Algorithm 1**Head Vehicle Selection Algorithm  
```
Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSEthen
3 Search \(V_{i}\) in \(CIT\)
4 if\(CIT\longrightarrow V\)then
5 Select new \(HV\)
6
7 else
8 HP exchange Starts again
```  
**Algorithm 2**Mobility Management Algorithm  
```
Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSEthen
3 Search \(V_{i}\) in \(CIT\)
4 if\(CIT\longrightarrow V\)then
5 Select new \(HV\)
6
7 else
8 HP exchange Starts again
```  
**Algorithm 3**Head Vehicle Selection Algorithm  
```
Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSEthen
3 Search \(V_{i}\) in \(CIT\)
4 if\(CIT\longrightarrow V\)then
5 Select new \(HV\)
6 else
7 HP exchange Starts again
```  
**Algorithm 4**Head Vehicle Selection Algorithm  
```
Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSEthen
3 Search \(V_{i}\) in \(CIT\)
4 if\(CIT\longrightarrow V\)then
5 Select new \(HV\)
6 else
7 HP exchange Starts again
```  
**Algorithm 5**Head Vehicle Selection Algorithm  
```
Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSE then
3 Search \(V_{i}\) in \(CIT\)
4 if\(CIT\longrightarrow V\)then
5 Select new \(HV\)
6 else
7 HP exchange Starts again
```  
**Algorithm 6**Head Vehicle Selection Algorithm  
```
Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSE then
4 Search \(V_{i}\) in \(CIT\)
5 if\(CIT\longrightarrow V\)then
6 Select new \(HV\)
7 else
8 HP exchange Starts again
```  
**Algorithm 7**Head Vehicle Selection Algorithm  
``` Input: \(V\) in \(CIT\) Output: new \(HV\) Selection
1 FIND \(HV\) in C\({}_{i}\)
2 if\(HV\) = FALSE then
9 Search \(V_{i}\) in \(CIT\)





Algorithm 2 describes the proposed scheme \(HV\) selection on disruptive communication links. Before leaving the cluster C\({}_{i}\), \(HV\) sends the leave packet to RSU. Now, if the RSU does not find the \(HV\) in the cluster, then RSU searches the new \(V_{i}\) entry in its \(CIT\). If the value of \(V\) is available in \(CIT\), then the new head vehicle \(HV\) is selected. Otherwise, if there is no entry in \(CIT\) regarding that particular cluster, then the hello packet (HP) will be exchanged again. The proposed scheme is tested in two different scenarios. Scenario 1 explains the working of the proposed scheme in stable network topology, and scenario 2 describes the working of the proposed solution in dynamic network topology. A detailed description is given below. Scenario 1: Stable Network Topology

As shown in Figure 3(a), if vehicles are interested in similar content, then they are grouped in the same cluster. Each cluster has a unique identity.