# Linear Project-Scheduling Optimization Considering a Reverse Construction Scenario
## 4 Design of a Solving Algorithm for the LSM-CBPS Model  
### Grey Wolf Optimization Algorithm  
The grey wolf optimizer (GWO), initially proposed by [PERSON] et al. in 2014 [54], is a meta-heuristic optimization algorithm inspired by the hunting behavior of grey wolves. It has been successfully applied in various fields, such as power flow optimization [55], vehicle path planning [56], and feature selection [57]. In the GWO, the solution with the best fitness is considered to be \(\alpha\) wolf, the second and third solutions with the best fitness are \(\beta\) wolf and \(\delta\) wolf, respectively, and the remaining solutions are \(\omega\) wolves. The hunting (optimization) process is guided by the top three grades of wolves, followed by \(\omega\) wolves. Assuming the population size is \(N\) and the search space is \(D\)-dimensional, the position of the \(i\)th grey wolf in \(D\)-dimensional space can be represented as \(X_{i}=(x_{i}^{1},x_{i}^{2},\ldots,x_{i}^{D})\), \(i=1,2,\ldots,N\).  
The hunting behavior of grey wolves, where they surround their prey, is modeled using the following equations.  
\[D=\left|C\cdot X_{p}^{d}(t)-X_{i}^{d}(t)\right| \tag{69}\]  
\[X_{i}^{d}(t+1)=X_{p}^{d}(t)-A\cdot D \tag{70}\]  
where \(t\) is the current iteration number; \(X_{p}=(x_{p}^{1},x_{p}^{2},\ldots,x_{p}^{D})\) is the prey position; and \(A\) and \(C\) are the coefficients, which can be defined as:  
\[A=2a\cdot r_{1}-a \tag{71}\]  
\[C=2\cdot r_{2} \tag{72}\]  
where \(r_{1}\) and \(r_{2}\) are random numbers between [0,1]; and \(a\) is a distance control parameter that linearly decreases from 2 to 0 as the number of iterations increases.  
Grey wolves can identify the location of the prey and surround it. The \(\beta\) and \(\delta\) wolves, led by wolf \(\alpha\), guide the wolf pack during the hunting process. The algorithm keeps track of the three solutions with the best fitness obtained so far, whereas the other candidate wolves within the population update their positions accordingly. The positions of the \(\beta\), \(\delta\), and \(\alpha\) wolves estimate the position of the prey, and the positions of the other wolves are randomly updated around the estimated prey position. The equation for updating the positions is as follows:  
\[\left\{\begin{array}{l}D_{\alpha}=\left|C\cdot X_{\alpha}^{d}(t)-X_{i}^{d}( t)\right|\\ D_{\beta}=\left|C\cdot X_{\beta}^{d}(t)-X_{i}^{d}(t)\right|\\ D_{\delta}=\left|C\cdot X_{\delta}^{d}(t)-X_{i}^{d}(t)\right|\\ \end{array}\right., \tag{73}\]  
\[\left\{\begin{array}{l}X_{i,\alpha}^{d}(t+1)=X_{\alpha}^{d}(t)-A\cdot D_{ \alpha}\\ X_{i,\beta}^{d}(t+1)=X_{\beta}^{d}(t)-A\cdot D_{\beta}\\ X_{i,\delta}^{d}(t+1)=X_{\delta}^{d}(t)-A\cdot D_{\delta}\\ \end{array}\right., \tag{74}\]\[X_{i}^{d}(t+1)=\frac{X_{i,\alpha}^{d}(t)+X_{i,\beta}^{d}(t)+X_{i,\beta}^{d}(t)}{3}. \tag{75}\]  
When the prey stops moving, the wolves attack it to complete the hunt. This attacking behavior is simulated by reducing the value of \(a\). As \(A\) is a random value during the interval \([a,-a]\), when \(a\) decreases, the range of \(A\) decreases as well. When \(|A|<1\), the wolves are forced to attack their prey, representing the local search phase of the algorithm. The searching behavior of prey corresponds to the global search. When \(|A|>1\), it forces the wolves to spread out and search for prey independently. The linear decrease in \(a\) balances the local search and global search.