## 4 Improved Iterative Greedy Algorithm
### Problem-Specific Local Search Strategy  
To improve the exploitation ability of the IIG algorithm, a problem-specific local search strategy has been developed. This strategy employs three types of search operators, i.e., the swap operator, insertion operator, and route reconstruction operator. Algorithm 4 provides the pseudocode for this strategy. To balance problem characteristics with neighborhood search capabilities, one of the three operators is randomly selected for helicopter scheduling. Figure 2 provides examples of these local search operators based on problem characteristics. The specific steps for each operator are as follows:  
(1) Swap operator: First, randomly select a helicopter \(k\) from the set \(H\) of all helicopters, with each helicopter having an equal probability of being chosen. Next, within helicopter \(k\), randomly select a rescue site \(i\) and swap it with the remainder rescue sites orderly. The solution corresponding to the best fitness value during the swap process is saved. This process is repeated \(m\) times, where \(m\) is the number of helicopters used in the current solution.  
(2) Insertion operator: First, randomly select a helicopter \(k\). Next, identify the rescue site \(i\) with the largest anteroposterior distance within the helicopter \(k\). Insert rescue site \(i\) into the current route at the position that minimizes the distance. This process is repeated \(m\) times.  
(3) Route reconstruction operator: First, randomly select a helicopter \(k\) and transfer the associated rescue sites to the set \(S_{r}\). Then, remove \(S_{r}\) from the current solution. Finally, reinsert each site in \(S_{r}\) into the current route position that minimizes the distance. This process is repeated \(m\) times.  
```
Input: a solution Output: an improved solution
1 \(r\) = rand (0%2, \(cnt\) = 0;
2 switch \(r\)do
3 case 0:
4 while\(cnt\) < \(m\)do
5 Randomly select a helicopter \(k\);
6 Randomly select a rescue site \(i\) in the helicopter \(k\);
7 for each of the other rescue site \(j\) in the helicopter \(k\)do
8 Swap rescue site \(i\) and rescue site \(j\);
9 end while
10 Select the best solution;
11 end if
12 case 1:
13 while\(cnt\) < \(m\)do
14 Selected the rescue site \(i\) with the largest anteroposterior distance in the helicopter \(k\);
15 Remove the rescue site \(i\) from the current solution;
16 for each helicopter \(k\) in the current solution do
17 for each position \(u\)do
18 if site \(i\) can be added to the current position \(u\)then
19 Store the position \(u\) into set \(S_{u}\);
20 end if
21 end for
22 end if
23 Choose the optimal position from the set \(S_{u}\) and add site \(i\) to the position \(u\);
24 end if
25 case 2:
26 while\(cnt\) < \(m\)do
27 Randomly select helicopter \(k\) and the rescue sites along its route are stored in the set \(S_{r}\);
28 Delete the set \(S_{r}\) from the current solution;
29 for each rescue site \(i\) in the set \(S_{r}\)do
30 for each helicopter \(k\) in the current solution do
31 for each position \(u\)do
32 if site \(i\) can be added to the current position \(u\)then
33 Store the position \(u\) into set \(S_{u}\);
34 end if
35 end for
36 Choose the optimal position from the set \(S_{u}\) and add site \(i\) to the position \(u\);
37 if insert the site \(i\) failed then
38 Add one helicopter and allocate the site \(i\) to this helicopter;
39 end if
40 end for
41 end while
```  
**Algorithm 4**The local search strategy