Good day, and thank you so much for this incredible tool!
Our university is now using the Microsoft online suite for email, etc - and because of this our smtp server is now "outlook.office365.com" whereas our old one was "smtp.wmich.edu"
Unfortunately, when I change the SMTP information to the new server, the email notification no longer works. I get an timed-out type error when I click on the TEST button.
I spoke with our university's help desk, and they are guessing that it might have something to do with Outlook's requirement of using TLS 1.2. Does anyone else out there use outlook.office365.com successfully?
Might there be any plans to update Silence Detector to these newer security standards?
Well.... color me red. I figured out my problem by reading more of your answers... thanks everyone!


text:
both Corn and Clover were forced to remember the ancient saying: "And this, too, shall pass away." King Corn began to complain again that his bed was getting hard and that the food furnished him was not sufficient. Queen Clover replied that she, too, was suffering from hunger, and that her home in the soil which had always been sweet and clean was becoming sour.
Naturally, Queen Clover was much more sensitive to this condition than King Corn, but she had done the best she could with what she had found in the soil and she had also secured for herself one choice kind of food from the air, and even prepared it for the King so far as she could.
But, in spite of all they could do, Queeen Clover's health began to fail; and some years she was entirely helpless, and consequently King Corn suffered greatly. They consulted many doctors. Some said the soil needed more drainage; others said the seed-bed should be better prepared; and still others advised the use of better seed and of more thorough cultivation.
All of these remedies proved helpful, but they afforded only temporary relief. At last Queen Clover said to the king that when she was a child a doctor, whose name was Science, had once visited her family, and that whatever he did was exactly right because his knowledge was true and absolute. He had shown them that all of the members of the Clover family were able to secure nitrogen from the air, and that this was one of the essential foods for plants.
The king and queen were greatly rejoiced to learn that the old doctor was still living, and they at once secured his services.
After a thorough investigation of the conditions. Doctor Science reported that he understood the case and that the remedy was simple and still within easy reach, but that they should proceed at once to apply the treatment before it became too late.
"The fundamental trouble," said he to King Corn, "is with the soil in which you live. In order to establish a permanent and healthful home for yourself and Queen Clover, about one half ton per acre of pure steamed bone meal, or of fine-ground natural rock phosphate, and two tons per acre of ground limestone should be applied once every four or five years. Then don't occupy the land too much of the time yourself, but bring in other crops and have a rotation—such as corn, oats and clover, or corn, wheat and clover for a three-year rotation; or wheat, corn, oats and clover (in grain farming), or corn, corn, oats and clover (in live-stock farming), for a four-year rotation. In the four-year rotation for grain farming a catch crop of clover may also be seeded on the wheat ground and plowed under the next spring for corn, and the regular clover crop in the fourth year may be mowed once or twice and left lying on the land, the seed crop afterward being harvested with a buncher attached to the mower.

redpajama_set_name: RedPajamaCommonCrawl


BSIDL has an in-house team of experienced associates and advisors with rich experience and expertise in diverse sectors.
As a partner in progress, BSIDL has access to the vast knowledge resource pool of the SREI Group companies and its affiliates. For efficient and effective delivery of advisory assignments, the BSIDL team has at its disposal the vast database of database of advisory resources and cross-functional advisory skill sets of Srei Group companies.
BSIDL maintains a healthy and progressive relationship with reputed R&D, academic institutions and individual experts to facilitate holistic planning and development of sustainable Urban, Industrial & Social infrastructure.
Ph.D, Ex-Advisor, Planning Commission and CEO - Infrastructure Advisory - Srei Infrastructure Finance Ltd.
MA (Econ), LLB, MBA(IIMC), Ex. Chairman & Managing Director, West Bengal Consultancy Organisation Ltd. - CEO, Bengal Srei Infrastructure Development Ltd. and Head, Infrastructure Advisory Division (Eastern Region) of Srei Infrastructure Finance Ltd.


text:
\section{}\label{app:newsolver}

Denote $z_1:=\mathbf{Re}(S_i^{(z)})$, $z_2:=\mathbf{Im}(S_i^{(z)})$, $z_3:=\sqrt{\frac{|C_i|+1}{2}}v_i^{(z)}$ and $z_4:=\ell_i^{(z)}$. Then the optimization problem \eqref{eq:zagent1} can be written equivalently as
\begin{subequations} \label{eq:zagent1_2}
\begin{eqnarray}
\min && \sum_{i=1}^4(z_i^2+c_iz_i) \label{eq:obj1}\\
\mathrm{over} && z  \nonumber \\
\mathrm{s.t. } && \frac{z_1^2+z_2^2}{z_3}\leq k^2 z_4   \label{eq:con11}\\
&& \underline z_3 \leq z_3\leq \overline z_3  \label{eq:con12}
\end{eqnarray}
\end{subequations}
where $\overline z_3> \underline z_3> 0$ and $c_i$, $k$ are constants that hinges on the constants in \eqref{eq:zagent1}.

Below we will derive a procedure that solves \eqref{eq:zagent1_2}. Let $\mu\geq 0$ denote the Lagrangian multiplier for constraint \eqref{eq:con11} and $\underline \lambda,\overline \lambda\geq 0$ denote the Lagrangian multipliers for constraint \eqref{eq:con12}, then the Lagrangian of P1 is
\begin{eqnarray*}
L(z,\mu,\lambda)=\sum_{i=1}^4(z_i^2+c_iz_i)+\mu\left( \frac{z_1^2+z_2^2}{z_3}-k^2z_4\right)+ \overline \lambda(z_3-\overline z_3)-\underline \lambda(z_3-\underline z_3)
\end{eqnarray*}

The KKT optimality conditions imply that the optimal solution $z^*$ together with the multipliers $\mu^*,\underline \lambda^*,\overline \lambda^*$ satisfy the following equations. For ease of notations, we sometimes skip the superscript $\star$ of the variables in the following analysis.
\begin{subequations}\label{eq:kkt1}
\begin{align}
&2z_1+c_1+2\mu\frac{z_1}{z_3}=0\\
&2z_2+c_2+2\mu\frac{z_2}{z_3}=0\\
&2z_3+c_3-\mu\frac{z_1^2+z_2^2}{z_3^2}+\overline \lambda-\underline \lambda=0\\
&2z_4+c_4-k^2\mu=0\\
& \overline \lambda(z_3-\overline z_3)=0 \quad \overline \lambda\geq 0 \quad z_3\leq \overline z_3 \\
& \underline \lambda(\underline z_3-z_3)=0 \quad \underline \lambda\geq 0 \quad z_3\geq \underline z_3 \\
& \mu\left( \frac{z_1^2+z_2^2}{z_3}-k^2z_4\right)=0 \quad \mu\geq 0 \quad \frac{z_1^2+z_2^2}{z_3}\leq k^2z_4
\end{align}
\end{subequations}

\begin{lemma}\label{lem:p1unique}
There exists a unique solution $(z^*,\mu^*,\underline \lambda^*,\overline \lambda^*)$ to \eqref{eq:kkt1} if $\overline z_3> \underline z_3\geq 0$.
\end{lemma}
\begin{IEEEproof}
P1 is feasible since $z=(0,0,\underline z_3,1)$ satisfies  \eqref{eq:con11}-\eqref{eq:con12}. In addition, P1 is a strictly convex optimization problem since the objective \eqref{eq:obj1} is a strictly convex function of $z$ and the constraints \eqref{eq:con11} and \eqref{eq:con12} are also convex. Hence, there exists a unique solution $z^*$ to P1, which indicates there exists a unique solution $(z^*,\mu^*,\underline \lambda^*,\overline \lambda^*)$ to the KKT optimality conditions \eqref{eq:kkt1}.
\end{IEEEproof}

Lemma \ref{lem:p1unique} says that there exists a unique solution to \eqref{eq:kkt1}, which is also the optima to P1. In the following, we will solve \eqref{eq:kkt1} through enumerating value of the multipliers $\mu,\overline\lambda,\underline\lambda$. Specifically, we first assume $\mu^*=0$ (Case 1 below), which is equivalent to assume constraint \eqref{eq:con11} is inactive. If there is a feasible solution to \eqref{eq:kkt1}, it is the unique solution to \eqref{eq:kkt1}. Otherwise, we assume $\mu^*=0$ (Case 2 below), which is equivalent to assume that the equality is obtained at optimality in \eqref{eq:con11}.

\flushleft\textbf{Case 1:} If $\mu=0$, \eqref{eq:kkt1} becomes
\begin{subequations}\label{eq:case1}
\begin{align}
&2z_1+c_1=0 \label{eq:case11}\\
&2z_2+c_2=0\\
&2z_3+c_3+\overline \lambda-\underline \lambda=0\\
&2z_4+c_4=0 \label{eq:case14}\\
& \overline \lambda(z_3-\overline z_3)=0 \quad \overline \lambda\geq 0 \quad z_3\leq \overline z_3 \label{eq:case15}\\
& \underline \lambda(z_3-\underline z_3)=0 \quad \underline \lambda\geq 0 \quad z_3\geq \underline z_3  \label{eq:case16}\\
& \frac{z_1^2+z_2^2}{z_3}\leq k^2z_4 \label{eq:case17}
\end{align}
\end{subequations}
The solution to \eqref{eq:case11}--\eqref{eq:case16} ignoring \eqref{eq:case17} is
\begin{align*}
&z_1=-\frac{c_1}{2}, \ z_2=-\frac{c_2}{2}, \ z_3=\left[-\frac{c_3}{2}\right]_{\underline z_3}^{\overline z_3},  \ z_4=-\frac{c_4}{2}\\
& \overline \lambda=-(2z_3+c_3)1_{\{z_3=\overline z_3\}}, \underline \lambda=-(2z_3+c_3)1_{\{z_3=\underline z_3\}}
\end{align*}
and if the solution satisfies \eqref{eq:case17}, it is the solution to \eqref{eq:kkt1}. Otherwise, we go to Case 2.

\flushleft\textbf{Case 2:} If $\mu>0$, \eqref{eq:kkt1} becomes
\begin{subequations}\label{eq:kkt2}
\begin{align}
&2z_1+c_1+2\mu\frac{z_1}{z_3}=0\label{eq:kkt21}\\
&2z_2+c_2+2\mu\frac{z_2}{z_3}=0\label{eq:kkt22}\\
&2z_3+c_3-\mu\frac{z_1^2+z_2^2}{z_3^2}+\overline \lambda-\underline \lambda=0\label{eq:kkt23}\\
& \overline \lambda(z_3-\overline z_3)=0 \quad \overline \lambda\geq 0 \quad z_3\leq \overline z_3 \\
& \underline \lambda(z_3-\underline z_3)=0 \quad \underline \lambda\geq 0 \quad z_3\geq \underline z_3 \label{eq:kkt25}\\
&\mu=\frac{1}{k^2}(2z_4+c_4)\label{eq:kkt26}\\
&z_4=\frac{z_1^2+z_2^2}{k^2z_3} \label{eq:kkt27}
\end{align}
\end{subequations}
Substitute \eqref{eq:kkt27} into \eqref{eq:kkt26}, we obtain
\begin{eqnarray}\label{eq:kkt28}
\mu=\frac{1}{k^2}(2z_4+c_4)=\frac{2(z_1^2+z_2^2)}{k^4z_3}+\frac{c_4}{k^2}
\end{eqnarray}
Then substituting \eqref{eq:kkt26} into \eqref{eq:kkt21}-\eqref{eq:kkt25}, we can write \eqref{eq:kkt2}  equivalently as

\begin{subequations}\label{eq:kkt3}
\begin{align}
&2+\frac{c_1}{z_1}+4\frac{(z_1^2+z_2^2)}{k^4z_3^2}+\frac{2c_4}{k^2z_3}=0 \label{eq:kkt31}\\
&2+\frac{c_2}{z_2}+4\frac{(z_1^2+z_2^2)}{k^4z_3^2}+\frac{2c_4}{k^2z_3}=0\label{eq:kkt32}\\
&2+\frac{c_3}{z_3}-2\frac{(z_1^2+z_2^2)^2}{k^4z_3^4}-c_4\frac{z_1^2+z_2^2}{z_3^3}+\frac{\overline \lambda-\underline \lambda}{z_3}=0\label{eq:kkt33}\\
& \overline \lambda(z_3-\overline z_3)=0 \quad \overline \lambda\geq 0 \quad z_3\leq \overline z_3 \\
& \underline \lambda(z_3-\underline z_3)=0 \quad \underline \lambda\geq 0 \quad z_3\geq \underline z_3
\end{align}
\end{subequations}
where \eqref{eq:kkt31}--\eqref{eq:kkt33} are obtained through dividing both sides of \eqref{eq:kkt21}--\eqref{eq:kkt23} by $z_1$, $z_2$ and $z_3$, respectively. The variables $\mu,z_4$ can be recovered via \eqref{eq:kkt26} and \eqref{eq:kkt27} after we solve \eqref{eq:kkt3}.

By \eqref{eq:kkt31} and \eqref{eq:kkt32},
\begin{eqnarray*}
\frac{c_1}{z_1}=\frac{c_2}{z_2}
\end{eqnarray*}
Denote $p:=\frac{z_1}{c_1z_3}=\frac{z_2}{c_2z_3}$. Then \eqref{eq:kkt3} is equivalent to the following equations.
\begin{subequations}\label{eq:kkt4}
\begin{align}
&p=\frac{z_1}{c_1z_3}=\frac{z_2}{c_2z_3} \label{eq:kkt41}\\
&2+\frac{1}{pz_3}=-\left(\frac{4(c_1^2+c_2^2)}{k^4}p^2+2\frac{c_4}{k^2z_3}\right) \label{eq:kkt42}\\
&2+\frac{c_3}{z_3}=\frac{2(c_1^2+c_2^2)^2}{k^4}p^4+\frac{c_4(c_1^2+c_2^2)}{k^2}\frac{p^2}{z_3}+\frac{\underline \lambda-\overline \lambda}{z_3}\label{eq:kkt43}\\
& \overline \lambda(z_3-\overline z_3)=0 \quad \overline \lambda\geq 0 \quad z_3\leq \overline z_3 \\
& \underline \lambda(z_3-\underline z_3)=0 \quad \underline \lambda\geq 0 \quad z_3\geq \underline z_3
\end{align}
\end{subequations}
where $\eqref{eq:kkt42}$ is obtained by substitute $z_2=c_2pz_3$ into \eqref{eq:kkt32}, \eqref{eq:kkt43} is obtained by substitute $z_1=c_1pz_3$ and $z_2=c_2pz_3$ into \eqref{eq:kkt33}. To solve \eqref{eq:kkt4}, we further divide our analysis into two sub-cases depending on whether $z_3^*$ hits the lower or upper bound.

