The computational implementation of the proposed methodology was carried out using the Julia programming language, version 1.9.2 [
36], executed on a personal computer equipped with an AMD Ryzen 7 3700 processor sourced from AMD, Santa Clara, USA, operating at 2.3 GHz, 16.0 GB of RAM, and a 64-bit version of Microsoft Windows 10 Single Language. Julia was selected due to its high-performance computing capabilities, which combine the execution speed of low-level languages with the syntactic simplicity of their high-level counterparts, an essential feature for handling computationally demanding optimization tasks.
For mathematical modeling and optimization, the
JuMP package was employed due to its expressive syntax and compatibility with a wide range of solvers. The nonlinear programming subproblems were solved using the
Ipopt solver [
36], which is well-suited for large-scale, sparse, and non-convex optimization problems. Additionally, the CBGA was implemented in the Julia environment to determine the optimal placement of TSCs. The CBGA interacted with
Ipopt within a master–slave framework, where the CBGA handled the binary decision variables (location) and the
Ipopt optimized the continuous sizing variables.
5.1. Fixed-Step Operation Scenario
To assess the performance of the proposed CBGA-IPOPT framework, a comparative analysis was conducted against four state-of-the-art metaheuristic algorithms: SCA, PSO, BWO, and AHA [
9]. These algorithms were selected based on their relevance and reported success in solving nonlinear, mixed-integer optimization problems for power systems. PSO is one of the most widely adopted swarm-based techniques in reactive power compensation studies, offering fast convergence and ease of implementation [
16]. Moreover, SCA is a math-inspired algorithm known for its balance between exploration and exploitation, and it has been effectively applied to the optimal placement of FACTS [
22]. BWO and AHA, on the other hand, are recent bio-inspired methods that have demonstrated competitive performance in solving complex engineering problems involving multiple decision variables and constraints. This selection ensured algorithmic paradigm diversity—from classical to emerging strategies—and provided a robust baseline to validate the superiority of the proposed hybrid framework in terms of technical performance, economic efficiency, and computational robustness.
5.1.1. Comparative Analysis for the 33-Bus Grid
Numerical simulations applying the proposed master–slave metaheuristic optimization methodology to the 33-bus test system, along with a comparative analysis against existing methods from the literature, are presented in
Table 4.
The results presented in this table demonstrate the effectiveness of CBGA-IPOPT in determining the optimal location and size of TSCs in a MVDN. The primary performance metric under consideration was the annualized objective function value, which combines the costs of energy losses and the investment in TSCs, measured in USD per year.
Among the evaluated methodologies, the BONMIN solver, a benchmark MINLP approach implemented in GAMS, achieved a total annual cost of USD 100,221.38, with a corresponding expected reduction of 11.10% (with respect to the absence of TSCs, i.e., USD 112,740.90). However, its solution involved a zero reactive power injection at one of the selected nodes (bus 6), which may indicate either an unnecessary installation or convergence limitations due to the inherent complexity of the non-convex problem space.
The metaheuristic approaches (CBGA, PSO, and BWO) provided more consistent and efficient solutions, with annual costs of USD 100,139.21, USD 100,107.24, and USD 100,093.29, respectively. These values correspond to operating cost reductions of approximately 11.18%, 11.21%, and 11.22%. Notably, all these methods identified bus 30 as a critical location for TSC installation, highlighting its electrical significance in minimizing network losses.
The AHA produced identical results to BWO, reflecting its comparable ability to effectively navigate the search space. However, the proposed CBGA-IPOPT stood out due to its superior convergence behavior. By integrating the CBGA for discrete location selection and the IPOPT for continuous sizing optimization, this method achieved the best-known cost of USD 100,093.29, with the added benefit of reduced solution variability across different runs and improved numerical stability.
Additionally, CBGA-IPOPT consistently identified the same three optimal nodes (14, 30, 32) and associated TSC sizes (0.1486, 0.3337, 0.1064 Mvar), which indicates a high degree of repeatability and robustness. These results affirm the advantage of combining the global exploration capabilities of the CBGA with the IPOPT’s precise local search, especially for MINLP problems involving complex network constraints.
In summary, while all optimization techniques demonstrated improvements over the baseline solution, CBGA-IPOPT proved to be the most reliable and effective, offering the highest cost reduction and the most consistent results. This validates its suitability for reactive power compensation planning in radial distribution systems under real-world operational constraints.
5.1.2. Results for the 69-Bus Grid
Table 5 presents the numerical results obtained for the 69-bus test system using different optimization methods, including the proposed CBGA-IPOPT. The benchmark case, i.e., system operation without reactive power compensation, corresponds to an annualized cost of approximately USD 119,715.63. This cost served as the baseline for evaluating the performance of the studied methods in terms of costs reduction.
As observed in the table, the BONMIN solver was unable to converge in this larger and more complex distribution feeder, reinforcing the challenges faced by exact solvers in high-dimensional, nonlinear, mixed-integer formulations. In contrast, all metaheuristic strategies yielded feasible and high-quality solutions.
Among the standalone metaheuristic methods, BWO, AHA, and CBGA exhibited a notable performance, achieving cost reductions ranging from approximately 12.55% to 12.58% when compared to the benchmark case. Although PSO also yielded competitive results, its reduction was slightly lower in comparison. These findings highlight the effectiveness of evolutionary and bio-inspired optimization techniques in addressing the complexity of reactive power compensation in large-scale distribution networks, particularly under nonlinear and mixed-integer constraints.
The best-performing strategy, CBGA-IPOPT, achieved the lowest annualized cost, i.e., USD 104,658.03, corresponding to a 12.58% reduction relative to the benchmark. This configuration, consistently identified across BWO, AHA, and CBGA-IPOPT, includes nodes 21, 61, and 64, with reactive capacities of 0.0647, 0.4363, and 0.1125 Mvar. The consistency in both location and size across multiple algorithms indicates the robustness and optimality of the identified solution.
Furthermore, CBGA-IPOPT combines the global exploration capabilities of CBGA for placement decisions with the precision of IPOPT in solving the nonlinear continuous sizing subproblem. This synergy allows our methodology to efficiently and reliably handle the combinatorial complexity and nonlinear dynamics of the power flow model.
In summary, the results confirm that the proposed CBGA-IPOPT not only surpasses classical solvers like BONMIN in terms of feasibility and robustness but also provides superior economic performance compared to other state-of-the-art metaheuristics. This makes it a strong candidate for real-world applications involving optimal reactive power planning for large distribution networks.
5.2. Variable-Step Operation Scenario
A significant advantage of CBGA-IPOPT is its ability to handle flexible reactive power injection over time, allowing for a more efficient and adaptive use of TSCs in distribution networks. For the 33-bus system, this time-dependent operation leads to finely tuned TSC sizes (0.1786 Mvar, 0.4022 Mvar, and 0.1365 Mvar) installed at the same nodes identified with the fixed-injection strategy. This dynamic approach reduces the annual operating cost to 98,729.21 USD/year, achieving a 12.43% cost reduction relative to the benchmark scenario. This enhanced capacity to modulate reactive power in response to hourly demand variations contributes to more effective voltage regulation and lower system losses when compared to traditional fixed injection schemes.
A similar improvement is observed in the 69-bus distribution system. By enabling variable reactive power injection, the hybrid strategy optimally allocates TSC capacities of 0.0683 Mvar, 0.5380 Mvar, and 0.1450 Mvar at nodes 21, 61, and 64. This is consistent with the locations found under fixed-injection conditions but yields superior performance due to the temporal flexibility introduced. In this case, the annual operating cost is reduced to 102,861.83 USD/year, corresponding to a 14.08% reduction with respect to the uncompensated baseline. This confirms the method’s adaptability to complex load dynamics and validates its efficacy in reducing long-term operational expenditure.
In both test feeders under variable reactive power injection conditions, CBGA-IPOPT consistently outperforms its fixed counterpart, as well as other conventional metaheuristic approaches like BONMIN, PSO, and BWO. These results emphasize the value of master–slave coordination between discrete location decisions and continuous sizing optimization, and they position the proposed method as a robust and economically efficient tool for planning dynamic reactive power compensation in modern radial distribution networks.
5.3. Techno-Economic Assessment
Table 6 presents a techno-economic evaluation of the proposed TSC-based compensation strategy under three operation scenarios for the 33-bus and 69-bus test systems: (i) no compensation, (ii) fixed reactive power injection, and (iii) variable reactive power injection. For each scenario, the annual cost of energy losses (
), the annualized cost of investment in TSCs (
), and the total cost (
) are reported. Additionally, the net profit is defined as the difference between the base-case cost and the total cost with compensation.
For the 33-bus system, the base case yields an annual energy losses cost of USD 112,740.88, which serves as the reference for comparison. Implementing fixed-step compensation reduces this cost to USD 91,052.01 and requires an annualized investment of USD 9,041.29, for a total cost of USD 100,093.30 and a net profit of USD 12,647.56. When the system operates under a variable reactive power injection strategy, the cost of energy losses further decreases to USD 87,713.87, with a slightly higher investment of USD 11,015.33. The resulting total cost of USD 98,729.21 leads to a greater net profit of USD 14,011.66, confirming that variable compensation provides enhanced economic benefits, given its better alignment with time-varying load demands.
In the case of the 69-bus system, the base-case annual losses cost is USD 119,715.63. The fixed-step scenario reduces this value to USD 95,240.70 and requires an investment of USD 9417.33, resulting in a total cost of USD 104,658.03 and a profit of USD 15,057.60. With variable compensation, the cost of energy losses drops to USD 91,331.77, and the investment cost increases to USD 11,530.06, leading to a minimized total cost of USD 102,861.83 and a net profit of USD 16,853.80. These results show that the flexibility of time-varying compensation enables a better system performance, even though slightly higher investments are required.
In both test feeders, the variable compensation strategy offers the highest net profit, highlighting the economic advantages of flexible TSC operation. Although the variable approach incurs slightly higher investment costs, the greater reduction in operational losses leads to superior total savings. These findings confirm that incorporating temporal flexibility into reactive power planning can significantly improve the overall efficiency and cost-effectiveness of distribution systems. The proposed CBGA-IPOPT successfully identifies optimal configurations that balance technical performance with economic feasibility, making it a robust solution for smart grid planning in the presence of dynamic demand profiles.
5.4. General Performance Analysis
The superior performance of the CBGA–IPOPT framework can be attributed to its hybrid structure, which effectively combines the strengths of global and local optimization techniques. CBGA is particularly adept at exploring the high-dimensional binary search space related to TSC placement, maintaining genetic diversity to avoid premature convergence and ensure broad exploration of potential solutions. Once promising candidate configurations are identified, IPOPT acts as a high-precision local optimizer, solving the nonlinear OPF subproblem for each candidate to refine solutions, satisfy system constraints, and minimize operational costs.
This master–slave synergy functions as a coordinated search process: CBGA (the master) explores and generates candidate solutions, while IPOPT (the slave) provides precise local refinement and validation of these solutions. This collaborative dynamic allows the framework to consistently identify high-quality solutions with low variance across simulations, as reflected in the stable voltage profiles, significant loss reductions, and cost savings observed in both test systems. Essentially, the master–slave relationship ensures a thorough exploration of the solution space combined with meticulous local optimization, leading to robust and reliable outcomes.