## 3 The Proposed Method
### The Proposed MDMS Strategy  
In the process of iteration, PSO continuously discards the particles with poor positions and retains the particles with better positions to achieve the goal of the population's evolution toward a better position and the search for an optimal position. Therefore, the superior particles lead each subswarm in a dynamic multiswarm strategy that can effectively avoid the population falling into a local optimum and improve the search efficiency of the population. Based on this, we propose a modified dynamic multiswarm strategy with a master-slave structure in which the subswarm is constructed with the superior particle as the center. A multiswarm segmentation scheme with a master-slave structure  
Assuming that the population is composed of \(M\) particles, it is divided into \(sn\) subswarms \(\{\mathbf{subpop}_{1},\mathbf{subpop}_{2},\dots,\mathbf{subpop}_{sn}\}\), and each subswarm contains \(sm\) particles, \(M=\sum\limits_{s=1}^{sn}sm_{si}\), including a master particle and (\(sm_{si}-1\)) slave particles. The number of subswarms \(sn\) decreases linearly with the iteration of the algorithm; at the _iter_ generation, it can be calculated by Equation (3). \[sn^{(iter)}=ceil\bigg{(}\frac{M}{2}(1-\frac{iter}{MaxGen+1})\bigg{)} \tag{3}\]  
Figure 1: MLDMS-PSO flowchart. where _MaxGen_ represents the maximum number of iterations of the algorithm. Figure 2 clearly explains the proposed multiswarm segmentation scheme with a master-slave structure, which is divided into three steps. First, the superior particles are identified. The individuals are sorted according to the fitness value of the particles, and the top of the \(M/2\) particles are selected as the superior particle set \(\textbf{{ST}}=\left\{\textbf{{st}}_{1},\textbf{{st}}_{2},\ldots,\textbf{{st}}_{g }\right\},g=M/2\), from which the master particles will be selected. Second, the master particles are selected. The distribution of the subswarms is closely related to the leader particle, and a more balanced distribution is conducive to the particle exploring a wider area. Therefore, to ensure a more balanced distribution of each subswarm, we took the Euclidian distance between particles as a measure and selected the combination that contained \(su\) particles with the largest sum of distances in the superior particle set \(\textbf{{ST}}\) as the set of master particles, \(\textbf{{Master}}_{i}=\left(\textbf{{mast}}_{1},\textbf{{mast}}_{2},\ldots, \textbf{{mast}}_{su}\right)^{T}\), \(\textbf{{Master}}\subseteq\textbf{{ST}}\). The distance sum of possible combinations, \(\textbf{{Cs}}=\left\{\textbf{{cs}}_{1},\ldots,\textbf{{cs}}_{su}\right\}\) and \(\textbf{{cs}}\subseteq\textbf{{ST}}\) can be calculated by Equations (4) and (5). \[\max\,Sum\_d=\sum_{i=1}^{sn-1}\sum_{j=i+1}^{sn}dist_{i,j} \tag{4}\]  
\[dist_{i,j}=\sqrt{\sum_{k=1}^{D}\left(\textbf{{cs}}_{i}^{k}-\textbf{{cs}}_{j}^ {k}\right)^{2}},\,\,(i\
eq j) \tag{5}\]  
where \(dist_{i,j}\) denotes the distance between two different \(D\)-dimensional individuals, \(\textbf{{cs}}_{i}\) and \(\textbf{{cs}}_{j}\), and \(\textbf{{Sum\_d}}\) represents the distance sum between all individuals in the _Cs_. Then, the combination of _Cs_ with the largest \(Sum\_d\) can be selected as the _Master_ by traversing all possible combinations. Finally, the slave particles are assigned. An individual master particle, \(\textbf{{mast}}_{si}\), in _Master_ leads to a subswarm, \(\textbf{{subpop}}_{si}\), and all other individuals, except those who have been selected as leader particles, should be assigned to subswarms. When assigning slave particles, the master particle is taken as the center of the subswarm, and the particle closest to itself is selected as its slave particle. Each subswarm competes for its own slave particles until the number of its slave particles reaches the upper limit. In detail, a particle \(\textbf{{x}}_{i}\) is randomly selected from all of the particles except the master particle.