## 5 Analysis of Impact of Resource Failures on CPS
To present the solution clearly, the above solution is shown in a spatial-temporal network in Figure 5. In Figure 5, the flows influenced by the resource failure are represented by a red path. Obviously, the above solution can meet the deadline of the order. In the process of producing products, resource may fail unexpectedly. Suppose a resource failed during the period from 8:00 a.m. Suppose the failure is expected to be recovered by 8:20 a.m. The resource failure information is shown in \[\sum\limits_{a=(u,w)\in A_{jrt}}f_{j}(u,w)\leq\widetilde{C}_{rt}\forall r\in \textbf{R}\ \forall t\in\{1,2,\ldots,\Pi\} \tag{6}\]0 As there are 16 places in the CPS model, for this example, we represent the resource failure by the perturbation vector \(\delta=[0\ 1\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0\ 0]\) and discrete time failure interval \(\omega_{21}=[\alpha_{21}\ \beta_{21}]=[1\ 2]\). To assess the influence of the resource failure, a residual spatial-temporal network is constructed based on \(\Delta(m)\)= (\(m\), \(\delta\), \(\omega\)). A solution is found by solving the FPRSTN defined by \(RSTN_{1}(V_{1},A_{1})\) with \(\Delta_{1}(m)=(m\), \(\delta\), \(\omega\)). As only one type of product involved in the nominal solution, only type-1 products will be influenced. Therefore, \(\mathbf{J}(\Delta(m))=\{1\}\) in Algorithm 3. By solving the FPRSTN \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Resource Type** & **No. of Resources Failed** & **Operation** & **Start Period** & **End Period** \\ \hline
1 & 1 & 1 & 1 & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Information of a Resource Failure. Figure 5: A nominal solution is represented in \(STN_{1}(V_{1},A_{1})\), where the flows influenced by resource failure is represented in the red path. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Resource Type** & **Capacity** & **Operation** & **Transitions** & **Processing Time** \\ \hline
1 & 1 & 1 & \(t_{1}\), \(t_{2}\) & 1 \\
2 & 1 & 2 & \(t_{3}\), \(t_{4}\) & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Data for Operations, Transitions and Resources involved in Type-1 Tasks. defined by \(RSTN_{j}(V_{j},A_{j})\) with residual capacity constraint for \(j=1\), a solution is obtained as follows: \(f_{3,14}=1\), \(f_{14,26}=1\) and \(f_{26,1}=1\). This solution satisfies the condition of Property 3. The above solution can meet the deadline as the condition of Property 1 holds. Figure 6a shows the above solution represented in \(RSTN_{1}(V_{1},A_{1})\). The solution displayed in Figure 6a is obtained by rerouting the flows in the red path of Figure 5. Figure 6b shows the overall solution obtained by combining the solution in Figure 6a (rerouted workflows) with the flows not influenced by resource failures. It indicates that the solution can meet the deadline as the flows of each arc after the deadline is zero. **Example 2**. : _Please refer to Appendix C for the details._

To illustrate the computational feasibility of the proposed method, we conduct relevant experiments. These experiments were running on a computer with an Intel CoreTM i7-4720 HQ CPU, 2.6 G Hz, and 16 GB of RAM. Two types of experiments have been performed. The first type of experiments aims to study the influence of number of tasks that need to be rerouted due to resource failures on the computation time. The second type of experiment focuses on the scalability of the proposed method with respect to the number of transitions in a task subnet. For the first type of experiment, we increase the number of tasks influenced, \(Q_{j}^{\delta}\), due to resource failures to study how the computational time grows with the number of tasks influenced. The number of tasks influenced due to resource failures is changed from 1 to 150. In this type of experiment, the number of operations in the task subnet is fixed at 10. Therefore, the number of transitions in the first type of experiments is 20. The time horizon, \(\Pi\), is set to 722 in this type of experiment. The results are shown in Figure 7a.