functions above, it can be decomposed into subproblems for each charging outlet, renewable energy generator, and charging station. The following problems **P4(a)** and **P4(b)** are for every charging outlet to decide their charging rates. Problem **P5** is for station’s private renewable energy generator to regulate the charging rate $R_{i}(t)$ to the battery. And problem **P6** is for every charging station to determine the energy they consume from the grid.

If $Q_{ij}(t)\!>\!0$, $$\textbf{P4(a)}:~~\max_{0\leq r_{ij}(t)\leq r_{i,max}}~~~r_{ij}(t)[Q_{ij}(t)\!+\!H_i(t)\eta^-] \label{eq_18}$$

If $Q_{ij}(t)\!=\!0$, $$\textbf{P4(b)}:~~\max_{0\leq r_{ij}(t)\!\leq\!r_{i,max}}~~r_{ij}(t)[\sum_{k=1}^K\!E_k(t)W_{k,ij}(t)\!+\!H_i(t)\eta^-] \label{eq_19}$$$\sum_{k=1}^K E_k(t)W_{k,ij}(t)+H_i(t)\eta^-$ in **P4(b)** will be solved by directing policy in the next subsection, which is the solution of **P3**. $$\begin{aligned}
\textbf{P5:}~~&\min_{R_{i}\left( t\right) }~~\sum_{i=1}^{I}\!H_{i}\left( t\right)
R_{i}\left( t\right) \eta ^{+} \\ \label{eq_20}
&\mbox{s.t.}~~0\!\leq\!R_{i}\left( t\right)\!\leq\!\min\!\left\{ R_{i}^{\max
},U_{i}\left( t\right)\!-\!\sum\limits_{j=1}^{J_{i}}r_{ij}\left( t\right)
\!\right\} \notag\end{aligned}$$ $$\begin{aligned}
\textbf{P6:}~~&\min_{\!D_i^d(t)}~~\phi_t(\overrightarrow{D^d},\overrightarrow{\lambda})
\!=\!\sum_{i=1}^I\!D_i^d(t)\!\left(\!H_i(t)\eta^-+Vc(t)\!\right)\!+\!\sum_{l=1}^L\!\lambda_l
\!\left(\sum_{i:X_{li}=1}D_i^d(t)\!-\!P_l\!+\!\textbf{E}\{N_l(t)\}\!+\!\frac{\sigma_{N_l}}{\sqrt{2\epsilon}}\!\right) \\ \label{eq_21}
&\mbox{s.t.}~~D_{i}^{d}\left( t\right)\!\in\!\left[ 0,\left(
\sum\limits_{j=1}^{J_{i}}r_{ij}\left( t\right)\!-\!U_{i}\left( t\right) \right)
^{+}\right] \notag\end{aligned}$$

Notice that **P4(a)**, **P4(b)**, and **P5** are independent of Lagrangian multipliers. Thus only the dual problem of **P6** shall be considered as follows. $$\begin{aligned}
\widehat \textbf{P6}\textbf{:}~~&\max_{\overrightarrow{\lambda}}~\min_{D_i^d(t)}~~\phi_t(\overrightarrow{D^d},\overrightarrow{\lambda}) \\ \label{eq_22}
&\mbox{s.t.}~~\lambda_l\geq 0~~~\forall l\in \textbf{L}, \notag\end{aligned}$$which is equivalent to: $$\label{eq_23}
\begin{small}
\max_{\overrightarrow{\lambda}}\{\sum_{l=1}^L\lambda_l(\textbf{E}\{N_l(t)\}+\frac{\sigma_{N_l}}{\sqrt{2\epsilon}}-P_l)+ \min_{\begin{subarray}{1} D_i^b(t)\end{subarray}}\sum_{i=1}^I\Lambda_i(D_i^d(t),\overrightarrow{\lambda})\},
\end{small}$$where $\Lambda_i(D_i^d(t),\overrightarrow{\lambda})=D_i^d(t)(H_i(t)\eta^-+Vc(t)+\sum_{l:X_{li}=1}\lambda_l)$.

Directing Policy and Distributed Energy Allocation Laws
-------------------------------------------------------

In this subsection, the solutions of **P3**$\sim$**P6** will be given. The whole algorithm consists of directing 