## 4 Partition Aware-RPL Protocol Overview
### Parent Selection Algorithm
The results are presented in Figure 5:3 We observe that when the sending frequency is high, the energy consumption goes up for both protocols. As sensors reduce their sending frequency, the energy consumption is also reduced, and stabilizes at an average of 1.12% per node/sec for RPL against 0.92% per node/sec for our PA-RPL; thus performing a gain of almost 20%. Recall here that deployed sensor nodes are limited in capacity and resources. Their role should be reduced to collecting data and making sure to convey it to the sink node where all the complexity resides. Moving the logic and the control (e.g., seasonality effect) to the application layer of each node makes the nodes more resource demanding. This explains the biggest contribution of PA-RPL that is its ability to reduce the overall energy consumption. Energy savings at the scale of the WSN are achieved by minimizing the global duty cycles. The duty cycle indicates the frequency with which the node wakes up to hear (whenever there is radio activity around it) or send data. With PA-RPL, we manage to minimize the global duty cycle by routing the data flow via paths avoiding unnecessary radio wake-ups of nodes in distant parcels. This resulted in an overall energy saving of around 20%. Implementing the logic at the application level will simply lead to loosing this property (limiting the impact of gathering data and sending it to the sink node), which means that the messages sent by nodes inside a parcel will be disseminated throughout the complete agricultural field, waking up almost all the nodes. ### PA-RPL with Parcel Level In-Network Aggregation

We recall here that the main advantage of PA-RPL is to build a specific routing topology which enables an efficient data in-network aggregation. The latter is a well-known technique that helps to reduce the data communication load. This technique can be classified into two types of approaches: lossy and lossless. Lossy in-network aggregation is the approach that combines and processes the data received by a sensor node from its neighbors by performing a lossy aggregation function such as \(MAXIMUM\), \(AVERAGE\), \(MINIMUM\), etc. It is worthy to note that most agriculture applications do not require all the sensed data, but only local lossy aggregated values instead. Moreover, this technique is generally applied in conjunction with a clustering algorithm that assembles a number of nodes in a cluster and then selects a cluster head, in which the aggregation will be executed. Again, we can clearly see the superiority of PA-RPL over RPL as it insures an easier clustering as well as an easier implementation of lossy in-network aggregation, by simply designing the Parcel Head (PH) as a cluster head, and applying the aggregation operation on data collected from sensors having the same color as the cluster head (i.e., belonging to the same parcel). #### 6.3.1 Implementation of In-Network Aggregation for PA-RPL

In this section, we describe an easy implementation of a lossy in-network aggregation for PA-RPL to help fight against the Late Blight pest. In our considered case scenario, it is important to note that because of the epidemic nature of the late blight pest, both humidity and temperature are required to be continuously measured in closed locations/points through the parcel area. In fact, whenever the pest conditions (humidity and temperature) are met in a single sensing point, late blight develops and promptly propagates to neighboring areas, and hence quickly covering the whole farm. Likewise, the only required input for a late blight decision support system is the range value of temperature and the maximum value of humidity through the monitored parcel. Then, it is clearly sufficient to apply a local processing algorithm in order to compute/detect the maximum value of humidity (i.e., exceeding a predefined warning threshold) through the whole parcel, and to transmit only this information to the decision system.