# Space-Constrained Scheduling Optimization Method for Minimizing the Effects of Stacking of Trades
## 3 Space-Constrained Scheduling Optimization Method
### Defining the Objective Function and Executing GA  
Meta-heuristics such as GA, SA, and TS are effective in solving the problem in this study. All three meta-heuristics have the ability to find a better solution than the manual process. Several studies on the performance comparison of GA, SA, and TS were conducted [21; 22; 23]. [PERSON] et al. [21] show that TS gives better calibration results compared to the GA and SA. On the other hand, [PERSON] et al. 's [23] study found that GA has a better solution quality than SA and TS for solving QAP (Quadratic Assignment Problem) optimization problems, but TS has a faster execution time than the others. This suggests that there may be differences in the performance of GA, SA, and TS depending on the type of problem. Therefore, this study adopts GA, which is the most diverse and widely used in the construction field, to solve the SCS problem. The GA parameters, fitness function, and GA operation termination rules used to find solutions are provided in detail. First, the user sets GA parameters (i.e., population size (_PS_), crossover rate (_CR_), mutation rate (_MR_)) to execute GA operations (Step 11). Then, SSO sets the GA operation termination rules. For the termination rules, we used the four termination criteria provided by Global Optimization ToolBox of MATLAB (ver. 2015b) developed by MathWorks, USA: (1) Generation: the operation is terminated if the maximum number of generations is reached; (2) StallGenLimit: the operation is terminated if there is no improvement in the objective function during a specific number of generations (stall generation); (3) StallTimeLimit: the operation is terminated if there is no improvement in the objective function for a certain period; (4) TimeLimit: the operation is terminated if the maximum computation time is exceeded. Tolfun (=\(1\times 10^{-6}\)), which is set as a default value by the GA solver of MATLAB, is used to determine whether the objective function has improved. SSO sets the objective function of the GA (Step 13). The objective function \(f_{\text{SC}}\)(A, ST) calculates the level of space interference given the set of alternatives of activity execution pattern A(=\(\{k_{1}\),...,\(k_{l}\}\)) and the set of deferred start times ST(=\(\{sd_{1}\),...,\(sd_{l}\}\)) using Equation (10). Space interference occurs when the work area (_h_) is occupied by multiple activities at the same project time point (_t_). Therefore, space interference minimization is to plan that the work is not executed in the same area simultaneously. When it is unavoidable for multiple activities to be performed simultaneously in the same work area due to the nature of the project, it is necessary to have a plan that arranges activities that have a small space interference effect of being in the same area simultaneously. Equation (10) does not add the occupation density if the work area (_h_) is not occupied (\(a_{t,h}=0\)), even if several activities are performed simultaneously at a certain project time (_t_). If several activities are performed in the same area at the same time (\(a_{t,h}=1\)), it means that space interference has occurred, and the corresponding amount of occupation density is added. If the sum of the area occupation density at time \(t\) is greater than 1, a penalty (_p_) is added. This is because the maximum allowed density of work that can be executed in the work area has been exceeded, as mentioned in Step 5. \[ \begin{split} f_{\text{SC}}(A,ST)&=\underset{t}{ \sum}\underset{h}{\sum}((f{s}_{i,h,k}(p_{i,t})\times a_{t,h})+P_{t,h})\\ & s.t.\ \ p_{t,i}=\frac{t-s_{t}}{D_{i}}\times 100\\ \end{split}  \tag{10}\] \[a_{t,h}=\left\{ \begin{array}{c}1,\ n(i|f{s}_{i,h,k}(p_{i,t})> 0,\ \forall i)>1\\ 0,\ otherwise\end{array} \right.\] \[P_{t,h}=\left\{ \begin{array}{c}p,\ if\ \sum_{i}(f{s}_{i,h,k}(p_{i,t})\times a_{t,h})>1\\ 0,\ otherwise\end{array}