# Dynamic Scheduling Optimization of Production Workshops Based on Digital Twin
## 5 Dynamic Scheduling Strategy and Case Analysis Based on Digital Twin
### Case Study  
#### 5.3.1. Initial Scheduling Scheme  
The production task was to process 12 different workpieces. There were 6 processes for each workpiece and 8 available processing machines. The available processing machines and the processing time for each workpiece are shown in Tables 5 and 6, and the power of each machine is shown in Table 7.  
The digital twin service system generates a 12 \(\times\) 6 scale initial scheduling scheme, as shown in Figure 8.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Workpiece**Work Sequence** & **1** & **2** & **3** & **4** & **5** & **6** \\ \hline
1 & 13, 15 & 20, 18 & 19, 17 & 15 & 13, 13 & 15, 14 \\
2 & 15, 16 & 18, 19 & 11, 15 & 13 & 16 & 15, 16 \\
3 & 17 & 15, 17 & 17, 15 & 15, 14 & 15 & 16, 20 \\
4 & 15, 18 & 14, 13 & 14, 16, 16 & 14, 16 & 15, 17 & 18, 20 \\
5 & 14, 16 & 20, 22 & 14, 19, 17 & 14, 13 & 18, 15 & 17, 14 \\
6 & 12, 14, 18 & 14, 17 & 16, 18, 19 & 19, 16 & 20, 22 & 18, 18, 16 \\
7 & 17 & 15, 17 & 17, 15 & 15, 14 & 15 & 16, 20 \\
8 & 12, 14, 18 & 14, 17 & 16, 18, 19 & 19, 16 & 20, 22 & 18, 18, 16 \\
9 & 14, 16 & 20, 22 & 17, 19, 20 & 14, 13 & 19, 18 & 17, 14 \\
10 & 13, 15 & 20, 18 & 19, 17 & 15 & 13, 13 & 15, 14 \\
11 & 15, 16 & 18, 19 & 11, 15 & 13 & 16 & 16, 10 \\
12 & 15, 18 & 14, 13 & 14, 16, 16 & 14, 16 & 15, 17 & 18, 20 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Processing time of each procedure (min).  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Machine Number** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** \\ \hline Standby power & 3.4 & 2.8 & 0.85 & 1.62 & 1.43 & 0.65 & 1.21 & 1.78 \\ Processing power & 22 & 16 & 7 & 17 & 13 & 7 & 10 & 14 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Power of each machine (kW).  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Workpiece**Work Sequence** & **1** & **2** & **3** & **4** & **5** & **6** \\ \hline
1 & 1, 8 & 4, 8 & 6, 7 & 5 & 6, 8 & 4, 7 \\
2 & 1, 2 & 3, 4 & 6, 8 & 5 & 7 & 3, 4 \\
3 & 3 & 4, 7 & 6, 8 & 1, 2 & 5 & 6, 7 \\
4 & 1, 3 & 1, 5 & 3, 5, 7 & 2, 4 & 6, 8 & 2, 7 \\
5 & 1, 2 & 2, 7 & 3, 4, 6 & 1, 4 & 3, 6 & 7, 8 \\
6 & 1, 2, 3 & 4, 7 & 6, 7, 8 & 5, 6 & 2, 4 & 1, 5, 8 \\
7 & 4 & 6, 8 & 4, 7 & 1, 2 & 5 & 6, 7 \\
8 & 1, 2, 3 & 4, 7 & 6, 7, 8 & 5, 6 & 2, 4 & 1, 5, 8 \\
9 & 1, 2 & 2, 7 & 3, 4, 6 & 1, 4 & 3, 6 & 7, 8 \\
10 & 1, 8 & 4, 8 & 6, 7 & 6 & 5, 8 & 4,7 \\
11 & 1, 2 & 3, 4 & 6, 8 & 5 & 7 & 4,5 \\
12 & 1, 3 & 1, 5 & 3, 5, 7 & 2, 4 & 6, 8 & 2,7 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Available machines for each process of each workpiece.  
In the figure, the horizontal coordinates represent the shop machining time and the vertical coordinates represent the machine number. Squares of the same color in the coordinate system represent the same workpiece, and the numbers in the squares are workpiece number and process number. For example, the red square in Figure 8 represents workpiece 1, where the red square numbered (1, 1) is the first process of workpiece 1, which is machined on machine 8 during the time period 0-10. The processing end time of the initial scheduling scheme is 197 min, and the energy consumption is 2354 kW.h.