###### Abstract  
The optimal allocation of buffers is an important research issue in the area of manufacturing system design and optimization, as buffers can have a large impact on system performance. In this study, we consider one of the most common buffer allocation problems in unreliable production lines: maximizing the throughput of a line subject to a total buffer capacity constraint. We propose an efficient gradient algorithm to solve this problem. Compared to the existing gradient algorithms based on approximate evaluation methods, the proposed algorithm uses simulation to evaluate throughput and can be applied to a wider range of systems, such as production lines with non-exponential failures. To address the challenge posed by the time-consuming nature of simulation, the algorithm employs an adaptive search mechanism that can greatly reduce the number of simulation runs. The algorithm automatically sets the initial search step size based on the scale of buffer allocation problems and dynamically adjusts it during the search process. The algorithmic complexity is characterized as \(O(lnN)\), where \(N\) denotes the total buffer capacity to be allocated. Numerical results demonstrate that the adaptive gradient algorithm is as accurate as the fixed-step gradient algorithm, while the computational time required is significantly reduced. Therefore, the algorithm shows a substantial advantage in solving large-scale buffer allocation problems. p 2025  
of the line. Nevertheless, the incorporation of buffers necessitates supplementary capital investment and floor space, which can incur substantial financial expense [4; 5]. More importantly, larger buffer capacities lead to higher work-in-progress (WIP) levels, which, in turn, engender extended lead times and higher storage costs. The identification of optimal buffer configurations is of paramount importance, and as such, the BAP represents one of the most challenging issues in the study of manufacturing systems [5; 6]. We study the BAP of maximizing the throughput for an unreliable, inhomogeneous production line under the constraint of a given total buffer capacity. This problem is an NP-hard problem [7; 8], and its computational complexity increases exponentially as the buffer capacity increases. Although many approaches have been proposed, the computational time for solving a large-scale BAP is still very long. This is especially the case when the system performance is evaluated by simulation. For instance, [PERSON] [9] solved the problem of buffer design for a car body production line using genetic algorithms combined in conjunction with a simulation model. Their experiments took several days to obtain relatively good accuracy. Due to the short product lifecycles in the automotive industry, long calculation times are not acceptable in the design and planning process [9]. Consequently, there is a need to develop efficient approaches for solving large-scale BAPs. In the literature, there are a number of gradient algorithms [4; 10; 11; 12] for BAPs, which are based on approximate analytical evaluation methods. Despite the fact that the approximation evaluation methods lack the precision of simulation, they are extensively employed in the study of BAPs due to their computational efficiency. Moreover, the approximate evaluation methods are only applicable to production lines with exponential failure and repair times; in contrast, simulation is much more widely applicable. The main purpose of this paper is to develop an efficient simulation-based gradient algorithm for BAPs. The gradient algorithms in [4; 10; 11; 12] cannot be directly used in the context of simulation because they depend on deterministic evaluation results, whereas the simulation results are nondeterministic. A fixed-step gradient search method can be used in conjunction with simulation; however, it is time-consuming when solving large-scale BAPs, as a single simulation run requires a relatively long computational time and a large number of simulations may be performed.