# Congestion-Aware Geocast Routing in Vehicular Delay-Tolerant Networks
## 4 V-GRADIENT Design
### Dynamic Dropping Policy  
The dynamic dropping policy implemented uses two mechanisms. The first one considers that if nodes are outside the ROI, they may not be able to return to the ROI within the messages' TTL and thus the corresponding messages can be deleted. The second mechanism controls the ROI radius according to the estimated network conditions. Assuming that, in urban environments, the vehicle's maximum speed, \(v_{max}\), is usually 50 km/h and the radio interfaces have considerable lower communication ranges relatively to the ROIs' radiuses, the minimum amount of time that would take for a node, located outside the ROI, to reach the ROI's boundaries of a particular message, is approximately given by \(\tau_{min}\), as shown in Equation (1). The variables \(d_{center}\) and \(R_{ROI}\) represent the distance of the vehicle to the ROI's center and the ROI's radius, respectively. Thus, if the remaining TTL of a given message drops below \(\tau_{min}\), the bearing node will be out of the ROI's range at least until the TTL expires, as it is advantageous to drop the bundle. \[\tau_{min}=\frac{d_{center}-R_{ROI}}{v_{max}}. \tag{1}\]  
To select dynamically the buffer zone range, the V-GRADIENT algorithm takes advantage of estimations of the network density level and of the message buffer occupation level, updated periodically. Because it is assumed here that nodes do not have access to any knowledge oracles, vehicles rely only on information exchanged during contact opportunities to perceive the surrounding network conditions and, for that reason, both awareness metrics are kept as dictionaries in the nodes' buffers in a decentralized manner. Moreover, the mathematical formulation used to compute both metrics follow an Exponentially Weighted Moving Average (EWMA). For the density level metric, \(\rho_{t}\), the EWMA is performed every 30 seconds taking into account the number of distinct contacts \(n_{c}\) established in 30 seconds intervals, as shown in Equation (2). The weight \(\alpha\) was set to 0.25 to balance old and new measurements. In this way, a 25% weight is used for the number of contacts established during the last 30 seconds interval and a 75% weight is used for the accumulated measurements of the previous intervals. These parameters were set experimentally to values that provided good node density estimations, filtering out very short term variations. \[\rho_{t}=\alpha\cdot n_{c}+(1-\alpha)\cdot\rho_{t-1}. \tag{2}\]  
The message buffer occupation metric \(\beta_{t}\) is determined by averaging the fractions of the message buffer occupancy, \(\beta_{level}\), varying from zero to one, retrieved from neighboring nodes in 30 seconds intervals with an EWMA, as shown in Equation (3). Weight \(\gamma\) was set to 0.7 in order to be high for recent buffer occupancy measurements. In this way, the protocol can adapt faster to network congestion situations. Again, these parameters were set experimentally to values that provided good buffer occupancy estimations. \[\beta_{t}=\gamma\frac{\sum^{n_{c}}\beta_{level}}{n_{c}}+(1-\gamma)\beta_{t-1}. \tag{3}\]  
In order to carry out a reliable implementation of the mechanism responsible for adjusting the extent of the buffer zone, a wide variety of simulations were executed using the ONE simulator [14] with the Geo ONE package [15], under different density scenarios, considering ROIs with different radius values, and in environments that led to serious buffer congestion issues, as shown in Table 1. In each simulation, an additional dropping policy was included that periodically removed messages from storage if the nodes were located outside of the buffer zone range, defined as the product between the ROI radius value, \(R_{ROI}\), and a threshold \(R_{+ratio}\). Figure 1 shows the evolution of the average density level estimated with Equation (2) in simulations encompassing a different number of nodes, proving that it is possible for each node to estimate accurately the average network density level, just by monitoring the number of contacts over time.