# 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  
Scenario 1 consists of keeping the generators connected to nodes 1 and 2 as they are established in the original case, that is, with quadratic cost functions; however, the generator connected to node 3 is assumed to be a hydraulic generator with the cost functions defined in [32]. Scenario 2 now contemplates the connection of a solar plant to node 3, replacing the existing conventional generator. The other generators are not modified. Scenario 3  
In the same way as in scenarios 1 and 2, the conventional generator connected to node 3 is replaced by a wind generator. Figure 4: Nine buses system. \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] & 82.75 & 82.73 & 82.71 & 82.71 & 82.7 \\  & \(Q_{g}\) [MVAR] & 13.62 & \(-\)2.49 & 13.58 & 13.63 & 13.41 \\ \multirow{2}{*}{Generator 2} & \(P_{g}\) [MW] & 125.19 & 125.28 & 125.22 & 125.22 & 125.23 \\  & \(Q_{g}\) [MVAR] & \(-\)0.17 & 5.54 & \(-\)0.14 & \(-\)0.17 & \(-\)0.04 \\ \multirow{2}{*}{Generator 3} & \(P_{g}\) [MW] & 110.59 & 110.62 & 110.6 & 110.6 & 110.6 \\ \multirow{2}{*}{\begin{tabular}{c} Stack node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & \(-\)22.23 & \(-\)8.29 & \(-\)22.2 & \(-\)22.24 & \(-\)22.12 \\ \multirow{2}{*}{\
\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 1.1 & 1.067 & 1.1 & 1.1 & 1.1 \\ \multirow{2}{*}{
\begin{tabular}{c} Shock node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & 549 & 80 & 5.14 & 0.6 & 0.45 \\ \hline \multicolumn{2}{c}{Objective function value [UM]} & 4474 & 4476.3 & 4474 & 4474 & 4474 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Results obtained for the 9-node system in scenario 2. \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 \\  & \(Q_{g}\) [MVAR] & 3.6 & 4.53 & 3.55 & 3.54 & 3.57 \\ \multirow{2}{*}{Generator 3} & \(P_{g}\) [MW] & 206.99 & 207.11 & 206.96 & 206.96 & 206.96 \\ \multirow{2}{*}{\begin{tabular}{c} Stack node voltage [PU] \\ Execution time [s] \\ \end{tabular} } & \(-\)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 7: Results obtained for the 9-node system in scenario 3.