## 4 Configuration/Scheduling Feasibility Problem and Context Generation Problem in CPS
Similar to dependency among workflows, dependency among workflows and resources also results in complex interactions between process agents and resource agents in the problem solving processes. As \(W1\) depends on resource agents \(R1\) and \(R2\), interactions among \(W1\), \(R1\) and \(R2\) are shown in Figure 5b. As \(W2\) depends on resource agent \(R3\), interactions among \(W2\) and \(R3\) are shown in Figure 5c. As \(W3\) depends on resource agents \(R4\) and \(R5\), interactions among \(W3\), \(R4\) and \(R5\) are shown in Figure 5d. Figure 4: The flowchart to handle messages by a process agent. Note that the development of methods/solution algorithms for the Configuration/Scheduling Feasibility Problem (CSFP) and the Context Generation Problem (CGP) for CPS requires the use of Cyber World models to facilitate the decision making processes. Construction of relevant Cyber World models for CPS will be introduced next. 5 Configuration/Scheduling Feasibility Problem Formulation Based on Cyber World Models of RMS in CPS  
Construction of the Cyber World models \(\Omega_{n}^{k}\) for all operations \(k\) of all process agent \(n\in WA\) and the Cyber World models for all activities performed by all resource agent \(a\in RA\) will be introduced in this section. The Cyber World models are used to achieve the following objectives: (1) Specify the activities or operations to be performed by different types of agents, (2) formulate the configuration/scheduling feasibility problem and (3) generate and represent the contextual information provided to guide resources/workers in CPS. This section details the Cyber World models for the entities in CPS. The configuration/scheduling problem formulation and generation of contextual information for resources/workers will be presented later. Figure 5: (**a**) Interactions between the task agent and process agents. (**b**) Interactions between process agent \(W1\) and resource agents \(R1\) and \(R2\). (**c**) Interactions between process agent \(W2\) and resource agent \(R3\). (**d**) Interactions between process agent \(W3\) and resource agents \(R4\) and \(R5\). As there are different types of entities in CPS, we will propose the Cyber World models for each type of entities, including the Cyber World models for process agents and the Cyber World models for resource agents. To facilitate modeling and analysis, these Cyber World models are represented based on a class of Petri nets. As timing is an important characteristic that needs to be captured in the Cyber World models, we adopt discrete timed Petri nets (DTPN) [41] to construct these models. A DTPN \(G\) is described by a set of places, \(P\), a set of transitions, \(T\), a set of flow relation, \(F\subseteq(P\times T)\cup(T\times P)\), an initial state or initial marking, \(m_{0}\), and firing time for each transition specified by \(\mu:T\to Z\), where \(Z\) is the set of nonnegative integers. A DTPN \(G\) can be described concisely by a five-tuple \(G=(P,T,F,m_{0},\mu)\) in which the initial marking \(m_{0}:P\to Z^{|P|}\). A marking \(m\in Z^{|P|}\) of \(G\) represents a state of the system indicating the number of tokens in each place. For transition \(t\) in \(T\), the set of input places of transition \(t\) is represented by \({}^{\bullet}t\) and the set of output places of \(t\) is represented by \(t^{\bullet}\). A transition \(t\) is enabled a marking \(m\) if \(m(P)\geq F(p,t)\forall p\in{}^{\bullet}t\). A transition \(t\) enabled under a marking \(m\) can be fired. Firing a transition \(t\) once will remove one token from each place in \({}^{\bullet}t\) and adds one token to each place in \(t^{\bullet}\). A bottom-up approach is adopted here to construct the Cyber World models. In constructing a Cyber World model with a DTPN, a place is used to represent a state in the workflow and a transition is used to represent an event that can bring the workflow from one state to another.