# On the Potential of Enhancing Delay-Tolerant Routing Protocols via Age of Information
## 4 Protocol Evaluation
### Evaluation Setup  
For the simulation, the Python programming language was used in a Google Colab environment. All experiments were performed on a PC with an Intel(R) Core(TM) i5-7200U [EMAIL_ADDRESS] GHz, 6 GB available RAM and Windows 10 operating system. In order to make it easier to reproduce and verify the measurements made, the entire simulation code is available online in the Github repository [36]. In this work, three different versions of the FRESH protocol are simulated and for each of them the original and the modified version of the protocol are compared with each other by incorporating the concept of AoI, as explained in Section 3.2 The common elements of all six simulations performed are summarized below:  
Initially, in each time slot 1-3 new packets are generated with equal probability and with random nodes as their source and destination. Subsequently, all nodes move according to the Random Waypoint Mobility Model [37] and for each node its current neighbors are found (it is checked if it is more or less than a predefined proximity radius value, and the Euclidean distance is used to measure the distance) and the encounter vectors are updated accordingly. For all simulations, the common assumption made is that in each time slot, each node can send at most one of the packets that it currently has stored in its buffer. More specifically, for the three versions concerning the original FRESH, for each node one of the packets it owns at that moment is randomly selected, while for the three modified versionsof FRESH, for each node it is chosen to transfer its packet to the network that has the highest AoI value at this time, in order to make use of the property of Age of Information (the older the age of a packet, the more critical it is to be transported in the network and delivered as soon as possible to the destination). Afterwards, each node in each of the versions of the algorithm chooses according to separate criteria what to do with the packet it chose in the previous step. Thus, it applies a certain reasoning in order to find the next hop of the packet to transmit at this time. At the end, it delivers this packet to the node it found from the above process and after this has been implemented by all nodes in the network, all packets that have not yet been delivered or dropped increase their age by 1. In the three versions of the Modified Protocol, if the age of a packet exceeds the threshold value, the respective packet is dropped from the network. The three variants of the FRESH protocol, which are simulated both in their original version and in the modified version with the introduction of the AoI variable, are the following:  
1. **Relay node selection based on neighbors**: in this variant, the node selects the relay node of the packet it has selected based on its current neighbors at the link layer. More specifically, if the destination of the packet belongs to the set of its neighbors at this time, then this is the best case, as it delivers the packet directly to its destination. Otherwise, if the destination does not belong to the set of its neighbors at this time, it looks at the encounter vectors of its neighbors and delivers the packet to the neighbor that had the most recent encounter with the destination. In case it has no neighbors at all, it keeps the packet stored in its buffer. This variant is hereafter denoted as **FRESH-neigh** or **Modified-neigh** depending on whether the original FRESH protocol is used or the one modified by introducing the AoI metric. 2. **Relay node selection based on \"best near anchor\" node**: in this variant, when each node chooses the packet to forward in the network, it forms a circular ring of a certain radius centered on itself. Then, it searches for the nodes residing inside the ring it has just formed (we call these nodes from now on \"near anchor nodes\") and then, it searches if there is a node close to it that has a more recent encounter than its own of the encounter with the destination of the packet.