# Internet of Bikes: A DTN Protocol with Data Aggregation for Urban Data Collection
## 6 Performance Evaluation of IoB-DTN
### Impact of Buffer Management Policies  
The buffer management policy is an important parameter of IoB-DTN protocol. It is used to find a slot in the buffer when a packet is generated or received. If the buffer is not full, it provides the first free slot. If the buffer is full, it decides which packet should be kept and which packet should be discarded with the risk that no copy reaches the destination. We propose four management policies. When the buffer is full, they perform as follows:  
1. **KONP: Keep Oldest No Priority:** If the buffer is full, the new generated packet or the received one is always deleted. 2. **NP: No Priority:** If the buffer is full, the new packet replaces the oldest one. This buffer policy is based on the concept that a packet spending a lot of time stored in a buffer is more likely to be sent to a neighbor node or to a base station. \begin{table}
\begin{tabular}{l l l} \hline \hline  & **Buffer Size** & **Duty Cycle (s)** \\ \hline SB-SDC & 250 & 50 \\ SB-LDC & 250 & 150 \\ LB-SDC & 500 & 50 \\ LB-LDC & 500 & 150 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulated cases. Figure 4: Bikes travel time in seconds. \begin{table}
\begin{tabular}{l l} \hline \hline Number of bikes & 47 \\ Number of bike stations & 49 \\ Packet generation time & Every second \\ Packet size & 160 Bytes \\ Number of copies & 8 \\ Communication model & 802.11p \\ Transmission power & 10 mW \\ Simulation time & 30 min \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. 3. **GPP: Generated Packet Priority:** This policy averts the cases in which received packets take up all the slots in the buffer by giving the priority to the self-generated packets. Thereby, if the buffer is full and a new packet is generated, it replaces the oldest received packet. Otherwise, if there are only generated packets stored in the buffer, it replaces the oldest one. All received packets are rejected. 4. **LC: Lesser Copy:** This policy is based on the number of copies parameter of each packet stored in the buffer. It considers that a packet having the fewest copies has a high probability to be transmitted to another neighbor node or to its destination. Thus, when the buffer is full, the packet having the fewest copies is rejected and replaced by the new one. We compared the performance of the four buffer management policies cited above with IoB-DTN protocol when the number of copies of a packet is limited to 8. We evaluated two metrics: the loss rate and the delivery delay which is the time between the generation of a packet and its reception by a base station. Figure 5 shows the loss rates obtained for all cases. The first observation we make is that GPP and LC have better performances than KONP and NP buffer management policies. GPP policy provides better performances in all cases. Normally, forwarding duplicated packets in the network has less impact on the loss rate for GPP since it gives priority to the generated packets. Nevertheless, GPP performs better when the duty cycle is lower, thus showing that the redundancy used by the protocol offers robustness. LC has the same performance as GPP. As expected, by discarding packets having the fewest copies has a high probability to be arrived to a base station, hence rises the redundancy of the packets in the network. NP outperforms slightly KONP. It offers bad results comparing to GPP and LC since it drops oldest packets if they are generated or received. KONP is the worst one, in particular when the buffer size is small. This is because the generated packets saturate very quickly the buffer, thus all new packets are rejected. Figure 5: Loss rate. The delivery delays of received packets are depicted in Figure 6. We observe that, as expected, NP policy has the best results in terms of delivery delay since it drops old packets. KONP gives the worst performance. This is an evident outcome for a policy of which only old packets are forwarded. GPP and LC policies have the same performance as NP while giving a better loss rate.