*4.6. Scouting Bees*

If a solution is not updated for a long time, the solution will be abandoned and the employed bee will then be transformed into a scout bee, choosing a new solution at random in the solution space. As random search is uncontrollable, this random strategy does not have a positive impact on the algorithm, therefore, this paper uses a neighborhoodbased solution swapping strategy to improve the efficiency of the scout bee phase of the algorithm [34]. This is because the solutions of neighboring sub-problems should be similar.

The scout bee searches in the following way: for a solution that has not improved after *L* cycles, the scout bee first finds a more suitable solution among its neighboring individuals. Then they exchange them with each other. If no better one is found, one individual is randomly chosen to exchange with each other. The basic procedure is described in Algorithm 5, where *L*(**X***i*) denotes the number of cycles **X***i* has gone through, *T* denotes the number of neighboring individuals, **<sup>X</sup>***i,j* denotes the *j*-th neighboring individual of the *i*-th solution.

```
Algorithm 4 Onlooker bee phase
Input: population, P;
Output: new population, P
                                 '
                                 ;
1: P
    '
      = P;
2: for j = 1 to N do
3: sj = Quality(Xj);
4: end for
5: Sort(P
          '
           , si);
6: for j = 1 to N do
7: Xindex = Select(P
                          '
                          )
8: Ti = GetNeighborhood(Xindex);
9: Xchild = TPX(Xindex,Ti);
10: if 0.1 < Random() then
11: Xchild =Mutation(Xchild);
12: end if
13: if Xchild < Xindex then
14: Xindex =Xchild;
15: end if
16: if Xchild) < Ti then
17: Ti = Xchild;
18: end if
19: end for
20: return P
              '
               .
```
#### **Algorithm 5** Scout bee phase

**Input:** population, *P*; **Output:** new population, *P '* ; 1: **for** *i* = 1 to *N* **do** 2: **if** L(*Xi*) > *L* **then** 3: **for** *j* = 1 to *T* **do** 4: **if** *Xi,j* < *Xi* **then** 5: *Xi,j* ↔ *Xi*; 6: **break;** 7: **end if** 8: **end for** 9: **if** *j* > *T* **then** 10: *r =* Rand(1, *T*); 11: *Xi,r* ↔ *Xi*; 12: **end if** 13: **end if** 14: **end for** 15: **return** *P '* .

#### *4.7. The Whole Process of the Algorithm*

This section outlines the entire algorithmic process of SDABC. It can be roughly divided into four steps.

Step 1: The population is initialized randomly and is energy-efficient to improve the quality of the solution.

Step 2: Sort the population in the manner described in Section 4.4 and perform the algorithmic operations described in Sections 4.5–4.7 in sequence, while updating the domain relationships of individuals in population and the external populations after each subsection is completed.

Step 3: Repeat Step 2 until the end conditions are met.

Step 4: Perform another energy saving procedure on the external population.

The algorithm flow of SDABC can be shown in Figure 1.

**Figure 1.** The overall flow of the SDABC.