\begin{itemize}
\item {\bf Case 2.1}: $z_3^*=\overline z_3$. $(\underline \lambda=0,\overline\lambda>0)$ ( The case of $z_3^*=\underline z_3$ can be solved using similar procedure.) \\
We first substitute $z_3=\overline z_3$ into \eqref{eq:kkt42} and  have
\begin{eqnarray}
\frac{4(c_1^2+c_2^2)}{k^4}p^3+\left(2\frac{c_4}{k^2\overline z_3}+2\right)p+\frac{1}{\overline z_3}=0,
\end{eqnarray}
whose solution\footnote{\label{footnote:1}There are potentially multiple solutions and we need to check all the real solution $p^*$ using the following procedure.} is denoted by $p^*$. Then substitute $p^*$ and $\overline z_3$ into \eqref{eq:kkt41}, we can recover $z_1^*$ and $z_2^*$. Then we can obtain $\mu^*,\overline \lambda^*$ using \eqref{eq:kkt28} and \eqref{eq:kkt33} by substituting $z_1^*,\ldots,z_4^*$. If $\mu^*,\overline \lambda^*\geq0$, they collectively solve \eqref{eq:kkt1}. Otherwise, we go to Case 2.2.

\item {\bf Case 2.2}: $\underline z_3<z_3^*<\overline z_3$ $(\underline \lambda,\overline\lambda=0)$.\\
Since $\overline \lambda$ and $\underline \lambda=0$, \eqref{eq:kkt4} reduces to
\begin{subequations}\label{eq:kkt5}
\begin{align}
&p=\frac{z_1}{c_1z_3}=\frac{z_2}{c_2z_3} \label{eq:kkt51}\\
&2+\frac{1}{pz_3}=-\left(\frac{4(c_1^2+c_2^2)}{k^4}p^2+2\frac{c_4}{k^2z_3}\right) \label{eq:kkt52}\\
&2+\frac{c_3}{z_3}=\frac{2(c_1^2+c_2^2)^2}{k^4}p^4+\frac{c_4(c_1^2+c_2^2)}{k^2}\frac{p^2}{z_3} \label{eq:kkt53}
\end{align}
\end{subequations}
\end{itemize}
Dividing each side of \eqref{eq:kkt52} by \eqref{eq:kkt53} gives
\begin{eqnarray*}
\frac{2z_3+\frac{1}{p}}{2z_3+c_3}=-\frac{2}{(c_1^2+c_2^2)p^2},
\end{eqnarray*}
which implies
\begin{eqnarray}\label{eq:case2}
z_3=-\frac{(c_1^2+c_2^2)p+2c_3}{2((c_1^2+c_2^2)p^2+2)}
\end{eqnarray}
Then substitute $\eqref{eq:case2}$ into \eqref{eq:kkt52}, we have
{\small
\begin{eqnarray*}
\frac{(c_1^2+c_2^2)p^2+2}{(c_1^2+c_2^2)p^2+2c_3p}-\frac{2(c_1^2+c_2^2)}{k^4}p^2+\frac{2c_4((c_1^2+c_2^2)p^2+2)}{k^2((c_1^2+c_2^2)p+2c_3)}=1
\end{eqnarray*}
}
which is equivalent to
{\small
\begin{eqnarray*}
\frac{(c_1^2+c_2^2)^2}{k^4}p^4+\frac{c_1^2+c_2^2}{k^2}\left(\frac{2c_3}{k^2}-c_4\right)p^3+\left(c_3-\frac{2c_4}{k^2}\right)p-1=0
\end{eqnarray*}
}
whose solution is denoted by $p^*$. Substitute $p^*$ into \eqref{eq:case2}, we can recover $z_3^*$, then $z_1^*,z_2^*$ can be recovered via \eqref{eq:kkt51}. $\mu^*$ is recovered using \eqref{eq:kkt28}. If $\mu^*\geq 0$, the corresponding solution solves \eqref{eq:kkt1}.

\section{}\label{app:solver2}

If $\mathcal{I}_i$ takes the form of \eqref{eq:S1}, the optimization problem \eqref{eq:zagent2} takes the following form
\begin{subequations}\label{eq:app2}
\begin{eqnarray}
\min_{p,q} && \frac{a_1}{2}p^2+b_1p+\frac{a_2}{2}q^2+b_2q\\
\text{s.t. } && p^2+q^2\leq c^2 \label{eq:app2:1}\\
&& p \geq 0 \label{eq:app2:2}
\end{eqnarray}
\end{subequations}
where $a_1,a_2,c>0$ $,b_1,b_2$ are constants. The solutions to \eqref{eq:app2} are given as below.
{\flushleft\bf Case 1}: $b_1\geq 0$.
\begin{eqnarray*}
p^*=0 \qquad q^*=\left[-\frac{b_2}{a_2}\right]_{-c}^{c}
\end{eqnarray*}
{\flushleft\bf Case 2}: $b_1< 0$ and $\frac{b^2_1}{a^2_1}+\frac{b^2_2}{a_2^2}\leq c^2$.
\begin{eqnarray*}
p^*=-\frac{b_1}{a_1} \qquad q^*=-\frac{b_2}{a_2}
\end{eqnarray*}
{\flushleft\bf Case 3}: $b_1< 0$ and $\frac{b^2_1}{a^2_1}+\frac{b^2_2}{a_2^2}> c^2$.\\
First solve the following equation in terms of variable $\lambda$:
\begin{eqnarray}
b_1^2(a_2+2\lambda)^2+b_2^2(a_1+2\lambda)^2=(a_1+2\lambda)^2(a_2+2\lambda)^2 \label{eq:app3:1}
\end{eqnarray}
which is a polynomial with degree of $4$ and has closed form expression. There are four solutions to \eqref{eq:app3:1}, but there is only one strictly positive $\lambda^*$, which can be proved via the KKT conditions of \eqref{eq:app2}. Then we can recover $p^*,q^*$ from $\lambda^*$ using the following equations.
\begin{eqnarray*}
 p^*=-\frac{b_1}{a_1+2\lambda^*} \quad \text{ and }\quad q^*=-\frac{b_2}{a_2+2\lambda^*}
\end{eqnarray*}

The above procedure to solve \eqref{eq:app2} is derived from standard applications of the KKT conditions of \eqref{eq:app2}. For brevity, we skip the proof here.

\section{Fast algorithm for OPF}

Now we describe another algorithm, which is also based on the decomposition in section \ref{sec:application}. This algorithm cannot be implemented in a distributed manner and has the advantage of faster convergence. For the distributed version, the system dimension is enlarged three times. Here, the new algorithm only enlarge it by twice and does not suffer the problem that the convergence rate depends on the diameter of the graph $\mathcal{G}$.

In this fast algorithm, we only replicate $v,\ell,S,s$ once, denoted by
\begin{eqnarray*}
v^{(z)}=v \ \   \ell^{(z)}=\ell \ \ S^{(z)}=S  \ \   s^{(z)}=s
\end{eqnarray*}
and the OPF problem \eqref{eq:ropf} can be written equivalently as
\begin{subequations}
\begin{eqnarray*}
\min && \sum_{i\in \mathcal{N}}f_i(p_i)\\
\text{s.t.} && v_{A_i}-v_i+2\mathrm{Re}(\overline z_i S_i)-\ell_{i}|z_{i}|^2=0 \quad i\in \mathcal{N}_{-1}  \label{eq:31}\\
&& \sum_{j\in C_i}(S_{j}-\ell_{j}z_{j})+s_i-S_{i}=0 \quad i\in \mathcal{N}   \label{eq:32}\\
&& z\in\mathcal{K}\\
&&  x=z
\end{eqnarray*}
\end{subequations}

Then in the $x$-update step, the problem required to be solved is
\begin{eqnarray*}
\min  && F(v,\ell,S,s)\\
\text{s.t.} &&v_{A_i}-v_i+2\mathrm{Re}(\overline z_i S_i)-\ell_{i}|z_{i}|^2=0 \quad i\in \mathcal{N}_{+}  \label{eq:31}\\
&& \sum_{j\in C_i}(S_{j}-\ell_{j}z_{j})+s_i-S_{i}=0 \quad i\in \mathcal{N}   \label{eq:32}
\end{eqnarray*}
where
\begin{align*}
&F(v,\ell,S,s)=\\
&\sum_{i\in \mathcal{N}}f_i(p_i)+\lambda_{1}^Tv+\lambda_{2}^T\ell+\lambda_{3}^TS+\lambda_{4}^Ts\\
&\frac{\rho}{2}\left(\|v-v^{(z)}\|_2^2+\|\ell-\ell^{(z)}\|_2^2+\|S-S^{(z)}\|^2+\|s-s^{(z)}\|^2\right)
\end{align*}

The above problem shares the same structure as \eqref{eq:xupdate1} and thus has close form solution. The $z$-update step is the same as the distributed algorithm.

\section{$4$ variables optimization}

\noindent P1:
\begin{eqnarray*}
\min && \sum_{i=1}^4 c_ix_i\\
\text{s.t.}&&\underline x_i \leq  x_i\leq \overline x_i \ \ 1\leq i\leq 3 \\
&& x_4\geq 0\\
&& x_3x_4\geq x_1^2+x_2^2
\end{eqnarray*}

Next, we will try to get a close form solution of P1. P1 can be reformulated as:
\begin{eqnarray*}
\min_{R\geq 0} f_1(R)+f_2(R)
\end{eqnarray*}
where
\begin{eqnarray*}
f_1(R):=\min_{x_1,x_2} \ \ c_1x_1+c_2x_2 \quad s.t. \ \ \underline x_1\leq x_1\leq \overline x_1, \ \underline x_2\leq x_2\leq \overline x_2, \ x_1^2+x_2^2\leq R^2
\end{eqnarray*}
\begin{eqnarray*}
f_2(R):=\min_{x_3,x_4} \ \ c_3x_3+c_4x_4 \quad s.t. \ \ \underline x_3\leq x_3\leq \overline x_3, \  x_4\geq 0, \ x_3x_4\geq R^2
\end{eqnarray*}

\begin{table}[htdp]
\caption{The objective value of $f_2(R)$. (Suppose $R^2\leq \overline x_3^2+\overline x_4^2$)}
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
$c_4$ & $c_3$ & $x_3$ & $x_4$ & Obj ($\overline x_4=\infty$) & Obj \\
\hline
- & - & $\overline x_3$ & $\overline x_4$ & $-\infty$ & \\
\hline
- & + & $\max\{\underline x_3,\frac{R^2}{\overline x_4}\}$ & $\overline x_4$ & $-\infty$ & \\
\hline
+ & - & $\overline x_3$ & $\frac{R^2}{\overline x_3}$ & $c_3 \overline x_3+c_4\frac{R^2}{\overline x_3}$ & \\
\hline
+ & + & $[R\sqrt{\frac{c_4}{c_3}}]_{\max\{\underline x_3, R^2/\overline x_4\}}^{\overline x_3}$ & Inverse of $x_3$ &
$[2\sqrt{c_3c_4}R]$ ($R\in \sqrt{c_3/c_4}[\underline x_3,\overline x_3]$) &\\
&&&& $c_3\underline x_3+c_4R^2/\underline x_3$ ($R\leq \sqrt{c_3/c_4}\underline x_3$)&\\
&&&& $c_3\overline x_3+c_4R^2/\overline x_3$ ($R\geq \sqrt{c_3/c_4}\overline x_3$)&\\
\hline
\end{tabular}
\end{center}
\label{tab:objf2R}
\end{table}

\begin{table}[htdp]
\caption{The objective value of $f_1(R)$. Suppose $c_1,c_2\geq 0$ and $c_2/c_1\geq \underline x_2/\underline x_1$. Cutoff $\overline x_1=\min\{0,\overline x_1\}$ and $\overline x_2=\min\{0,\overline x_2\}$.}
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\# of positive vertex $-c_2x_1+c_1x_2$ &$\underline x_1$ & $\underline x_2$& $R^2$ & $x_1$ & $x_2$  & Obj \\
\hline
$(\underline x_1,\underline x_2)$&- & - & $[\overline x_1^2+\overline x_2^2,\frac{c_1^2+c_2^2}{c_2^2}\overline x_2^2]$ & $-\sqrt{R^2-\overline x_2^2}$ & $\overline x_2$ & $-c_1\sqrt{R^2-\overline x_2^2}+c_2\overline x_2$\\
&- & - & $[\frac{c_1^2+c_2^2}{c_2^2}\overline x_2^2,\frac{c_1^2+c_2^2}{c_2^2}\underline x_2^2]$ & $\frac{-c_1}{\sqrt{c_1^2+c_2^2}}R$ & $\frac{-c_2}{\sqrt{c_1^2+c_2^2}}R$ & $-R\sqrt{c_1^2+c_2^2}$\\
&- & - & $[\frac{c_1^2+c_2^2}{c_2^2}\underline x_2^2, \underline x_1^2+\underline x_2^2]$ & $-\sqrt{R^2-\underline x_2^2}$ & $\underline x_2$ & $c_2 \underline x_2- c_1\sqrt{R^2-\underline x_2^2}$\\
\hline

$(\underline x_1,\underline x_2)$,$(\overline x_1,\overline x_2)$&- & - & $[\overline x_1^2+\overline x_2^2,\frac{c_1^2+c_2^2}{c_1^2}\overline x_1^2]$ & $\overline x_1$ & $-\sqrt{R^2-\overline x_1^2}$ & $c_1\overline x_1-c_2\sqrt{R^2-\overline x_1^2}$\\
&- & - & $[\frac{c_1^2+c_2^2}{c_1^2}\overline x_1^2,\frac{c_1^2+c_2^2}{c_2^2}\underline x_2^2]$ & $\frac{-c_1}{\sqrt{c_1^2+c_2^2}}R$ & $\frac{-c_2}{\sqrt{c_1^2+c_2^2}}R$ & $-R\sqrt{c_1^2+c_2^2}$\\
&- & - & $[\frac{c_1^2+c_2^2}{c_2^2}\underline x_2^2, \underline x_1^2+\underline x_2^2]$ & $-\sqrt{R^2-\underline x_2^2}$ & $\underline x_2$ & $c_2 \underline x_2- c_1\sqrt{R^2-\underline x_2^2}$\\
\hline

$(\underline x_1,\underline x_2)$,$(\overline x_1,\overline x_2)$,$(\overline x_1,\underline x_2)$&- & - & $[\overline x_1^2+\overline x_2^2,\overline x_1^2+\underline x_2^2]$ & $\overline x_1$ & $-\sqrt{R^2-\overline x_1^2}$ & $c_1\overline x_1-c_2\sqrt{R^2-\overline x_1^2}$\\
&- & - & $[\overline x_1^2+\underline x_2^2], \underline x_1^2+\underline x_2^2]$ & $-\sqrt{R^2-\underline x_2^2}$ & $\underline x_2$ & $c_2 \underline x_2- c_1\sqrt{R^2-\underline x_2^2}$\\
\hline

&- & + & $[\overline x_1^2+\underline x_2^2,\underline x_1^2+\underline x_2^2]$ & $-\sqrt{R^2-\underline x_2^2}$ &$\underline x_2$ & $c_2 \underline x_2- c_1\sqrt{R^2-\underline x_2^2}$ \\
\hline
&+ & - & $[\underline x_1^2+\overline x_2^2,\underline x_1^2+\underline x_2^2]$ &$\underline x_1$ & $-\sqrt{R^2-\underline x_1^2}$ & $c_1 \underline x_1- c_2\sqrt{R^2-\underline x_1^2}$ \\
\hline
&+ & + & Whatever & $\underline x_1$ & $\underline x_2$ & $c_1\underline x_1+c_2\underline x_2$ \\
\hline
\end{tabular}
\end{center}
\label{tab:objf1R}
\end{table}

