## 2 Capacity Optimal Design Method
### Wpso  
Particle swarm optimization (PSO) is derived from the simulation of bird predation. In essence, it is a random search algorithm suitable for finding the optimal solution in a dynamic and multi-objective optimization environment.  
The search space of optimization problems is analogous to the flight space of birds, each of which is abstracted into a particle without mass and volume, which is used to represent a possible solution to all problems. Each group of particles begins by randomly assigning an initial position \(x\) and initial velocity \(v\) in a given space, and \(x\) and \(v\) are then updated using the following equations:  
\[v_{ij}(t+1)=w\cdot v_{ij}(t)+c_{1}r_{1}(t)\left[p_{ij}(t)-x_{ij}(t)\right]+c_{ 2}r_{2}(t)\left[p_{gi}(t)-x_{ij}(t)\right], \tag{5}\]\[x_{ij}(t+1)=x_{ij}(t)+v_{ij}(t+1), \tag{6}\]  
where \(t\) is the current iteration number, \(r_{1}\) and \(r_{2}\) are distributed in [0, 1], and \(p_{ij}(t)\) is the historical optimal position of the \(i\)-th particle. Moreover, \(p_{gi}(t)\) is the best historical group position, and \(c_{1}\) and \(c_{2}\) are non-negative constants. The velocity and position are usually limited to a certain interval, namely, \([-v_{max},v_{max}]\) and \([-x_{max},x_{max}]\), respectively. Finally, \(w\) is the dynamic iteration weight, which is adopted as the following decreasing linear equation:  
\[w=w_{\max}-\frac{(w_{\max}-w_{\min})\cdot t}{T_{\max}}, \tag{7}\]  
where \(T_{\max}\) represents the maximum number of evolutions, and \(w_{\max}\) and \(w_{\min}\), respectively, denote the maximum and minimum inertia weight values.  
The fitness values \(fit[i]\) for each particle are calculated to select the individual extremum \(p_{best}(i)\) for the \(i\)-th iteration and the global extremum \(g_{best}(i)\) among all iterations. When the algorithm termination condition is satisfied, the global extremum and the corresponding position are the optimal results.  
When actual engineering problems involve the constrained optimization of complex multi-objective functions, a fitness function with a fixed value often cannot achieve the expected results. In this case, the optimization problem is usually solved by the improved weighted PSO (WPSO) method. In this algorithm, the fitness function is often not a single function, but a multifunctional equation system. The fitness-weighted matrix \(\left\|fit[i]\cdot\eta_{i}\right\|_{2}\) is introduced into the Euclidean norm equation of the fitness function, which sorts the function priority and can be represented as follows:  
\[\left\|fit[i]\cdot\eta_{i}\right\|_{2}=\left(\left|fit[x_{i1}]\cdot\eta_{i1} \right|^{2}+\left|fit[x_{i2}]\cdot\eta_{i2}\right|^{2}+\ldots+\left|fit[x_{in} ]\cdot\eta_{in}\right|^{2}\right)^{1/2}, \tag{8}\]  
where \(fit[x_{ij}](j=1\sim n)\) represents each desirable equation for the optimization function, and \(\eta_{ij}(j=1\sim n)\) represents the importance weight of each desirability equation.  
In this case, \(\left\|fit[i]\cdot\eta_{i}\right\|_{2}\) is the desirability function for the actual optimization of the system of equations. The RSM and WPSO are integrated to design the WPSO-RSM model.