# A Multi-Customer Vehicle Scheduling Optimization Method for Coal Intelligent Loading System
## 3 Construction of Vehicle Scheduling Optimization Model for Coal Mine Enterprises
### Sparrow Search Algorithm  
The Sparrow Search Algorithm (SSA) simulates the behavior of sparrows in foraging and collaborative group communication [32]. The algorithm categorizes individuals into discoverers, followers, and vigilantes [33]. Discoverers provide foraging information to the entire group, followers follow and forage, and vigilantes monitor the foraging area.  
The current optimal scheduling plan (discoverer) position update can be expressed as in Formula (21):  
\[X_{p,q}^{t+1}=\begin{cases}X_{p,q}^{t}\cdot exp\left(\frac{-p}{\alpha\cdot exp _{max}}\right),R_{0}\geq ST\\ X_{p,q}^{t}+H\cdot L\,,\ R_{2}<ST\end{cases} \tag{21}\]  
where: \(t\) denotes the current iteration number, \(X_{p,q}^{t}\) denotes the position of the \(p\)th plan in the \(q\)th dimension in the \(t\)th generation, \(\alpha\in(0,1)\), \(gen_{max}\) is the maximum number of iterations, \(R_{0}\) denotes the alarm value, \(ST\) denotes the safety threshold, \(H\) is a random number obeying the normal distribution, and \(L\) is a 1-dimensional all-1 matrix.  
Other scheduling plans (follower) position updates can be expressed as in Formula (22):  
\[X_{p,q}^{t+1}=\begin{cases}Q\cdot exp\left(\frac{X_{burst}^{t}-X_{p,q}^{t}}{p^ {2}}\right),p>\frac{l}{2}\\ X_{p}^{t+1}+\left|X_{p,q}^{t}-X_{c}^{t+1}\right|\cdot A^{*}\cdot L,\ p\leq\frac{l}{2} \end{cases} \tag{22}\]  
where: \(X_{burst}^{t}\) denotes the location of the scheduling plan with the worst fitness in generation \(t\), and \(X_{c}^{t+1}\) denotes the location of the scheduling plan with the best fitness in generation \(t+1\). \(A\) denotes a 1-dimensional matrix, where each element is randomly predefined as \(-1\) or \(1\), \(A^{*}=A^{T}\big{(}AA^{T}\big{)}^{-1}\), and \(l\) is the population size. When \(p>\frac{l}{2}\), it means that the \(p\)th scheduling plan has low fitness; when \(p\leq\frac{l}{2}\), the scheduling plan will be close to the optimal plan \(X_{c}\).  
The potential scheduling plan for updating the position (vigilant) can be expressed as in Formula (23):  
\[X_{p,q}^{t+1}=\begin{cases}X_{best}^{t}+\epsilon\cdot\left|X_{p,q}^{t}-X_{best }^{t}\right|,\ f_{p}\
eq f_{\epsilon}\\ X_{best}^{t}+\delta\left(\frac{X_{p,q}^{t}-X_{best}^{t}}{|f_{p}-f_{\pi}|+ \sigma}\right),\ f_{p}=f_{\epsilon}\end{cases} \tag{23}\]  
where: \(X_{best}^{t}\) denotes the global optimal position in generation \(t\), \(\epsilon\) is a random number that controls the step size and follows a normal distribution with a mean of 0 and variance of 1, \(s\in[-1,1]\), and \(\sigma\) is a smaller constant to prevent the denominator from being 0. \(f_{p}\) denotes the fitness value of the current scheduling plan, while \(f_{\epsilon}\) and \(f_{w}\) represent the fitness values of the current global optimal and worst scheduling plans, respectively. When \(f_{p}\
eq f_{\epsilon}\), the scheduling plan keeps changing its position and tries to find a better fit; when \(f_{p}=f_{\epsilon}\), the scheduling plan moves closer to the nearby plans to avoid the danger zone.