\If{(not the first frequency)}
\State $F_i \gets F_i+\Fdiff_i,~i=1,\dots,N.$
\EndIf
- \State $\Told \gets max_{~i=1,\dots,N } (\Tcp_i+\Tcm_i)$
+ \State $\Told \gets \max_{i=1,\dots,N} (\Tcp_i+\Tcm_i)$
% \State $\Eoriginal \gets \sum_{i=1}^{N}{( \Pd_i \cdot \Tcp_i)} +\sum_{i=1}^{N} {(\Ps_i \cdot \Told)}$
\State $\Eoriginal \gets \sum_{i=1}^{N}{( \Pd_i \cdot \Tcp_i + \Ps_i \cdot \Told)}$
\State $\Sopt_{i} \gets 1,~i=1,\dots,N. $
\State $F_i \gets F_i - \Fdiff_i,~i=1,\dots,N.$
\State $S_i \gets \frac{\Fmax_i}{F_i},~i=1,\dots,N.$
\EndIf
- \State $\Tnew \gets max_\textit{~i=1,\dots,N} (\Tcp_{i} \cdot S_{i}) + \MinTcm $
+ \State $\Tnew \gets \max_{i=1,\dots,N} (\Tcp_{i} \cdot S_{i}) + \MinTcm $
% \State $\Ereduced \gets \sum_{i=1}^{N}{(S_i^{-2} \cdot \Pd_i \cdot \Tcp_i)} + \sum_{i=1}^{N} {(\Ps_i \cdot \rlap{\Tnew)}} $
\State $\Ereduced \gets \sum_{i=1}^{N}{(S_i^{-2} \cdot \Pd_i \cdot \Tcp_i + \Ps_i \cdot \rlap{\Tnew)}} $
\State $\Pnorm \gets \frac{\Told}{\Tnew}$