## 4 Configuration/Scheduling Feasibility Problem and Context Generation Problem in CPS  
In this section, we will state the configuration/scheduling feasibility problem and context generation problem in CPS. As the CPS consists of distributed resources, including machines, robots and workers interacting with each other autonomously based on the workflows to be performed, multi-agent systems (MAS) architecture is adopted to capture these characteristics and formulate these problems. To support interactions and negotiation of agents, it is assumed that a multi-level contract net protocol (CNP) based on [36] is used in the CPS. The multi-level CNP has specified the details about task announcement, bidding mechanism, contract awarding and negotiation. Therefore, we adopt the multi-level CNP in this study without re-inventing the wheel. The proposed multi-agent system architecture consists of a set of resource agents and a set of process agents which work collaboratively to perform the operations specified by the task agent according to the orders received. To state the configuration/scheduling feasibility problem and the context generation problem in CPS, the notations in Table 1 are defined. We will defer the details of the notations above to later section to avoid distracting readers' attention away from the problems to be addressed in this study. For example, construction of the Cyber World models \(\Omega_{n}^{k}\) for all operations \(k\) of process agent \(n\in WA\) and the Cyber World models for all activities performed by resource agent \(a\in RA\) will be introduced in later section. Let \(\Omega=\left\{\Omega_{n}^{k}\right\}\) denote the set of Cyber World models for all process agents in \(WA\). Let \(A=\left\{A_{na}^{k}\right\}\) denote the set of Cyber World models for all activities performed by resource agents in \(WA\). Based on the notations introduced above, suppose the Cyber World models \(\Omega=\left\{\Omega_{n}^{k}\right\}\) for all operations of all process agents in \(WA\) and the Cyber World models \(A=\left\{A_{na}^{k}\right\}\) for all activities performed by all resource agents in \(RA\) are given. The configuration/scheduling feasibility problem and the context generation problem are stated as follows, respectively:  
Configuration/Scheduling Feasibility Problem (CSFP):  
Given orders with product demand quantity \(Q\) and due date \(\theta\), a set of resource agents \(RA\), a set of process agents \(WA\) and the Cyber World models \(\Omega=\left\{\Omega_{n}^{k}\right\}\) and \(A=\left\{A_{na}^{k}\right\}\), determine whether there exist a set of process agents, \(WA^{*}\), a set of resource agents, \(RA^{*}\) and associated schedule \(S_{a}\) for each agent \(a\) in \(RA^{*}\) to meet the product demand by the due date \(\theta\), where \(WA^{*}\subseteq WA\) and \(RA^{*}\subseteq RA\). The context generation problem to be studied in this paper is to generate context-ware information to guide resources/workers. Context Generation Problem (CGP):  
Generate contextual information for each agent \(a\) in \(RA^{*}\) based on the associated schedule \(S_{a}\). As no single agent can solve the above mentioned problem alone, collaboration among agents is necessary to solve the problems. The problems stated above rely on the development of solution algorithms based on interactions of agents in CPS in conjunction with application of optimization methods by individual agents to solve the problems. We will first present the interactions among agents in the problem solving processes and defer the details of the development of solution algorithms for the above problems until later sections. Each workflow consists of one or more operations and there exists precedence constraints and among operations in each workflow. Moreover, there are precedence constraints among workflows as shown in Figure 2(a). To perform an operation, a resource is needed. Therefore, there exists dependency among operations and resources as shown in Figure 2(b).