# Bulk Solids Stacking Strategy of a Rectangular Ship Cabin
## 3 Determination of Stacking Volume and Algorithm Optimization  
The total volume of bulk solids loaded into a ship cabin is the sum of the stacking volume of the bulk solids stockpile at each location. By retaining the curved shape and adjusting the bottom radius, each stockpile is scaled until the difference between the sum of the stockpile volumes at all locations and the total volume of bulk solids to be stacked is within the allowable range. Due to the overlaps among the stockpiles, the stacking volume at each location is calculated by subtracting the overall bulk solids volume at the previous stacking location from that at the current stacking location. This calculation is repeated to calculate the bulk solids volume at each stacking location. In the process mentioned above, the determination of the bottom radius of the bulk solids stockpile requires a large number of repeated iterative calculations, so it is necessary to select an appropriate algorithm to simplify the calculation steps and shorten the calculation time. The absolute value of the difference between the total volume of the model and the total volume of bulk solids to be stacked is taken as the objective function. When the objective function value is zero, the bottom radius of the stockpile model is the optimal solution. When the radius value is less than the optimal solution, the objective function decreases monotonically; when the radius value is greater than the optimal solution, the objective function rises monotonically. Therefore, the search process of model volume is refined as an unconstrained single valley optimal solution problem [20]. According to the size of the yard, the advance and retreat method is used to preliminarily determine the range of the radius value. The advance and retreat method is an optimization algorithm commonly used to determine the search space [21]. Then, the preliminarily determined interval is divided by the golden section method [22; 23] to obtain the optimal solution. The basic principle of the golden section method is shown in Figure 6. The length of the interval \([a,b]\) is set as \"\(L\)\", and a point \"\(d\)\" in the interval is taken to ensure the distance  
Figure 4: Schematic diagram of contour curve type of stockpile. Figure 5: Schematic diagram of contour curve extraction method. between \"\(a\)\" and \"\(d\)\" is equal to \"\(a\)\". If the ratio of \"\(ad\)\" to \"\(ab\)\" is equal to the ratio of \"\(db\)\" to \"\(ad\)\", then:  
\[\frac{\alpha}{L}=\frac{L-\alpha}{\alpha}\Rightarrow\alpha\approx 0.618L \tag{1}\]  
Therefore, the interval is segmented using the value 0.618 in the golden section method, and a point \"\(c\)\" and point \"\(d\)\" are obtained, respectively. The function values corresponding to the point \"\(c\)\" and point \"\(d\)\" are compared in the unimodal interval \([a,b]\). If the function value corresponding to the point \"\(c\)\" is less than that of the point \"\(d\)\", as shown in Figure 7a, the interval \([b,d]\) is discarded and the interval \([a,d]\) is retained to search for the optimal value. If the function value corresponding to point \"\(c\)\" is greater than that of point \"\(d\)\", as shown in Figure 7b, the interval \([a,c]\) is discarded and the interval \([c,b]\) is retained to search for the optimal value. The golden section method is capable of finding the optimal solution of the single valley function. In the iterative calculation process, the golden section method can iningeniously set each division point as the next golden section point and reuse the result of the last operation, thereby simplifying the calculation. Compared with dichotomy [24], it has a higher efficiency in solving extreme value problems of unimodal functions. To accelerate the search step, a self-influence factor was added to reduce the number of searches during searching.