# Multi-Objective Message Routing in Electric and Flying Vehicles Using a Genetics Algorithm
## 2 System Model  
Our system model includes vehicles (UAV or EV) with important properties such as 3D location, represented by \(l_{i}(x_{i},y_{j},z_{i})\) along with velocity of \(\gamma_{i}\). These mobile vehicles can communication with each other within a transmission range \(R_{i}\). The straight line distance \(\Delta D_{i,j}\) between a vehicle \(i\) and \(j\) can be identified using \(\Delta D_{i,j}=\sqrt{\left(x_{j}-x_{i}\right)^{2}+\left(y_{j}-y_{i}\right)^{2} +\left(z_{j}-z_{i}\right)^{2}}\). It is assumed that all EVs are at \(z=0\) position in the 3 rd dimension, whereas UAVs can have a positive \(z\) value. With the assumption of uniform velocity and unchanged direction for all vehicles at time t = 0, the future position of a vehicle can be predicted as (\(\Delta D_{i,j}(t_{0}+\tau)\)) at time \(t_{0}+\tau\) using the current position at the current time and movement vector, as given below:  
\[ \begin{split}\Delta D_{i,j}(t_{0}+\tau)=\sqrt{[(x_{j}+v_{x,j} \times\tau)-(x_{i}+v_{x,i}\times\tau)]^{2}}+\sqrt{[(y_{j}+v_{y,j}\times\tau)-( y_{i}+v_{y,j}\times\tau)]^{2}}+\\ \sqrt{[(z_{j}+v_{z,j}\times\tau)-(z_{j}+v_{z,j}\times\tau)]^{2}} \end{split}  \tag{1}\]  
A movement vector shows the acceleration of a vehicle in the direction of any one, two, or all of the three dimensions, in a unit of time (ex. seconds). The UAVs functionality allows the availability of the movement vector (\(v_{x,i},v_{y,j},v_{z,i}\)) in their beacon or hello messages; however, in EV, the only relatable available information is the velocity (\(\gamma_{i}\)) and acceleration direction (\(\theta_{i}\)). EVs share periodic basic safety messages (BSM) under the DSRC communication protocol, which contains location, velocity, and direction information. The movement vector for an EV can be extracted by considering the top view where the north always points to \(90^{\circ}\), and by dividing the total \(360^{\circ}\) into quadrants of equal size (\(Qs\)). Here, \(Qs=45^{\circ}\) is considered, which creates eight quadrants and an offset of \(Qs/2=22.5\). Thus, if a vehicle's direction angle is between \(0^{\circ}\sim 22.5^{\circ}\) or \(337.5^{\circ}\sim 360^{\circ}\), then a positive value with a velocity of \(\gamma_{i}\) on the x-axis is considered for \(v_{x,i}\). A simple movement direction metric \(\theta^{\prime}_{i}=(\theta_{i}+\text{Offset})/Qs\) is formulated, which identifies the movement of EV in a positive or negative value over the x-axis, y-axis, or both axis. The movement of an EV on the x-axis and y-axis in a single time unit with an unchanged direction can be estimated as:  
\[v_{x,i}=\left\{ \begin{array}{l l}(+1)\times\gamma_{i}&\text{, if }0\leq\theta^{ \prime}_{i}<2\text{ or }\theta^{\prime}_{i}>7\\ (-1)\times\gamma_{i}&\text{, if }3\leq\theta^{\prime}_{i}<6\\ (0)\times\gamma_{i}&\text{, if }2\leq\theta^{\prime}_{i}<3\text{ or }6\leq \theta^{\prime}_{i}<7\end{array} \right\} \tag{2}\]  
Figure 1: Proposed FA-VANET paradigm. **A–E** are dummy names for the vehicles. \[v_{y,i}=\left\{ \begin{array}{ll}(+1)\times\gamma_{i}&\text{, if }1\leq\theta_{i}^{ \prime}<4\\ (-1)\times\gamma_{i}&\text{, if }\theta_{i}^{\prime}\geq 5\\ (0)\times\gamma_{i}&\text{, if }0\leq\theta_{i}^{\prime}<1\text{ or }4\leq\theta_{i}^{\prime}<5\end{array} \right\} \tag{3}\]  
with the \(v_{z,i}=0\), velocity (\(\gamma_{i}\)) and vehicle direction (\(\theta_{i}\)), a movement vector (\(v_{x,i},v_{y,i},v_{z,i}\)) can be formulated for an EV (\(i\)) to employ in Equation (1), using Equations (2) and (3). Practically, it is unlikely that a vehicle keeps on moving in the same direction, but even a short time using the proposed prediction is enough to successfully communicate with reliability. Reliable data transfer is identified by our coined metric of \(\omega_{i,j}\), which considers data rate and the size of the data \(Dt_{i,j}\) between two vehicles, as \(\omega_{i,j}=\frac{\tau_{i,j}\times T_{x,j}}{Dt_{i,j}}\), where \(\tau_{i,j}\) is the connectivity time between vehicle \(i\) and \(j\).