# An Improved NSGA-II Algorithm Based on Adaptive Weighting and Searching Strategy
## 3 Improved NSGA-II Algorithm
### Framework and Details of INSGA-II Algorithm  
To overcome the disadvantages of slow convergence and falling into a local optimum [13] in the NSGA-II algorithm, we use an adaptive weight [14] to balance the global search and local search ability to accelerate the convergence speed, while using Levy flight and random walk strategies to improve the global and local search ability of the algorithm, respectively. The search mechanism of an optimization algorithm usually consists of two steps, which are the global exploration and the local exploitation. Exploration denotes the tendency of an algorithm to behave in a highly randomized manner. Significant changes in the solutions prompt further exploration of the variables space to discover their promising positions. Exploitation is the discovery of promising areas followed by the reduction in random behavior so that the algorithm can search around the promising areas. Since Levy flight has a characteristic of walking between long and short, it can effectively improve the global search ability of the algorithm and make the population individuals evenly distributed in the space. The random walk can focus the search on the locations in the space, where the optimal solution is more likely to occur and make the algorithm converge to the optimal solution. In the early stage of optimization, individuals in the population should be distributed extensively throughout the entire search space, with individuals converging to the global optimum during the later stage of optimization. Therefore, we design an adaptive weighting factor \(C\) in this study to balance the pre-global exploration and post-local exploitation capability of the algorithm. The value of \(C\) decreases from 1 to 0.02 during iterations. With the increase in iterations, the algorithm gradually switches from global search into local exact search that aims to enhance the overall convergence accuracy, which is calculated as  
\[C=1-\text{It}\bigg{(}\frac{0.98}{\text{MaxIt}}\bigg{)} \tag{9}\]  
where It is the current number of iterations and MaxIt is the maximum number of iterations. The maximum number of iterations for the two-objective test function was set to 800, while the maximum number of iterations for the three-objective test function was set to 1500. The offspring population individuals in the iteration are generated with the formula as follows:  
\[X(t+1)=C\times(X_{t}+\alpha\otimes\text{[PERSON]}(\beta)) \tag{10}\]  
\[X(t+1)=(1-C)\times(X_{t}+\alpha\otimes\text{Guass}(\beta)) \tag{11}\]  
The adaptive weight factor \(C\) in this paper is considered a balanced treatment of the speed and accuracy of convergence, which also ensures that the algorithm has some global search capability at the late merit search iterations. The intuitive algorithmic flow is shown in Figure 1.  
The population distance \(D\) between population \(G\) and population \(F\) is calculated as follows:  
\[D=\sum_{PG_{g}\in\Omega_{C}^{\text{pos}}}\text{sum}\left(\sum_{PF_{f}\in \mathbb{Q}_{F}^{\text{pos}}}\text{min}\Big{(}ED\Big{(}PF_{g},PF_{f}\Big{)} \Big{)}\right)/NCH_{G}\]  
where \(\Omega\) is the set of solutions for a population \(G\) or \(F\) with a non-dominated ranking of 1. \(G\) and \(F\) are solutions with non-dominated ranking of 1, respectively. \(NCH_{G}\) is the number of populations with a non-dominance ranking of 1. \(ED\) is the Euclidean distance. The algorithm results begin to stabilize if the distance between the populations of neighboring generations is less than the acceptable population distance. The INSGA-II algorithm is converged if it satisfies one of the following conditions:  
1. The population distances of neighboring generations are consecutively less than the threshold. 2. The number of iterations reaches the maximum set value. The INSGA-II algorithm is implemented as follows:  
1. Initial population and set the evolutionary generation \(\text{Gen}=1\);2.