## 6 Conclusions  
In this paper, an adaptive gradient algorithm is proposed for solving the BAP of maximizing the throughput of a production line with a given number of buffer resources. The algorithm is distinguished from existing gradient algorithms [4, 10, 11, 12, 29] based on approximate performance evaluation methods in that it employs simulation as an evaluative tool. This characteristic enables its application to a wider range of systems, including production lines with non-exponential failures. To address the challenge posed by long optimization times resulting from simulation, the algorithm automatically sets the search step size according to the scale of BAP and dynamically adjusts it during the search process. For a BAP with a total of \(N\) buffer units, the number of simulations required is \(O(lnN)\). Therefore, the algorithm has a great advantage in solving large-scale buffer allocation problems. Numerical results demonstrate that the adaptive gradient algorithm achieves the same level of accuracy as the fixed-step gradient algorithm but requires significantly less computation time. As technologies such as the internet of things, artificial intelligence, and digital twins continue to evolve and become more prevalent, machine data and production line models are becoming increasingly accurate. In comparison with traditional gradient methods that are based on approximate evaluation techniques, simulation-based optimization methods have the capacity to generate more reliable results. The proposed algorithm has the potential to effectively address the disadvantage of time-consuming simulation optimization and can be utilized to solve large-scale BAPs in long production lines. In further research, the proposed algorithm will be extended to more complex systems such as closed-loop lines or merge/split lines. It is also possible to apply the approach to other types of BAPs, such as the buffer capacity minimization problem [4] and the profit maximization problem [11]. Another research direction is the application of machine learning methods to BAPs, with the objective of developing data-driven buffer allocation algorithms, which are expected to become increasingly efficient as more data are collected. Conceptualization, L.L. ; methodology, L.L. ; software, L.L. ; validation, L.L. and M.C. ; formal analysis, L.L. ; investigation, L.L. and M.C. ; resources, L.L. and M.C. ; data curation, L.L. ; writing--L.L. ; writing--review and editing, L.L. ; visualization, L.L. ; supervision, L.L. ; project administration, L.L. ; funding acquisition, L.L. All authors have read and agreed to the published version of this manuscript. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Machine** & **Processing Rate** & **MTTF** & **CVF** & **MTTR** & **CVR** \\ \hline
1 & 17,225 & 0.36 & 1.52 & 0.054 & 2.91 \\
2 & 17,270 & 0.45 & 1.45 & 0.062 & 4.73 \\
3 & 16,885 & 0.51 & 1.42 & 0.048 & 3.41 \\
4 & 16,795 & 0.43 & 1.32 & 0.044 & 3.78 \\
5 & 16,446 & 0.77 & 1.46 & 0.064 & 2.41 \\
6 & 16,559 & 0.76 & 1.57 & 0.059 & 2.14 \\
7 & 16,708 & 0.54 & 1.60 & 0.059 & 2.25 \\
8 & 16,785 & 0.43 & 1.62 & 0.050 & 2.37 \\ \hline \end{tabular}
\end{table} 
Table 7: An electronic component assembly line. \begin{table}
\begin{tabular}{c c c c c} \hline
**Algorithm** & **Solution** & **Throughput** & **\#Eval.** & **CPU Time (s)** \\ \hline FG & 2642, 3758, 3608, 3768, 3332, 3351, 2291 & 12,415 & 22,500 & 94,265.6 \\ \hline AG & 2636, 3745, 3609, 3772, 3339, 3346, 2303 & 12,415 & 57 & 238.8 \\ \hline \end{tabular}
\end{table} 
Table 8: Comparison of solutions obtained by different algorithms for the electronic component assembly line. **Funding:** This research is supported by the National Natural Science Foundation of China (Grant No. 52075539). **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. **Data Availability Statement:** The authors confirm that the data supporting the findings of this study are available within the article.