## 9 Discussion  
From the perspectives of modeling tools, solution methods and application domains, this study are different from previous studies. In terms of the development of context-aware systems and applications, although there are a lot of studies relevant to context-aware systems and applications on engineering context-aware systems [16], design of implementation method in context-aware ecosystems [17], and context-aware computing for the IoT [15], there are only a few works on the development of context-aware information system for CPS, e.g., [18; 19; 20; 21; 22]. Moreover, these works focus on security issue [19], programming [20], process guidance [21] and achieving self-optimization by using context awareness [22]. The problem to generate temporal workflow contextual information for complex workflows of CPS is not addressed in these studies. In terms of modeling tools, the DTPN models proposed in this paper extends the one defined in [41] by allowing multiple input places in the workflows of CPS. The timed model makes it possible to capture the characteristics of assembly operations in manufacturing systems and enable temporal planning to generate temporal contextual information. Although the problem to generate contextual information in workflow systems has been studied in [42], the method proposed in [42] cannot generate temporal workflow contextual information due to the use of untimed models. As a time interval is used to specify the timing for firing each transition, the time factor considered in the models of [43] in conjunction with the proposed algorithms can only be used for temporal reasoning of a task. It cannot generate context-aware scheduling information for assembly workflows in CPS. Comparing with the drawbacks of the models used in [43], the DTPN Cyber World models proposed in this paper endows the CPS with the capability to achieve effective generation of temporal context-aware information system based on optimization theory and a transformation method. Several types of production processes can be handled in this study. These include sequential processes as well as assembly processes. An assembly process can be decomposed into a number of sub-processes with dependency between upstream sub-processes and downstream sub-processes. Each process agent is responsible for only one sub-process with sequential structure. This allows the proposed approach to handle a wide variety of production processes. The capacity constraints are described in (1). Analysis and optimization are based on the capacity constraints as well as the flow balance constraints. Flexibility of the physical system can be described in terms of the capabilities and the processing time to perform operations. The capability to perform the k-th operation of process agent \(w_{n}\) by resource agent \(a\) is described by \(A^{k}_{na}=\left(p^{k}_{na},T^{k}_{na},F^{k}_{na},m^{k}_{na0},p^{k}_{na}\right)\). The processing time is specified in the \(p^{k}_{na}\) function. Limitations in material supply (from external entities) have been considered in \(f_{n0}=m^{k}_{n0}\Big{(}p^{ki}_{n}\Big{)}=Q\) in constraint (3). So, the solution found by our proposed method will satisfy the constraints due to limitations in material supply from external entities. To assess the efficiency of the proposed approach, the computational complexity of the proposed method is analyzed. The procedures involved in the proposed method to generate contextual information include the DTPN to Graph Transformation (DTPN2 GT). Algorithm, the algorithm to solve Problem 3, the Context Generation Algorithm and the negotiation protocol used. For a given negotiation protocol, the complexity of the DTPN to Graph Transformation (DTPN2 GT) Algorithm and the Context Generation Algorithm are analyzed as follows. Note that the DTPN to Graph Transformation (DTPN2 GT) Algorithm constructs a \((K_{n}+1)\times T\) matrix of nodes in addition to a source node and a sink node for the graph \(DG_{n}(V_{n},E_{n})\).