## 3 Distributed Optimized Scheduling of EGHS
### Inner Layer ADMM-FE Algorithm  
Generally, ADMM is only used to solve two-operator problems. The electricity-gas-heating system model constructed in this paper is a three-operator problem. If the ADMM is directly extended by the three operators, the calculation result does not necessarily converge. The electricity-gas-heating system optimization problem is as follows:  
\[\left\{\begin{array}{l}\text{min}\varphi_{1}(x)+\varphi_{2}(y)+\varphi_{3}(z )\\ s.t.\,Ax+\mathbf{B}y+\mathbf{C}z=\mathbf{D}\end{array}\right. \tag{33}\]  
In the above, \(x,y,\) and \(z\) are separable three operators. \(\mathbf{A}\), \(\mathbf{B}\), and \(\mathbf{C}\) are the constraint coefficient vectors related to the grid, gas network, and heat grid, respectively. \(\mathbf{D}\) is the parameter vector of the correlation equation.  
Augmented Lagrangian function:  
\[\begin{array}{l}L_{\beta}^{3}(x,y,z,\lambda)=\varphi_{1}(x)+\varphi_{2}(y)+ \varphi_{3}(z)-\\ \lambda(\mathbf{A}x+\mathbf{B}y+\mathbf{C}z-\mathbf{D})+\frac{\eta}{2}\|\mathbf{A}x+\mathbf{B}y+\mathbf{C}z -\mathbf{D}\|_{2}\end{array} \tag{34}\]  
In the above, \(L_{\beta}^{3}(x,y,z,\lambda)\) is an augmented Lagrangian function that introduces Lagrangian multiplier \(\lambda\) and penalty factor \(\eta\).  
The standard ADMM iteration format is as follows:  
\[\left\{\begin{array}{l}x^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x,y ^{k},z^{k},\lambda^{k}\Big{)}|x\in\mathcal{X}\Big{\}}\\ \Big{(}y^{k+1},z^{k+1}\Big{)}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x^{k+1 },y,z,\lambda^{k}\Big{)}|y\in\mathcal{Y},z\in\mathcal{Z}\Big{\}}\\ \lambda^{k+1}=\lambda^{k}-\beta\Big{(}Ax^{k+1}+\mathbf{B}y^{k+1}+\mathbf{C}z^{k+1}+ \mathbf{D}\Big{)}\end{array}\right. \tag{35}\]  
The above formula is a standard ADMM iterative format, and its convergence is guaranteed, but \(y^{k+1}\) and \(z^{k+1}\) are updated synchronously, and distributed computing is not implemented. In order to achieve fully distributed computing, ADMM is directly promoted as follow:  
\[\left\{\begin{array}{l}x^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x,y ^{k},z^{k},\lambda^{k}\Big{)}\Big{\}}\\ y^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x^{k+1},y,z^{k},\lambda^{k} \Big{)}\Big{\}}\\ z^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x^{k+1},y^{k+1},z,\lambda^{k }\Big{)}\Big{\}}\\ \lambda^{k+1}=\lambda^{k}-\beta\Big{(}\mathbf{A}x^{k+1}+\mathbf{B}y^{k+1}+\mathbf{C}z^{k+1 }-\mathbf{D}\Big{)}\end{array}\right. \tag{36}\]  
Comparing Equation (35) with Equation (36), Equation (35) uses \((Ax^{k+1},\,By^{k},\,Cz^{k},\lambda^{k})\) to update \(y^{k+1}\), but Equation (29) uses \((Ax^{k+1},\,By^{k},\,Cz^{k+1},\,\lambda^{k})\) to update \(y^{k+1}\). The equal status of \(y\) and \(z\) is destroyed, resulting in the algorithm may not converge. Therefore, modify the iteration format as follows:  
\[\left\{\begin{array}{l}x^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x,y ^{k},z^{k},\lambda^{k}\Big{)}|x\in\mathcal{X}\Big{\}}\\ y^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x^{k+1},y,z^{k},\lambda^{k} \Big{)}+\frac{\eta}{2}\|\mathbf{D}\Big{(}y-y^{k}\Big{)}\|^{2}\Big{|}y\in\mathcal{Y }\Big{\}}\\ z^{k+1}=\text{argmin}\Big{\{}L_{\beta}^{3}\Big{(}x^{k+1},y^{k},z,\lambda^{k} \Big{)}+\frac{\eta}{2}\|\mathbf{C}\Big{(}z-z^{k}\Big{)}\|^{2}\Big{|}z\in\mathcal{Z }\Big{\}}\\ \lambda^{k+1}=\lambda^{k}-\beta\Big{(}\mathbf{A}x^{k+1}+\mathbf{B}y^{k+1}+\mathbf{C}z^{k+ 1}-\mathbf{D}\Big{)}\end{array}\right. \tag{37}\]  
The above formula updates \(y^{k+1}\) and \(z^{k+1}\) with the same information, guarantees the equal and parallel processing of \(y\) and \(z\), and adds regular items when updating \(y\) and \(z\). The meaning is to add a self-constraining mechanism to the variable to correct the variables. The improved ADMM algorithm guarantees the convergence of the algorithm by forcing equal updates of the variables. The improved algorithm is ADMM-FE.