# Energy-Aware Forwarding Strategies for Delay Tolerant Network Routing Protocols
## 3 New Energy-Aware Routing Protocols
### Optimized Remaining Required Energy (ORRE) Algorithm  
The RRE algorithm automatically determines the optimal threshold for individual nodes based on the energy required to transmit stored packets back to the base station. However, this constraint does not take into account scenarios where the nodes collect data in a non-uniform manner. Specifically to the wildlife-tracking scenario, if animals are active during the middle of the day, the RRE strategy will overestimate its available energy resources during the first half of the day when the tracking nodes are collecting a small number of data points. We propose the _Optimized Remaining Required Energy (ORRE)_ strategy to address the non-uniform data collection scenarios using a user-provided parameter to define the minimal number of packets that the application is expected to collect between energy-harvesting events. The forwarding threshold of ORRE (ETh \(\mathrm{o}_{\mathrm{RRE\ FWd}}\)) is based on three factors: (1) the energy required for transmitting the current packets in the buffer (Etx_packetToday); (2) the energy required for scanning the base station during the remainder of the day until the next recharge time (Escan); and (3) the energy required for forwarding the minimum number of collected packets to the base station (EReserved). The forwarding energy threshold (ETh \(\mathrm{o}_{\mathrm{RRE\ FWd}}\)) for reserving energy in ORRE is calculated as follows:  
\[\mathrm{E}^{\mathrm{Th}}\mathrm{o}_{\mathrm{RRE\ FWd}}=\mathrm{E}_{\mathrm{ tx\_packetToday}}+\mathrm{E}_{\mathrm{scan}}+\mathrm{E}_{\mathrm{expected}} \tag{9}\]  
\[\mathrm{E}_{\mathrm{tx\_packetToday}}=\mathrm{N}_{\mathrm{packetToday}} \times\mathrm{E}_{\mathrm{tx\_per\_packet}} \tag{10}\]  
\[\mathrm{E}_{\mathrm{scan}}=(\mathrm{t}_{\mathrm{remaining\_time}}\div\mathrm{ t}_{\mathrm{scanniterval}})\times\mathrm{E}_{\mathrm{rx\_scan}} \tag{11}\]  
\[\mathrm{E}_{\mathrm{expected}}=\mathrm{E}_{\mathrm{Reserved}}\times\mathit{ Delta} \tag{12}\]  
\[\mathrm{E}_{\mathrm{Reserved}}=\mathrm{N}_{\mathrm{Reserved}}\times(\mathrm{E}_{ \mathrm{tx\_per\_packet}}+\mathrm{E}_{\mathrm{GPS}}) \tag{13}\]  
\[\mathit{Delta}=(\mathrm{t}_{\mathrm{remaining\_time}}\div\mathrm{t}_{\mathrm{PerDay}}) \tag{14}\]  
where EReserved is the expected energy required to forward collected packets to the base station, Etx_per_packet is the amount of energy required to transmit one packet and EGPS is the amount of energy required for sampling one packet. _Delta_ is a parameter that is proportional to the time remaining in the day. Unlike the constant thresholds for data sampling used in Threshold and RRE strategies, the sampling threshold in ORRE also depends on the number of packets stored in the buffer:  
\[\text{E}^{\text{Th}}\;\text{o}_{\text{RRE}\;\text{Samp}}=\text{N}_{\text{ packetToday}}\times\text{E}_{\text{tx}\_\text{per}\_\text{packet}} \tag{15}\]  
The nodes stop sampling once their remaining energy drops below the sampling threshold (\(\text{E}^{\text{Th}}\;\text{o}_{\text{RRE}\;\text{Samp}}\)). Both RRE and ORRE algorithms require the nodes to be able to accurately estimate the time when they recharge their energy and the time of the next contact with a base station. We note that these assumptions are true in our motivating application, or more generally, in solar energy-based deployments of sensor networks that collect data regularly. We implemented the three strategies in the ONE simulator. Specifically, the algorithms are implemented in the lower layers of the network stack, thus they are reusable across existing DTN routing protocols. Most implementations of DTN routing protocols in ONE rely on shared functions that are used by all routing protocols. For example, the \"ActiveRouter\" Java class implements the functionality associated with dropping packets when the time-to-live expires in transit or a buffer is full. By extending the shared function components, energy-aware functionality can be enabled across all routing protocols.