# A Probabilistic VDTN Routing Scheme Based on Hybrid Swarm-Based Approach
## 5 Proposed VDTN Solution
### Firefly-Based SCF Node Selection  
The FA is implemented to support the knowledge-based VDTN routing phase since we believe its adaptive quality to mimic the increasing forwarding quality of the SCF principle used for DTN routing. Fireflies offers the progressive characteristic of passing from a solution to a better one. This property is identical to SCF hops when forwarding or replicating bundles from source to destination vehicles.  
For VDTN routing, the FA seeks the anticipation of near-optimum relay SCF vehicles that speed up delivering bundles according to a list of predefined brightness parameters that seek optimizing replication/forwarding balance moreover to buffer residence time. In our solution, a customized FA is implemented to be adapted with the intermittent routing that characterizes VDTN networks.  
The mapping between the FA elements and VDTN routing components is illustrated in Table 1.  
The initial brightness (\(\beta_{0}\)) and attractiveness (\(\alpha_{0}\)) values are set for each bundle on the source vehicle to a predefined value Equation (10):  
\[\beta_{0}=\alpha_{0}=1+\frac{1}{ED_{Host,Dest}} \tag{10}\]  
\(ED_{Host,Dest}\) is the euclidean distance between the bundle's host and destination vehicles. It is worth noticing that \(\alpha_{0}\) gets increasing proportionally when the ED to the bundle's destination gets closer.  
Each candidate VDTN node's brightness is calculated following Equation (11):  
\[\beta=(1+\frac{1}{ED_{Host,Dest}})\times\exp^{\frac{-\gamma}{\beta warm_{ fitness}}} \tag{11}\]  
Considering:  
* \(\beta\): the up-to-date vehicle's brightness for the stored bundle copy.
* \(\beta_{0}\): the initial brightness of the bundle which is set for all nodes carrying a copy of this bundle.
* \(Swarm_{fitness}\): the brightness fitness of the current hop's neighbor for the given bundle.
* The absorption factor of our solution is calculated basing on the fitness value.  
We deduce the vehicle attractiveness (\(\alpha\)) in Equation (12) for a given bundle towards its destination from the calculated brightness (\(\beta\)):  
\[\alpha=(1+\frac{1}{ED_{Host,Dest}})\times\exp^{\frac{-\gamma}{(Swarm_{fitness} )^{2}}} \tag{12}\]  
The next position of each bundle \(\mathbf{b}\) is calculated relative to each candidate's next-SCF vehicle \(\mathbf{j}\) amongst the current host's active contacts following Equation (13):  
\[x_{b}^{t+1}=x_{b}^{t}+\alpha_{bj}(x_{j}^{t}-x_{b}^{t})+Rand \tag{13}\]  
Considering:  
* \(x_{b}^{t}\): the bundle's position towards the next-SCF candidate \(\mathbf{j}\) at instant \(\mathbf{t}\).
* \(x_{b}^{t+1}\): the bundle's position towards the next-SCF candidate \(\mathbf{j}\) at instant \(\mathbf{t+1}\).
* \(\alpha_{bj}\): the attractiveness value of the candidate next-SCF vehicle \(\mathbf{j}\) on bundle \(\mathbf{b}\).
* \(x_{j}^{t}\): the position of next-SCF vehicle candidate \(\mathbf{j}\) at instant \(\mathbf{t}\).  
The candidate vehicle, which provides the best position \(x_{b}^{t+1}\) for the bundle \(\mathbf{b}\), is the most likely to be selected from the host node as the next SCF vehicle that with handle the carried bundle \(\mathbf{b}\).  
\begin{table}
\begin{tabular}{c c} \hline
**VDTN Components** & **FA Elements** \\ \hline VDTN vehicle & Firefly agent \\ \hline Next-SCF vehicle & Adjacent neighboring firefly \\ \hline Forwarding quality & Luminescence \\ \hline Destination vehicle & Brightest firefly \\ \hline \end{tabular}
\end{table}
Table 1: Vehicular Delay Tolerant Network (VDTN)/Firefly Algorithm (FA) mapping.