# Multi-Stage Dynamic Transmission Network Expansion Planning Using LSHADE-SPACMA
## 4 LSHADE with Semi-Parameter Adaptation Hybrid with CMA-ES
### Pseudocode of LSHADE-SPACMA for Solving the TNEP Problem  
The pseudocode of the LSHADE-SPACMA algorithm for solving the TNEP problem is presented in Table 1. It starts with setting the population size and dimension of the problem and defining the maximum number of problem evaluations, the lower bound, and the upper bound of decision variables. The population of Np individuals was initialized according to Equation (15), and initial values of SHADE and CMA control parameters were introduced. Steps 1 through 10 are repeated until a stop criterion is reached.  
\begin{table}
\begin{tabular}{l l} \hline \hline  & \(\bullet\) & Dimension of the problem, \(d\). \\  & \(\bullet\) & Population size, \(N_{p}\). \\ Input & \(\bullet\) & Stop criterion, MAX\({}_{\text{NFE}}\) (i.e., maximum number of fitness evaluations). \\  & \(\bullet\) & Maximum and minimum values of \(d\)-decision variables, in vector form \\  & \(x_{max}=[D_{max,1},\,\ldots,\,D_{max,d}]\) and \(x_{min}=[D_{min,1},\,\ldots,\,D_{min,d}]\). \\  & \(\bullet\) & Set generation counter, \(t=1\) and function evaluation counter \(NFE=0\). \\  & \(\bullet\) & Set SHADE parameters: Memory \(M\) size, initialize \(M_{FCP}=0.5\), \(M_{Cr}=0.5\) and \(M_{F}=0.5\). \\  & \(\bullet\) & POP: Create a population of \(N_{p}\) individuals according to Equation (14). \\ Initialization & \(\bullet\) & Initialize CMA parameters. \\  & \(\bullet\) & Evaluate objective function and constraint violation using Equation (2) to Equation (6) for each \\  & \(\bullet\) & Inrequest function evaluation counter NFE by \(N_{p}\). \\  & \(\bullet\) & Algorithm loop \\  & \(\bullet\) & For \(i=1\):\(N_{p}\), do \\  & \(r_{i}=\) select from [1,H] randomly; \\  & \(Cr_{i,G}=randn(Mcr_{i},0.1)\) \\  & \(\text{FCP}_{i,g}=M_{\text{FCP},i}\) \\ Step 1 & If \(\text{refs}\leq\max\text{refs}/2\) \\  & \(F_{i,G}=0.45+0.1*rand\); \\  & \(\text{otherwise}\), \\  & \(F_{i,G}=randn(Mfr_{i},0.1)\); \\  & \(\bullet\) & end \\  & \(\bullet\) & Generate donor vector using LSHADE (\(V_{LSHADE}\)). \\ Step 2 & \(\bullet\) & Generate donor vector using \(CMA\) (\(V_{CMA}\)). \\  & \(\bullet\) & Concatenate \(V_{LSHADE}\), \(V_{CMA}\). \\ Step 3 & Generate trial vector (U). \\  & \(\bullet\) & Check constraints from Equations (3)–(6) or (8)–(14). \\ Step 4 & \(\bullet\) & Evaluate (U) using fitness Equations (2) or (7). \\ Step 5 & Update _POP_ and Fitness function according to the evaluation of U. \\ Step 6 & Store successful _FCP_, \(F\), and \(Cr\) \\  & \(\bullet\) & Update archive A \\ Step 7 & \(\bullet\) & If (archive size \(>|A|\)) \\  & \(\bullet\) & Delete individuals archive randomly \\  & \(\text{End}\) \\  & \(\bullet\) & Update \(M_{Cr}\) and \(M_{FCP}\) \\ Step 8 & \(\bullet\) & If \(\text{refs}<max\text{refs}/2\) \\  & \(\bullet\) & Update \(M_{F}\) \\  & \(\bullet\) & Calculate N\({}_{G+1}\) according to Equation (19). \\  & \(\bullet\) & If \(N_{G}<N_{G+1}\) \\ Step 9 & - & Sort individuals in P based on their fitness values and delete the \\  & \(\text{N}_{G}\)-\(N_{G+1}\) member. \\  & - & Resize archive (\(|A|\)) according to the new _POP_. \\  & \(\bullet\) & Update _CMA_ parameters. \\ \hline \hline \end{tabular}
\end{table}
Table 1: Pseudo-code of LSHADE-SPACMA algorithm to solve the TNEP problem.