# Algorithms for Optimal Power Flow Extended to Controllable Renewable Systems and Loads
## 4 Results: Optimal Power Flow Solution Considering Heuristic and Analytical Algorithms
### Nine-Node IEEE System
#### 4.1.2 Scenarios Analyzed
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & & \multicolumn{5}{c}{**Optimization Technique**} \\ \cline{3-6}  & & **DEEPSO** & **Genetic Algorithm** & **FMINCON** & **IPOPT** & **MIPS** \\ \hline \multirow{2}{*}{Generator 1 (Slack)} & \(P_{g}\) [MW] & 41.52 & 41.43 & 41.52 & 41.52 & 41.52 \\  & \(Q_{g}\) [MVAR] & 18.33 & 12.55 & 18.43 & 18.47 & 18.38 \\ \multirow{2}{*}{Generator 2} & \(P_{g}\) [MW] & 72.85 & 72.83 & 72.88 & 72.88 & 72.88 \\ \multirow{2}{*}{Generator 2} & \(Q_{g}\) [MVAR] & 3.6 & 4.53 & 3.55 & 3.54 & 3.57 \\  & \(Q_{g}\) [MW] & 206.99 & 207.11 & 206.96 & 206.96 & 206.96 \\ \multirow{2}{*}{Generator 3} & \(Q_{g}\) [MVAR] & \(-\)7.54 & \(-\)1.44 & \(-\)7.63 & \(-\)7.66 & \(-\)7.59 \\ \multirow{2}{*}{\
\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 1.096 & 1.084 & 1.097 & 1.097 & 1.097 \\ \multirow{2}{*}{
\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 433 & 104 & 1.67 & 3.66 & 0.5 \\ \hline \multicolumn{2}{c}{Objective function value [UM]} & 6940.5 & 6940.8 & 6940.5 & 6940.5 & 6940.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Results obtained for the 9-node system in scenario 4. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & & \multicolumn{5}{c}{**Optimization Technique**} \\ \cline{3-6}  & & **DEEPSO** & **Genetic Algorithm** & **FMINCON** & **IPOPT** & **MIPS** \\ \hline \multirow{2}{*}{Generator 1 (Slack)} & \(P_{g}\) [MW] & 83.1 & 83.16 & 83.15 & N.C. & 83.15 \\  & \(Q_{g}\) [MVAR] & 8.78 & \(-\)5.16 & 9.35 & N.C. & 9.29 \\ \multirow{2}{*}{Generator 2} & \(P_{g}\) [MW] & 126.45 & 126.5 & 126.44 & N.C. & 126.44 \\ \multirow{2}{*}{Generator 3} & \(Q_{g}\) [MVAR] & \(-\)1.16 & 4.74 & \(-\)1.09 & N.C. & \(-\)1.07 \\ \multirow{2}{*}{Generator 3} & \(P_{g}\) [MW] & 88.66 & 88.6 & 88.62 & N.C. & 88.62 \\  & \(Q_{g}\) [MVAR] & \(-\)25.65 & \(-\)13.38 & \(-\)25.23 & N.C. & \(-\)25.22 \\ \multirow{2}{*}{Controllable load} & \(P_{g}\) [MW] & 19.59 & 19.59 & 19.59 & N.C. & 19.59 \\ \multirow{2}{*}{\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 3.56 & 2.39 & 2.53 & N.C. & 2.56 \\ \multirow{2}{*}{\
\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 1.099 & 1.07 & 1.099 & N.C. & 1.099 \\ \multirow{2}{*}{
\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 461 & 91 & 0.39 & N.C. & 1.56 \\ \hline \multicolumn{2}{c}{Objective function value [UM]} & 4844.9 & 4846.6 & 4844.9 & N.C. & 4844.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results obtained for the 9-node system in scenario 1. It is noteworthy that, for scenario 1, as seen in Table 5, the DEEPSO algorithm yielded a slightly lower value than the analytical solver FMINCON. It is also observed that the analytical solver FMINCON outperforms heuristic algorithms in terms of computation times. On the other hand, it is also observed that the IPOPT and MIPS solvers did not converge for this scenario. In scenarios 2 and 3 shown in Tables 6 and 7, the three solvers analyzed reached the local optimum value. The MIPS solver had the best performance in terms of execution time. For the evaluation of the objective function the three solvers reached very similar answers. In scenario 4, shown in Table 8, the IPOPT solver did not converge, while FMINCON had an excellent performance in terms of computational time. From the analyzed scenarios, the superiority in terms of computation times of the analytical methods with respect to the metaheuristic algorithms is clearly observed. Although the genetic algorithm converged much faster than the DEEPSO algorithm, the results of the DEEPSO algorithm are much closer to the results obtained by the analytical methods; this is mainly observed in the reactive power values obtained for each generator. It is also observed in the analytical methods that, although the active power values in generators produced by each method are too close to each other, there are small differences in the reactive power values.