# An Improved NSGA-II-Based Method for Cutting Trajectory Planning of Boom-Type Roadheader
## 2 Methodology
### Optimizing Cutting Paths Using Improved NSGA-II
#### 2.3.3 Adjacent Constraints Design for Cutting Space Points  
In robotics, joint space is defined as the space with joint parameters as coordinate axes. The state of each joint varies independently, without directly considering the position of the end effector in Cartesian space. This paper establishes adjacency constraints using joint parameters as the basis, focusing primarily on the relative positional relationships and kinematic constraints among joints. Although joint space does not directly utilize the concept of geometric neighborhoods, the notion of \"neighborhood\" can be extended in this context. Let the coordinates of the set of spatial points be \(M=\{m_{1},m_{2},\ldots,m_{n}\}\), where each spatial point \(m_{1}=(x_{i},y_{i},z_{i})\) corresponds to a joint space point \(Q=\{q_{1},q_{2},\ldots,q_{n}\}\). Specifically, spatial point \(m_{1}=(x_{i},y_{i},z_{i})\) corresponds one-to-one with joint space point \(q_{1}=(\theta_{i1},\theta_{i2},d_{i})\), where \(q_{1}\) represents the joint parameters of the cutting part. This means that for each spatial point \(m_{i}\), there is a unique joint space point \(q_{i}\), and the positioning of the spatial point is achieved through the joint space parameters \(q_{i}\). The adjacency matrix \(\mathbf{A}\) is used to represent the adjacency relationship between spatial points. The adjacency matrix \(\mathbf{A}\) is defined as:  
\[\mathbf{A}= \begin{bmatrix}a_{11}&a_{12}&\cdots&a_{1n}\\ a_{21}&a_{22}&\cdots&a_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ a_{n1}&a_{n2}&\cdots&a_{nn}\end{bmatrix}  \tag{13}\]  
where \(m_{i}\) and \(m_{j}\) represent adjacent points \(a_{ij}=1\), and the motion corresponding to joint points \(q_{i}\) and \(q_{j}\) must satisfy the continuity constraint. \(m_{i}\) and \(m_{j}\) indicate \(a_{ij}=0\) that there is no adjacency relationship between them. When considering a single joint, its neighborhood can be defined as the two states resulting from adding or subtracting a small increment to the current joint angle. Since the three joints of the cantilever roadheader are independent, they can be controlled independently. By adding or subtracting a small increment \(\Delta\theta\) to the current joint space coordinate \(O(\theta_{1},\theta_{2},d)\) along the rotational joint's direction of motion, two states \(A(\theta_{1}+\Delta\theta,\theta_{2},d)\) and \(B(\theta_{1}-\Delta\theta,\theta_{2},d)\) are generated. Similarly, by adding or subtracting \(\Delta\theta\) along the lifting joint's direction of motion, two states \(C(\theta_{1},\theta_{2}+\Delta\theta,d)\) and \(D(\theta_{1},\theta_{2}-\Delta\theta,d)\) are produced. By adding or subtracting a small increment \(\Delta d\) along the telescoping joint's direction of motion, two states \(E(\theta_{1},\theta_{2},d+\Delta d)\) and \(F(\theta_{1},\theta_{2},d-\Delta d)\) are generated. These states are combined to form the adjacency constraint model in joint space, as illustrated in Figure 9.  
At this point, the changes of points \(q_{i}\) and \(q_{j}\) in the \(\theta_{1}\)-direction and \(\theta_{2}\)-direction satisfy  
\[\left|\theta_{i1}-\theta_{j1}\right|\leq\Delta\theta,\left|\theta_{i2}-\theta _{j2}\right|\leq\Delta\theta \tag{14}\]  
where \(\Delta\theta\) represent the maximum change in the \(\theta_{1}\)-direction and \(\theta_{2}\)-direction, respectively. This condition can be used to determine the adjacency conditions for the joint rotation directions of \(\theta_{1}\) and \(\theta_{2}\). The change in points \(q_{i}\) and \(q_{j}\) in the direction of the cutterhead's telescoping motion satisfies:  
\[\left|d_{i}-d_{j}\right|\leq\Delta d \tag{15}\]  
where \(\Delta d\) represents the maximum allowable change in the cutterhead's telescoping direction. Therefore, the adjacency relationship between points \(q_{i}\) and \(q_{j}\) holds if and only if all the above conditions are satisfied, that is:  
\[a_{ij}=\left\{