## 2 Energy-Aware Multi-UAV Dispatch Algorithm (EAMUD)
### Details of the EAMUD Algorithm
* EAMUD checks if the current time is equal to the end time of this sub-event. If yes, which means the parent event of this sub-event has finished, all sibling sub-events of the same parent event have to be removed from \(Ev_{q}\). Otherwise, EAMUD goes to Step 3. * EAMUD checks whether this sub-event has reserved a UAV. If no, it goes to Step 4. Otherwise, it executes the algorithm in Step 5 to check UAV dispatching, based on \(t_{next}\) of this sub-event. * If the number of UAVs needed for this sub-event is less than or equal to the number of UAVs which states are _Available_ in the UAV Pool, EAMUD will dispatch this number of Available UAVs from the UAV pool for this sub-event, with the highest battery powers first criterion. After that, EAMUD goes to Step 5. If the number of UAVs needed for this sub-event is higher than the number of UAVs which states are _Available_ in the UAV Pool, EAMUD must handle this exception by jumping to Step 6. * At this step, EAMUD performs the _event-based dispatching_ (EBD) algorithm to check whether communication durations of UAVs already dispatched for all other sibling sub-events could overlap with the communication duration of the UAV dispatched for this sub-event. If yes, the communication link failure of this event has been recovered during the overlap duration, which raises the event communication time. The flow of the EBD algorithm is shown in Figure 7 and its details are explained as follows:
* If the next handover time \(t_{next}\) of every other sibling sub-event is later than that of this sub-event, which means that each sub-event has reserved its handover UAV at its corresponding handover time \(t_{next}\), EBD goes to Step 5. Otherwise, it performs Step 5.4. * Insert the next handover time \(t_{next}\) of this sub-event into \(Ev_{q}\) and goes to Step 5.3. * Dispatch the reserved UAV to the location of this sub-event for continuing the event communication. At this time, the EBD algorithm has completed its checking process and goes back to Step 7 of EAMUD. * If this sub-event has not reserved a UAV, this EBD algorithm goes to Step 5.5. Otherwise, it goes back to Step 5.1. * According to status of all UAVs in the UAV pool of the GCS, EBD can decide if there are enough _Available_ or _Charging_ UAVs could be reserved for this sub-event. If yes, the GCS will reserve the UAV having the highest battery energy for this sub-event and this algorithm goes back to Step 5.1. If the GCS fails to reserve any UAV for this sub-event, it will cancel UAV reservations of all sub-events which have been checked in Step 5, return these reserved UAVs to the UAV pool and go to Step 5.6. * If this sub-event is the last sibling one of its parent event, EBD goes to Step 5.8. Otherwise, it goes to Step 5.7. * Because this sub-event is not the last sibling one of its parent event, the GCS will postpone all checked sub-events to the processing time of next sibling sub-event, which has not been checked by this algorithm, as mentioned in case 1 above. EBD then goes to Step 7. * Because this sub-event is the last sibling one of its parent event, the GCS will postpone all sibling sub-events to its processing time plus a delay interval \(t_{delay}\). EBD then goes to Step 7. * [leftmargin=2.3 em,labelsep=6 mm]
* Two exception handling methods are proposed here. * The Drop method:
* Remove this sub-event from \(Ev_{q}\) to stop dispatching the handover UAV for this sub-event. * For maintaining the link communication of an event, each sub-event of this event must be served by a dispatched UAV. Since this sub-event has been removed from \(Ev_{q}\), all sibling sub-events must be removed from \(Ev_{q}\) to avoid wasting UAV energy. * The Postpone method:
* Assume the processing time of this sub-event \(i\) is \(t_{i}\). This method is to postpone its processing time to \(t_{i}+t_{delay}\) and modifies its information in \(Ev_{q}\). * Each sibling sub-event with its processing time earlier than \(t_{i}+t_{delay}\) is postponed to \(t_{i}+t_{delay}\).