\begin{lemma}
Let $h(x)=a R^2-c\sqrt{R^2-b}$. Then its unique minimizer on $[R_1,R_2]\in \mathbb{R}$ is $R=[\sqrt{b+\frac{c^2}{4a^2}}]_{R_1}^{R_2}$.
\end{lemma}
\begin{lemma}
Let $h(x)=a R^2-cR$. Then its unique minimizer on $[R_1,R_2]\in \mathbb{R}$ is $R=[c/2a]_{R_1}^{R_2}$.
\end{lemma}
\begin{lemma}
Let $h(x)=a R-cR$. Then its unique minimizer on $[R_1,R_2]\in \mathbb{R}$ is $\min\{(a-c)R_1,(a-c)R_2\}$.
\end{lemma}
\begin{lemma}
Let $h(x)=a R-c\sqrt{R^2-b}$. Then its unique minimizer on $[R_1,R_2]\in \mathbb{R}$ is $R=[\sqrt{ba^2/(a^2-c^2)}]_{R_1}^{R_2}$.
\end{lemma}

The algorithm developed turns out to be $1000$ times faster than generic CVX solver.
\section{Conclusion}\label{sec:conclusion}
In this paper, we have developed a distributed algorithm for optimal power flow problem based on alternating direction method of multiplier for balanced radial distribution network. We have derived a closed form solution for the subproblems solved by each agent thus significantly reducing the computation time. Preliminary simulation shows that the algorithm is scalable to a 2,065-bus system and the optimization subproblem in each ADMM iteration is solved 1,000x faster than generic optimization solver.
\section{Introduction}

\IEEEPARstart{T}HE optimal power flow (OPF) problem seeks to optimize certain objective such as power loss and
generation cost subject to power flow equations and operational constraints.
It is a fundamental problem because it underlies many power system operations and planning problems
such as economic dispatch, unit commitment, state estimation, stability and reliability assessment,
volt/var control, demand response, etc.  The continued growth of highly volatile renewable
sources on distribution systems calls for real-time feedback control.   Solving the OPF problems in such an
environment has at least two challenges.

First the OPF problem is hard to solve because of its nonconvex feasible set.
Recently a new approach through convex relaxation has been developed.
Specifically semidefinite program (SDP) relaxation \cite{Bai2008} and second order cone program (SOCP) relaxation \cite{Jabr2006} have been proposed in the bus injection model, and SOCP relaxation has been proposed
in the branch flow model \cite{Farivar2011-VAR-SGC, Farivar-2013-BFM-TPS}.
See the tutorial \cite{Low2014a, Low2014b} for further pointers to the literature.
When an optimal solution of the original OPF problem can be recovered from any optimal solution
of a convex relaxation, we say the relaxation is \emph{exact}.
For radial distribution networks (whose graphs are trees), several sufficient conditions have been proved that
guarantee SOCP and SDP relaxations are exact.  This is important because almost all distribution
systems are radial.  Moreover some of these conditions have been shown to hold for many practical networks.
In those cases we can rely on off-the-shelf convex optimization solvers to obtain a globally
optimal solution for the nonconvex OPF problem.

Second most algorithms proposed in the literature are centralized and meant for applications
in today's energy management systems that, \emph{e.g.}, centrally schedule a relatively small number of generators.
In future networks that simultaneously optimize (possibly real-time) the
operation of a large number of intelligent endpoints, a centralized approach will not scale because of
 its computation and communication overhead.
 In this paper we address this challenge.  Specifically
we propose a distributed algorithm for solving the SOCP relaxation of OPF for  balanced radial distribution
networks.

Various distributed algorithms have been developed to solve the OPF problem. Through optimization decomposition, the original OPF problem is decomposed into several local subproblems that can be solved simultaneously. Some distributed algorithms do not deal with the non convexity issue of the OPF problem, including \cite{kim1997coarse,baldick1999fast}, which leverage method of multipliers and \cite{sun2013fully}, which is based on alternating direction method of multiplier (ADMM). However, the convergence of these algorithms is not guaranteed due to non-convexity of the problem. In contrast, algorithms for the convexified OPF problem are proposed to guarantee convergence, \emph{e.g.} dual decomposition method \cite{lam2012distributed,lam2012optimal}, auxiliary variable method  \cite{devane2013stability,li2012demand} and ADMM \cite{dall2012distributed,kraning2013dynamic}.

One of the key performance metrics of a distributed algorithm is the time of convergence (ToC), which is the product of the number of iterations and the computation time to solve the subproblems in each iteration. To our knowledge, all the distributed OPF algorithms in the literature rely on generic iterative optimization solvers, which are computationally intensive, to solve the optimization subproblems. In this paper, we will improve ToC by reducing the computation time for each subproblem.

Specifically we develop a scalable distributed algorithm
through decomposing the \emph{convexified} OPF problem into smaller subproblems based on alternating direction method of multiplier (ADMM). ADMM blends the decomposability of dual decomposition and superior convergence properties of the method of multipliers \cite{boyd2011distributed}. It has broad applications in different areas and particularly useful when the subproblems can be solved efficiently \cite{ghadimi2013optimal}, for example when they admit closed form expressions, \emph{e.g.} matrix factorization \cite{sun2014alternating}, image recovery \cite{afonso2010fast}.

The proposed algorithm has two advantages: 1) There is closed form solution for each optimization
subproblem, thus eliminating the need for an iterative procedure to solve a SDP/SOCP problem for each ADMM iteration.
2) Communication is only required between adjacent buses.

We demonstrate the scalability of the proposed algorithms using a real-life network.
In particular, we show that the algorithm converges within 0.6s for a 2,065-bus system.
To show the superiority of deriving close form expression of each subproblems,
finally we compare the computation time for solving a subproblem by our algorithm
and an off-the-shelf optimization solver (CVX, \cite{grant2008cvx}).
Our solver requires on average $6.8\times 10^{-4}$s while CVX requires on average $0.5$s.
On the other hand, we also show that the convergence rate is mainly determined by the diameter \footnote{The diameter of a graph is defined as the number of hops between two furthest nodes.} of the network through simulating the algorithm on different networks.

The rest of the paper is structured as follows. The OPF problem is defined in section \ref{sec:opf}.
In section \ref{sec:alg}, we develop our distributed algorithm.   In section \ref{sec:case}, we
 test its scalability using data from a real-world distribution network. We conclude this paper in section \ref{sec:conclusion}.

\section{Problem formulation}\label{sec:opf}

In this section, we define the optimal power flow (OPF) problem
on a balanced radial distribution network and review how to solve it through SOCP relaxation.

We denote the set of complex numbers with $\mathbb{C}$, the set of $n$-dimensional complex numbers with $\mathbb{C}^n$. The hermitian transpose of a vector is denoted by $()^H$. To differentiate vector and scaler operations, the conjugate of a complex scaler is denoted by $()^*$. The inner product of two vectors $x,y\in\mathbb{C}^n$ is denoted by $\langle x,y\rangle:=\mathbf{Re}(tr(x^Hy))$. The Euclidean norm of a vector $x\in\mathbb{C}^{n}$ is defined as $\|x\|_2:=\sqrt{\langle x,x\rangle}$.

\subsection{Branch flow model}

\begin{figure}
\centering
\includegraphics[width=0.5\linewidth]{figure/notation}
\caption{Notations.}
\label{fig:notation}
\end{figure}

We model a distribution network by a \emph{directed} tree graph $\mathcal{T} := (\mathcal{N}, \mathcal{E})$ where
 $\mathcal{N}:=\{0,\ldots,n\}$ represents the set of buses and $\mathcal{E}$ represents the set
 of distribution lines connecting the buses in $\mathcal{N}$.
Index the root of the tree by $0$ and let $\mathcal{N}_+:=\mathcal{N}\setminus\{0\}$ denote the other buses. For each node $i$, it has a unique ancestor $A_i$ and a set of children nodes, denoted by $C_i$.
We adopt the graph orientation where every line points towards the root. Each directed line connects a node $i$ and its unique ancestor $A_i$. We hence label the lines by $\mathcal{E}:=\{1,\ldots,n\}$ where each
 $i\in\mathcal{E}$ denotes a line from $i$ to $A_i$.

For each bus $i\in \mathcal{N}$, let $V_i=|V_i|e^{\mathbf{i}\theta_i}$ be its complex voltage and $v_i:=|V_i|^2$ be its magnitude squared. Let $s_i:=p_i+\mathbf{i}q_i$ be its net complex power injection which is generation minus load. For each line $i\in \mathcal{E}$, let $z_{i}=r_{i}+\mathbf{i}x_{i}$ be its complex impedance. Let $I_{i}$ be the complex branch current from bus $i$ to $A_i$ and $\ell_{i}:=|I_{i}|^2$ be its magnitude squared. Let $S_{i}:=P_{i}+\mathbf{i}Q_{i}$ be the branch power flow from bus $i$ to $A_i$. The notations are illustrated in Fig. \ref{fig:notation}. A variable without a subscript denotes a column vector with appropriate components, as summarized below.
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
 $v:=(v_{i},i\in \mathcal{N})$ &  $s:=(s_{i},i\in \mathcal{N}) $\\
 \hline
  $\ell:=(\ell_i,i\in \mathcal{E})$ & $S:=(S_{i},i\in \mathcal{E})$  \\
  \hline
\end{tabular}
\vspace{0.05in}
\end{center}

Branch flow model is first proposed in \cite{Baran1989a,Baran1989b} for radial network. It has better numerical stability than bus injection model and has been advocated for the design and operation for radial distribution network, \cite{Farivar-2013-BFM-TPS, gan2014exact,li2012demand}. It ignores the phase angles of voltages and currents and uses only the set of variables $(v,s,\ell,S)$.
Given a radial network $\mathcal{T}$, the branch flow model is defined by:
\begin{subequations}\label{eq:bfm}
\begin{align}
&v_{A_i}-v_i+(z_iS_i^*+S_iz_i^*)-\ell_{i}|z_i|^2=0 & i\in\mathcal{E}  \label{eq:bfm1}\\
& \sum_{j\in C_i}(S_{j}-\ell_{j}z_{j})+s_i-S_{i}=0  & i\in\mathcal{N}  \label{eq:bfm2}\\
& |S_i|^2= v_i\ell_i  & i\in\mathcal{E}   \label{eq:bfm3}
\end{align}
\end{subequations}
where  $S_0=0$ ( the root of the tree does not have parent) for ease of presentation. Given a vector $(v,s,\ell,S)$ that satisfies \eqref{eq:bfm}, the phase angles of the voltages and currents can be uniquely determined if the network is a tree.
Hence the branch flow model  \eqref{eq:bfm} is equivalent to a full  AC power flow model.
See \cite[Section III-A]{Farivar-2013-BFM-TPS} for details.

\subsection{OPF and SOCP relaxation}

The OPF problem seeks to optimize certain objective, e.g. total line loss or total generation cost, subject to power flow equations \eqref{eq:bfm} and various operational constraints.
We consider an objective function of the following form:
\begin{eqnarray}\label{eq:objective}
F(p)=\sum_{i\in\mathcal{N}}f_i(p_i):=\sum_{i\in\mathcal{N}}\left(\frac{\alpha_i}{2}p_i^2+\beta_ip_i\right)
\end{eqnarray}
where $\alpha_i,\beta_i\geq0$.
For instance,
\begin{itemize}
\item to minimize total line loss, we can set $\alpha_i=0$ and $\beta_i=1$ for each bus $i\in\mathcal{N}$.
\item to minimize generation cost, we can set $\alpha_i=0$ and $\beta_i=0$ for bus $i$ where there is no generator and for generator bus $i$, the corresponding $\alpha_i,\beta_i$ depends on the characteristic of the generator.
\end{itemize}

We consider two operational constraints. First, the power injection $s_i$ at each bus $i$ is constrained to be in a region $\mathcal{I}_i$, \emph{i.e.}
\begin{eqnarray}\label{eq:operation1}
s_i\in\mathcal{I}_i \ \ \text{for } i\in\mathcal{N}
\end{eqnarray}
The feasible power injection region $\mathcal{I}_i$ is determined by the controllable devices attached to bus $i$. Some common controllable loads are:
\begin{itemize}
\item For controllable load, whose real power can vary within $[\underline p_i,\overline p_i]$ and reactive power can vary within $[\underline q_i,\overline q_i]$, the injection region $\mathcal{I}_i$ is
\begin{subequations}
\begin{eqnarray}\label{eq:S2}
\mathcal{I}_i=\{p+\mathbf{i}q\mid p\in[ \underline p_i,  \overline p_i], q\in[\underline q_i,\overline q_i] \}\subseteq \mathbb{C}
\end{eqnarray}
\item For solar panel connecting the grid through a inverter with nameplate $\overline s_i$, the injection region $\mathcal{I}_i$ is
\begin{eqnarray}\label{eq:S1}
\mathcal{I}_i=\{p+\mathbf{i}q\mid p\geq 0, p^2+q^2\leq \overline s_i^2\}\subseteq\mathbb{C}
\end{eqnarray}
\end{subequations}
\end{itemize}
Second, the voltage magnitude at each bus $i\in\mathcal{N}$ needs to be maintained within a prescribed region, \emph{i.e.}
\begin{eqnarray}\label{eq:operation2}
\underline v_i \leq v_i\leq \overline v_i  \ \ \text{for } i\in\mathcal{N}
\end{eqnarray}
Typically the voltage magnitude at the substation bus $0$ is assumed to be fixed at some prescribed value, \emph{i.e.} $\underline v_0=\overline v_0$. At other bus $i\in\mathcal{N}_+$, the voltage magnitude is typically allowed to deviate by $5\%$ from its nominal value $1$, \emph{i.e.} $\underline v_i=0.95^2$ and $\overline v_i=1.05^2$.

To summarize, the OPF problem for radial network is
\begin{eqnarray}
\text{\bf OPF: }\min && \sum_{i\in\mathcal{N}}f_i(p_i)\nonumber\\
\mathrm{over} && v,s,S,\ell \label{eq:opf}\\
\mathrm{s.t.} &&  \eqref{eq:bfm}, \eqref{eq:operation1}\text{ and } \eqref{eq:operation2}\nonumber
\end{eqnarray}

The OPF problem \eqref{eq:opf} is nonconvex due to the quadratic equality constraint \eqref{eq:bfm3}. In \cite{Farivar2011-VAR-SGC, Farivar-2013-BFM-TPS}, \eqref{eq:bfm3} is relaxed to a second order cone constraint:
\begin{eqnarray}\label{eq:socp}
|S_i|^2\leq v_i\ell_i  \quad\text{for } \quad i\in\mathcal{E},
\end{eqnarray}
resulting in a second-order cone program (SOCP) relaxation of \eqref{eq:opf}
\begin{eqnarray}
\text{\bf ROPF: }\min && \sum_{i\in\mathcal{N}}f_i(p_i)\nonumber\\
\mathrm{over} && v,s,S,\ell \label{eq:ropf}\\
\mathrm{s.t.} &&  \eqref{eq:bfm1}, \ \eqref{eq:bfm2}, \ \eqref{eq:socp}  \text{ and }\eqref{eq:operation1},\eqref{eq:operation2}\nonumber
\end{eqnarray}

