4.1 Highway mobility model
There are two major approaches to describe the spatiotemporal propagation of vehicular traffic flows [
16]: macroscopic traffic flow models and microscopic traffic flow models. The macroscopic approach pictures the traffic flow as the physical flow of a continuous fluid. It describes the traffic dynamics in terms of aggregated macroscopic quantities such as traffic density
p(
x,
t), traffic flow
q(
x,
t) and average velocity
v(
x,
t) as functions of space
x and time
t corresponding to partial differential equations. These parameters can be related together through their average values using the following relations [
17]:
${d}_{\mathrm{m}}=\frac{1,000}{{\rho}_{\mathrm{veh}}}{l}_{\mathrm{m}}$
(1)
${\tau}_{\mathrm{m}}=\frac{{d}_{\mathrm{m}}}{{v}_{\mathrm{m}}}=\frac{1}{{v}_{\mathrm{m}}}\left(\frac{1,000}{{\rho}_{\mathrm{veh}}}{l}_{\mathrm{m}}\right)$
(2)
${q}_{\mathrm{m}}=\frac{1}{{\tau}_{\mathrm{m}}}={v}_{\mathrm{m}}\left(\frac{1}{\frac{1,000}{{\rho}_{\mathrm{veh}}}{l}_{\mathrm{m}}}\right),$
(3)
where d_{m} is the average distance between vehicles in meters; ρ_{veh} is the traffic density on the freeway section considered in vehicles per kilometer; l_{m} is the average length of vehicle in meters; τ_{m} is the average time gap between vehicles in seconds; v_{m} is the average velocity of vehicles on the road in meters per second; and q_{m} is the average traffic flow measured in vehicles per second.
On the other hand, the microscopic approach describes the motion of each individual vehicle. It models actions like the accelerations, decelerations and lane changes of each driver as a response to the surrounding traffic. It is known that the macroscopic approach can be used to describe both individual vehicle motion and general traffic flow status [18]. Hence, we use the macroscopic traffic flow model to describe the vehicular traffic flow and utilize the average velocity quantity to consider the mathematical distribution of vehicular movements over the traffic network. Moreover, the connection availability is determined based on the position, direction and velocity of each individual vehicle so the involvement of microscopic traffic flow model can improve the accuracy of the modelling. Thus, we propose a hybrid approach combining both macroscopic and microscopic traffic flow models as an improvement to [19], where we used only the macroscopic traffic flow model. The vehicular velocity distribution comes from the macroscopic approach, and each individual vehicle's movement is tuned using a microscopic approach to refine the prediction of its movement. Using this hybrid approach, we can obtain more accurate estimation of the link reliability between vehicles.
Based on the microscopic model, the movement of each vehicle
i is defined by the following parameters: current Cartesian position at
t:
x_{i}(
t) and
y_{i}(
t), current velocity
v_{i}(
t), direction of movement
α_{i}(
t) and acceleration
a_{i}(
t). In VANETs, we consider that the vehicular velocity is the major factor in determining the expected communication duration between two vehicles. It is assumed that vehicular velocity has a normal distribution [
20,
21]. The following relations describe the highway mobility model using the city section mobility model [
9,
22]:
${v}_{\mathrm{i}}\left(t+\mathit{\Delta t}\right)={v}_{\mathrm{i}}\left(t\right)+{a}_{\mathrm{i}}\left(t\right)\times \mathit{\Delta t}$
(4)
$\Delta {\mathrm{x}}_{\mathrm{b},\mathrm{c}}={\displaystyle \sum _{k=b+1}^{c}{v}_{\mathrm{ik}}}\times \partial t\times cos{\alpha}_{\mathrm{ik}}$
(5)
$\Delta {\mathrm{y}}_{\mathrm{b},\mathrm{c}}={\displaystyle \sum _{k=b+1}^{c}{v}_{\mathrm{ik}}}\times \partial t\times sin{\alpha}_{\mathrm{ik}}$
(6)
where
Δ x
_{b,c} and
Δ y
_{b,c} are the travelling distances along the
x and
y directions during time
Δt = (t_{c} −
t_{b}), ∂
t is the time sampling interval between
t_{b} and
t_{c},
v_{ik} is the velocity of vehicle
i at time instant
k, and
α_{ik} is the direction of movement of vehicle
i at time instant
k. Nevertheless, the acceleration/deceleration values have a uniform distribution, i.e. the values of
v_{i}(
t +
Δt) do not follow a normal distribution. One possible solution is to convert the uniform distribution of the acceleration/deceleration values to normal distribution using the BoxMuller transform [
23] or the Ziggurat algorithm [
24]. However, this solution is computationally expensive to apply and adds complexity to the routing algorithm. We propose a simpler solution to allow vehicles to accelerate or decelerate or keep the same velocity by picking a new normally distributed velocity value. Let
V_{set} = {
nv_{1},
nv_{2},…,
nv_{e}} be a set of normally distributed velocity values generated at
t +
Δt. Let
nv_{L} and
nv_{S} ∈
V_{set,} where
nv_{L} ≥
v_{i}(
t) and
nv_{S} ≤
v_{i}(
t). If the vehicle picks
nv_{L}, then it is accelerating; otherwise, it is decelerating by picking
nv_{S}. The drivers' behaviour parameter (
DBR) is included in our proposed solution to distinguish between drivers who tend to accelerate over the average velocity and drivers who tend to decelerate. Thus, we rewrite Equation (
4) as follows:
${v}_{\mathrm{i}}\left(t+\mathit{\Delta t}\right)=\left\{\begin{array}{l}n{v}_{\mathrm{L}}\phantom{\rule{2em}{0ex}}\mathrm{if}\phantom{\rule{0.24em}{0ex}}U1<3\mathrm{DBR}/4\\ n{v}_{\mathrm{S}}\phantom{\rule{2em}{0ex}}\mathrm{otherwise}\end{array}\right.$
(7)
where U 1 is a random variable generated between 0 and 1. The DBR parameter value is set based on highway studies which suggest that about 75% of aggressive drivers tend to favour acceleration over a general mean velocity [10].
According to the classical vehicular traffic theory, vehicles are assumed to have Poisson distributed arrivals [
17]. Thus, the time gaps between vehicles are distributed according to the following probability density function (pdf) [
25]
${p}_{\tau}\left(\tau \right)=q{e}^{q.\tau},$
(8)
where
q is the traffic flow in vehicles per second. Based on Equation (
8), the pdf of the vehicles' distance
d can be written as follows:
${p}_{\mathrm{d}}\left(d\right)=\frac{q}{{v}_{\mathrm{m}}}{e}^{q.\frac{d}{{v}_{\mathrm{m}}}}\phantom{\rule{0.36em}{0ex}}=\frac{{\rho}_{\mathrm{veh}}}{1,000}{e}^{\frac{{\rho}_{\mathrm{veh}}}{1,000}.d},$
(9)
where q is substituted by use of Equation (3), and l_{m} is neglected to keep the mathematics simple. Hence, the distance between vehicles is exponentially distributed with the rate λ = ρ_{veh}/1,000, where d > 0. Nonetheless, the pdf in Equation (9) suggested replacing the velocity of vehicles with a constant average velocity v_{m} which is not quite accurate according to the fact that velocities are variable because of the acceleration/deceleration while driving. However, this simple presentation of the pdf of vehicles' distance is suitable for our highway mobility model and simulation scenario design. More general and accurate distribution of the distance between vehicles has been investigated in [26].
4.2 Link reliability model
The link reliability is defined as the probability that a direct communication link between two vehicles will stay continuously available over a specified time period [
27]. Given a prediction interval
T_{p} for the continuous availability of a specific link
l between two vehicles at
t, the link reliability value
r(
l) is defined as follows:
$r\left(l\right)=P\left\{\mathrm{to}\phantom{\rule{0.12em}{0ex}}\mathrm{continue}\phantom{\rule{0.12em}{0ex}}\mathrm{to}\phantom{\rule{0.5em}{0ex}}\mathrm{be}\phantom{\rule{0.12em}{0ex}}\mathrm{available}\phantom{\rule{0.12em}{0ex}}\mathrm{until}\phantom{\rule{0.12em}{0ex}}t+{T}_{p}\phantom{\rule{0.12em}{0ex}}\phantom{\rule{0.5em}{0ex}}\mathrm{available}\phantom{\rule{0.12em}{0ex}}\mathrm{at}\phantom{\rule{0.12em}{0ex}}t\right\}.$
In order to calculate the link reliability
r(
l), we utilize the vehicle's velocity parameter. The calculation of
r(
l) can be done in one part based on the assumption that the vehicular velocity has a normal distribution, i.e. if the velocities of two adjacent vehicles are unchanged or changed between
t and
t +
T_{p}, the resulting relative velocity has a normal distribution. Let
g(
v) denote the probability density function of the velocity of vehicle
v, and
G(
v) be the corresponding probability distribution function:
$g\left(v\right)=\frac{1}{\sigma \sqrt{2\pi}}{e}^{\frac{{\left(v\mu \right)}^{2}}{2{\sigma}^{2}}}$
(10)
$G\left(v\le {V}_{0}\right)=\frac{1}{\sigma \sqrt{2\pi}}{\displaystyle \underset{0}{\overset{{V}_{0}}{\int}}{e}^{\frac{{\left(v\mu \right)}^{2}}{2{\sigma}^{2}}}\mathit{dv},}$
(11)
where
μ and
σ^{
2
} denote the mean and the variance of velocity
v, respectively. The distance
d between two vehicles can be written as a function of the relative velocity
Δv and time duration
T,
d =
Δv ×
T, where
Δv = v_{2} –
v_{1}. Since
v_{2} and
v_{1} are normally distributed random variables, then
Δv is also a normally distributed random variable and we can write
Δv =
d/
T. Let
H denote the radio communication range of each vehicle. The range where communication between any two vehicles remains possible can be determined as
2H, i.e. when the relative distance between the two vehicles changes from −
H to +
H. Let
f(
T) denote the probability density function of the communication duration
T. We can calculate
f(
T) as follows:
$f\left(T\right)=\frac{4H}{{\sigma}_{\mathit{\Delta v}}\sqrt{2\pi}}\frac{1}{{T}^{2}}{e}^{\frac{{\left(\frac{2H}{T}{\mu}_{\mathit{\Delta v}}\right)}^{2}}{2{\sigma}_{\mathit{\Delta v}}{}^{2}}}\phantom{\rule{0.12em}{0ex}}\mathrm{for}\phantom{\rule{0.12em}{0ex}}\mathrm{T}\ge 0,$
(12)
where μ_{Δv}_{
=
}μ_{v1}_{−}μ_{v2} and σ^{
2
}_{Δv}_{=}σ^{
2
}_{v1} + σ^{
2
}_{v2} denote the mean and the variance of relative velocity Δ v, respectively. We suppose that each vehicle is equipped with a GPS device to identify its location, velocity and direction information. T_{p} is defined as the prediction interval for the continuous availability of a specific link l between two vehicles C_{i} and C_{j}. We assume that vehicles will not change their velocities either by accelerating or decelerating during T_{p}. We also assume there is no separation distance between lanes carrying forward traffic and lanes carrying backward traffic. The width of the road is ignored for simplicity. The following cases are considered to calculate T_{p} accurately:

Vehicles are moving in the same direction
${T}_{\mathrm{p}}=\left\{\begin{array}{l}\frac{2H{L}_{\mathrm{ij}}}{\left{v}_{\mathrm{i}}{v}_{\mathrm{j}}\right}\phantom{\rule{2em}{0ex}}\mathrm{if}\phantom{\rule{0.24em}{0ex}}{v}_{\mathrm{j}}>{v}_{\mathrm{i}},\mathrm{i}.\mathrm{e}.{C}_{\mathrm{j}}\phantom{\rule{0.12em}{0ex}}\mathrm{approaches}\phantom{\rule{0.12em}{0ex}}{C}_{\mathrm{i}}\phantom{\rule{0.12em}{0ex}}\mathrm{from}\phantom{\rule{0.12em}{0ex}}\mathrm{behind}\\ \frac{H{L}_{\mathrm{ij}}}{\left{v}_{\mathrm{i}}{v}_{\mathrm{j}}\right}\phantom{\rule{2em}{0ex}}\mathrm{if}\phantom{\rule{0.12em}{0ex}}{v}_{\mathrm{i}}>{v}_{\mathrm{j}}\phantom{\rule{0.12em}{0ex}}\mathrm{i}.\mathrm{e}.{C}_{\mathrm{i}}\phantom{\rule{0.12em}{0ex}}\mathrm{moves}\phantom{\rule{0.12em}{0ex}}\mathrm{forward}\phantom{\rule{0.12em}{0ex}}\mathrm{in}\phantom{\rule{0.12em}{0ex}}\mathrm{front}\phantom{\rule{0.12em}{0ex}}\mathrm{of}\phantom{\rule{0.12em}{0ex}}{C}_{\mathrm{j}}\end{array}\right.$
(13)

Vehicles are moving in opposite directions
${T}_{\mathrm{p}}=\left\{\begin{array}{l}\frac{H+{L}_{\mathrm{ij}}}{{v}_{\mathrm{i}}+{v}_{\mathrm{j}}}\phantom{\rule{2em}{0ex}}{C}_{\mathrm{i}\phantom{\rule{0.12em}{0ex}}}\mathrm{and}\phantom{\rule{0.12em}{0ex}}{C}_{\mathrm{j}}\phantom{\rule{0.12em}{0ex}}\mathrm{are}\phantom{\rule{0.12em}{0ex}}\mathrm{moving}\phantom{\rule{0.12em}{0ex}}\mathrm{toward}\phantom{\rule{0.12em}{0ex}}\mathrm{each}\phantom{\rule{0.12em}{0ex}}\mathrm{other}\\ \frac{H{L}_{\mathrm{ij}}}{{v}_{\mathrm{i}}+{v}_{\mathrm{j}}}\phantom{\rule{2em}{0ex}}{C}_{\mathrm{i}}\phantom{\rule{0.12em}{0ex}}\mathit{and}\phantom{\rule{0.12em}{0ex}}{C}_{\mathrm{j}}\phantom{\rule{0.12em}{0ex}}\mathrm{are}\phantom{\rule{0.12em}{0ex}}\mathrm{moving}\phantom{\rule{0.12em}{0ex}}\mathrm{away}\phantom{\rule{0.12em}{0ex}}\mathrm{from}\phantom{\rule{0.12em}{0ex}}\mathrm{each}\phantom{\rule{0.12em}{0ex}}\mathrm{other}\end{array}\right.$
(14)
where
L_{ij} is the Euclidean distance between vehicles
C_{i} and
C_{j}, and
v_{ij} is the relative velocity between vehicles
C_{i} and
C_{j}.
L_{ij} is calculated as follows:
${L}_{\mathrm{ij}}=\sqrt{{\left({y}_{\mathrm{i}}{y}_{\mathrm{j}}\right)}^{2}+{\left({x}_{\mathrm{i}}{x}_{\mathrm{j}}\right)}^{2}},$
(15)
where we assumed that L_{ij} > 0, i.e. two vehicles cannot be at the same location at the same time.
We can integrate
f(
T) in (12) from
t to
t +
T_{
p
} to obtain the probability that at time
t, the link will be available for a duration
T_{p}. Thus, the link reliability value
r_{t}(
l) at time
t is calculated as follows:
${r}_{\mathrm{t}}\left(l\right)=\left\{\begin{array}{lll}{\displaystyle \underset{t}{\overset{t+{T}_{\mathrm{p}}}{\int}}}& {\displaystyle f\left(T\right)\mathit{dt}}& \mathit{if}\phantom{\rule{0.24em}{0ex}}{T}_{\mathrm{p}}>0\\ 0& \phantom{\rule{0.4em}{0ex}}\mathrm{otherwise}\end{array}\right.\phantom{\rule{0.4em}{0ex}},$
(16)
the integral in (16) can be derived using the Gauss error function
Erf[
28]. It can be obtained as
${r}_{\mathrm{t}}\left(l\right)=\mathrm{Erf}\left[\frac{\left(\frac{2H}{t}{\mu}_{\Delta \mathrm{v}}\right)}{{\sigma}_{\Delta \mathrm{v}}\sqrt{2}}\right]\mathrm{Erf}\left[\frac{\left(\frac{2H}{t+{T}_{\mathrm{p}}}{\mu}_{\Delta \mathrm{v}}\right)}{{\sigma}_{\Delta \mathrm{v}}\sqrt{2}}\right]\phantom{\rule{0.48em}{0ex}}\mathrm{when}\phantom{\rule{0.12em}{0ex}}{T}_{\mathrm{p}}>0,$
(17)
where Erf is defined as follows
$\mathrm{Erf}\left(w\right)=\frac{2}{\sqrt{\pi}}{\displaystyle {\int}_{0}^{w}{e}^{{t}^{2}}}\phantom{\rule{0.12em}{0ex}}\mathit{dt}\phantom{\rule{0.25em}{0ex}}\infty <w<+\infty .$
(18)
4.3 Route reliability definition
In vehicular networks, multiple potential routes could exist between the source vehicle
s_{r} and destination vehicle
d_{e}, where each route is composed of a set of links (hops) between the source and the destination. Without loss of generality, for any given route, let us denote the number of its links as
Ω:
l_{1}= (
s_{r},
n_{1}),
l_{2} = (
n_{1},
n_{2}),…,
l_{Ω} = (
n_{Ω}, d_{e})
. For each link
l_{ω} (
ω = 1, 2,…,
Ω), we denote by
r_{t}(
l_{ω}) the value of its link reliability as calculated in Equation (
16). The route reliability for a route
P, denoted by
R(
P(
s_{r},d_{e}))
, is defined as follows:
$R\left(P\left({s}_{r},{d}_{e}\right)\right)={\displaystyle {\prod}_{\omega =1}^{\Omega}{r}_{\mathrm{t}}\left({l}_{\mathrm{\omega}}\right)\mathrm{where}\phantom{\rule{0.6em}{0ex}}{l}_{\mathrm{\omega}}\in P\left({s}_{r},{d}_{e}\right)}.$
(19)
Suppose there are
z potential multiple routes from the source
s_{r} to the destination
d_{e}. If
M(
s_{r},d_{e}) = {
P_{1},
P_{2},…,
P_{
z
}} is the set of all those possible routes, then the optimal route will be chosen at the source node based on the following criteria:
$arg{max}_{P\in M\left({s}_{r},{d}_{e}\right)}R\left(P\right).$
(20)
In other words, if multiple routes are available, we choose the most reliable route that satisfies the reliability threshold determined by the application. It can be said that the route P is reliable if R(P) is greater than the reliability threshold, e.g. sensitive data needs more reliable route than other normal data. In this case, the reliability threshold for sensitive data could be R(P) > 0.9. A route could be reliable for some types of data to be transferred while it is not reliable for other types of data.
In conclusion, route reliability is a relative concept and depends on the data type to be transferred. If we have many routes that satisfy the reliability threshold, then we could choose the route that has the least number of hops.