## 4 Beetle Swarm Optimization (BSO) Method
### Beetle Swarm Optimization (BSO) Method  
In order to overcome the drawbacks of the standard BAS, a beetle-swarm-based optimization (BSO) is proposed, which takes the ground risk distribution into account. It is assumed that the size of a beetle swarm is \(M\), which means that the number of beetles is \(M\). Subsequently, an adaptive step size for each beetle is presented to guarantee the diversity of this constructed beetle swarm. A proportionality coefficient is also designed as a random variable for each beetle's movement to keep the flexibility. In the end, a kind of optimum attraction operator is built to help enforce the effects of the social information on all the beetles' behaviors. (1) Adaptive step size for each beetle  
The step sizes of the beetles could determine the distances of their moves in every iteration, which correspondingly lead to different optimization accuracies and efficiencies. For any beetle \(i\) in a swarm in the \(k\)th move, the step size denoted as \(Step_{i}{}^{k}\) can be calculated by using Equation (10), which is an adaptive parameter as the beetle moves. Specifically, in this equation, \(Step_{i}{}^{k-1}\) is the step size of beetle \(i\) in the (\(k-1\))th move. \(c_{i}\) is a constant that would be unequal for the different beetles even though they belong to the same beetle swarm. Normally, \(c_{i}\) is set as a positive value, which is smaller than one. \(Rand_{i}{}^{k}\) is used to generate a random value between \(0\) and \(1\) to guarantee the randomness of the beetle's step size. By using Equation (10), an adaptive step size can be generated for every beetle \(i\) in each move \(k\). \[Step_{i}^{k}=Step_{i}^{k-1}\cdot\left[c_{i}+Rand_{i}^{k}\times 0.1\right] \tag{10}\]  
In this way, by introducing this kind of randomness into the step size for every beetle adaptively, the deficiency of the local optimum solutions could be avoided to some extent. Also, the step size is highly related to the number of iterations. As shown in Equation (10), it is obvious that in the last few iterations, the step size is much smaller compared with that in the few beginning iterations, which could further make the expected optimum solutions easy to find. This adoption of an adaptive step size in the proposed BSO method guarantees that all the beetles would move to the global optimum positions in a short time with a high accuracy, which makes the algorithm more efficient even in a complicated situation with a large number of beetles existing in a swarm. Random proportionality coefficient  
It is known that a bigger beetle moves further in terms of distance every iteration, which means that there is a proportionality coefficient between the beetle size and its step size. As illustrated in Equation (8), a predefined distance \(d_{0}\) does exist between the beetle's right and left antennas to describe the sizes of the beetles exactly. A larger \(d_{0}\) means a larger beetle. In the standard BAS algorithm, this proportionality coefficient is set as a constant, which, in turn, could reduce the complexity of the BAS. However, on the contrary, using a constant proportionality coefficient would make it difficult for the beetles to reach the global optimum positions, leading to a lot of swings during the optimization. In this way, the solutions obtained by the standard BAS algorithm may not be the optimum, and possibly, it would be suboptimal around the optimum positions. In the proposed BSO method, a random proportionality coefficient is designed to improve the suboptimal problem that appears in the standard BAS algorithm. For a beetle \(i\) in the \(k\)th move, a random proportionality coefficient can be denoted as \(R_{i}^{k}\), which is calculated with Equation (11). In this equation, \(e_{1}{}^{i}\) and \(e_{2}{}^{i}\) are two constants for a beetle \(i\) to limit the scope of proportionality coefficient \(R_{i}^{k}\) during each move. Generally, \(e_{1}{}^{i}\) is larger than \(e_{2}{}^{i}\) for a beetle \(i\).