## 4 Configuration/Scheduling Feasibility Problem and Context Generation Problem in CPS
To endow the workflow model with the capability to capture assembly operations, the workflow model proposed in this paper extends the one defined in [41]. The Cyber World model for the \(k\)-th operation of process agent \(w_{n}\), \(n\in WA\) is a DTPN \(\Omega_{n}^{k}=\left(P_{n}^{k},T_{n}^{k},F_{n}^{  
Let \(K_{n}\) denote the number of operations involved in the workflow of process agent \(w_{n}\). The Cyber World model for process agent \(w_{n}\) is defined as follows:  
**Definition 3**. : _The Cyber World model for process agent \(w_{n}\), where \(n\in WA\) is an acyclic DTPN \(\Omega_{n}=\|_{k\in\{1,2,\ldots,K_{n}\}}\Omega_{n}^{k}\)._  
Without loss of generality, it is assumed that only the input transition in the Cyber World model of the first operation may have multiple input places, i.e., \(\left|P_{n}^{ki}\right|\geq\)1 and \(\left|P_{n}^{ki}\right|=1\) for \(k\in\{2,\ldots K_{n}\}\). If this condition is not satisfied, we can decompose the workflow of a process agent into several subworkflows with multiple input places allowed only for the first operation in each subworkflow and assign each subworkflow to a process agent to make the above condition satisfied. Figure 7a-c show the DTPN models, \(\Omega_{1}\), \(\Omega_{2}\) and \(\Omega_{3}\) for process agents \(w_{1}\), \(w_{2}\) and \(w_{3}\), where \(\Omega_{1}=\Omega_{1}^{1}\|\Omega_{1}^{2}\), \(\Omega_{2}=\Omega_{2}^{1}\) and \(\Omega_{3}=\Omega_{3}^{1}\|\Omega_{3}^{2}\). Each operation of process agent \(w_{n}\) must be performed by some resource agent. To describe the situation that \(k\)-th operation of process agent \(w_{n}\) is performed by resource agent \(a\), we define a DTPN \(A_{na}^{k}=\left(P_{na}^{k},T_{na}^{k},F_{na}^{k},m_{na0}^{k},\mu_{na}^{k}\right)\). In performing an operation, resource agent \(a\) will start and end with the idle state place \(r_{a}\). Therefore, \(A_{na}^{k}=\left(P_{na}^{k},T_{na}^{k},F_{na}^{k},m_{na0}^{k},\mu_{na}^{k}\right)\) is a cycle or circuit [37]. **Definition 4**. : _The Cyber World model of the \(k\)-th operation of process agent \(w_{n}\) performed by resource agent \(a\), where \(a\in MA\), is represented by DTPN \(A_{na}^{k}=\left(P_{na}^{k},T_{na}^{k},F_{na}^{k},m_{na0}^{k},\mu_{na}^{k}\right)\). The initial marking \(m_{na0}^{k}(r_{a})\) is the number of resources allocated, where \(r_{a}\) is the idle state place. There is no common transition between \(A_{na}^{k}\) and \(A_{na}^{k^{\prime}}\) for \(k\
eq k^{\prime}\)._  
Figure 8a-e show the DTPN models, \(A_{11}^{1}\), \(A_{12}^{1}\), \(A_{23}^{1}\), \(A_{34}^{1}\) and \(A_{35}^{2}\) for process agents \(w_{1}\), \(w_{2}\), and \(w_{3}\). Figure 7: (a) A DTPN model \(\Omega_{1}\) for process agent \(W1\); (b) A DTPN model \(\Omega_{2}\) for process agent \(W2\); (c) A DTPN model \(\Omega_{3}\) for process agent \(W3\). To model collaboration of resource agents and process agents, a collaboration model \(\Psi_{n}\) is obtained by combining the Cyber World model \(\Omega_{n}\) for process agent \(w_{n}\) and the Cyber World models of the activity performed by relevant resource agents. Let \(R_{n}^{k}\) denote the set of resource agents involved in performing the \(k\)-th operation in \(\Omega_{n}\). The collaboration model \(\Psi_{n}\) is defined as follows:  
**Definition 5**. : _The Cyber World model for the collaboration of process agent \(w_{n}\) with relevant resource agents is a DTPN \(\Psi_{n}=(P_{n},T_{n},F_{tt},m_{n0},\mu_{n})=\|_{k\in\{1,2,\ldots,K_{k}\}}\left( \Omega_{n}^{k}\|_{a\in R_{n}^{k}}A_{na}^{k}\right)\), where \(n\in WA\). The firing time \(\mu_{n}(t)\) for each transition \(t\in T_{n}\) is \(\mu_{na}^{k}(t)\)._  
Suppose \(R_{1}^{1}=\{1\}\), \(R_{1}^{2}=\{2\}\), \(R_{2}^{1}=\{3\}\), \(R_{3}^{1}=\{4\}\), \(R_{3}^{2}=\{5\}\),  
\(\Psi_{1}=(\Omega_{1}^{1}\|A_{11}^{1})\|(\Omega_{1}^{2}\|A_{12}^{2})\),  
\(\Psi_{2}=\Omega_{2}^{1}\|A_{23}^{1}\),  
\(\Psi_{3}=(\Omega_{3}^{1}\|A_{34}^{1})\|(\Omega_{3}^{2}\|A_{35}^{2})\),  
Figure 9a-c show the DTPN models of, \(\Psi_{1}\), \(\Psi_{2}\) and \(\Psi_{3}\), respectively.