# A Tolerance Type Screening Method Based on Similarity Evaluation
## 3 Similarity Assessment Strategies
### Similarity Assessment of Similar Elements
#### 3.3.2 Similarity Assessment of Spatially Related Similar Tupels  
According to the analysis in Section 3.2.2, the spatial similarity element \(\mathbf{R}\) has two sub-similarity elements \(\mathbf{R}_{\text{o}}\) and \(\mathbf{R}_{\text{c}}\). \(\mathbf{R}_{\text{o,tc}}\) represents the spatial similarity element \(\mathbf{R}_{\text{o}}\) under resource conditions, and \(\mathbf{R}_{\text{o,to}}\) represents the regional similarity element \(\mathbf{R}_{\text{o}}\) under target conditions. \(\mathbf{SR}_{\text{o,tc}}\) and \(\mathbf{SR}_{\text{o,to}}\), respectively, represent the sets of elements in similar elements \(\mathbf{R}_{\text{o,tc}}\) and \(\mathbf{R}_{\text{o,to}}\). In the process of tolerance specification design, the difference sets \((\mathbf{SR}_{\text{o,tc}}\backslash\mathbf{SR}_{\text{o,to}})\) and \((\mathbf{SR}_{\text{o,to}}\backslash\mathbf{SR}_{\text{o,tc}})\) between \(\mathbf{SR}_{\text{o,tc}}\) and \(\mathbf{SR}_{\text{o,to}}\) have the same significance for determining tolerance types, and their impact on the similarity between \(\mathbf{R}_{\text{o,tc}}\) and \(\mathbf{R}_{\text{o,to}}\) is the same. According to Equation (4), the similarity evaluation values of similar tuples \((\mathbf{R}_{\text{o,tc}},\mathbf{R}_{\text{o,to}})\) are obtained, as shown in Equation (6):  
\[S(\mathbf{R}_{\text{o,tc}},\mathbf{R}_{\text{o,to}})=1-\log_{2}\biggl{(}1+\frac{0.5\!f (\mathbf{SR}_{\text{o,tc}}\backslash\mathbf{SR}_{\text{o,to}})+0.5\!f(\mathbf{SR}_{\text{o,to}}\backslash\mathbf{SR}_{\text{o,tc}})}{f(\mathbf{SR}_{\text{o,tc}}\cap\mathbf{SR}_{ \text{o,to}})+0.5\!f(\mathbf{SR}_{\text{o,tc}}\backslash\mathbf{SR}_{\text{o,to}})+0.5 \!f(\mathbf{SR}_{\text{o,to}}\backslash\mathbf{SR}_{\text{o,tc}})}\biggr{)} \tag{6}\]  
The resource case similarity element \(\mathbf{R}_{\text{c}}\) is represented by \(\mathbf{R}_{\text{c,tc}}\), and the similarity element \(\mathbf{R}_{\text{c}}\) in the target case is represented by \(\mathbf{R}_{\text{c,to}}\). Use sets \(\mathbf{SR}_{\text{o,tc}}\) and \(\mathbf{SR}_{\text{o,to}}\) to represent the feature elements in similar elements \(\mathbf{R}_{\text{c,tc}}\), \(\mathbf{R}_{\text{c,to}}\), respectively. In the process of tolerance specification design, the difference set \((\mathbf{SR}_{\text{c,tc}}\backslash\mathbf{SR}_{\text{c,to}})\) and \((\mathbf{SR}_{\text{c,to}}\backslash\mathbf{SR}_{\text{c,tc}})\) between \(\mathbf{SR}_{\text{c,tc}}\) and \(\mathbf{SR}_{\text{c,to}}\) have the same significance for determining the tolerance type. The similarity calculation formula for similar elements \((\mathbf{R}_{\text{c,tc}},\mathbf{R}_{\text{c,to}})\) is obtained, as shown in Equation (7):  
\[S(\mathbf{R}_{\text{c,tc}},\mathbf{R}_{\text{c,to}})=1-\log_{2}\biggl{(}1+\frac{0.5( \mathbf{SR}_{\text{c,tc}}\backslash\mathbf{SR}_{\text{c,to}})+0.5\!f(\mathbf{SR}_{\text{ c,tc}}\backslash\mathbf{SR}_{\text{c,tc}})}{f(\mathbf{SR}_{\text{c,tc}}\cap\mathbf{SR}_{\text{c,to}})+0.5\!f( \mathbf{SR}_{\text{c,tc}}\backslash\mathbf{SR}_{\text{c,to}})+0.5\!f(\mathbf{SR}_{\text{c, tto}}\backslash\mathbf{SR}_{\text{c,tc}})}\biggr{)} \tag{7}\]  
Use \(\mathbf{R}_{\text{to}}\) to represent similar elements in the target case \(\mathbf{T}_{\text{o}}\), and \(\mathbf{R}_{\text{tc}}\) to represent similar elements in the resource case \(\mathbf{T}_{\text{c}}\). The similarity evaluation of similar tuples \((\mathbf{R}_{\text{tc}},\mathbf{R}_{\text{to}})\) can be seen as a linear combination of the similarity evaluations of two similar elements, \(\mathbf{R}_{\text{o}}\) and \(\mathbf{R}_{\text{c}}\).