## 3 Distributed Method
### Distributed Method
\tag{12c}\]  
where \(\theta\) denotes \(p\) or \(pq\), \(\vartheta\) denotes \(qp\) or \(q\), and \(t=2k\) or \(2k+1\). In addition, we let \(\Phi=\left[\lambda_{i}^{\theta},z_{i}^{\theta},x_{i}^{\theta},y_{i}^{\theta}\right]\) (\(\Theta=\left[\lambda_{i}^{\theta},z_{i}^{\theta},x_{i}^{\theta},y_{i}^{\theta}\right]\)) represent all the variables relating to heat (electrical) power. Equation (11) shows the updating rules for \(\Theta(2k)\). In this step, the purpose is to make \(\Theta\) go to the optimal solution, meanwhile \(\Phi(2k)=\Phi(2k-1)\) so that they can be seen as unchanged for further updating \(\Theta\). The detailed updating processes are as the following statements. Firstly, \(\lambda_{i}^{qp}(2k)\) and \(\lambda_{i}^{q}(2k)\) in Equation (11a) compose to the first consensus protocol, which includes consensus part and feedback part. The consensus part is associated to row stochastic \(\overline{R}\) which drives \(\lambda_{i}^{qp}(2k)\) and \(\lambda_{i}^{q}(2k)\) to a common value. The feedback part includes \(\eta\gamma_{i}^{qp}(2k-1)\) and \(\eta\gamma_{i}^{q}(2k-1)\) which can let HOAs and CGAs change their incremental cost to satisfy the electrical power supply-demand balance to further obtain the optimal \(\lambda_{q}^{*}\). That is, each HOA or CGA decrease (or increase) its corresponding heat incremental cost and heat power output when \(y_{i}^{q}(2k-1)\) or \(y_{i}^{qp}(2k-1)\) is negative (or positive) for the common value further adjustment to \(\lambda_{q}^{*}\). Secondly, according to Equation (8), \(z_{i}^{qp}(2k)\) and \(z_{i}^{q}(2k)\) in Equation (11b) are used to update the estimated heat power outputs before considering the inequality constraints. Then, according to Equation (9), Equation (11c) defines the projection operators to take account of the inequality constraints, on the basis of the first assumption that \(x_{i\_w\_min}^{pq}\leq x_{i}^{pq}(2k-1)\leq x_{i\_w\_max}^{pq}\) must be satisfied. Finally, inspired by literature [21], \(y_{i}^{qp}(2k)\) and \(y_{i}^{q}(2k)\) in Equation (11d) are used to update the estimated the heat power mismatch in a fully distributed fashion, which will be used to adjust the heat power incremental cost in the next cycle. Similarly, Equation (12) shows the updating rules for \(\Phi(2k+1)\) meanwhile \(\Theta(2k+1)=\Theta(2k)\). \(\lambda_{i}^{p}(2k+1)\) and \(\lambda_{i}^{pq}(2k+1)\) in Equation (12a) compose to the second modified consensus protocol which also includes its corresponding consensus part associated to row stochastic \(R\) and feedback part (i.e., \(\eta y_{i}^{p}(2k)\) and \(\eta y_{i}^{pq}(2k)\)) to obtain the optimal \(\lambda_{p}^{*}\). \(z_{i}^{p}(2k+1)\), \(z_{i}^{pq}(2k+1)\) in Equation (12b) and \(x_{i}^{p}(2k+1)\), \(x_{i}^{pq}(2k+1)\) in Equation (12c) are used to update the estimated electrical power outputs before and after considering the inequality constraints, respectively, on the basis of the second assumption \(x_{i\_w\_min}^{qp}\leq x_{i}^{qp}(2k)\leq x_{i\_w\_max}^{qp}\). \(y_{i}^{p}(2k+1)\) and \(y_{i}^{pq}(2k+1)\) in Equation (12d) are used to update the estimated the electrical power mismatch. According to the aforementioned statement, we can give the major conclusion as follows. If the studied problem (Equation (4)) is feasible, then the method composed of Equations (11a) -(11c) and (12a) -(12c) is stable. Furthermore, each variable can converge to its optimal value, i.e., \(\lambda_{i}^{q}\rightarrow\lambda_{q}^{*}\), \(\lambda_{i}^{qp}\rightarrow\lambda_{q}^{*}\), \(\lambda_{i}^{pq}\rightarrow\lambda_{p}^{*}\), \(\lambda_{i}^{pq}\rightarrow\lambda_{p}^{*}\), \(x_{i}^{q}\to x_{i}^{q*}\), \(x_{i}^{qp}\to x_{i}^{q*}\), \(x_{i}^{p}\to x_{i}^{p*}\), \(x_{i}^{pq}\to x_{i}^{p*}\) as \(t\rightarrow\infty\) (he proof can be seen in Appendix A). According to Remark 2, for each CGA, the initial values of electrical and heat power outputs, i.e., \(x_{i}^{pq}(0)\) and \(x_{i}^{qp}(0)\), can be set to any values in the corresponding feasible operating region.