## 3 Results
### Phase I: Defining PC On-site Assembly Optimization Principles via BIM-GA Hybrid System
#### 3.2.2 Application of Genetic Algorithm  
The crucial encoding process of GAs involves genes (representing PC elements) and chromosomes (representing assembly sequences). Initially, elements marked with an \"installation\" value of 0 were used as genes for generating assembly sequences. These were combined into an initial chromosome to ensure the unique selection of each ID without overlap. Considering the task complexity, working radius adjacency, and installation feasibility, a penalty score calculation function was developed as the objective function. The roulette-wheel method was employed to select higher-fitness parent chromosomes, paving the way for crossover and mutation processes to generate offspring chromosomes. Figure 6 \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**No.** & **ID** & **x** & **y** & **z** & **Level** & **Zone** & **Installation** \\ \hline
0 & 442407 & \(-\)43,609 & \(-\)112,333 & 3800 & 3 & A & 1 \\
1 & 442452 & \(-\)32,609 & \(-\)112,333 & 3800 & 3 & B & 1 \\
2 & 442559 & \(-\)21,609 & \(-\)112,333 & 3800 & 3 & A & 0 \\
3 & 442636 & \(-\)10,609 & \(-\)112,333 & 3800 & 3 & B & 0 \\
4 & 442687 & 390 & \(-\)112,333 & 3800 & 3 & A & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Example of PC component information. (Source: own elaboration). Figure 5: Extracting information of PC components. (Source: own elaboration). provides a detailed outline of the crossover and mutation procedures. In crossover, the parent chromosomes are blended at a defined division point to generate offspring, whereas mutations introduce alterations in a single gene within the offspring chromosome. The implementation of the genetic algorithm involved a meticulous coding process utilizing Visual Studio Code and Python. The initial phase entailed a comprehensive analysis of task intricacies, particularly focusing on consecutive task types and establishing precedent components. The tasks were systematically categorized into distinct entities: columns, beams, and slabs. When consecutive components differ in type, penalty scores are assigned based on the type of the preceding component, as outlined in Section 3.2. In the algorithm, 'Prev_type' and 'current_type' represent the types of two consecutive components. For example, if a column is followed by a beam, 'prev_type' would be a column, and 'current_type' would be a beam, resulting in a penalty score of 1 due to the difference in component types. Conversely, when consecutive components are of the same type, such as two consecutive columns, no penalty score is incurred (Algorithm 1). ```
# complexity penalty  for i in range(start_index,n):  prev_component = result_uninstalled.iloc[individual[i\(-\)1]]  current_component = result_uninstalled.iloc[individual[i]]  prev_type = prev_component['installation time']  current_type = current_component['installation time'] if prev_type == current_type:  penalty1 = 0 else:  if prev_type == 'column':  penalty1 = 1  elif prev_type == 'beam':  penalty1 = 2  elif prev_type =='slab':  penalty1 = 3 penalty_matrix.append(penalties1)

Figure 6: Cross-over and mutation of assembly sequence. (Source: own elaboration). To satisfy the second criterion of adjacency within the working radius, the adjacency penalty score was calculated based on the proximity of the surrounding elements to the reference element. The penalty score was determined by the ratio of the distance values between consecutive elements, and efforts were made to minimize the sum of these penalty scores. This was performed to prioritize the installation of adjacent elements (refer to Algorithm 2).