Clearly the relaxation ROPF \eqref{eq:ropf} provides a lower bound for the original OPF problem \eqref{eq:opf} since the original feasible set is enlarged. The relaxation is called \emph{exact} if every optimal solution of ROPF attains equality in \eqref{eq:bfm3} and hence is also optimal for the original OPF.
For network with tree topology, SOCP relaxation is exact under some mild conditions
\cite{Farivar-2013-BFM-TPS, gan2014exact}.

\section{Distributed Algorithm for OPF}\label{sec:alg}

We assume SOCP relaxation is exact and  develop in this section
a distributed algorithm that solves ROPF.
We first review a standard alternating direction method of multiplier (ADMM).
We then make use of the structure of ROPF to speed up the standard ADMM algorithm
by deriving closed form expressions for the optimization subproblems in each ADMM iteration.

\subsection{Preliminary: ADMM}

ADMM blends the decomposability of dual decomposition with the superior convergence properties of the method of multipliers
\cite{boyd2011distributed}. For our application, we consider optimization problems of the form:
\begin{eqnarray}
\min && f(x)+g(z) \nonumber \\
\mathrm{over} &&  x\in\mathcal{K}_x, \ \ z\in\mathcal{K}_z \label{eq:admm}\\
\mathrm{s.t.} &&  x=z \nonumber
\end{eqnarray}
where $\mathcal{K}_x,\mathcal{K}_z$ are convex sets. Let $\lambda$ denote the Lagrange
 multiplier for the constraint $x=z$.   Then the augmented Lagrangian is defined as
\begin{eqnarray}\label{eq:agumentlag}
L_\rho(x,z,\lambda):=f(x)+g(z)+\langle \lambda, x-z\rangle+\frac{\rho}{2}\|x-z\|_2^2,
\end{eqnarray}
where  $\rho\geq 0$ is a constant. When $\rho=0$, the augmented Lagrangian reduces to
the standard Lagrangian. At each iteration $k$, ADMM consists of the iterations:
\begin{subequations}\label{eq:update}
\begin{eqnarray}
x^{k+1}&\in&\arg\min_{x\in\mathcal{K}_x} L_\rho(x,z^{k},\lambda^k)\label{eq:xupdate}\\
z^{k+1}&\in&\arg\min_{z\in\mathcal{K}_z} L_\rho(x^{k+1},z,\lambda^k)\label{eq:zupdate}\\
\lambda^{k+1}&=&\lambda^{k}+\rho(x^{k+1}-z^{k+1})\label{eq:mupdate}
\end{eqnarray}
\end{subequations}
Compared to dual decomposition, ADMM is guaranteed to converge to an optimal
solution under less restrictive conditions. Let
\begin{subequations}\label{eq:feasible}
\begin{eqnarray}
r^k&:=&\|x^{k}-z^{k}\|_2 \label{eq:pfeasible} \\
s^k&:=&\rho\|z^{k}-z^{k-1}\|_2 \label{eq:dfeasible}
\end{eqnarray}
\end{subequations}
which can be viewed as the residuals for primal and dual feasibility.
Assume:
\begin{itemize}
\item A1: $f$ and $g$ are closed proper and convex.
\item A2: The unaugmented Lagrangian $L_0$ has a saddle point.
\end{itemize}
The correctness of ADMM is guaranteed by the following result; see \cite[Chapter 3]{boyd2011distributed}.
\begin{proposition}[\cite{boyd2011distributed}]\label{prop}
Suppose A1 and A2 hold. Let $p^*$ be the optimal objective value.
Then
\begin{eqnarray*}
\lim_{k\rightarrow \infty}r^k=0,  \quad  \lim_{k\rightarrow \infty}s^k=0
\end{eqnarray*}
and
\begin{eqnarray*}
\lim_{k\rightarrow \infty} f(x^k)+g(z^k)= p^*
\end{eqnarray*}
\end{proposition}

\subsection{Apply ADMM to OPF problem}

We assume the SOCP relaxation is exact and now derive a distributed algorithm for solving ROPF \eqref{eq:ropf} that has the
following advantages:
\begin{itemize}
\item Each bus only needs to solves a local subproblem in each iteration of \eqref{eq:update}.
	Moreover there is a closed form solution for each subproblem, in contrast to most
	algorithms that employ iterative procedure to solve these subproblems
\cite{lam2012optimal,lam2012distributed,dall2012distributed,sun2013fully,devane2013stability,li2012demand,kim1997coarse,baldick1999fast}.
\item Communication is only required between adjacent buses.
\end{itemize}

The ROPF problem defined in \eqref{eq:ropf} can be written explicitly as:
\begin{subequations}
\begin{align}
\min & \ \ \sum_{i\in \mathcal{N}} f_i(p_i) &\\
\mathrm{over }& \ \ v,s,S,\ell& \\
\mathrm{s.t.}  & \ \ v_{A_i}-v_i+z_iS_i^*+S_iz_i^*-\ell_i|z_i|^2=0 & i\in\mathcal{E}  \label{eq:bfm21}\\
&\ \ \sum_{i\in C_i}(S_j-z_j\ell_j)-S_i +s_i=0 & i\in\mathcal{N}  \label{eq:bfm22}\\
&\ \ |S_i|^2\leq v_i\ell_i  &  i\in\mathcal{E}  \label{eq:bfm23}\\
&\ \ s_i\in\mathcal{I}_i & i\in\mathcal{N}   \label{eq:bfm24} \\
&\ \ \underline v_i\leq v_i\leq \overline v_i & i\in\mathcal{N}   \label{eq:bfm25}
\end{align}
\end{subequations}

Assume each bus $i$ is an agent that maintains local variables $(v_i,s_i,S_i,\ell_i)$. Then \eqref{eq:bfm23}--\eqref{eq:bfm25} are local constraints to agent (bus) $i$.  \eqref{eq:bfm21} and \eqref{eq:bfm22} describe the coupling constraints among $i$ and its parent $A_i$ and the set of children in $C_i$, \emph{i.e.} \eqref{eq:bfm21} models the voltage of its ancestor $A_i$ as a function of the local variables of $i$, \eqref{eq:bfm22} describes the power flow balance among the set of children $C_i$ and bus $i$ itself. To decouple the constraints  \eqref{eq:bfm21}--\eqref{eq:bfm22}, for each bus $i$, its ancestor $A_i$ sends its voltage $v_{A_i}$ to $i$, denoted by $v_{A_i,i}$ and each child $j\in C_i$ sends the branch power to $i$, denoted by $S_{j,i}$ and current to $i$, denoted by $\ell_{j,i}$. Then ROPF can be written equivalently as follows.

\begin{subequations}\label{eq:eropf}
\begin{align}
\min & \ \ \sum_{i\in \mathcal{N}} f_i(p_i^{(z)}) \\
\mathrm{over} & \ \ x:=\{v^{(x)}_i, s^{(x)}_i,S^{(x)}_i,\ell^{(x)}_i,v^{(x)}_{A_i,i},S^{(x)}_{i,A_i},\ell^{(x)}_{i,A_i},i\in\mathcal{N} \} \hspace{-0.1in} \nonumber\\
& \ \ z:=\{v^{(z)}_i, s^{(z)}_i,S^{(z)}_i,\ell^{(z)}_{i},i\in\mathcal{N}\} \nonumber \\
\mathrm{s.t.}  & \ \ v^{(x)}_{A_i,i}-v^{(x)}_{i}+z_i\left(S^{(x)}_{i}\right)^*+S^{(x)}_{i}z_i^*-\ell^{(x)}_{i}|z_i|^2=0 \hspace{-0.1in}& i\in\mathcal{E}  \\
& \sum_{i\in C_i}\left(S^{(x)}_{j,i}-z_j\ell^{(x)}_{j,i}\right)-S^{(x)}_{i} +s^{(x)}_{i}=0 & i\in\mathcal{N} \\
& |S_i^{(z)}|^2\leq v_i^{(z)}\ell_i^{(z)} &  i\in\mathcal{E}  \\
&  s_i^{(z)}\in \mathcal{I}_i  &  i\in\mathcal{N} \\
& \underline v_i\leq v_i^{(z)}\leq \overline v_i  &  i\in\mathcal{N} \\
& S_{i,A_i}^{(x)}=S_i^{(z)}, \ \ell_{i,A_i}^{(x)}=\ell_{i}^{(z)}, \ v_{A_i,i}^{(x)}=v_{A_i}^{(z)} & i\in\mathcal{N} \label{eq:ndup} \\
& S_{i}^{(x)}=S_i^{(z)},  \ell_{i}^{(x)}=\ell_{i}^{(z)}, v_{i}^{(x)}=v_{i}^{(z)}, \ s_i^{(x)}=s_i^{(z)} & i\in\mathcal{N} \label{eq:sdup}
\end{align}
\end{subequations}
{\flushleft where \eqref{eq:ndup} and \eqref{eq:sdup} are consensus constraints that force all the copies of each variable to be the same. Since ADMM has two separate groups of variables $x$ and $z$ that is updated alternatively, we put superscripts $(\cdot)^{(x)}$ and $(\cdot)^{(z)}$ on each variable to denote whether the variable is updated in the $x$-update or $z$-update step.}

Next, we apply ADMM to decompose \eqref{eq:eropf} by relaxing the consensus constraints in \eqref{eq:ndup} and \eqref{eq:sdup}. Let $\lambda,\mu,\gamma$ be the Lagrangian multipliers associated with \eqref{eq:ndup} and \eqref{eq:sdup} as specified in Table \ref{tab:muliplier}.

\begin{table}
\caption{Multipliers associated with constraints \eqref{eq:ndup}-\eqref{eq:sdup}}
\begin{center}
\begin{tabular}{|c|c||c|c|}
\hline
$\lambda_{1,i}$: & $S_{i}^{(x)}=S_i^{(z)}$ & $\lambda_{2,i}$: & $\ell_{i}^{(x)}=\ell_{i}^{(z)}$\\
\hline
$\lambda_{3,i}$: & $v_{i}^{(x)}=v_{i}^{(z)}$ & $\lambda_{4,i}$: & $s_i^{(x)}=s_i^{(z)}$\\
\hline
$\mu_{1,i}$: & $S_{i,A_i}^{(x)}=S_i^{(z)}$ & $\mu_{2,i}$: & $\ell_{i,A_i}^{(x)}=\ell_{i}^{(z)}$ \\
\hline
$\gamma_{i}$: & $v_{A_i,i}^{(x)}=v_{A_i}^{(z)}$ & &\\
\hline
\end{tabular}
\end{center}
\label{tab:muliplier}
\end{table}

Denote
\begin{eqnarray*}
x_i&:=&\left(v_i^{(x)},\ell_i^{(x)},S_i^{(x)},s_i^{(x)}\right)\\
x_{j,i}&:=& \left(\ell_{j,i}^{(x)},S_{j,i}^{(x)}\right)\\
z_i&:=&\left(v_i^{(z)},\ell_i^{(z)},S_i^{(z)},s_i^{(z)}\right)\\
\lambda_i&:=&(\lambda_{k,i},k=1,2,3,4)\\
\mu_i&:=&(\mu_{k,i},k=1,2)
\end{eqnarray*}

The variables maintained by each agent (bus) $i$ are its local variables for itself: $x_i$, $z_i$, the copy of its parent's voltage $v_{A_i,i}^{(x)}$, the copy $x_{j,i}$ from each of its child $j\in C_i$ and the associated Lagrangian multipliers. Let $\mathcal{A}_i$ denote the set of variables, then
\begin{eqnarray*}
\mathcal{A}_i:=\{x_i, v_{A_i,i}^{(x)}, \{x_{j,i},\mu_j,j\in C_i\},z_i,\lambda_i,\gamma_i\}
\end{eqnarray*}

\begin{figure}
\centering
\subfloat[x-update]{
	\includegraphics[scale=0.25]{figure/xupdate.png}
	\label{fig:msg_x}
	}
\subfloat[z-update] {
	\includegraphics[scale=0.25]{figure/zupdate.png}
	\label{fig:msg_z}
	}
\caption{Message exchange in the x and z-update step for agent $i$.}
\label{fig:msg_update}
\end{figure}

\begin{figure*}
{\scriptsize
\begin{subequations}\label{eq:AL}
\begin{align}
&L_{\rho}(x,z,\lambda,\gamma,\mu)\label{eq:AL1}\\
=&\sum_{i\in\mathcal{N}}\left(f_i(p_i^{(z)})+\langle\lambda_i,x_i-z_i\rangle+\langle\mu_i,x_{i,A_i}-z_i\rangle+\sum_{j\in C_i}\langle\gamma_j,v_{i,j}^{(x)}-v_{i}^{(z)}\rangle+\frac{\rho}{2}\left(\|x_i-z_i\|^2_s + \|x_{i,A_i}-z_i\|_n^2+\sum_{j\in C_i}\|v_{i,j}^{(x)}-v_{i}^{(z)}\|_2^2 \right)\right)\label{eq:AL2}\\
=&\sum_{i\in\mathcal{N}}\left(f_i(p_i^{(z)})+\langle\lambda_i,x_i-z_i\rangle+\sum_{j\in C_i}\langle\mu_j,x_{j,i}-z_j\rangle+\langle\gamma_i,v_{A_i,i}^{(x)}-v_{A_i}^{(z)}\rangle+\frac{\rho}{2}\left(\|x_i-z_i\|_s^2 + \sum_{j\in C_i}\|x_{j,i}-z_j\|_n^2+\|v_{A_i,i}^{(x)}-v_{A_i}^{(z)}\|_2^2 \right)\right)\label{eq:AL3}
\end{align}
\end{subequations}
}
\end{figure*}

Next, we demonstrate that the problem in \eqref{eq:eropf} can be solved in a distributed manner using ADMM, i.e. both the $x$-update \eqref{eq:xupdate} and $z$-update \eqref{eq:zupdate} can be decomposed into small subproblems that can be solved simultaneously by each agent $i$. For ease of presentation, we remove the iteration number $k$ in \eqref{eq:update} for all the variables, which will be updated accordingly after each subproblem is solved. The augmented Lagrangian for modified ROPF problem is given in \eqref{eq:AL}.
Note that in \eqref{eq:AL}, $x_{i,A_i}$ and $z_i$ consist of different components and $x_{i,A_i}-z_i$ is composed of the components that appear in both $x_{i,A_i}$ and $z_i$, \emph{i.e.} $x_{i,A_i}-z_i:=\left(S_{i,A_i}^{(x)}-S_{i}^{(z)},\ell_{i,A_i}^{(x)}-\ell_{i}^{(z)}\right)$.

