## 3 Constructing an AT Representation Model Containing Tolerance-Zone DOF Layers
### OWL/SWRL Representation for AT Information Based on Tolerance-Zone DOFs
#### 4.5.2 SWRL Representation of Inference Rules for Screening Tolerance Types  
Section 3 defines the adjacency matrix \(M_{\vec{v}_{i},3\times 6}\) for the tolerance-zone DOF layer and the mapping matrix \(M_{T,21\times 6}\) for the tolerance zone type layer. The tolerance type selection algorithm using the tolerance-zone DOFs proposed in reference [14] is shown in Figure 7. The protege 5.5 tool is used to complete the instantiation of different tolerance-zone DOF vectors for different tolerance types of the same AFE. Based on this, the SWRL rule language is used to describe the tolerance type selection algorithm using tolerance-zone DOFs, and the SWRL representation of the intelligent tolerance type selection rules is constructed. 1. Reasoning rules for common DOF vector \(\mathbf{V}_{\text{c}}\). In the coordinate system, if the normal direction of the target feature element is the Y-axis direction, the vector \(V_{\text{t}}\) is an instance of the class Y_DOF. The measurement reference feature DOF vector \(\mathbf{V}_{\text{f}}\) is an instance of class DOFs. Then, the values of the elements in the vector \(\mathbf{V}_{\text{C}}\) are the Boolean values between \(\mathbf{V}_{\text{t}}\) and \(\mathbf{V}_{\text{f}}\). Based on the adjacency matrix \(M_{\vec{v}_{i},3\times 6}\), which represents the tolerance-zone DOF vectors, the inference rule for finding the values of the six data attributes of the vector \(\mathbf{V}_{\text{c}}\) is constructed. For example, the SWRL of the inference rule for finding the value of translational DOFs in the Y-axis direction for the vector \(\mathbf{V}_{\text{c}}\) is expressed as: hasDOF_Y(\(\mathbf{V}_{\text{t}}\),?x) \(\wedge\) hasDOF_Y(\(\mathbf{V}_{\text{t}}\)?y) \(\wedge\) swrlb:notEqual(?x,?y) \(\rightarrow\) hasDOF_Y(\(\mathbf{V}_{\text{c}}\), false); hasDOF_Y(\(\mathbf{V}_{\text{t}}\)?x) \(\wedge\) hasDOF_Y(\(\mathbf{V}_{\text{t}}\)?y) \(\wedge\) swrlb:Equal(?x,?y) \(\rightarrow\) hasDOF_Y(\(\mathbf{V}_{\text{c}}\), true). Similarly, the inference rules can be constructed for the other five data attribute values in the common DOF vector \(\mathbf{V}_{\text{c}}\). 2. Reasoning rules for the control parameter DOF vector \(\mathbf{V}_{0}\). If \(\mathbf{V}_{\text{p}}\) is the auxiliary DOF vector, the control parameter DOF vector \(\mathbf{V}_{0}\) is the result of the Boolean of the auxiliary DOF vector \(\mathbf{V}_{\text{P}}\) and the common DOF vector \(\mathbf{V}_{\text{C}}\). With reference to the method of determining the inference rule for the common DOF vector, the inference rule for determining the six data values in the control parameter DOF vector \(\mathbf{V}_{0}\) is constructed. As an example, the SWRL of the inference rule for finding the rotational DOF value of the DOF vector \(\mathbf{V}_{0}\) around the Y axis is expressed as follows: hasDOF_aroundY(\(\mathbf{V}_{\text{c}}\)?x) \(\wedge\) hasDOF_aroundY(\(\mathbf{V}_{\text{p}}\),?y) \(\wedge\) swrlb:notEqual(?x,?y) \(\rightarrow\) hasDOF_aroundY(\(\mathbf{V}_{\text{o}}\), false); hasDOF_aroundY(\(\mathbf{V}_{\text{c}}\)?x) \(\wedge\) hasDOF_aroundY(\(\mathbf{V}_{\text{p}}\),?y) \(\wedge\) swrlb:Equal(?x,?y) \(\rightarrow\) hasDOF_aroundY(\(\mathbf{V}_{\text{o}}\), true). Similarly, the inference rules can be constructed for the other five data values in the vector of control parameter DOFs \(\mathbf{V}_{0}\). 3. Inference rules for determining the comparative DOFs \(\mathbf{V}_{\text{ij,k}}\). If \(\mathbf{V}_{\text{ij,k}}\) is a vector of DOFs for the different tolerance types of an AFE (subscript \(\vec{i}\) is the part number, \(j\) is the contact surface number, and \(k\) is the tolerance mark sequence number) and \(\mathbf{V}_{0}\) is a vector of control parameter DOFs, then the comparative DOFs vector \(\mathbf{V}_{\text{ij,k}}\) is the result of a Boolean operation between \(\mathbf{V}_{\text{ij,k}}\) and \(\mathbf{V}_{0}\).