## 4 System Design and Goals
### Modification to Message Intervals and New Message Variables
#### 4.4.5 DRI Function
With built-in resilience through exception handling and comprehensive record-keeping, the algorithm ensures that nodes maintain an up-to-date understanding of the network topology, which is essential for maintaining optimal routing performance. Together, these algorithms represent a cohesive approach to managing routing in D2D communication networks, balancing the need for timely updates with resource efficiency, and providing a solid foundation for reliable and scalable network operations. ### MPR Selection Technique

The proposed MPR selection mechanism allows a node to consider four (4) parameters, namely node battery level (BL), mobility speed (MB), node degree (ND), and connection to the base station (CBS) for optimum relay selection, extended network lifetime, and energy efficiency, as presented in our previous work in [48]. The mechanism classified nodes into various node statuses, namely best, better, good, and bad, and returns a single value of 1, 2, 3, or 4, respectively, in OLSRv2 Hello and TC messages, thereby saving energy and other resources required for much topological information. The modified Hello and TC message Type Length Value (TLV) is presented in Figure 11, and the algorithm for MPR selection is shown in Figure 12.

#### 4.5.1 Algorithm for MPR Selection

This section gives the algorithm for the MPR selection, which depends on the weights of four parameters, namely battery level, mobility speed, node degree, and connection to the base station. The classification of the model parameters and the relay selection model is given in our previous papers [43; 48]. The MPR selection utilizes node status, as illustrated in Figure 12 above. #### 4.5.2 MPR Selection Algorithm

The proposed selection of the MPR process has been optimized to utilize node status, thereby allowing the best node to be selected as the MPR. The MPR selection is modified from the conventional MPR selection in the OLSRv2 protocol. The MPR selection is represented by the value of the node status that determines the best node as the relay. This is given in Algorithm 6, where the willingness level takes four possibilities, namely WILL NEVER, with a status value of '1', WILL LOW, with a status value of '2', WILL DEFAULT, with a status value of '3', and, finally, WILL HIGH, with a node status of '4'. Figure 11: The modified Hello and TC message TLV for the proposed routing protocol. Figure 12: A flow chart of the relay selection process for a D2D network, showing the node status depending on the relay selection model [44]. The proposed MPR selection algorithm ranked willingness based on the node's status. The low-status value of 1 indicates that the node status is bad and will not be selected as the MPR. Meanwhile, a high status value of 4 indicates that the node is the best one to be selected as the MPR and that willingness is high. Therefore, the willingness increases with the increase in the status value. Each node in the network elects its MPR during the MPR selection process from its one-hop neighbor through the advertisement of its willingness, which is broadcasted via HELLO message. Therefore, by implementing this algorithm, the best high-status nodes will be considered as the MPR first, followed by those classed as better and then good. Thus, low-status nodes will be considered last, thereby extending their lifetime. This reduces transitionary route disappearances to the other edge of the network, which can lead to network collisions, thereby increasing control overhead in the network.