outlets in the $i$-th charging station cannot obtain amounts of energy from the battery more than the battery’s residual energy and the battery also has its capacity constraint. The algorithm given in Section can guarantee it perfectly.

Since PEVs’ charging request is random, the following virtual demand queues are introduced to measure the relationship between charging request and energy supply. The stability of demand queues, defined in Section , can be reached by regulating charging rate at every outlet and directing policy in Section to realize the supply-demand balance. The stability of demand queue means that the time-average charging requests can be satisfied. For every outlet, the demand queue is denoted by: $$\label{eq_6}
\begin{small}
Q_{ij}(t+1)=[Q_{ij}(t)-r_{ij}(t)+E_k(t)W_{k,ij}(t)1_{\{Q_{ij}(t)=0\}}]^+,
\end{small}$$ where $[a]^+$ stands for $\max\{a,0\}$. The expression $1_{\{Q_{ij}(t)=0\}}$ here denotes that only if the demand queue is empty at the beginning of time slot $t$, can any new PEV’s demand be directed to this charging outlet.

Problem Formulation
===================

The goal of this paper is to minimize the time-average expected cost from the power grid with constraints of battery and stable demand queues, as well as the safety of the distribution networks. The problem can be formulated as a stochastic optimization problem. $$\begin{aligned}
\textbf{P1:}~~&\min~\lim 