## 2 Modeling and Problem Formulation
### A Multi-Agent System Architecture and Models of Agents in CPSs

Table 1: Notations used in the models and problem formulation. The requirements of a process agent \(n\in WA\) in the CPS are specified by the operations and the connection between operations. We construct the Cyber World model for the \(k\)-th operation of process agent \(n\in WA\) and the Cyber World model for process agent \(n\in WA\) as follows. In this paper, we adopt Discrete Timed Petri Nets (DTPNs) to represent the Cyber World model of an activity. A DTPN \(G\) is described by \(G=(P,T,F,m_{0},\mu)\), where \(P\) denotes a set of places, \(T\) denotes a set of transitions, \(F\subseteq(P\times T)\cup(T\times P)\) denotes a set of flow relations, \(m_{0}\) denotes the initial marking, the function \(\mu:T\to Z\) specifies the firing time for each transition and \(Z\) is the set of nonnegative integers. Definition 1: The Cyber World model for the \(k\)-th operation of process agent \(n\in WA\) is a DTPN \(\Omega_{n}^{k}=(P_{n}^{k},T_{n}^{k},F_{n}^{k},m_{n0}^{k},\mu_{n}^{k})\) with \(T_{n}^{k}=\left\{t_{ns}^{k},t_{n}^{k}\right\}\) and \(P_{n}^{k}=\left\{p_{n}^{kb}\right\}\), where \(t_{ns}^{k}\) denotes the start transition, \(t_{ne}^{k}\) denotes the end transition, \(p_{n}^{kb}\) denotes the busy state place of the \(k\)-th operation and \(\mu_{n}^{k}\) denotes a function specifying the firing time of each transition in \(T_{n}^{k}\). For the motivating example, to represent the operations, a model is constructed for each operation. As there are five operations for the workflow \(\Omega_{n}\) of process agent \(n\), we will construct models, \(\Omega_{n}^{1}\), \(\Omega_{n}^{2}\), \(\Omega_{n}^{3}\), \(\Omega_{n}^{4}\) and \(\Omega_{n}^{5}\), to represent these five operations. Figure 1a-e show the DTPN models \(\Omega_{n}^{1}\), \(\Omega_{n}^{2}\), \(\Omega_{n}^{3}\), \(\Omega_{n}^{4}\) and \(\Omega_{n}^{5}\) for the first operation, the second operation, the third operation, the fourth operation and the fifth operation, respectively. For the example in Figure 1, the start transition of \(\Omega_{n}^{1}\) is \(t_{1s}^{1}=t_{1}\) and the end transition of \(\Omega_{n}^{1}\) is \(t_{1e}^{1}=t_{2}\). The start transition of \(\Omega_{n}^{2}\) is \(t_{1s}^{2}=t_{2}\) and the end transition of \(\Omega_{n}^{2}\) is \(t_{1e}^{2}=t_{3}\). Similarly, \(t_{1s}^{3}=t_{3}\), \(t_{1e}^{3}=t_{4}\), \(t_{1s}^{4}=t_{4}\), \(t_{1e}^{4}=t_{5}\), \(t_{1s}^{5}=t_{5}\) and \(t_{1e}^{5}=t_{6}\). The busy state place of \(\Omega_{n}^{1}\) is \(p_{1}^{1b}=p_{1}\), the busy state place of \(\Omega_{n}^{2}\) is \(p_{1}^{2b}=p_{2}\), the busy state place of \(\Omega_{n}^{3}\) is \(p_{1}^{3b}=p_{3}\), the busy state place of \(\Omega_{n}^{4}\) is \(p_{1}^{4b}=p_{4}\) and the busy state place of \(\Omega_{n}^{5}\) is \(p_{1}^{5b}=p_{5}\). To construct the Cyber World model for process agent \(n\), we combine the Cyber World models of the operations involved. A \"\(\|\)\" operator is defined to combine two DTPNs. \begin{table}
\begin{tabular}{c c} \hline \hline
**Symbol/Variable** & **Meaning** \\ \hline \(E\) & A notation to represent the energy consumption of the set of all bids, \(E_{aj}\), where \(a\in\{1,2,3,\ldots,|A|\}\) \\  & and \(j\in\{1,2,3,\ldots,J_{a}\}\) \\ \hline \(q_{ak}\) & The maximum number of times that the operation \(k\) can be performed by agent \(a\) \\ \hline \(x_{aj}\) & The decision variable of the optimization problem. The value of \(x_{aj}\) is one if the \(j\)-th bid of agent \(a\) is accepted and is zero otherwise.