In the $x$-update, each agent $i$ jointly solves the following $x$-update \eqref{eq:xupdate}.
\begin{eqnarray}
\arg\min_{x\in\mathcal{K}_x}L_\rho(x,z,\lambda,\gamma,\mu)=\arg\min_{x\in\mathcal{K}_x}\sum_{i\in\mathcal{N}}G_i(x_i,v_{A_i,i}^{(x)},\{x_{j,i},j\in C_i\}),  \label{eq:xupdate_jointly}
\end{eqnarray}
where $G_i(x_i,v_{A_i,i}^{(x)},\{x_{j,i},j\in C_i\})$ is obtained from \eqref{eq:AL2} and
\begin{align*}
&G_i(x_i,v_{A_i,i}^{(x)},\{x_{j,i},j\in C_i\})\\
:=&\langle\lambda_i,x_i\rangle+\sum_{j\in C_i}\langle\mu_j,x_{j,i}\rangle+\langle\gamma_i,v_{A_i,i}^{(x)}\rangle+\frac{\rho}{2}\left(\|x_i-z_i\|_2^2 + \sum_{j\in C_i}\|x_{j,i}-z_j\|_2^2+\|v_{A_i,i}^{(x)}-v_{A_i}^{(z)}\|_2^2 \right)
\end{align*}
The corresponding subproblem for each agent $i$ that jointly solves \eqref{eq:xupdate_jointly} is
{
\begin{align}
\min \ &G_i(x_i,v_{A_i,i}^{(x)},\{x_{j,i},j\in C_i\})\nonumber\\
\mathrm{over}\  & x_i,v_{A_i,i}^{(x)},\{x_{j,i},j\in C_i\} \label{eq:xagent}\\
\mathrm{s.t.} \ & v^{(x)}_{A_i,i}-v^{(x)}_{i}+z_i\left(S^{(x)}_{i}\right)^*+S^{(x)}_{i}z_i^*-\ell^{(x)}_{i}|z_i|^2=0 \nonumber  \\
& \sum_{i\in C_i}\left(S^{(x)}_{j,i}-z_j\ell^{(x)}_{j,i}\right)-S^{(x)}_{i} +s^{(x)}_{i}=0 \nonumber
\end{align}
}

Prior to solving \eqref{eq:xagent}, each agent $i$ needs to collect $\left(v_{A_i}^{(z)},\gamma_i\right)$ from its parent and $(z_j,\mu_j)$ from all of its children $j\in C_i$.  The message exchanges in the x-update is illustrated in Fig. \ref{fig:msg_x}.

Next, we show how to solve \eqref{eq:xagent} in closed form. For each $i$, we can stack the real and imaginary part of the variables $(x_i,v_{A_i,i}^{(x)},\{x_{j,i},j\in C_i\})$ in a vector with appropriate dimensions and denote it as $\tilde x$. Then the subproblem solved by agent $i$ in the $x$-update \eqref{eq:xagent} takes the following form:
\begin{eqnarray}
\min_{\tilde x} \ \ \frac{1}{2}{\tilde x}^HA {\tilde x}+c^H{\tilde x} \quad \text{s.t. } B{\tilde x}=0  \label{eq:xupdate1}
\end{eqnarray}
where $A$ is a positive diagonal matrix, $B$ is a full row rank real matrix and $c$ is a real vector. $A,c,B$ are derived from \eqref{eq:xagent}. There exists a closed form expression for \eqref{eq:xupdate1} given by
\begin{eqnarray*}
\tilde x=\left(A^{-1}B^H(BA^{-1}B^H)^{-1}BA^{-1}-A^{-1}\right)c
\end{eqnarray*}

In the $z$-update, each agent $i$ updates $z_i$ by jointly solving the z-update \eqref{eq:zupdate}
\begin{eqnarray}
\arg\min_{z\in\mathcal{K}_z}L_\rho(x,z,\lambda,\gamma,\mu)=\arg\min_{z\in\mathcal{K}_z}\sum_{i\in\mathcal{N}}H_i(z_i),\label{eq:zupdate_jointly}
\end{eqnarray}
where $H_i(z_i)$ is obtained from \eqref{eq:AL3} and
\begin{align*}
H_i(z_i):=f_i(p_i^{(z)})-\langle\lambda_i,z_i\rangle-\langle\mu_i,z_i\rangle-\sum_{j\in C_i}\langle\gamma_j,v_{i}^{(z)}\rangle+\frac{\rho}{2}\left(\|x_i-z_i\|^2_2 + \|x_{i,A_i}-z_i\|_2^2+\sum_{j\in C_i}\|v_{i,j}^{(x)}-v_{i}^{(z)}\|_2^2\right)
\end{align*}
The corresponding subproblem for each agent $i$ that jointly solves \eqref{eq:zupdate_jointly} is

\begin{eqnarray}
\min && H_i(z_i)   \nonumber\\
\mathrm{over} && z_i \label{eq:zagent}\\
\mathrm{s.t.}&&    |S_i^{(z)}|^2\leq v_i^{(z)}\ell_i^{(z)} \nonumber   \\
&& s_i^{(z)}\in \mathcal{I}_i  \nonumber \\
&& \underline v_i\leq v_i^{(z)}\leq \overline v_i \nonumber
\end{eqnarray}

Prior to solving \eqref{eq:zagent}, each agent $i$ needs to collect $(x_{i,A_i},\mu_i)$ from its parent and $(v_{i,j}^{(x)},\gamma_j)$ from all of its children $j\in C_i$.  The message exchanges in the z-update is illustrated in Fig. \ref{fig:msg_z}.

Next, we show how to solve \eqref{eq:zagent} in closed form. Note that
{\small
\begin{align}
H_i(z_i):=&f_i(p_i^{(z)})-\langle\lambda_i,z_i\rangle-\langle\mu_i,z_i\rangle-\sum_{j\in C_i}\langle\gamma_j,v_{i}^{(z)}\rangle+\frac{\rho}{2}\left(\|x_i-z_i\|^2_2 + \|x_{i,A_i}-z_i\|_2^2+\sum_{j\in C_i}\|v_{i,j}^{(x)}-v_{i}^{(z)}\|_2^2\right)\nonumber\\
=&\rho\left(|S_i^{(z)}-\hat S_i|^2+|\ell_i^{(z)}-\hat \ell_i|^2+\frac{|C_i|+1}{2}|v_i^{(z)}-\hat v_i|^2\right)+f_i(p_i^{(z)})+\frac{\rho}{2}\|s_i^{(z)}-\hat s_i\|_2^2+\text{constant} \label{eq:zupdate_square}
\end{align}
}
We use square completion to obtain \eqref{eq:zupdate_square} and the variables labeled with hat are some constants. Then \eqref{eq:zagent} can be furthered decomposed into two subproblems as below. The first one is
\begin{eqnarray}
\min && \left|S_i^{(z)}-\hat S_i\right|^2+\left|\ell_i^{(z)}-\hat \ell_i\right|^2+\frac{|C_i|+1}{2}\left|v_i^{(z)}-\hat v_i\right|^2\nonumber\\
\mathrm{over} && v_i^{(z)},\ell_i^{(z)}, S_i^{(z)} \label{eq:zagent1}\\
\mathrm{s.t.}&&     \left|S_i^{(z)}\right|^2\leq v_i^{(z)}\ell_i^{(z)} \nonumber\\
 && \underline v_i\leq v_i^{(z)}\leq \overline v_i \nonumber
\end{eqnarray}

The optimization problem in \eqref{eq:zagent1} has a quadratic objective, a second order cone constraint and a box constraint. We illustrate in Appendix \ref{app:newsolver} the procedure that solves \eqref{eq:zagent1}. Compared with using generic iterative solver, the procedure is computationally efficient since it only requires to solve the zero of three polynomials with degree less than or equal to $4$, which have closed form expression.

The second problem is
\begin{eqnarray}
\min && f_i\left(p_i^{(z)}\right)+\frac{\rho}{2}\left\|s_i^{(z)}-\hat s_i\right\|_2^2 \nonumber\\
\mathrm{over} &&  s_i^{(z)}  \label{eq:zagent2} \\
\mathrm{s.t.}&&  s_i^{(z)}\in \mathcal{I}_i \nonumber
\end{eqnarray}

Recall that $f_i\left(p_i^{(z)}\right):=\frac{\alpha_i}{2} p_i^2+\beta_i p_i$ as in \eqref{eq:objective}. If $\mathcal{I}_i$ takes the form of \eqref{eq:S2}, the closed form solution to \eqref{eq:zagent2} is
\begin{eqnarray*}
p_i^{(z)}=\left[\frac{\rho\hat p_i-\beta}{\alpha+\rho}\right]_{\underline p_i}^{\overline p_i} \quad
q_i^{(z)}=\left[\hat q_i\right]_{\underline q_i}^{\overline q_i}
\end{eqnarray*}
where $[x]_a^b:=\min\{a,\max\{x,b\}\}$. If $\mathcal{I}_i$ takes the form of \eqref{eq:S1}, there also exists a closed form expression to \eqref{eq:zagent2} and the procedure is relegate to Appendix \ref{app:solver2}.

Finally, we specify the initialization and stopping criteria for the algorithm. A good initialization usually reduce the number of iterations for convergence. We use the following initialization suggested by our empirical results. We first initialize the $z$ variable. The voltage magnitude square $v_i^{(z)}=1$. The power injection $s_i^{(z)}$ is picked up from a feasible point in the feasible region $\mathcal{I}_i$. The branch power $S_i^{(z)}$ is the aggregate power injection $s_i^{(z)}$ from the nodes connected by line $i$ (Note that the network has a tree topology.). The branch current $\ell_{i}^{(z)}=\frac{|S_i^{(z)}|^2}{v_i^{(z)}}$ according to \eqref{eq:bfm3}. The $x$ variables are initialized using the corresponding $z$ variable according to \eqref{eq:ndup}-\eqref{eq:sdup}. Intuitively, the above initialization procedure can be interpreted as a solution to the branch flow equation \eqref{eq:bfm} assuming zero impedance on all the lines.

For the stopping criteria, there is no general rule for ADMM based algorithm and it usually hinges on the problem \cite{boyd2011distributed}. In \cite{boyd2011distributed}, it is suggested that a reasonable stopping criteria is that both the primal residual $r^k$ defined in \eqref{eq:pfeasible} and the dual residual $s^k$ defined in \eqref{eq:dfeasible} are within $10^{-3}\sqrt{|\mathcal{N}|}$ or $10^{-4}\sqrt{|\mathcal{N}|}$. The stopping criteria we adopt is that both $r^k$ and $s^k$ are below $10^{-4}\sqrt{|\mathcal{N}|}$ and empirical results show that the solution is accurate enough. The pseudo code for the algorithm is summarized in Table \ref{tab:alg}.

\begin{table}
\caption{Distributed algorithm of OPF}
\centering
\begin{tabular}{|p{8cm}|}
\hline
{\bf Distributed Algorithm of OPF}\\
\hline
{\bf Input}: network $\mathcal{T}$, power injection region $\mathcal{I}_i$, voltage region $(\underline v_i,\overline v_i)$,\\
\hspace{0.6cm} line impedance $z_i$ for $i\in\mathcal{N}$.\\
{\bf Output}: voltage $v$, power injection $s$.\\
\hline
1. Initialize the $x$ and $z$ variables. \\
2. Iterate the following step until both the primal residual $s^k$ \eqref{eq:pfeasible} and the dual residual $r^k$ \eqref{eq:dfeasible} are below $10^{-4}\sqrt{|\mathcal{N}|}$.\\
\hspace{0.2cm} a. In the $x$-update, each agent $i$ solves \eqref{eq:xagent} to update $x$.\\
\hspace{0.2cm} b. In the $z$-update, each agent $i$ solves \eqref{eq:zagent} to update $z$.\\
\hspace{0.2cm} c. In the multiplier update, update $\lambda,\mu,\gamma$ by  \eqref{eq:mupdate}.\\
\hline
\end{tabular}
\label{tab:alg}
\end{table}

\section{Proposal}
\begin{itemize}
\item Dual decomposition
\item ADMM: More message passing but likely less steps to converge.
\item Benders decomposition
\end{itemize}
\section{Case Study: 2 bus network}

Suppose there are two buses $0$ and $1$, the OPF problem then can be stated explicitly as:

\noindent OPF-1.0:
\begin{eqnarray*}
\min && f_0(p_0)+f_1(p_1)\\
\text{s.t.}  && v_1=v_0-2(r_0P_0+x_0Q_0)+\ell_0 |z_0|^2\\
&& p_0=P_0\\
              && p_1=-(P_0-\ell_0 r_0)\\
&& q_0=Q_0\\
&& q_1=-(Q_0-\ell_0 x_0)\\
&& v_0\ell_0\geq P_0^2+Q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline v_1\leq v_1\leq \overline v_1\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline p_1\leq p_1\leq \overline p_1\\
&& \underline q_0\leq q_0\leq \overline q_0\\
&& \underline q_1\leq q_1\leq \overline q_1
\end{eqnarray*}

\subsection{Dual Decomposition}
\qiuyu{The dual decomposition  does not convergence unless the objective is strictly convex in $p,q,v,\ell$, which is hardly satisfied.}

Let $\hat S_0:=S_0$ and $\tilde S_0:=S_0-\ell_0 z_0$ as local copies, OPF-1.0 can be rewritten equivalently as:

\noindent OPF-1.1:
\begin{eqnarray*}
\min && f_0(p_0)+f_1(p_1)\\
\text{s.t.} && \hat P_0=\tilde P_0-\ell_0 r_0\\
               && \hat Q_0=\tilde Q_0-\ell_0 x_0\\
               && v_1=v_0-2(r_0\hat P_0+x_0\hat Q_0)+\ell_0 |z_0|^2\\
&& p_0=\hat P_0\\
              && p_1=-\tilde P_0\\
&& q_0=\hat Q_0\\
&& q_1=-\tilde Q_0\\
&& v_0\ell_0\geq \hat P_0^2+\hat Q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline v_1\leq v_1\leq \overline v_1\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline p_1\leq p_1\leq \overline p_1\\
&& \underline q_0\leq q_0\leq \overline q_0\\
&& \underline q_1\leq q_1\leq \overline q_1
\end{eqnarray*}

We relax the first three constraints with multipliers $\lambda_1,\lambda_2,\lambda_3$ and OPF-1.2 can be rewritten equivalently as:

\noindent OPF-1.2:
\begin{eqnarray*}
\max_{\lambda} \quad g(\lambda)
\end{eqnarray*}
where
\begin{eqnarray*}
g(\lambda):=\min_{x} && f_0(p_0)+f_1(p_1)+\lambda_1(\hat P_0-\tilde P_0+\ell_0 r_0)+\lambda_2(\hat Q_0-\tilde Q_0+\ell_0 x_0)+\lambda_3(v_1-v_0+2(r_0\hat P_0+x_0\hat Q_0)-\ell_0 |z_0|^2)\\
\text{s.t.}
&& p_0=\hat P_0\\
              && p_1=-\tilde P_0\\
