# Multi-Objective Message Routing in Electric and Flying Vehicles Using a Genetics Algorithm
## 3 Multi-Objective Vehicular Routing in EnFVs  
Let \(G(V,E)\) be a directed graph of a communication paradigm containing UAVs and EVs, represented as set V with E, communication edges. In a multi-hop environment, a communication route exists if it meets the criteria of specified constraints, C. If there exist multiple routes between a source and a destination, then a chosen route from problem space must satisfy the following objective functions \((O^{1},O^{2})\):  
\[argmax_{p\in M(s,d)}O^{1} \tag{6}\] \[argmax_{p\in M(s,d)}O^{2}\] \[\text{s.t. }C1:\ \forall\ argmin_{p}(\omega_{s,1},\omega_{1,2}, \ldots,\omega_{m,d})>1\] \[C2:\ 0<\forall\bar{\xi}_{i}\leq 100\] \[C3:\ \forall Tx_{i}>0,\]  
where \(M(s,d)\) is the solution space of possible paths between \(s\) and \(d\), considering all preliminary inquisitions. The objective functions \(O^{1}\) and \(O^{2}\) are defined in Equations (4) and (5), respectively. Algorithm 1 outlines that a sender vehicle discovers and evaluates multiple routes towards a destination. A broadcast shares route request (RReq) messages to all connected vehicles. Each route reply message from the destination or any intermediate vehicle having a route to the destination includes additional information for the proposed scheme, as follows: (1) \(min\omega_{i,d}=min(\omega_{i,j},min\omega_{j,d})\), (2) \(min\xi_{i,d}=min(\xi_{i,j},min\xi_{j,d})\), (3) \(sumTx_{i,d}=sum(Tx_{i,j},sumTx_{j,d})\), (4) hop count. Each route reply message includes additional information which helps in route evaluation. A route reply message includes \(min\omega_{i,d}=min(\omega_{i,j},min\omega_{j,d})\), \(min\xi_{i,d}=min(\xi_{i,j},min\xi_{j,d})\), \(sumTx_{i,d}=sum(Tx_{i,j},sumTx_{j,d})\) and hop count. After receiving all route reply messages, if there is any direct route between source and destination, then the source vehicle selects the route and terminates further route evaluation. On the other hand, the algorithm calculates \(\omega_{s,d}\) for each route and discards all unreliable paths (\(\omega_{s,d}<1\)). Subsequently, the remaining routes are passed to a multi-objective optimal route algorithm which calculates both objective functions (\(O^{1}\), \(O^{2}\)) to represent each route. In the end, the source device chooses the best route based on objective functions from available routes. Algorithm 2 describes that using population \(M(s,d)\) in Equation (6); a multi-objective problem under defined constraints can be formulated wherein all objective functions values are normalized between \([0,1]\). The multi-objective problem formulation in Equation (6) supports any number of objectives and constraints. The proposed scheme considers two objective functions for the maximum average data rate, \(O^{1}\) and the highest minimum residual energy, \(O^{2}\) with three constraints. Along with reliability (\(\omega_{s,d}<1\)), \(O^{1}\) ensures that a route with UAVs has priorities, whereas \(O^{2}\) considers avoiding UAVs with low residual energy. Considering that both objectives have a contradictory nature, a multi-objective solution allows a fair trade-off wherein both objectives have a higher value. Normally, a multi-objective optimization algorithm calculates the Pareto front for all solutions, which is a set of non-dominant solutions such that no other solution existsthat outperforms. However, all the solutions on the Pareto front are not favorable to all objectives. Moreover, genetic algorithms and traditional evolutionary algorithms identify and reduce the Pareto front for a solution set. The proposed scheme considers reliability and complete message delivery using \(\omega\) factor and reduces the solution space before the genetics algorithm. It is worth noting that the population (\(M(s,d)\)) in the proposed Algorithm 2 is already filtered out using the reliability check of Algorithm 1 and requires only minimal processing, thus becoming the lightweight multi-objective optimal procedure. Algorithm 2 outlines the complete process of the proposed multi-objective optimization using a genetics algorithm.