## 4 DT Workshop Planning Modeling Based on GNN
### Graph Neural Network Structure  
Recently, there has been a significant surge in scholarly inquiry regarding the utilization of Graph Neural Networks (GNNs) in conjunction with Deep Reinforcement Learning (DRL) for the purpose of resolving workshop job scheduling problems [10; 11; 12; 13; 14; 40]. This approach is regarded as one of the most efficient computational methods for optimizing scheduling. In contrast to traditional heuristic rules and metaheuristic algorithms, which require computation under the objective function and constraints of the previous section, the priority scheduling rules (PDRs)-based sequential decision problem is turned into a Markov decision process (MDP) by training GNN parameters through DRL. This approach incorporates the optimization objectives and constraints into the reward mechanism, thereby achieving the generalization of the scheduler. This methodology can effectively decrease the computational burden of each scheduling computation while maintaining solution precision and enabling the repeated utilization of GNNs with stability subsequent to a solitary training iteration. Consequently, this methodology has the potential to significantly mitigate the substantial burden on the computing capacity of the planners' personal computers during the plant's planning phase and delegate the computationally intensive tasks to the server for execution. Furthermore, a server-side interface might be devised to retrieve real-time progress and work time information from jobs gathered in the DT system and incorporate it into the training sets. These can serve as an effective foundation for updating status or action values in subsequent rounds of training.  
Combining the DT workshop foundation and job planning requirements, this paper proposes a planning framework based on a graph attention network (GAT) and DRL, as shown in Figure 6.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Symbols** & **Definition** & **Description** \\ \hline \(N\) & Total number of workpieces & \(\{1,2,\cdots,i,\cdots,N\}\) \\ \(i\) & Workpiece number & \(i\in[1,N]\) \\ \(j\) & Process number & \(j\in[1,P_{il}]\) \\ \(k\) & Equipment number & \(k\in[1,M]\) \\ \(M\) & Total number of equipment & \(\{m_{1},m_{2},\cdots,m_{k},\cdots m_{M}\}\) \\ \(G_{i}\) & Number of all process routes for \(i\) & \(G_{i}=\{O,C,M\}\) \\ \(l\) & Flexible process route number & \(l\in[1,G_{i}]\) \\ \(p_{il}\) & Total number of processes planning for & \(P_{il}\in G_{i}\) \\  & the process plan \(l\) of \(i\) & \(o_{ijl}\in P_{il}\) \\ \(o_{ijl}\) & The operation \(j\) of the process plan \(l\) for \(i\) & \(o_{ijl}\in P_{il}\) \\ \(s_{ijk}\) & Workpiece manufacturing start time & Time \\ \(c_{j}\) & Workpiece delivery time & Time \\ \(c_{i}^{\prime}\) & Workpiece completion time & Time \\ \(t_{ijk}\) & Workpiece processing time & \(t_{ijkl}=\left[s_{ijlk},c_{i}^{\prime}\right]\) \\ \(X_{il}\) & Process route selection decision variable & \(X_{il}=\left\{\begin{array}{ll}1&i\text{ if }i\text{ select process plan }l\\ 0&\text{else}\end{array}\right.\) \\ \(Z_{ijlk}\) & Equipment selection decision variable & \(Z_{ijlk}=\left\{\begin{array}{ll}1&i\text{ if }o_{ijl}\text{ select equipment }k\\ 0&\text{else}\end{array}\right.\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: The definitions and descriptions of the symbols in the mathematical models.