&& q_0=\hat Q_0\\
&& q_1=-\tilde Q_0\\
&& v_0\ell_0\geq \hat P_0^2+\hat Q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline v_1\leq v_1\leq \overline v_1\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline p_1\leq p_1\leq \overline p_1\\
&& \underline q_0\leq q_0\leq \overline q_0\\
&& \underline q_1\leq q_1\leq \overline q_1
\end{eqnarray*}
The subproblem corresponding to bus $0$ is

\noindent OPF-bus0-1.0:
\begin{eqnarray*}
\min_{x} && f_0(p_0)+\lambda_1(\hat P_0+\ell_0 r_0)+\lambda_2(\hat Q_0+\ell_0 x_0)+\lambda_3(-v_0+2(r_0\hat P_0+x_0\hat Q_0)-\ell_0 |z_0|^2)\\
\text{s.t.}
&& p_0=\hat P_0\\
&& q_0=\hat Q_0\\
&& v_0\ell_0\geq \hat P_0^2+\hat Q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline q_0\leq q_0\leq \overline q_0
\end{eqnarray*}
or

\noindent OPF-bus0-1.1:
\begin{eqnarray*}
\min_{x} && f_0(p_0)+\lambda_1(p_0+\ell_0 r_0)+\lambda_2( q_0+\ell_0 x_0)+\lambda_3(-v_0+2(r_0 p_0+x_0 q_0)-\ell_0 |z_0|^2)\\
\text{s.t.}
&& v_0\ell_0\geq  p_0^2+ q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline q_0\leq q_0\leq \overline q_0
\end{eqnarray*}
If $f_0(p_0)$ is linear in $p_0$, then OPF-bus0-1.1 is a LQP of the following form:

\subsection{ADMM}

Radial network is a bipartite graph, which suggests a very good decomposition using ADMM. We will still use the 2 bus network as an example.
Let $\hat S_0:=S_0$ and $\tilde S_0:=S_0-\ell_0 z_0$ as local copies, as done in OPF-1.1. We relax the first three constraints with multipliers $\lambda_1,\lambda_2,\lambda_3$ and OPF-2.1 can be rewritten equivalently as:

\noindent OPF-1.2:
\begin{eqnarray*}
\max_{\lambda} \quad g(\lambda)
\end{eqnarray*}
where
\begin{eqnarray*}
g(\lambda):=\min_{x} && f_0(p_0)+f_1(p_1)+\lambda_1(\hat P_0-\tilde P_0+\ell_0 r_0)+\lambda_2(\hat Q_0-\tilde Q_0+\ell_0 x_0)+\lambda_3(v_1-v_0+2(r_0\hat P_0+x_0\hat Q_0)-\ell_0 |z_0|^2)\\
&& + \frac{\rho}{2}(v_1-v_0+2(r_0\hat P_0+x_0\hat Q_0)-\ell_0 |z_0|^2)^2\\
\text{s.t.}
&& p_0=\hat P_0\\
              && p_1=-\tilde P_0\\
&& q_0=\hat Q_0\\
&& q_1=-\tilde Q_0\\
&& v_0\ell_0\geq \hat P_0^2+\hat Q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline v_1\leq v_1\leq \overline v_1\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline p_1\leq p_1\leq \overline p_1\\
&& \underline q_0\leq q_0\leq \overline q_0\\
&& \underline q_1\leq q_1\leq \overline q_1
\end{eqnarray*}

The subproblem at bus $0$ is ($v_1$ is given)

\noindent OPF-bus0-2.0:
\begin{eqnarray*}
\min_{x} && f_0(p_0)+\lambda_1(\hat P_0+\ell_0 r_0)+\lambda_2(\hat Q_0+\ell_0 x_0)+\lambda_3(-v_0+2(r_0\hat P_0+x_0\hat Q_0)-\ell_0 |z_0|^2)+ \frac{\rho}{2}(v_1-v_0+2(r_0\hat P_0+x_0\hat Q_0)-\ell_0 |z_0|^2)^2\\
\text{s.t.}
&& p_0=\hat P_0\\
&& q_0=\hat Q_0\\
&& v_0\ell_0\geq \hat P_0^2+\hat Q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline q_0\leq q_0\leq \overline q_0
\end{eqnarray*}
or

\noindent OPF-bus0-2.1:
\begin{eqnarray*}
\min_{x} && f_0(p_0)+\lambda_1(p_0+\ell_0 r_0)+\lambda_2( q_0+\ell_0 x_0)+\lambda_3(-v_0+2(r_0 p_0+x_0 q_0)-\ell_0 |z_0|^2)+ \frac{\rho}{2}(v_1-v_0+2(r_0p_0+x_0q_0)-\ell_0 |z_0|^2)^2\\
\text{s.t.}
&& v_0\ell_0\geq  p_0^2+ q_0^2\\
&& \underline v_0\leq v_0\leq \overline v_0\\
&& \underline p_0\leq p_0\leq \overline p_0\\
&& \underline q_0\leq q_0\leq \overline q_0
\end{eqnarray*}
If $f_0(p_0)$ is linear in $p_0$, then OPF-bus0-1.1 is a LQP of the following form:
\begin{eqnarray*}
\min && \sum_{i=1}^4 c_ix_i+\frac{\rho}{2}(\sum_{i=1}^4d_ix_i+d_5)^2\\
\text{s.t.}&&\underline x_i \leq  x_i\leq \overline x_i \ \ 1\leq i\leq 4 \\
&& x_3x_4\geq x_1^2+x_2^2
\end{eqnarray*}

Let $y_1=x_1$, $y_2=x_2$, $y_3=(x_3-x_4)/2$ and $y_4=(x_3+x_4)/2$, the above problem has the following form:
\begin{eqnarray*}
\min && \sum_{i=1}^4 c'_iy_i+\frac{\rho}{2}(\sum_{i=1}^4d'_iy_i+d'_5)^2\\
\text{s.t.}&&\underline x_i \leq  y_i\leq \overline x_i \ \ 1\leq i\leq 2 \\
&&  \underline x_3 \leq   y_3+y_4\leq \overline x_3\\
&&  \underline x_4 \leq  y_4-y_3 \leq \overline x_4\\
&& y\in SOC(\mathbf{R}^4)
\end{eqnarray*}

\subsection{Modified ADMM \& Dual Decomposition}

It turns out that most of the constraints are local, thus is unnecessary to relax.

\section{Distributed Algorithm for OPF}\label{sec:alg}

We assume SOCP relaxation is exact and  develop in this section
a distributed algorithm that solves ROPF.
We first review a standard alternating direction method of multiplier (ADMM).
We then make use of the structure of ROPF to speed up the standard ADMM algorithm
by deriving close form expressions for the optimization subproblems in each ADMM iteration.

\subsection{Preliminary: ADMM}

ADMM blends the decomposability of dual decomposition with the superior convergence properties of the method of multipliers
\cite{boyd2011distributed}. It solves optimization problem of the form:
\begin{eqnarray}
\min_{x,z} && f(x)+g(z) \nonumber \\
\text{s.t.} && x\in\mathcal{K}_x, \ \ z\in\mathcal{K}_z \label{eq:admm}\\
&& Ax+Bz=c \nonumber
\end{eqnarray}
where $\mathcal{K}_x,\mathcal{K}_z$ are convex sets. Let $\lambda$ denote the Lagrange
 multiplier for the constraint $Ax+Bz=c$.   Then the augmented Lagrangian is defined as
\begin{eqnarray*}
L_\rho(x,z,\lambda)&:=&f(x)+g(z)+\lambda^T(Ax+Bz-c)\\
&&+\frac{\rho}{2}\|Ax+Bz-c\|^2,
\end{eqnarray*}
where  $\rho\geq 0$ is a constant. When $\rho=0$, the augmented Lagrangian reduces to
the standard Lagrangian. ADMM consists of the iterations:
\begin{subequations}\label{eq:update}
\begin{eqnarray}
x^{k+1}&\in&\arg\min_{x\in\mathcal{K}_x} L_\rho(x,z^{k},\lambda^k)\label{eq:xupdate}\\
z^{k+1}&\in&\arg\min_{z\in\mathcal{K}_z} L_\rho(x^{k+1},z,\lambda^k)\label{eq:zupdate}\\
\lambda^{k+1}&=&\lambda^{k}+\rho(Ax^{k+1}+Bz^{k+1}-c)\label{eq:mupdate}
\end{eqnarray}
\end{subequations}
Compared to dual decomposition, ADMM is guaranteed to converge to an optimal
solution under less restrictive conditions. Let
\begin{subequations}\label{eq:feasible}
\begin{eqnarray}
r^k&:=&\|Ax^k+Bz^k-c\| \label{eq:pfeasible}\\
s^k&:=&\rho\|A^TB(z^{k}-z^{k-1})\| \label{eq:dfeasible}
\end{eqnarray}
\end{subequations}
They can be viewed as the residuals for primal and dual feasibility.
Assume:
\begin{itemize}
\item A1: $f$ and $g$ are closed proper and convex.
\item A2: The unaugmented Lagrangian $L_0$ has a saddle point.
\end{itemize}
The correctness of ADMM is guaranteed by the following result
in \cite[Chapter 3]{boyd2011distributed}.
\begin{proposition}[\cite{boyd2011distributed}]
Suppose A1 and A2 hold. Let $p^*$ be the optimal objective value.
Then
\begin{eqnarray*}
\lim_{k\rightarrow \infty}r^k=0,  \quad  \lim_{k\rightarrow \infty}s^k=0
\end{eqnarray*}
implying
\begin{eqnarray*}
\lim_{k\rightarrow \infty} f(x^k)+g(z^k)= p^*
\end{eqnarray*}
\end{proposition}

\subsection{Decoupling in ADMM}\label{sec:application}

In applying ADMM to ROPF, we first exploit the structure of ROPF to derive
subproblems that are decoupled and can be solved concurrently.  We then
derive closed form solutions to these subproblems.  In this subsection we explain
how the standard technique of decoupling through local variables.

Consider the problem:
\begin{subequations}\label{eq:admm_app}
\begin{eqnarray}
\min_{x\in \mathbb R^n} && f(x) \label{eq:admm_app1} \\
\text{s.t.} &&    a_i^Tx=b_i, \ \ i\in \mathcal{I}  \label{eq:admm_app2}\\
&& x\in  \mathcal{K}_z \label{eq:admm_app3}
\end{eqnarray}
\end{subequations}
where $f(x)$ is a convex function and $\mathcal{K}_z \subseteq \mathbb R^n$ is a convex set.
Suppose we
Let $\{\mathcal{I}_l,1\leq l\leq m\}$ be a partition of $\mathcal{I}$, i.e. $\cup_{1\leq l\leq m}\mathcal{I}_l=\mathcal{I}$, and
\begin{eqnarray*}
\mathcal{K}_x:=\cup_{l=1}^m\{x^{(l)}\mid a_i^Tx^{(l)}=b_i, i\in\mathcal{I}_l \}
\end{eqnarray*}
then \eqref{eq:admm_app} is equivalent to
\begin{eqnarray}
\min_{x,z} && f(z)\nonumber\\
\text{s.t.}&& x\in\mathcal{K}_x,  \ \ z\in \mathcal{K}_z \label{eq:admm_app4}\\
&& x^{(l)}-z=0 \quad   1 \leq  l\leq m \nonumber
\end{eqnarray}
where $x:=\{x^{(l)},1\leq l\leq m\}$. Relax the last equality for each $l$ and the augmented Lagrangian is
{\small
\begin{eqnarray*}
L_\rho(x,z,\lambda):=f(z)+\sum_{l=1}^{m}\left( (\lambda^{(l)})^T(x^{(l)}-z)+\frac{\rho}{2}\|x^{(l)}-z\|^2\right)
\end{eqnarray*}}
Then we can update the primal variables $(x,z)$ and the multipliers $\lambda$ according to \eqref{eq:update}.

The purpose of the partition of the index set $\mathcal{I}$ is to make the constraints in \eqref{eq:admm_app2} local, i.e. the update in \eqref{eq:update} can be decomposed into several small optimization subproblems that can be solved simultaneously. Next, we will show that two partitions are sufficient for designing distributed OPF algorithm using this approach.

\subsection{Distributed OPF algorithm}

In this section, we apply the decomposition approach described in section \ref{sec:application} to develop a distributed algorithm that solves ROPF \eqref{eq:ropf}. The advantages of the proposed algorithm are
\begin{itemize}
\item For each agent\footnote{Each bus is an agent.}, we solve its corresponding subproblem efficiently, i.e. we derive a close form expression for each optimization subproblem, which is usually solved by iterative algorithms:\cite{lam2012optimal,lam2012distributed,dall2012distributed,sun2013fully,devane2013stability,li2012demand,kim1997coarse,baldick1999fast}.
\item Communication is only required between adjacent buses.
\end{itemize}
We can write the ROPF problem \eqref{eq:ropf} in the form of \eqref{eq:admm_app} as sequel.
\begin{eqnarray*}
\min_{x}&& \sum_{i\in \mathcal{N}}f_i(p_i,\ell_i)\\
\text{s.t.} && x \text{ satisfies } \eqref{eq:bfm1}-\eqref{eq:bfm3}\\
&& x\in\mathcal{K}_z
\end{eqnarray*}
where $\mathcal{K}_z:=\{z\mid z \text{ satisfies \eqref{eq:operation} and \eqref{eq:bfm5}} \}$. Next, we will partition the constraints in \eqref{eq:bfm1}-\eqref{eq:bfm3} to write it equivalently in the form of \eqref{eq:admm_app4} such that the update in \eqref{eq:update} can be done simultaneously by each agent.

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figure/tree.png}
\caption{Example of a graph with tree topology.}
\label{fig:tree}
\end{figure}

We assume each bus $i\in\mathcal{N}$ is an agent with its local variables $x_i:=(v_i,\ell_i,P_i,Q_i,p_i,q_i)$. Then the constraints in $\mathcal{K}_z$ are local, i.e. they are separable for each agent $i$. Note that the network $\mathcal{T}$ is a tree, which is a bipartite graph and can be partitioned into two groups $\mathcal{I}_1:=\{i\in\mathcal{N}\mid i \text{ is in the odd layer}\}$ and $\mathcal{I}_2:=\{i\in\mathcal{N}\mid i \text{ is in the even layer}\}$. For instance, there are four layers in Fig. \ref{fig:tree} and $\mathcal{I}_1=\{1,4,5,6\}$ and $\mathcal{I}_2=\{2,3,7,8,9\}$. Let
\begin{eqnarray*}
\mathcal{K}_x=\cup_{l=1}^2\{x_i^{(l)}\mid x_i^{(l)} \text{ satisfies \eqref{eq:bfm1}-\eqref{eq:bfm3} for }i\in\mathcal{I}_l\}
\end{eqnarray*}

Under such partition, bus $i\in \mathcal{I}_1$ ($\mathcal{I}_2$) is only coupled with buses $k\in \mathcal{I}_2$ ($\mathcal{I}_1$). In particular, by \eqref{eq:bfm1}, each bus $i$ needs the voltage $v_{A_i}$ from its ancestor $A_i$, thus we create a copy $v_{A_i,i}$, representing the replication of $v_{A_i}$ at bus $i$. On the other hand, in \eqref{eq:bfm2} and \eqref{eq:bfm3}, each bus $i$ needs $\ell_j,P_j,Q_j$ from all of its children $j\in C_i$ and we create a copy $\ell_{j,i},P_{j,i},Q_{j,i}$ of each $j\in C_i$ at bus $i$. Then the ROPF problem \eqref{eq:ropf} can be written in the form of \eqref{eq:admm_app4}.

