## 4 Configuration/Scheduling Feasibility Problem and Context Generation Problem in CPS
Therefore, the Configuration/Scheduling Feasibility Problem (CSFP) will be formulated based on distributed computing architecture to take advantage of divide-and-conquer strategy. We will propose a method to find a set \(WA^{*}\) of process agents, a set \(RA^{*}\) of resource agents and the firing sequence \(S_{a}\) for each agent \(a\) in \(RA^{*}\) in distributed multi-agent system architecture by applying the multi-level contract net protocol based on transformation of Cyber World models. The multi-level contract net protocol will be initiated by a task agent that represents an order. The task agent will send an RFP message to potential process agents that can produce the requested type of products. A potential process agent will send an RFP message to potential resource agents to acquire the required resources. Based on the potential process agent and the resource agents acquired, a DTPN model, \(\Psi_{n}\), will be constructed. It is necessary to determine whether there exists a firing sequence \(S_{n}\) for \(\Psi_{n}\) such that the final transition \(t_{nf}\) of \(\Psi_{n}\) is the last firing sequence in \(S_{n}\) and can be fired by the deadline. If there exists a firing sequence \(S_{n}\) for \(\Psi_{n}\) to fire \(t_{nf}\) by the deadline, the process agent will send an RFP message to potential process agents at its upstream. The processes repeats until a solution is found. To support the above solution processes, we formulate a subproblem for each process agent. Each process agent will attempt to solve a subproblem based on collaboration with other resource agents and process agents according to the dependency on other processes and resources. We will study the condition for the existence of a solution based on solutions of subproblems. A problem formulation for the Configuration/Scheduling Feasibility Problem (CSFP) of each process agent based on the Cyber World model, DTPN \(\Psi_{n}\)=\(\left(P_{n},T_{n},F_{n},m_{n0},H_{n}\right)=\left\|{}_{k\in\{1,2,\ldots,K_{n}\}} \left(\Omega_{n}^{k}\right)_{a\in\mathbb{R}_{n}^{k}}A_{n}^{k}\right)\) is stated as follows:  
**Problem 1**. : _Configuration/Scheduling Feasibility Problem Formulation for Individual Process Agent based on DTPN Model: Given the requested product quantity \(Q\), the deadline \(\theta\) set by the downstream product agent and a DTPN model \(\Psi_{n}\), determine whether there exists a set of resource agent, \(RA_{n}^{*}\), a firing sequence \(S_{n}\) for \(\Psi_{n}\) such that the final transition \(t_{nf}\) of \(\Psi_{n}\) is the last firing sequence in \(S_{n}\) and is fired \(Q\) times by the deadline._  
6 A Condition for Configuration/Scheduling Feasibility Based on Transformation of Cyber World Models  
Although the DTPN based Cyber World models defined above can capture the behaviors of agents, activities and resources, it is difficult to develop a solution algorithm to solve Problem 1 based on DTPN models. Therefore, we will transform a DTPN to a graph model and then find a solution based on the graph model. In this section, we first propose an algorithm to transform a DTPN to a graph model and study the properties that establish the connection between the DTPN and the graph model. Based on the properties, the problem to determine whether there exists a firing sequence \(s_{n}\) of \(\Psi_{n}\) and firing \(s_{n}\) will bring \(\Psi_{n}\) to a desired marking by a deadline can be formulated as an optimization problem defined on the graph model. Finally, we establish a configuration/scheduling feasibility condition based on the solution of the optimization problem. Suppose the time horizon is \(T\). The dynamics of a DTPN Cyber World model \(\Psi_{n}=(P_{n},T_{n},F_{n},m_{n0},\mu_{n})\) of RMS can be described by the marking \(m_{nt}\) at different time period \(t\), where \(t\in\{1,\,2,\,\ldots,\,T\}\). We first illustrate how to represent marking \(m_{nt}\) at different time period \(t\) by a graph \(DG_{n}(V_{n},E_{n})\).