# Linear Project-Scheduling Optimization Considering a Reverse Construction Scenario
## 4 Design of a Solving Algorithm for the LSM-CBPS Model
### Improved Grey Wolf Optimization Algorithm Design
As the number of iterations increases, the population diversity weakens; consequently, escaping the local optima becomes challenging for the algorithm. To address this, the cross-mutation operator was introduced. #### 4.2.7 Heuristic Rule

In the process of evolution, because of the complexity of the search space and the presence of constraints, there may be many infeasible solutions in the population, which can significantly impact the search performance and effectiveness of the algorithm. The constraint condition-based correction was introduced, which involves adjusting the position of an individual that does not meet the constraint conditions, to enable meeting the constraint conditions and reducing its constraint violation value. The specific process is as follows. Step 1: For activity \(j\), if a minimum time constraint exists between it and the preceding activity \(i\), according to Section 2, the earliest start time \(Pst_{j,h}\) and end time \(Pet_{j,h}\) for each section of activity \(j\) can be calculated. For any construction crew \(m\) in the set of selected crews for activity \(j\), the construction sequence \(seq_{j,m}\) is traversed, the difference \(pval_{j,h}\) between the earliest start time \(Pst_{j,h}\) and the current actual start time \(st_{j,h}\) in each section is determined, and the maximum difference is \(mpvval_{h,m}\). \[pval_{j,h}=Pst_{j,h}-st_{j,h}, \tag{78}\]

\[mpvval_{h,m}=\max\Bigl{\{}pval_{j,h}\Bigr{\}}. \tag{79}\]

If \(mpvval_{h,m}\) is greater than 0, it indicates that the start time of some subactivities does not meet the minimum time constraint. In this case, the start time of all the subactivities in

Figure 8: Illustration of mutation. the \(seq_{j,m}\) is adjusted upward by \(adjust_{j,m}\). If a maximum time constraint between activity \(j\) and \(i\) does not exist, the final start time \(st_{j,h}\) for each activity can be obtained, and the equation is shown in (82). Otherwise, proceed to step 2. \[adjust_{j,m}=\max\bigl{\{}0,mpval_{h,m}\bigr{\}} \tag{80}\]

\[st_{j,h}^{\prime}=st_{j,h}-adjust_{h,m}, \tag{81}\]

\[st_{j,h}=st_{j,h}^{\prime}. \tag{82}\]

Step 2: If a maximum time constraint between activity \(j\) and \(i\) exists, the latest start time \(Lst_{j,h}\) and end time \(Lst_{j,h}\) could be calculated by the maximum time constraint. For each construction crew \(m\) in the set of selected crews for activity \(j\), the construction sequence \(seq_{j,m}\) is traversed to determine the difference \(lval_{j,h}\) between the latest start time \(Lst_{j,h}\) and adjusted start time \(st_{j,h}\), and the minimum difference is \(mval_{h,m}\). \[lval_{j,h}=st_{j,h}-Lst_{j,h}, \tag{83}\]

\[mval_{h,m}=\max\Bigl{\{}lval_{j,h}\Bigr{\}}. \tag{84}\]

If the minimum difference value \(mval_{h,m}\) is greater than 0, it indicates that the start time of some subactivities does not meet the maximum time constraint. In this case, the start time of all the subactivities in the \(seq_{j,m}\) is adjusted downward by \(mval_{h,m}\). \[adjust_{j,m}=\max\bigl{\{}0,mval_{h,m}\bigr{\}}, \tag{85}\]

\[pval_{j,h}=Pst_{j,h}-st_{j,h}, \tag{78}\]0

The construction sequence \(seq_{j,m}\) is traversed again to obtain the difference \(pval_{j,h}\) between the earliest start time \(Pst_{j,h}\) and the adjusted start time \(st_{j,h}^{\prime\prime}\) for each section, and the maximum difference is \(mpval_{h,m}\). \[pval_{j,h}=Pst_{j,h}-st_{j,h}, \tag{78}\]1

\[pval_{j,h}=Pst_{j,h}-st_{j,h}, \tag{78}\]2

If the maximum difference \(mpval_{h,m}\) is greater than 0, it indicates that the start time of certain subactivity after adjustment no longer meets the minimum time constraint; that is, the construction sequence cannot simultaneously meet the minimum and maximum time constraints. In this case, the minimum time constraint is satisfied first, and the final activity start time \(st_{j,h}\) is obtained.