## 3 Composite Metric Routing Approach
### The Proposed Greedy Implementation  
We define the following terms before describing the proposed greedy algorithm. The terrain is modeled as a graph \(G=(V,A)\), where \(V\) is the set of nodes/vertices and \(A\) is the set of links/arcs. The distance of any link \((m,n)\in A\) is given by \(d(m,n)\) as in (2). The energy cost of any link \((m,n)\in A\) is given by \(e(m,n)\) as in (8). The distance and energy costs between any node and itself is zero, i.e., \(d(m,m)=e(m,m)=0\). It is also noted that if \((m,n)\
otin A\), then \(d(m,n)=e(m,n)=\infty\). Moreover, the following definitions are in order. \(s,f\): Source and final (or finish) nodes of the required path, respectively; \(D^{n}\): Distance of best path from the source node \(s\) to node \(n\); \(E^{n}\): energy cost of best path from the source node \(s\) to node \(n\); \(M^{n}\): _Composite Metric_ of best path from the source node \(s\) to node \(n\), i.e., \(M^{n}=D^{n}\times E^{n}\); \(P\): Set of nodes for which the best path from \(s\) is known; _Pred\({}^{n}\):_ Predecessor of node \(n\) on the best path from the source node \(s\). Now, we can state the proposed algorithm as shown in Algorithm 1. ```
1 Initialization: Let \(P=\{s\}\), \(D^{s}=E^{s}=M^{s}=0\), \(D^{n}=d(s,n)\quad\forall n\
eq s\), \(E^{n}=e(s,n)\quad\forall n\
eq s\), and \(M^{n}=D^{n}\times E^{n}\quad\forall n\
eq s\). 2 while\(P\
eq V\)do
3 Find \(m\
otin P\) such that \(M^{m}=\min_{n\
otin P}M^{n}\); \(P:=P\cup\{m\}\); for\(n\
otin P\)do
4 if\((D^{m}+d(m,n))\times(E^{m}+e(m,n))<M^{n}\)then
5\(D^{n}:=D^{m}+d(m,n)\);
6\(E^{n}:=E^{m}+e(m,n)\);
7\(M^{n}:=D^{n}\times E^{n}\);
8\(Pred^{n}=m\);
9
10 end if
11
12 end while return\(\{M^{m}:m\in V\}\) and \(\{Pred^{m}:m\in V\}\);
```  
**Algorithm 1**_Composite Metric_ Greedy Implementation  
Note that after the algorithm terminates, \(M^{f}\) will be equal to the composite metric of the selected path from source \(s\) to final node \(f\). Moreover, the selected path itself can be constructed by tracing \(Pred^{m}\) backwards. In other words, the selected path can be constructed backwards as follows: \(\{n_{1}=f,n_{2}=Pred^{n_{1}},n_{3}=Pred^{n_{2}},\ldots,s\}\). It can be easily seen that the computational complexity of composite metric greedy implementation is \(O(|V|^{2})\). In fact, the above greedy algorithm is a modification to the [PERSON] shortest path algorithm, where the composite metric is used instead of the link distance metric. The details of our proposed Algorithm 1 and its simulation context can be described as follows. The simulation starts with loading offline data into the algorithm. These data are composed of the elevation of the nodes, distances between neighboring nodes, and soil information for each node on the terrain under study, in addition to the air humidity and vehicle information. Consequently, we are also able at this point to calculate the energy cost per link (8) offline, and feed this information to the algorithm. Given a routing node pair \([s,f]\), the algorithm is initialized in Step 1 by setting the distance, energy cost and composite metric from the source \(s\) to itself as zeros. Moreover, the distances, energy costs and composite metrics from node \(s\) to its immediate neighbours are initialized using the available information of the link distances and energy costs of the terrain graph. The algorithm starts by defining node \(s\) as the first node in the set of nodes along the final constructed path to reach node \(f\). This set of nodes is referred to as the permanent set of nodes. Then, the algorithm initiates a _while_ loop in Steps 2-12, which performs a greedy graph search among all nodes on the terrain to discover the next permanent node to be added to the list of nodes that construct the final path. In particular, the nonpermanent node with the smallest composite metric label is chosen as the next permanent node. This is performed in Steps 3-4 of the algorithm. The calculations taking place in Steps 5-12 of Algorithm 1 can be summarized as follows.