## 4 Expected Area-Based Real-Time Routing (EAR2)
### Calculation of Data Delivery Speed  
In EAR2, data dissemination is divided into two processes: (1) forwarding the data from the source to one of the point of the EA by unicasting and (2) flooding the data into \(EA\). The data transmission time, therefore, is the sum of \(T_{forwarding}\) as the time for the forwarding process and \(T_{flooding}\) as the time for the flooding process. When the \(T_{setdeadline}\) is defined as the desired time deadline, to support real-time service, the following condition has to be satisfied according to the same rule mentioned in papers [4; 5]. \[T_{setdeadline}\geq T_{forwarding}+T_{flooding} \tag{3}\]  
Figure 1: Real-time data routing based on expected area of a mobile sink. To satisfy Equation (3), the source sets a data delivery speed \(S_{speed}\) for the forwarding process, i.e., data transmission from itself to a flooding point \(p1\) as the nearest point of \(EA\). \(S_{speed}\) is calculated considering \(T_{floading}\) as follows:  
\[S_{speed}=\frac{d(src,p1)}{T_{sted deadline}-T_{floading}}, \tag{4}\]  
where the \(d(src,p1)\) is the distance from the source to \(p1\). \(T_{floading}\) is the expected time that all nodes in \(EA\) receive the data through flooding. However, the source cannot determine the \(T_{floading}\) within the \(EA\). Even though the \(T_{floading}\) can be measured, the measured \(T_{floading}\) varies vastly according to time and environment. Therefore, for \(T_{floading}\), we exploit the observed flooding time for a circular area with a radius \(r\) through simulation by using the NS-2.30 network simulator [33; 34]. Figure 2 shows the simulation results for the observed flooding time using a single flooding point. We extract the simulation results through numerous fulfillments in different environments (need density, initial flooding node, data packet size, etc.). The graph in Figure 2 shows two lines of a single point for the radius \(r\). The above lines and below lines show the worst and best values for flooding time in the circle region with radius \(r\), respectively. In other words, the flooding time within the circle region with radius \(r\) has a value between the worst and best values in a variety of different environments. We use the worst value as the \(T_{floading}\) because the real flooding time may not have any value bigger than the worst value. Through programming in the module of sensor nodes before their deploying, we enable them to know the flooding time \(T_{floading}\) within the circular region with radius \(r\). All sources use the \(T_{floading}\) to deliver their own data to a mobile sink within a desired time deadline \(T_{sted deadline}\) in EAR2. After calculating \(S_{speed}\) using Equation (4), the source sends the data containing information of the sink ID, \(S_{speed}\), and \(EA\) location (radius \(r\) and sink location) to the point \(p1\) of \(EA\). To support real-time service, the data have to be delivered faster than \(S_{speed}\). Every relay node, including the source, elects one of the neighbor nodes that is closer to the point \(p1\) than itself and has a relay speed larger than \(S_{speed}\) as the next-hop node. Among nodes around the point \(p1\), the node located in the \(EA\) first receives the data, stops forwarding the data, and then performs restricted flooding within the \(EA\)  
Figure 2: Flooding time for circle region with radius \(r\). Because \(S_{speed}\) is calculated considering the worst case, the mobile sink located in the \(EA\) can receive the data within the desired time deadline. However, the single-point flooding has several weaknesses. First, as shown in Figure 2, if the radius r is large, the worst value of the \(T_{f flooding}\) is very large. Accordingly, by Equation (3), the \(T_{forwarding}\) is very small and as a result, \(S_{speed}\) might be very great. Since such great \(S_{speed}\) may not be supported by sensor nodes, real-time transmission to a mobile sink is difficult to provide.