# Multi-Objective Optimization Study of Annular Fluid Flow Structure in Cordless Core Drilling Tools
## 2 Structural Design and Principles of Hydraulic Lifting Cordless Coring Drilling Tool
### Principles of the Improved NSGA-II Algorithm  
The NSGA-II algorithm is a widely used evolutionary algorithm for multi-objective optimization. The four criteria of NSGA-II include non-dominated sorting, elite retention strategy, congestion calculation, and race selection, the core of which lies in fast non-dominated sorting and congestion comparison. Multi-objective optimization is the process of finding a vector of decision variables that satisfy the constraints and assigning appropriate values to all objective functions. Such a problem produces a set of optimal solutions, i.e., a set of Pareto optimal solutions, rather than a single solution. The multi-objective problem can be formulated as:  
\[\left\{\min\!F(x)=\left\{f_{1}(x),f_{2}(x),f_{3}(x),\ldots,f_{n}(x)\right\}^{T} \right. \tag{3}\]  
where \(F(x)\) is the value of the objective function and \(S\) is the set of equality and inequality constraints. Figure 4: Model II training results. In this study, for a desired set of fluid back pressure to spring force pressure ratio and drilling fluid flow rate, the number of spearhead inlets, diameter of spearhead inlets, number of spool outlets, diameter of spool outlets, and distance between the centers of the two circles of the spool outlet oblong holes are used as the decision variables. The objective function is the output of the BP neural network. The improved NSGA-II algorithm is improved in terms of fitness allocation, environment selection mechanism, crossover, and mutation operation. The execution steps are as follows:  
Step 1: Population initialization and fitness calculation: an initial population is randomly generated, and the objective function value of each individual is calculated. Then the fitness calculation is performed, which is based on the position of each individual on its dominance frontier. The fitness of an individual is related to its dominance level (Pareto rank) and crowding distance. The fitness calculation formula is:  
\[Q=r_{i}+\frac{1}{d_{i}+2} \tag{4}\]  
where \(r_{i}\) denotes the Pareto rank; a low rank indicates that an individual dominates fewer individuals and \(d_{i}\) denotes the crowding distance. The crowding distance between individuals on the same frontier is used to maintain the diversity of the solution set. Step 2: Fast, non-dominated sorting (Algorithm 1) to sort the population and assign Pareto rank. The following steps are followed to compute the dominance relationships and Pareto ranks of individuals:  
1. For each individual \(p\), its objective function value is compared with other individuals in the population;
2. The set of individuals \(S_{p}\) is determined, dominated by individual \(p\), and the number of dominated individuals \(n_{p}\);
3. Dominance relationships are used to stratify the population, which is not dominated by any individual belonging to the first frontier. ```
Input: Population P Output: Sorted fronts F and Pareto ranks R
1: Initialize empty lists F and R
2: for each individual p in P do
2:1: Initialize empty list Sp and set np = 0
2:2: for each individual q in P do
2:2.1: if p dominates q then
2:2.1.1: Add q to Sp
2:2.2.2: else if q dominates p then
2:2.2.1: Increment np by 1
2:3: if np == 0 then
2:3.1: Set rank of p to 1
2:3.2: Add p to the first front F1
3: Set i = 1
4: while Fi is not empty do
4:1: Initialize empty list Q
4:2. for each individual p in Fi do
4:2.1: for each individual q in Sp do
4:2.1.1: Decrement np by 1
4:2.1.2: if nq == 0 then
4:2.1.2.1: Set rank of q to i + 1
4:2.1.2.2: Add q to Q
4:3: Increment i by 1
4:4. Add Q to F
5: Return F and R Step 3: Crowding distance calculation within the same Pareto front and calculating the crowding distance between individuals for maintaining population diversity (Algorithm 2). The improved crowding distance calculation considers not only the target space but also the similarity in the decision space to increase the efficiency of the algorithm in dealing with highly correlated variables.