## 2 Modeling and Problem Formulation
### A Multi-Agent System Architecture and Models of Agents in CPSs  
In this subsection, we introduce the models of CPSs. A process in a CPS consists of a number of operations. The execution of operations must satisfy their constraints as needed. The operations may be performed by different resources. A multi-agent system architecture is used in this study to model the process-planning problem in CPSs. The entities involved in the process planning of a CPS include process agents, resource agents and optimization agents. Agents interact with each other in the CPS with a multi-level contract net protocol (CNP) [10]. Each process agent specifies the requirements of a production process. A process agent submits a bid to describe the requirements of its production process. Each resource agent in the CPS represents a manufacturing resource that performs operations in the production process. A resource agent submits bids according to its capabilities to perform different operations. An optimization agent aims to determine the configuration of a process agent and relevant resource agents to realize the production process according to the bids of the process agent and resource agents. Using different combinations of resources to perform the required operations typically results in different total processing time and energy consumption for the process. The total processing time and energy consumption of a process are two important characteristics that need to be optimized. To obtain a process with satisfactory characteristics in a CPS, an objective function is required. An objective function that considers both total processing time and energy consumption is defined. Given the objective function, a constrained optimization problem is formulated for the process-planning problem. The problem of planning processes in CPSs is to find the winning bids (the best combination of bids) based on the bids submitted by resources such that the objective function is optimized. To describe the capabilities of agents and formulate the planning problem, a list of notations is defined in Table 1. \begin{table}
\begin{tabular}{c c} \hline
**Symbol/Variable** & **Meaning** \\ \hline \(K_{n}\) & The maximum number of operations in the workflow of process agent \(n\). \\ \hline \(k\) & The index of an operation in the system, where \(k\in\{1,2,3,\ldots,K\}\) \\ \hline \(\omega_{n}\) & The upper bound of total processing time \\ \hline \(d_{nk}\) & If operation \(k\) is required to be performed in the requirements of process agent \(n\), \(d_{nk}\) is equal to 1. Otherwise, \(d_{nk}\) is equal to 0. \\ \hline \(\Reeq_{n}\) & \(\Reeq_{n}\) represents the requirements of the process agent \(n\). \(\Reeq_{n}=(d_{n1},d_{n2},d_{n3},\ldots,d_{nK_{n}},\omega_{n})\), where \(\omega_{n}\) denotes the upper bound of the overall processing time of the process, i.e., the total processing time must be less than or equal to \(\omega_{n}\). \\ \hline \(RA\) & The set of resource agents in the system \\ \hline \(a\) & The index of a resource agent in the system, where \(a\in RA=\{1,2,3,\ldots,|RA|\}\) \\ \hline \(j\) & The index of a bid submitted by an agent \\ \hline \(J_{a}\) & The number of bids submitted by agent \(a\) \\ \hline \(o_{ajk}\) & \(o_{ajk}\) is one if operation \(k\) can be performed by agent \(a\) in the \(j\)-th bid; \(o_{ajk}\) is zero otherwise. \\ \hline \(B_{aj}\) & The \(j\)-th bid submitted by agent \(a\) with \(B_{aj}=\left(o_{aj1},o_{aj2},o_{aj3},\ldots,o_{ajk},\tau_{aj}\right),\) where \(\tau_{aj}\) is the overall processing time for performing the specified operations in the bid \\ \hline \(B\) & A notation to represent the set of all bids, \(B_{aj}\), where \(a\in\{1,2,3,\ldots,|A|\}\) and \(j\in\{1,2,3,\ldots,J_{a}\}\) \\ \hline \(E_{aj}\) & The energy consumption of the \(j\)-th bid submitted by agent \(a\) with \(E_{aj}=\left(o_{aj1},o_{aj2},o_{aj3},\ldots,o_{ajK},e_{aj}\right),\) where \(e_{aj}\) is the overall energy consumption for performing the specified operations in the bid \\ \hline \end{tabular}
\end{table}