\noindent E-ROPF:
\begin{subequations}\label{eq:mropf}
\small
\begin{align}
\min_{x} \ \ & \sum_{i\in\mathcal{N}}f_i(p_i^{(z)},\ell_i^{(z)}) \nonumber\\
\mathrm{s.t.}\ \ &v_{A_i,i}^{(l)}=v_i^{(l)}-2(r_i P_i^{(l)}+x_iQ_i^{(l)})+\ell_{i}^{(l)}(r_i^2+x_i^2) \ \ i\in \mathcal{E}  \label{eq:d1}\\
& \sum_{j\in C_i}(P_{j,i}^{(l)}-\ell_{j,i}^{(l)}r_{j})+p_i^{(l)}=P_{i}^{(l)} \ \ i\in \mathcal{N}  \label{eq:d2}\\
& \sum_{j\in C_i}(Q_{j,i}^{(l)}-\ell_{j,i}^{(l)}x_{j})+q_i^{(l)}=Q_{i}^{(l)} \ \ i\in \mathcal{N}  \label{eq:d3}\\
& (P_i^{(z)})^2+(Q_i^{(z)})^2\leq v_i^{(z)}\ell_{i}^{(z)} \ \ i\in\mathcal{E}  \label{eq:d4}\\
& (p_i^{(z)},q_i^{(z)})\in\mathcal{S}_i  \ \ i\in\mathcal{N}  \label{eq:d5}\\
& \underline v_i\leq  v_i^{(z)}\leq \overline v_i \ \ i\in\mathcal{N} \label{eq:d6}\\
& x^{(l)}-z=0 \ \ l\in\{1,2\} \label{eq:d7}
\end{align}
\end{subequations}
where \eqref{eq:d1}-\eqref{eq:d3} form $\mathcal{K}_x$ and $\eqref{eq:d4}-\eqref{eq:d6}$ form $\mathcal{K}_z$. The value of the superscript $l$ depends on the partition that $i$ belongs to, i.e. $l=1$ ($2$) if $i\in\mathcal{I}_1$ ($\mathcal{I}_2$). Let $\lambda$, $\gamma$ and $\mu$ be Lagrangian multipliers associated with $x^{(l)}-z=0$, in particular

\vspace{0.05in}

\begin{tabular}{|c|c||c|c|}
\hline
$\lambda_{1,i}$: & $v_i^{(l)}-v^{(z)}_i=0$ & $\lambda_{2,i}$: & $\ell_i^{(l)}-\ell^{(z)}_i=0$\\
\hline
$\lambda_{3,i}$: & $P_i^{(l)}-P^{(z)}_i=0$ & $\lambda_{4,i}$: & $Q_i^{(l)}-Q^{(z)}_i=0$\\
\hline
$\lambda_{5,i}$: & $p_i^{(l)}-p^{(z)}_i=0$ & $\lambda_{6,i}$: & $q_i^{(l)}-q^{(z)}_i=0$\\
\hline
$\mu_{1,i}$: & $\ell_{i,A_i}^{(l)}-\ell_{i}^{(z)}=0$ & $\mu_{2,i}$: & $P_{i,A_i}^{(l)}-P_{i}^{(z)}=0$ \\
\hline
$\mu_{3,i}$: & $Q_{i,A_i}^{(l)}-Q_{i}^{(z)}=0$ & &\\
\hline
$\gamma_j$: & \multicolumn{3}{|c|}{$v_{i,j}^{(l)}-v_{i}^{(z)}=0$ for $j\in C_i$} \\
\hline
\end{tabular}
Denote
\begin{eqnarray*}
x^{(l)}_i&:=&(v_i^{(l)},\ell_i^{(l)},P_i^{(l)},Q_i^{(l)},p_i^{(l)},q_i^{(l)})\\
z_i&:=&(v^{(z)}_i,\ell^{(z)}_i,P^{(z)}_i,Q^{(z)}_i,p^{(z)}_i,q^{(z)}_i)\\
x^{(l)}_{i,A_i}&:=&(\ell_{i,A_i}^{(l)},P_{i,A_i}^{(l)},Q_{i,A_i}^{(l)})\\
\lambda_i&:=& (\lambda_{k,i}\mid k=1,2,3,4,5,6)\\
\mu_i &:=&  (\mu_{k,i}\mid k=1,2,3)
\end{eqnarray*}
Then the variables maintained by each bus (agent) $i$ is given below.
\begin{eqnarray*}
\mathcal{A}_i:=\{x^{(l)}_i, x_{i,A_i}^{(l)}, \{v^{(l)}_{i,j},\gamma_j\mid j\in C_i\}, z_i,\lambda_i,\mu_i,\}.
\end{eqnarray*}

\begin{figure*}
\begin{subequations}\label{eq:AL}
\scriptsize
\begin{align}
&L_{\rho}(x,z,\lambda,\gamma,\mu)\label{eq:AL1}\\
=&\sum_{i\in\mathcal{N}}\left(f_i(p_i^{(z)})+\lambda_i^T(x^{(l)}_i-z_i)+\mu_i^T(x^{(l)}_{i,A_i}-z_i)+\sum_{j\in C_i}\gamma_j(v_{i,j}^{(l)}-v_{i}^{(z)})+\frac{\rho}{2}\left(\|x^{(l)}_i-z_i\|^2 + \|x^{(l)}_{i,A_i}-z_i\|^2+\sum_{j\in C_i}(v_{i,j}^{(l)}-v_{i}^{(z)})^2 \right)\right)\label{eq:AL2}\\
=&\sum_{i\in\mathcal{N}}\left(f_i(p_i^{(z)})+\lambda_i^T(x^{(l)}_i-z_i)+\sum_{j\in C_i}\mu_j^T(x^{(l)}_{j,i}-z_j)+\gamma_i(v_{A_i,i}^{(l)}-v_{A_i}^{(z)})+\frac{\rho}{2}\left(\|x^{(l)}_i-z_i\|^2 + \sum_{j\in C_i}\|x^{(l)}_{j,i}-z_j\|^2+(v_{A_i,i}^{(l)}-v_{A_i}^{(z)})^2 \right)\right)\label{eq:AL3}
\end{align}
\end{subequations}
\hrulefill
\end{figure*}

Next, we demonstrate that the E-ROPF problem \eqref{eq:mropf} can be solved in a distributed manner, i.e. both the $x$-update \eqref{eq:xupdate} and $z$-update \eqref{eq:zupdate} can be decomposed into small subproblems that can be solved simultaneously. For ease of presentation, we remove the iteration number $k$ in \eqref{eq:update} for all the variables, which will be updated accordingly after each subproblem is solved. The augmented Lagrangian for modified ROPF problem is given in \eqref{eq:AL}. We abuse notations in \eqref{eq:AL} and denote $x^{(l)}_{i,A_i}-z_i:=(\ell_{i,A_i}^{(l)}-\ell_i^{(z)},P_{i,A_i}^{(l)}-P_i^{(z)},Q_{i,A_i}^{(l)}-Q_i^{(z)})$ although there are 3 entries in $x^{(l)}_{i,A_i}$ but 6 entries in $z_i$. By \eqref{eq:AL3}, in the x-update step \eqref{eq:xupdate}, we solve
\begin{eqnarray*}
\arg\min_{x\in\mathcal{K}_x}L_\rho(x,z,\lambda,\gamma,\mu)=\arg\min_{x\in\mathcal{K}_x}\sum_{i\in\mathcal{N}}G_i(x^{(l)}),
\end{eqnarray*}
where
\begin{align*}
&G_i(x^{(l)}):=\lambda_i^Tx^{(l)}_i+\sum_{j\in C_i}\mu_j^Tx_{j,i}^{(l)}+\gamma_iv_{A_i,i}^{(l)}+\\
&\frac{\rho}{2}\left(\|x^{(l)}_i-z_i\|^2+\sum_{j\in C_i}\|x_{j,i}^{(l)}-z_j\|^2+(v_{A_i,i}^{(l)}-v_{A_i}^{(z)})^2\right)
\end{align*}
For each agent $i$, the corresponding subproblem is
\begin{align}
\min \ & G_i(x^{(l)})\label{eq:algx}\\
 \text{s.t.} \ &\ v_{A_i,i}^{(l)}=v_i^{(l)}-2(r_iP_{i}^{(l)}+x_iQ_{i}^{(l)})+\ell_{i}^{(l)}(r_i^2+x_i^2) \nonumber\\%\\
