## 4 Multiple Metrics Implementation
### Link Metric Weighing  
The link metric domain of OLSR on each node contains a set of RLMTs that will be selected based on the QoS requirements of the application traffic type. In order to map application traffic type to a specific path, the RLMT that will run on smart meter nodes to send a particular application data type must be decided. The decision on which link metric path an application traffic type takes to a data concentrator is determined using the AHP technique proposed in [33] for WMN in NAN. For example, suppose the smart meter Node 0 in Figure 2 transmits three application traffic types, A, B and C, to the data concentrator Node 8, and traffic Type A has two QoS requirements: high reliability (low loss rates) and low delay. On the other hand, suppose also that traffic Type B requires a high throughput and low loss rate and traffic Type C requires very low delay. The set of RLMTs chosen for traffic Type A are ETX (for reliability) and ML (for Low delay). On the other hand, for traffic Type B, which requires a high throughput and low loss, ETX is given priority. Finally, ML is chosen to fulfil the low latency requirement traffic Type C.  
Figure 2: A representation of smart meter nodes in a 3 by 3 grid WMN-based NAN. Table 1 illustrates the link metrics and possible paths to the data concentrator. Applying the metric weight to compare all of the possible paths involves the following steps:  
Step 1. Find all possible paths to the destination. Table 1 shows the link metric values for the best possible paths to the data concentrator. Step 2. Compute a path-to-path pair-wise comparison matrix \((ppcm)\) for the values shown in Table 1. \(ppcm\) is used to determine how well a path scores on each metric (ETX and ML), by using a pair-wise comparison matrix with a size of \((NbyN)\), where \(N\) is the number of paths to the destination. The basic idea of the \(ppcm\) is to compare the quantitative metric of ETX and ML of one path with that of all other paths. The matrix calculations are based on the following expression, where \(i\) and \(j\) are paths and \(mj\) is the overall value of the metric for path \(j\). * \(ppcm(i,i)=1\), when comparing the same path;
* \(ppcm(j,i)=1/ppcm(i,j)\), for reciprocal paths; and
* \(ppcm(I,j)=mj/mi\), for min criterion. Applying \(ppcm\) to ETX paths in Table 1 is given as:  
\[ppcm(ETX)= \begin{pmatrix}1&1.2834&0.6902&0.8980\\ 0.7792&1&0.5378&0.6997\\ 1.4489&1.8595&1&1.3011\\ 1.1136&1.4292&0.7686&1\end{pmatrix}  \tag{3}\]  
Step 3. The normalized path-path pair-wise comparison matrix \((nppcm)\) is generated by dividing each entry in column \(j\) of the \(ppcm\) by the sum of the entries in that same column. This results in a normalized matrix in which the sum of the entries in each column is one. The formula for calculation is given as follows:  
\[nppcm(i,j)=\frac{ppcm(i,j)}{\sum ppcm_{column(j)}} \tag{4}\]  
The nppcmmatrix for ETX is given as:  
\[nppcm(ETX)= \begin{pmatrix}0.2303&0.2303&0.2303&0.2303\\ 0.1795&0.1795&0.1795&0.1795\\ 0.3337&0.3337&0.3337&0.3337\\ 0.2565&0.2565&0.2565&0.2565\end{pmatrix}  \tag{5}\]  
Step 4. The average \(nppcm\)\((amppcm)\) is calculated for each metric, based on the following equation:  
\[amppcm(i)=\frac{\sum nppcm_{row}}{N} \tag{6}\]  
The \(amppcm\) is an \([n\times N]\) matrix, where \(n\) is the number of metrics used (two for ML and ETX in this case) and \(N\) is the number of paths. If Steps 2-4 are applied to ML, The complete \(amppcm\) for ETX and ML is given as:  
\[amppcm(ETX\ and\ ML)= \begin{pmatrix}0.2303&0.1795&0.3337&0.2565\\ 0.1757&0.4128&0.2331&0.1784\end{pmatrix}  \tag{7}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Path** & **A** & **B** & **C** & **D** \\ \hline Links & 0478 & 058 & 0378 & 0158 \\ ETX & 7.94 & 10.19 & 5.48 & 7.13 \\ ML & 1.95 & 0.83 & 1.47 & 1.92 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Metric values for possible Paths from Nodes 0–8. Each row of this matrix refers to the metrics ETX and ML, respectively.