## 2 Multi-Agent Supply Chain Model
To ensure the stability of this supply chain system and reach consensus, two controllers must be designed to meet the control objectives: the production controller, which adjusts the production rate based on the local conditions of each sub-chain, and the consensus agreement controller, which modifies the production rate through communication with neighboring nodes, facilitating consensus among all agents. **Remark 2**. : _It is important to note that communication between agents is subject to delays. Specifically, the production communication delay between two facilities within the same subchain differs from the consensus communication delay between two subchains. The following section will provide a detailed description of the choice of delay._  
Thus, the controller of the subchain is  
\[ \begin{split} u_{i}(k)&=\dot{u}_{i}(k)+\overline{u}_{i}(k )\\ \dot{u}_{i}(k)&=\hat{K}(x_{i}(k-\tau_{1})-x_{i}(0))+B_{i}^{-1} \hat{b}_{i}\\ \bar{u}_{i}(k)&=\overline{K}\sum_{j\in N_{i}}\alpha_{ij} \big{(}x_{j}(k-\tau_{2})-x_{i}(k-\tau_{2})\big{)}\end{split}  \tag{5}\]  
where \(\hat{K}\) is the production rate gain, \(\bar{K}\) is the consensus gain, and \(\hat{b}_{i}=\big{[}0,...,0,\overline{d}_{in}\big{]}^{\mathsf{T}}\). In addition, \(0\leq\tau_{1}\leq\overline{\tau}_{1}\), \(0\leq\tau_{2}\leq\overline{\tau}_{2}\), where \(\overline{\tau}_{1}\), \(\overline{\tau}_{2}\) is a positive scalar constant and is an upper bound on the time lag, while \(x_{i}(0)\) denotes the inventory control objective of the ith subchain. Substituting (5) into (4) yields the kinetic equation for the ith subchain as  
\[x_{i}(k+1) =(I-\rho_{i})x_{i}(k)+B_{i}\bar{u}_{i}(k)+B_{i}\bar{u}_{i}(k)-d_{i}(k) \tag{6}\] \[x_{i}(k+1) =A_{i}x_{i}(k)+B_{i}\hat{K}\big{(}x_{i}(k-\tau_{1})-x_{i}(0)\big{)} -\overline{K}\sum_{j\in N_{i}}l_{ij}x_{j}(k-\tau_{2})+\omega_{i}(k) \tag{7}\]  
where \(A_{i}=(I-\rho_{i})\), \(\omega_{i}(k)=[0,\ldots,0,-\omega_{in}(k)]^{\mathsf{T}}\), \(l_{ij}\) is the \((i,j)\)th element in the Laplacian matrix \(L\). Figure 1: Subchain i production process with \(n\) facilities. A multi-agent-based supply chain system model can be obtained by aggregating the sub-chains. \[x(k+1)=(I_{N}\otimes A)x(k)+(I_{N}\otimes B\tilde{K})\big{(}x(k-\tau_{1})-x(0) \big{)}-(L\otimes B\tilde{K})x(k-\tau_{2})+\omega(k) \tag{8}\]  
where \(x(k)=[x_{1}^{\rm T}(k),\ldots,x_{N}^{\rm T}(k)]^{\rm T}\), \(\omega(k)=[\omega_{1}^{\rm T}(k),\ldots,\omega_{N}^{\rm T}(k)]^{\rm T}\), and \(L\) is the Laplace matrix of the graph. The average inventory status of the system is \(\overline{x}(k)=(1/N)\sum_{i=1}^{N}x_{i}(k)\), and the error between the inventory state of each agent and the average inventory state is \(\delta_{i}(k)=x_{i}(k)-\overline{x}(k)\). According to Equation (8), we can obtain the error equation for the \(i\)th subchain as  
\[ \begin{split}\delta_{i}(k+1)&=A_{i}\delta_{i}(k)+ B_{i}\tilde{K}(\delta_{i}(k-\tau_{1})-\delta_{i}(0))\\ &-B_{i}\tilde{K}\sum_{j\in N_{i}}l_{ij}\delta_{ji}(k-\tau_{2})+ \omega_{i}(k)-\frac{1}{N}\sum_{j=1}^{N}\omega_{j}(k)\end{split}  \tag{9}\]  
where \(\delta(k)=[\delta_{1}^{\rm T}(k),...,\delta_{N}^{\rm T}(k)]^{\rm T}\). The complete supply chain error system is as follows:  
\[ \begin{split}\begin{cases}\delta(k+1)=\hat{A}\delta(k)+\hat{B}( \delta(k-\tau_{1})-\delta(0))+\overline{B}\delta(k-\tau_{2})+B_{\omega}\omega( k)\\ z(k)=\delta(k)\end{cases}\end{split}  \tag{10}\]  
where \(\hat{A}=(I_{N}\otimes A)\), \(\widehat{B}=\big{(}I_{N}\otimes B\tilde{K}\big{)}\), \(\overline{B}=-(L\otimes B\overline{K})\), and \(z(k)\) is the output of the system. \[B_{\omega}=\left[ \begin{array}{cccc}\dfrac{N-1}{N}&-\dfrac{1}{N}&\ldots&- \dfrac{1}{N}\\ -\dfrac{1}{N}&\dfrac{N-1}{N}&\ldots&-\dfrac{1}{N}\\ \vdots&\vdots&\ddots&\vdots\\ -\dfrac{1}{N}&-\dfrac{1}{N}&\ldots&\dfrac{N-1}{N}\end{array} \right]\]  
**Remark 3**: _In a multi-agent system, the consistency problem can be redefined as a stabilization problem of an error system, where the error is the deviation between the state value of each agent and the target value.