& \sum_{j\in C_i}(P^{(l)}_{j,i}-\ell^{(l)}_{j,i}r_{j})+p_i^{(l)}=P_{i}^{(l)} \nonumber\\
& \sum_{j\in C_i}(Q^{(l)}_{j,i}-\ell^{(l)}_{j,i}x_{j})+q_i^{(l)}=Q_{i}^{(l)} \nonumber
\end{align}
which takes the following form
\begin{eqnarray}
\min_x \ \ \frac{\rho}{2}\|x\|_2^2+c^Tx \quad \text{s.t. } Bx=0  \label{eq:xupdate1}
\end{eqnarray}
whose close form solution is given as
\begin{eqnarray*}
x=\frac{1}{\rho}(B^T(BB^T)^{-1}Bc-\frac{1}{\rho}c
\end{eqnarray*}
Prior to perform the update, each agent $i$ needs to request variables from its parent $A_i$ and children $j\in C_i$. In particular, it needs to get $v_{A_i,i}^{(l)}$, $v_{A_i}^{(z)}$ and $\gamma_i$ from its ancestor $A_i$ and $x_{j,i}^{(l)},z_{j},\mu_j$ from all of its children $j\in C_i$. After the update, it needs to send the updated variables back to its ancestor $A_i$ and its children $j\in C_i$. The communication is illustrated in figure \ref{fig:xupdate}.

\begin{figure}
\centering
\subfloat[Data received by agent $i$ before the $x$-update.] {
	\includegraphics[scale=0.22]{figure/x_update1.png}
	\label{fig:x_update1}
	}
\subfloat[Data sent by agent $i$ after the $x$-update.]{
	\includegraphics[scale=0.22]{figure/x_update2.png}
	\label{fig:x_update2}
	}
\caption{The communications in $x$-update step.}
\label{fig:xupdate}
\end{figure}

 Based on \eqref{eq:AL2}, In the $z$-update step, we solve
\begin{eqnarray*}
\arg\min_{z\in\mathcal{K}_z}L_\rho(x,z,\lambda,\gamma,\mu)=\arg\min_{z\in\mathcal{K}_z}\sum_{i\in\mathcal{N}}H_i(z),
\end{eqnarray*}
where
\begin{align*}
&H_i(z):=f(p_i^{(z)},\ell_i^{(z)})-\lambda_i^Tz_i-\mu_i^Tz_i-\sum_{j\in C_i}\gamma_jv_i^{(z)}+\\
&\frac{\rho}{2}\left(\|x^{(l)}_i-z_i\|^2 + \|x^{(l)}_{i,A_i}-z_i\|^2+\sum_{j\in C_i}(v_{i,j}^{(l)}-v_{i}^{(z)})^2 \right)
\end{align*}
The subproblem solved by each agent $i$ is
\begin{eqnarray*}
\min && H_i(z)\label{eq:algz}\\
\text{s.t.}&&   (P^{(z)}_{i})^2+(Q^{(z)}_{i})^2 \leq v^{(z)}_i\ell^{(z)}_{i} \\
&& \underline v_i\leq v^{(z)}_i\leq \overline v_i\nonumber\\
&& (p_i^{(z)},q_i^{(z)})\in \mathcal{S}_i
\end{eqnarray*}
Suppose $f_i(p_i^{(z)},\ell_i^{(z)})$ is linear or quadratic over its argument, let $k=(|C_i|+1)^{-\frac{1}{2}}$ and scale $v_i^{(k)}$ down by $k$ in the above problem, then it takes the following form:

 \begin{eqnarray}\label{eq:ab1}
\min_y && \sum_{i=1}^6(y_i^2+c_iy_i) \\
\text{s.t. } && y_1^2+y_2^2\leq k^2 y_3y_4  \nonumber\\
&& \underline y_3 \leq y_3\leq \overline y_3 \nonumber\\
&& (y_5,y_6)\in \mathcal{S}_i \nonumber
\end{eqnarray}
Note that $(y_1,\dots,y_4)$ and $(y_5,y_6)$ are independent in the optimization problem \eqref{eq:ab1}, thus we have two independent subproblems. The first subproblem solves
\begin{eqnarray}
\min_{y_5,y_6} \  \sum_{i=5}^6(y_i^2+c_iy_i) \text{ s.t. }  (y_5,y_6)\in\mathcal{S}_i\nonumber
\end{eqnarray}
which determines the update of $(y_5,y_6)$. If the feasible set $\mathcal{S}_i$ takes the form of \eqref{eq:S1}, the close form solution is
\begin{eqnarray*}
(y_5,y_6)=-\frac{1}{2}\min\{1,\frac{2\overline s_i}{\sqrt{c_1^2+c_2^2}}\}(c_5,c_6)
\end{eqnarray*}
If the feasible set $\mathcal{S}_i$ takes the form of \eqref{eq:S2}, the close form solution is
\begin{eqnarray*}
(y_5,y_6)=(\left[\frac{-c_5}{2}\right]_{\underline p_i}^{\overline p_i}, \left[\frac{-c_6}{2}\right]_{\underline q_i}^{\overline q_i}),
\end{eqnarray*}
where $[x]_a^b:=\min\{b,\max\{x,a\}\}$. The second subproblem solves
 \begin{eqnarray*}
\min_{y_1,y_2,y_3,y_4} && \sum_{i=1}^4(y_i^2+c_iy_i) \\
\text{s.t. } && y_1^2+y_2^2\leq k^2 y_3y_4  \\
&& \underline y_3 \leq y_3\leq \overline y_3
\end{eqnarray*}
which determines the update of $(y_1,\dots,y_4)$. In Appendix \ref{app:solver2}, we show the procedure of how to obtain close form expressions for this problem. After the z-update step, we update the Lagrangian multipliers for the relaxed constraints as \eqref{eq:mupdate}. Both the z-update and multiplier update steps only involve variables within the agent and no communication is required.

Finally, we will specify the stopping criteria for the algorithm. Empirical results show that the the solution is accurate enough when both the primal residual $r^k$ defined in \eqref{eq:pfeasible} and the dual residual $s^k$ defined in \eqref{eq:dfeasible} are below $10^{-4}\sqrt{N}$, where $N$ is the number of buses. The pseudo code for the algorithm is summarized in Table \ref{tab:alg}.
\begin{table}[htdp]
\caption{Distributed algorithm of OPF}
\centering
\begin{tabular}{|p{8cm}|}
\hline
{\bf Distributed Algorithm of OPF}\\
\hline
{\bf Input}: Network $\mathcal{T}$, Power injection region $\mathcal{S}_i$, Voltage region $(\underline v_i,\overline v_i)$,\\
\hspace{0.6cm} Line impedance $z_i$\\
{\bf Output}: Voltage $v$, Power injection $s$\\
\hline
1. Initialize the variables with any number. \\
2. Iterate the following step until both the primal residual $s^k$ \eqref{eq:pfeasible} and the dual residual $r^k$ \eqref{eq:dfeasible} are below $10^{-4}\sqrt{N}$.\\
\hspace{0.2cm} a. In the x-update, each agent $i$ solves \eqref{eq:algx} to update $x$.\\
\hspace{0.2cm} b. In the z-update, each agent $i$ solves \eqref{eq:algz} to update $z$.\\
\hspace{0.2cm} c. In the multipliers update, update the multiplier $\lambda,\mu,\gamma$ by  \eqref{eq:mupdate}.\\
\hline
\end{tabular}
\label{tab:alg}
\end{table}

\section{Case Study}\label{sec:case}

In this section, we first demonstrate the scalability of the distributed algorithm proposed in section \ref{sec:alg} by testing it on the model of a 2,065-bus distribution circuit in the service territory of the Southern California Edison (SCE). In particular, we also show the advantage of deriving closed form expression by comparing the computation time of solving the subproblems between off-the-shelf solver (CVX \cite{grant2008cvx}) and our algorithm. Second, we simulate the proposed algorithm on networks of different sizes to understand the factors that affect the convergence rate. The algorithm is implemented in Matlab 2014 and run on a Macbook pro 2014 with i5 dual core processor.

\subsection{Simulation on a 2,065 bus circuit}\label{sec:case1}

In the 2,065 bus distribution network, there are 1,409 household loads whose power consumptions are within 0.07kw--7.6kw and 142 commercial loads, whose power consumptions are within 5kw--36.5kw. There are 135 rooftop PV panels, whose nameplates are within 0.7--4.5kw, distributed across the 1,409 houses.

The network is unbalanced three phase.
We assume that the three phases are decoupled such that the network becomes identical single phase network. The voltage magnitude at each load bus is allowed to lie within
$[0.95,1.05]$ per unit (pu), i.e. $\overline v_i=1.05^2$ and $\underline v_i=0.95^2$ for $i\in\mathcal{N}_+$. The control devices are the rooftop PV panels whose real and reactive power injections are controlled. The objective is to minimize power loss across the network, namely $\alpha_i=0,\beta_i=1$ for $i\in\mathcal{N}$, where $\alpha_i,\beta_i$ are coefficients in the objective function and defined in \eqref{eq:objective}. Each bus is an agent and there are 2,065 agents in the network
that solve the OPF problem in a distributed manner.

\begin{figure}
\centering
\subfloat[Primal and dual residual] {
	\includegraphics[scale=0.3]{figure/residual.png}
	\label{fig:residual}
	}
\subfloat[Objective value]{
	\includegraphics[scale=0.3]{figure/objective.png}
	\label{fig:objective}
	}
\caption{Simulation results for 2065 bus distribution network.}
\label{fig:rossi2065}
\end{figure}

We mainly focus on the time of convergence (ToC) for
the proposed distributed algorithm. The algorithm is run on a single machine. To roughly estimate the ToC (excluding communication overhead) if the algorithm is run on distributed machines, we divide the total time by the number of agents. Recall that the stopping criteria is that both the primal and dual residual are below $10^{-4}\sqrt{|\mathcal{N}|}$ and Figure \ref{fig:residual} illustrates the evolution of $r^k/\sqrt{|\mathcal{N}|}$ and $s^k/\sqrt{|\mathcal{N}|}$ versus iterations $k$. The stopping criteria are satisfied after $1,114$ iterations. The evolution of the objective value is illustrated in Figure \ref{fig:objective}. It takes 1,153s to run 1,114 iterations on a single computer.
Then the ToC is roughly 0.56s if we implement the algorithm in a distributed manner not counting communication overhead.

Finally, we show the advantage of closed form solution by comparing the computation time of solving the subproblems by an off-the-shelf solver (CVX) and by our algorithm. In particular, we compare the average computation time of solving the subproblem in both the $x$-update and the $z$-update step. In the $x$-update step, the average time required to solve the subproblem is $1.7\times10^{-4}$s for the proposed algorithm but $0.2$s for CVX.  In the $z$-update step, the average time required to solve the subproblem is $5.1\times10^{-4}$s for the proposed algorithm but $0.3$s for CVX. Thus, each ADMM iteration only takes about $6.8\times 10^{-4}$s for the proposed algorithm but $0.5$s for using iterative algorithm, which is a 1,000x speedup.

\subsection{Rate of Convergence}

\begin{table}
\caption{Statistics of different networks}
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
Network & Diameter & Iteration & Total Time(s) & Avg time(s)\\
\hline
2065Bus& 64 & 1114 &1153 & 0.56\\
\hline
1313Bus& 53 &671 &471 & 0.36\\
\hline
792Bus& 45 &524 &226 & 0.29\\
\hline
363Bus& 36 &289 &112 & 0.24\\
\hline
108Bus& 16 & 267 &16 & 0.14\\
\hline
\end{tabular}
\end{center}
\label{tab:statistics}
\end{table}

In section \ref{sec:case1}, we demonstrate that the proposed distributed algorithm can dramatically reduce the computation time within each iteration and therefore is scalable to a large practical 2,065 bus distribution network. The time of convergence(ToC) is determined by both the computation time required within each iteration and the number of iterations. In this subsection, we study the number of iterations, namely rate of convergence.

To our best knowledge, most of the works on convergence rate for ADMM based algorithms study how the primal/dual residual changes as the number of iterations increases. Specifically, it is proved  in \cite{wei20131,hong2012linear} that the general ADMM based algorithms converge linearly under certain assumptions. Here, we consider the rate of convergence from another two factors, network size $N$ and diameter $D$, \emph{i.e.} given the termination criteria in Table \ref{tab:alg}, the impact from network size and diameter on the number of iterations. The impacts from other factors, \emph{e.g.} form of objective function and constraints, etc. are beyond the scope of this paper.

First, we simulate the algorithm on different networks (that are subnetworks of the 2,065-bus system) and some statistics are given in Table \ref{tab:statistics}. For simplicity, we assume the number of iterations $T$ to converge takes the linear form $T=a N+b D$. Using the data in Table \ref{tab:statistics}, the parameters $a=0.34$, $b=5.53$ give the least square error. It means that the network diameter has a stronger impact than the network size on the rate of convergence.

 To further illustrate the phenomenon, we simulate the algorithm on two extreme cases: 1) Line network in Fig. \ref{fig:line}, whose diameter is the largest given the network size, 2) Fat tree network in Fig. \ref{fig:fattree}, whose diameter is the smallest ($2$) given the network size. In Table \ref{tab:statistics1}, we record the number of iterations for both line and fat tree network of different sizes. For line network, the number of iterations increases notably as the size increases. For fat tree network, the trend is less obvious compared to line network.

\begin{figure}
\centering
\subfloat[Line network] {
	\includegraphics[scale=0.6]{figure/LineNetwork.png}
	\label{fig:line}
	}
\subfloat[Fat tree network]{
	\includegraphics[scale=0.6]{figure/FattreeNetwork.png}
	\label{fig:fattree}
	}
\caption{Topology for tree and fat tree networks.}
\label{fig:network}
\end{figure}

\begin{table}
\caption{Statistics of line and fat tree networks}
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
Size & $\#$ of iterations (Line) & $\#$ of iterations (Fat tree) \\
\hline
$5$ & $43$ & $31$ \\
\hline
$10$ & $123$  & $51$\\
\hline
$15$ & $198$ & $148$\\
\hline
$20$ & $286$ & $87$\\
\hline
$25$ & $408$ & $173$\\
\hline
$30$ & $838$ & $119$\\
\hline
$35$ & $1471$ & $187$\\
\hline
$40$ & $2201$ & $109$\\
\hline
$45$ & $2586$ & $182$\\
\hline
$50$ & $3070$ & $234$\\
\hline
\end{tabular}
\end{center}
\label{tab:statistics1}
\end{table}

redpajama_set_name: RedPajamaArXiv


This year has been marked by the move to Berlin. My home-office was finnished early february. And I have since mastered two records for Sysselmann (darkambient from Norway), finnished records with, The Norwegian Flute ensemble (our third together), WoodsFolk and Helmersson Pettersson Karlsson Sjönvall & Möller. Had a great time recording an EP with Berlin based Dirty Feetz as well as some location recordings with other local artists. Slowly, but shurely things are looking up for 2019.


text:
CSK thrash Daredevils to move upto 4th spot
Edited By Odishatv Bureau Published By Odishatv Bureau On May 13, 2012 - 8:07 AM
Chennai: Chennai Super Kings bowlers exposed the vulnerability of the Delhi Daredevils` top-order as the defending champions thrashed the current table toppers by nine wickets in an IPL match, here on Saturday.
Opting to bowl on a track where the ball did a fair bit during initial stages, CSK bowlers led by Ben Hilfenhaus restricted Daredevils to a meagre 114 for five. The total was never going to be enough and CSK openers Mike Hussey (38, 32 balls, 5×4, 1×6) and Murali Vijay (48 no, 40 balls, 5×4, 1×6)ensured that there are no hiccups as they put on 75 runs for the opening stand in first 10 overs.
The emphatic victory with 28 balls to spare also ensured that CSK with 15 points moved upto fourth spot ahead of Royal Challengers Bangalore.
It was Hilfenhaus who set up the convincing win by polishing off the top three batsmen in the opposition line-up in his first spell of three overs thereby ending Daredevils` chances of putting up a sizeable total. He removed skipper Virender Sehwag (4), last match`s centurion David Warner (8) and Naman Ojha (3) to reduce Delhi to 24 for three in only first five overs.
In another couple of deliveries, it was four down with Mahela Jayawardene (8) also back in the dug-out courtesy Albie Morkel. Hilfenhaus` first spell figures read 3-0-14-3 and he ultimately finished with three for 27 courtesy a few big shots by Yogesh Nagar in the penultimate over.
Nagar (43 not out, 47 balls, 1×4, 1×6) and former India player Y Venugopal Rao (27, 24, 2×6) added 48 runs for the fifth wicket but with the track being one that is difficult to bat on, scoring runs at a fast pace wasn`t the order of the day.
The slide started in the very first over as Hilfenhaus bowled a beauty that saw Sehwag`s stumps go for a walk. The ball pitched on the middle stump and moved a shade as Sehwag got squared up.
Warner didn`t get the required elevation as he hit one straight to Ashwin at mid-off. Ojha, who played a blinder couple of days back gloved one which Dhoni fumbled twice before clutching onto it. The last chance of putting up a big score depended on Jayawardene but he committed early to a stroke to offer a simple catch to Mike Hussey at mid-on.
Venugopal did try his bit as he lofted Ravindra Jadeja for a straight six – the first of the match in the ninth over. The duo mainly played in singles and doubles but boundaries were hard to come by. Venugopal hit another straight six off left-arm spinner Shadab Jakati.
However a brilliant piece of work by Albie at short cover saw the back of Venu and it slowed things down further. Nagar scratched around and finally hit a four and a six off Hilfenhaus in the penultimate over but that didn`t boost the total significantly.


Helping to improve the lives of Coloradans is important, and so is receiving timely payment for the services you provide. Your time is valuable, which is why we strive to make the claims process as easy and efficient as possible for our providers. For claims information for the State Managed Care Network (SMCN), click here.
Here are four simple steps to follow to help ensure your claims are paid quickly.
You should submit all Medicaid physical health claims directly to the state through the Health First Colorado (Colorado's Medicaid Program) Provider Web Portal. Click here to read more about that process.
2. Be sure to choose a payment option for how you want to receive your payment. You may choose between an electronic fund transfer (EFT) payment, a Virtual Credit Card (VCC) (the default option if you don't choose another option) or a paper check. Click here for information on other payment options and how to request a change.
3. Be sure to file within the timely filing limit, which is 120 days from the date of service or the time limit specified in your contract.
4. You can check the status of a Colorado Access claim through our provider portal.
If you have additional questions about the claims process, visit our FAQ page or call us for additional assistance. For State Managed Care Network (SMCN) information, click here.
If you don't want to receive a VCC payment, you must opt-out by calling 855-886-3863. We encourage you to take action and choose your preferred payment option. Click here for information on other payment options and how to request a change.
Please contact your preferred clearinghouse directly to receive the appropriate payer ID required to submit claims. If you have questions about electronic claim submissions, please email edi_coordinator@coaccess.com. You can also find more information about claims in our FAQ.


The full schedule of the 2011 New Yorker Festival appears in this week's issue and at newyorker.com/festival.
We have two late-breaking events that aren't listed in the program guide. On Saturday, October 1st, at 10 P.M., the gospel legend Mavis Staples will join our staff writer Lawrence Wright for a "conversation with music," at Gramercy Theatre (127 East 23rd Street). More information here.
And on Sunday, October 2nd, at 4 P.M., the actor Paul Giamatti will sit down for a conversation with our staff writer Mark Singer, at SVA Theatre 1 (333 West 23rd Street). More information here.
Tickets for all events, including those two, will go on sale this Friday at noon E.T.


text:
{% extends "sqlshare_web/base.html" %}

{% block title %}SQLSHARE: Query{% endblock %}

{% load staticfiles %}

{% block content %}

SQL

        SQL Query:
        <textarea id="query_sql" name='query_sql' class="well" style="background:#fff;">{{ query.sql_code }}</textarea>

        <button type="button" class="btn btn-primary" id="run_query">RUN QUERY</button>

        <form action="/new/" method="POST" id="new_dataset_from_query_form">
        {% csrf_token %}
        <input type="hidden" name="sql" value="" id="new_query_sql"/>
        <button type="button" class="btn btn-default btn-xs" id="new_dataset_from_query"> NEW DATASET FROM QUERY</button>
        </form>

Query Preview

 Running query...

Query Preview

    {% include "sqlshare_web/sample_data_preview.html" with dataset=query is_query=True %}

{% endblock %}

redpajama_set_name: RedPajamaGithub


A recent Computer Technology Industry Association (CompTIA) survey of 400 US Human Resources professionals found that 65% of employers use IT certifications to differentiate between equally qualified candidates for a given job role.
While Vendor certifications are often based on time-bound examinations or a test of specific knowledge areas, the ACS offers professional certification to demonstrate currency in ICT. ACS certification encompasses the knowledge, skills and attributes of an individual, assessing qualifications alongside work experience and communications skills.
ACS Certification is not a "tick a box" in gaining certification. Candidates are assessed not on how many knowledge based exams or qualifications they have completed, but on demonstrated on the job experience in working with a technology. This is how ACS Certified Professionals distinguish themselves above their peers.
On November 6th only, ACS are offering members the opportunity to be certified via an onsite assessment. Normally onsite assessments are reserved for large accounts but ACS WA are holding a special open day and providing assessment slots for interested candidates on a 1st come 1st served basis.