## 3 PPS Algorithm  
The proposed PPS algorithm was developed to improve the process capability and flexibility of selective assembly systems, particularly those with multiple-slot rows. In systems with multiple-slot rows--one for each of the multiple key components--PPS assigns and evaluates priorities across all rows to optimize component matching. Although PPS shares fundamental principles with DBP [13], it introduces distinctive features to improve compatibility and precision in the assembly process. In PPS, priority rankings are assigned to the components stored in each slot row. For each row, the components are categorized according to their dimensional similarities; those that are closely clustered according to their dimensions are assigned higher priority in the assembly process than those not closely clustered. Using Algorithm 1, the dimensional similarities are calculated by first sorting the components in each row according to their size. Then, for each component, the size difference between its nearest smaller and bigger neighboring components is calculated. This difference represents the component dimensional similarity score; a small  
Figure 4: (**a**) Dimensional distribution in slots vs. process cycle in the ordinary case. (**b**) Dimensional distribution in slots vs. process cycle in the optimal case. difference indicates a high similarity to other components. For components that fall in the middle of the sorted list, the dimensional similarity is the difference in the nearest neighboring component on both sides. However, for the smallest and largest components in the sorted order--those with only one neighboring component--the similarity score is calculated as twice the single-size difference to approximate the effect of neighboring components on both sides. ```
1 functionSortBySimilarity (array X)
2n\(\leftarrow\) length(X)
3 initializeS[1..n]
4 sortX in ascending
5 fori\(\leftarrow\) 2..n-1 do
6S[i]\(\leftarrow\) X[i + 1]-X[i-1]
7 endfor
8S[1]\(\leftarrow\) 2 \(\times\) (X[2]-X[1])
9S[n]\(\leftarrow\) 2 \(\times\) (X[n]-X[n-1])
10 sortX by S in ascending
11 returnX
12 endfunction
```  
**Algorithm 1** Function: SortBySimilarity  
An important concept in PPS is the \"stride\", which allows priority rankings to be grouped into intervals, thereby enabling components within certain ranges to be treated as having equivalent priorities. This parameter, which can be set independently for each slot row, defines the size of these intervals and controls the number of components that share the same priority level. For example, let us consider a row containing six parts categorized according to their dimensional priority, which is conventionally assigned the priority order in the 1 to 6 range. When applying a stride of two, the six parts are grouped into three priority levels: two parts share priority 1, the next two share priority 2, and the last two share priority 3. If the stride is increased to three, the six parts will be grouped into two priority levels with three parts assigned to each level [1, 1, 1, 2, 2, 2]. This configuration allows a flexible adjustment of \"narrow\" or \"wide\" priorities assigned within each row. This stride-based grouping can be configured separately for each slot row. Consequently, each possible combination of components is assigned a combined priority, which is calculated as the sum of the priority levels assigned to individual components. By introducing stride, PPS establishes a structured priority hierarchy among component combinations, where several combinations share the same summed priority. Each set of combinations with identical priority levels is referred to as a \"block\". As presented in Algorithm 2, PPS evaluates the assembly combinations by iterating through these priority blocks, starting with the highest priority block. Within each block, PPS searches for combinations that satisfy the assembly tolerance. If a suitable combination is found, it is selected for assembly.