## 3 An Opportunistic Routing for Data Forwarding Based on Vehicle Mobility Association
### The Algorithm Design of OVMA  
According to the previous section of the traversal process, we can see that OVMA algorithm implementation process is as follows:  
Figure 3: Brief introduction of OVMA (Opportunistic Routing for Data Forwarding Based on Vehicle Mobility Association). If Ert is sufficient:  
* A graph G(V, E), a source node \(i\), initial state: \(\delta_{i,j}(t)=\delta_{m,n}(t)=\mathbb{Q}\);
* Accessing adjacent nodes of \(i\) and calculating the data transfer probability, \(p_{i,j}(t)>\tau\);
* If a node \(s\) cannot be found, \(p_{i,s}(t)>\tau\), reduce the value of \(p_{i,s}(t)>\varsigma\) (\(\varsigma>\tau\));
* Add \(j,s\) in \(tabu_{n}\), \((j,s)\in tabu_{n}\);
* Accessing adjacent nodes of \(j\) and \(s\) and calculating the data transfer probability;
* If \(p_{j,s}(t)>\tau\), the algorithm is unable to execute, because \(s\in tabu_{n}\);
* Add the data delivery path in Er to calculate adjacent node affinity, \(\delta_{ij}(t)=1-\varsigma_{ij}(t)\), update Ec table. * If node \(i\) and node \(j\) are located in information efficient region boundary, broadcast the EM information and calculate the angle between A and B: \(\beta\);
* Feedback HM information to determine whether or not the EM information is exchanged. Else:
* Update EM info: tabun = null, Er = null, Ec: \(\delta_{i,j}(t)=\delta_{m,n}(t)=\mathbb{Q}\)  
According to the above selected process, OVMA algorithm pseudo code can be obtained, as shown in Algorithms 1 and 2. ```
0: A graph G(V, E), a source node \(S\), a destination node \(D\);
0: optimal path and nodes association degree;
1:\(\delta_{ij}(t)\): represents the degree of association between nodes
2:\(p_{i,j}(t)\): the data transfer probability
3:\(\text{Ert: EM information lifetime}\)
4:\(tabu_{n}\): tabu List
5: Ec: the degree of association between vehicles
6: Er: data delivery path
7: Initial state: \(\delta_{i,j}(t)=\delta_{m,n}(t)=\mathbb{Q}\)
8:for\(i\
eq j\in g=(v,e,\tau),j\
ot\in tabu_{n}\)do
9:if Ert is sufficient then
10: calculate the data transfer probability \(p_{i,j}(t)>\tau\)
11:if cannot find a node s, \(p_{i,s}(t)>\tau\)then
12: reduce the value of \(p_{i,s}(t)>\varsigma\) (\(\varsigma<\tau\))
13:endif
14: add \(j,s\) in \(tabu_{n}\), \((j,s)\in tabu_{n}\)
15:if\(p_{j,s}(t)>\tau\)then
16: unable to execute, because s\(\in tabu_{n}\)
17:endif
18: add the data delivery path in Er
19: calculate adjacent node affinity, \(\delta_{ij}(t)=1-\varsigma_{ij}(t)\)
20: update Ec table
21:\(\delta_{ij}(t+n)=\Delta\,\delta_{ij}(t+n)\)
22:\(\Delta\,\delta_{ij}(t+n)=|\,\delta_{ij}(t+n)-\delta_{ij}(t)|\)
23:else
24: Ert to the EM information lifetime
25: update EM info
26:\(tabu_{n}\) = null, Er = null
27: Ec: \(\delta_{i,j}(t)=\delta_{m,n}(t)=\mathbb{Q}\)
28:endif
29:endfor
```  
**Algorithm 1** Information efficient region phase ```
1:Es: information source (Base Station)
2:Ev: velocity vector
3:for\(i\in G_{1},j\in G_{2}\)do
4:if Ert is sufficient then
5: broadcast the EM information
6: calculate the angle between A and B vehicles directions
7:\(\beta=\arccos\frac{a.rrab.p}{|a.v||b.v|}\)
8:if\(|\beta|<10\)then
9: same direction
10:if at the same Es then
11: feedback HM information
12: do not exchange EM information
13:endif
14:endif
15:if\(|\beta|>170\)then
16: different directions
17:if at the different Es then
18: feedback HM information
19: exchange EM information
20:endif
21:endif
22:else
23: Ert to the EM information lifetime
24: update EM info
25:endif
26:endfor
```

**Algorithm 2** Information efficient region boundary phase

## 4 Performance Evaluation

In the OVMA algorithm, \(\alpha\) and \(\beta\) are the heuristic factor and the expected heuristic factor of nodes, which satisfy \(\alpha+\beta=1\). Change the value of \(\alpha\) and \(\beta\) and observe the performance of the algorithm. We compared OVMA with three existing VANETs routing protocol of Greedy Perimeter Stateless Routing (GPSR), Optimized Link State Routing (OLSR), and D-ODMRO. Data delivery ratio, routing overhead, and data delivery delay are used to evaluate the performance of OVMA.