## 3 Distributed Method
### Distributed Method
For convenience, we set the value of point B (\(x_{i\_B}^{pq}\), \(x_{i\_B}^{qp}\)) in Figure 2 as the initial value, i.e., \(x_{i}^{pq}(0)=x_{i\_B}^{pq}\) and \(x_{i}^{qp}(0)=x_{i\_B}^{qp}\). In addition, if bus \(i\) has electrical or heat load only, then it can be assumed that there is a fictitious EOA (or HOA) with \(x_{i\_min}^{p}=x_{i\_max}^{p}=0\) (or \(x_{i\_min}^{q}=x_{i\_max}^{q}=0\)). Then, for each EOA (or HOA), the initial value of electrical (or heat) power output, i.e., \(x_{i}^{p}(0)\) (or \(x_{i}^{q}(0)\), can be any value. Furthermore, we set the corresponding lower bound as its initial value. The initial values of electrical and heat incremental costs, i.e., \(\lambda_{i}^{p}(0)\), \(\lambda_{i}^{pq}(0)\), \(\lambda_{i}^{qp}(0)\) and \(\lambda_{i}^{q}(0)\), which can also be any values, are set as zeros in this paper. In addition, the initial electrical (or heat) power mismatches, i.e., \(y_{i}^{p}(0)\) and \(y_{i}^{pq}(0)\) (or \(y_{i}^{q}(0)\) and \(y_{i}^{qp}(0)\)), are set as the difference between the local electrical (or heat) load demands and the initial electrical (or heat) power outputs. To sum up, each variable is initialized as follows:  
\[\left\{ \begin{array}{l}x_{i}^{p}(0)=x_{i\_min}^{p},x_{i}^{pq}(0)=x_{i\_B}^{ pq},x_{i}^{qp}(0)=x_{i\_B}^{qp},x_{i}^{q}(0)=x_{i\_min}^{q}\\ x_{i}^{p}(0)=\lambda_{i\_0}^{pq}(0)=\lambda_{i}^{qp}(0)=\lambda_{i}^{q}(0)=0\\ y_{i}^{p}(0)=L_{i\_E}-x_{i}^{p}(0),y_{i}^{pq}(0)=L_{i\_E}-x_{i}^{pq}(0),y_{i}^ {qp}(0)=L_{i\_H}-x_{i}^{qp}(0),y_{i}^{q}(0)=L_{i\_H}-x_{i}^{q}(0)\end{array} \right. \tag{13}\]  
**Remark 2:** There are two assumptions which must be satisfied during the updating process. In the even-numbered iteration, we have \(x_{i}^{pq}(2k-1)=z_{i}^{pq}(2k)=x_{i}^{pq}(2k)\). Thus, if the first assumption \(x_{i\_w\_min}^{pq}\leq x_{i}^{pq}(2k-1)\leq x_{i\_w\_max}^{pq}\) is satisfied, then \(x_{i\_w\_min}^{pq}\leq z_{i}^{pq}(2k)\leq x_{i\_w\_max}^{pq}\) which indicates \((z_{i\_w\_max}^{pq}(2k),z_{i\_w\_max}^{qp}(2k))\) is within the area between L1 and L2 as shown in Figure 2. Due to the calculation of \(z_{i}^{qp}(2k)\) without considering the inequality constraints, \((z_{i}^{pq}(2k),z_{i}^{qp}(2k))\) may be out of the feasible operating region, e.g., the point E shown in Figure 2. However, the upper and lower bounds of \(z_{i}^{qp}(2k)\) can be easily obtained, because \(z_{i}^{pq}(2k)\) is known. Then, by using the corresponding projection operator (11c), the infeasible point can be mapped into the feasible operating region to further obtain \((x_{i}^{pq}(2k),x_{i}^{qp}(2k))\), e.g., the point G shown in Figure 2. It is not very difficult to verify that \(x_{i}^{qp}(2k)\) satisfies \(x_{i\_w\_min}^{qp}\leq x_{i}^{qp}(2k)\leq x_{i\_w\_max}^{qp}\). Thus, in the next iteration, the second assumption is satisfied. Then, \((z_{i\_w\_max}^{pq}(2k+1),z_{i\_p}^{qp}(2k+1))\) is within the area between L3 and L4. By using the projection operator 12(c), \((z_{i\_i}^{pq}(2k+1),x_{i\_p}^{qp}(2k+1))\) can be further calculated, which is within the feasible operating region. By such analogy, the two assumptions will be always satisfied if only the initial value of \((x_{i}^{pq}(0),x_{i\_p}^{qp}(0))\) is in the feasible operating region. For clarify, the proposed distributed method is summarized as:  
**Distributed Consensus-Based Method**  
**Initialize:** Each agent initializes all of variables based on Equation (13)  
**Iteration:** (\(t>0\))  
**(1). **: Each agent exchanges the local information of \(\lambda_{i}^{p}\), \(\lambda_{i}^{pq}\), \(\lambda_{i}^{qp}\) and \(\lambda_{i}^{q}\) (and \(y_{i}^{p}\), \(y_{i}^{pq}\), \(y_{i}^{qp}\) and \(y_{i}^{q}\)) with its neighbors. **(2). **: If \(t=2k\) (i.e., in the even-numbered iteration)  
**(2a). **: Update \(\lambda_{i}^{p}\), \(\lambda_{i}^{pq}\), \(\lambda_{i}^{qp}\) and \(\lambda_{i}^{q}\) based on Equation (11a)
**(2b).