## 2 Energy-Aware Multi-UAV Dispatch Algorithm (EAMUD)
### Details of the EAMUD Algorithm  
The main concept of the EAMUD algorithm is as follows. Before the GCS dispatches a UAV for a sub-event recorded in its event queue when the processing time of this sub-event has come, it will first check whether it could dispatch the required UAVs for all sub-events, which belong to the parent event of the current sub-event, at their processing time or not. In this paper, every sub-event with the same parent event of this sub-event is called as its sibling one. If the GCS fails to fulfill the UAV requirement for any sibling sub-event, this sub-event has to be postponed. In the following, two different cases to postpone the sub-event are discussed. 1. If this sub-event is not the last sibling one of its parent event, the GCS will postpone it to the processing time of next sub-event, which has not been checked, of the same parent event: As shown in Figure 4, \(Ev_{A}\) has three sub-events \(Ev_{A,1}\), \(Ev_{A,2}\) and \(Ev_{A,3}\). According to Equation (8), the GCS calculates the handover interval, i.e., \(\Delta t\), of the original dispatched UAV for \(Ev_{A,1}\) and knows it has to dispatch a handover UAV to replace the energy-drained one at time 2. For maximizing the event communication time of the whole event, the EAMUD algorithm has to check whether the GCS could dispatch UAVs for all other sub-events, i.e., \(Ev_{A,2}\) and \(Ev_{A,3}\), during time 2 to time 6, which indicates the time for the GCS to dispatch the next handover UAV for replacing the preceding dispatched one at time 2. If the GCS is not able to dispatch a handover UAV at the processing time of \(Ev_{A,2}\), i.e., time 3, which will introduce a communication break for this event later and waste the handover UAV dispatched for \(Ev_{A,1}\) at time 2. Hence, the EAMUD algorithm postpones these two sub-events, \(Ev_{A,1}\) and \(Ev_{A,2}\), to the processing time of next sub-event \(Ev_{A,3}\) at time 4 and then performs EAMUD again. Figure 3: The time \(t_{next}\) for dispatching the handover unmanned aerial vehicle (UAV) to replace the original one. 2. If this sub-event is the last sibling one of its parent event, the GCS will postpone all sub-events to its processing time plus a delay interval \(t_{delay}\): As the case mentioned above, if the GCS can dispatch a handover UAV at time 3 to \(Ev_{A,2}\) but cannot dispatch another handover UAV at time 4 to the last sub-event \(Ev_{A,3}^{t}\) this scenario means that both handover UAVs, which are dispatched at time 2 and 3, are wasted. Hence, as shown in Figure 5, the EAMUD algorithm postpones these two sub-events, \(Ev_{A,1}\) and \(Ev_{A,2}\), to time 4, i.e., the processing time of the last sub-event \(Ev_{A,3}\), plus \(t_{delay,~{}A}\). After that, the GCS performs EAMUD again. All sub-events are first sorted according to their Euclidean distance to the GCS. Then by averaging the flying time difference of any two adjacent sub-events of an event as follows: \[t_{delay,~{}j}=\frac{\sum_{i=1}^{N_{j}-1}\left(\left(d_{j,j+1}^{t}-d_{j,i}^{t} \right)/S\right)}{N_{j}-1}\] (9) where \(S\) is the average flying speed of the UAV, \(d_{j,i}^{t}\) is the Euclidean distance between the GCS and the location of the \(i\)-th sub-event \(Ev_{j,i}^{t}\) of event \(Ev_{j}\) and \(N_{j}\) is the sub-event number of \(Ev_{j}\), the value of \(t_{delay,~{}j}\) is calculated accordingly. Figure 6 is the complete flow chart of EAMUD, which is explained below. Assume EAMUD starts at time \(T\). 1. EAMUD first checks if there is any sub-event in \(Ev_{q}\) has to be processed at time \(T\). If yes, EAMUD executes Step 2. Otherwise, the current time will advance to \(T+1\) to execute Step 1.1. Figure 4: The scenario to postpone a sub-event to the processing time of its next sub-event. Figure 5: The scenario to postpone all sub-events to the processing time of the last sub-event plus a delay interval \(t_{delay}\). * If there is any sub-event in \(Ev_{q}\) has to be processed, EAMUD goes to Step 1. Otherwise, EAMUD stops its execution because it has processed all sub-events in \(Ev_{q}\).