1 Introduction

As is widely recognized, the extensive and reckless exploitation and allocation of power and other energy sources has led to limited and expensive resources, resulting in significant resource wastage and gradual impacts on social life. Therefore, it is imperative to make efficient and rational use of these limited energy resources. Utilizing energy and fostering innovation in energy-related areas have always been crucial factors in economic development and ensuring livelihood security. In particular, the rational and effective distribution of large-scale power resources is of utmost significance [1]. Economic load dispatch (ELD) is a crucial matter for power system operations. The ELD aims to reduce fuel costs while fulfilling inequality and equality constraints. Equality constraints are based on the stability of power between the productions of the system and the whole demand with transmission losses. Inequality constraints are based on power output [2]. Many traditional approaches have been proposed to solve ELD problems as linear programming, nonlinear programming, and mixed integer linear programming [3]. Nevertheless, the real-world system presents several significant considerations, including factors such as the valve-point effect, transmission losses, and the inherent nonlinearity of the generator set. ELD scheduling involves non-convex optimization challenges, making it exceedingly challenging to address these nonlinear problems using conventional mathematical approaches. Recently, metaheuristic techniques are widely used to solve the ELD problem [4]. In both unimodal and multimodal problems, exploration and exploitation can be accomplished using mathematical equations, which are implemented using specific techniques. However, the requirements for these techniques may differ depending on the problem at hand.

Metaheuristic algorithms are employed to solve various optimization problems [5,6,7]. The earliest algorithm used to solve the ELD problem is a genetic algorithm (GA) and its variants [8], particle swarm optimization (PSO) technique its variants [9], an improved slime mold algorithm (ISMA) algorithm [10], and artificial cooperative search (ACS) algorithm in [11].

Recently, numerous metaheuristic algorithms have been established to solve the ELD problem, such as the evolutionary simplex adaptive Hooke–Jeeves algorithm [12], opposition-mutual learning differential evolution with hybrid mutation strategy [13], hybrid gray wolf optimizer (HGWO) [14], improved fitness-dependent optimizer (IFDO) [15], a multigroup marine predator algorithm [16], chaotic eagle-strategy supply–demand optimizer (CESSDO) [17], a chaotic slime mold algorithm (CSMA) [18], and elementary function disturbance arithmetic optimization technique (EFDAO) [19]. In 2018, Singh et al. suggested an enhanced gray wolf optimizer (GWO) to solve the ELD problem in collaboration with exploration and exploitation, which coordinates the behavior of gray wolf, random search, local random search, and reverse learning heuristic [20]. In [21], the sine–cosine algorithm was applied to solve the ELD problem. A comparative analysis to assess the behaviors of hurricane and sine‐cosine optimizers was carried out for solving the ELD with considering the ecological emissions [22]. The enhanced moth-flame optimization algorithm was presented in [23] to solve different sizes of ELD problem considering the emission minimization. The enhanced social network search (ESNS) was suggested to solve the ELD problem using high- and low-velocity ratio approach to improve the searching balance between exploration and exploitation of each solution in [24]. In 2020, Ling et al. proposed the shrinking Gaussian distribution quantum performance optimization algorithm (SG-QPSO) to solve the ELD problem. By iteratively reducing the Gaussian probability distribution near the learning tendency point of each particle, SG-QPSO maintains a strong global search ability at the beginning and gradually enhances the local search ability [25]. To overcome the ELD difficulties, an enhanced arithmetic optimization is suggested. There are two crucial variables in the arithmetic optimization algorithm (AOA) math optimizer acceleration and probability [26]. It can be seen from the above literature that intelligent optimization algorithms were used to solve the ELD problem. Some directly use the original algorithm to solve the ELD problem, and some use some strategies to optimize the original algorithm to enhance its performance. It achieved better results in solving the ELD problem. A comparative study is shown in Table 1 to keep track of algorithms and their evaluation on standard test systems.

Table 1 Comparative study of several algorithms and their evaluation on standard test systems

Recently, the white shark optimizer (WSO) has been suggested to emulate the manners of white sharks, containing their unique intelligences of audible range and smell when navigating and hunting [46]. In this article, an effective WSO algorithm is employed to achieve the optimal solution for the ELD problem. The main reason for choosing this algorithm in this article is that it has a few adjustable parameters that have been implemented easily. This characteristic makes it very potential for applications in many engineering fields. In [47], the WSO approach is applied in OPF solution of power systems with renewable energy sources. The WSO technique is suffering from slowing the convergence rate and falling in the local optima because of unbalance between the exploration and exploitation process. Therefore, the traditional WSO algorithm needs to be further improved [48]. Thus, the authors in this work aim to achieve a fine balance between them using the leader-based mutation-selection approach to get more promising results than those gained from the conventional WSO algorithm, and it can improve search accuracy and extend global search capabilities.

The ELD problem has received significant attention in recent decades, as highlighted in the summary above. Although various optimization approaches have been proposed to tackle ELD problems. This article specifically focuses on integrating algorithm and constraint processing technology to address the ELD problems. In the context of constraint optimization problems, constraint-handling techniques are just as crucial as algorithm design, as such problems require managing both fitness function and the degree of constraint violation. Building on the considerations, a leader white shark optimizer (LWSO) is presented to solve the ELD problem. By incorporating a leader-based mutation-selection strategy, the LWSO algorithm aims to not only optimize the objective function but also effectively manage the constraints involved in the problem. This leader-based approach enables the algorithm to adapt to changing dynamics in the optimization landscape and ensures that the solution obtained adheres to the problem's constraints, enhancing the overall robustness of the ELD optimization process. Furthermore, the LWSO algorithm provides a promising avenue for further advancements in solving complex optimization problems, by striking a balance between exploration and exploitation to achieve more accurate and globally competitive solutions. The vital contributions of the article could be brief as below:

  • Applying the proposed LWSO to solve the ELD problem;

  • Four test networks with 6-, 10-, 11-, and 40-hermal units are used to confirm the LWSO performance;

  • Comparison between the LWSO and other recent algorithms such as the Golden Jackal Optimization (GJO), Northern Goshawk Optimization (NGO), fox optimizer (FOX), and conventional WSO algorithms and other literature algorithms such as the Improved slime mold algorithm (ISMA), tunicate swarm algorithm (TSA), Harris Hawks optimizer (HHO), slime mold algorithm (SMA), jellyfish search optimizer (JS), and PSO algorithms is performed.

  • Statistical analysis is performed for 20 trails of studied techniques, and the strength and convergence rates for LWSO are discussed.

The rest of the paper is arranged as Sect. 2 presents the ELD problem’s mathematical model; the original WSO and the proposed LWSO techniques are explained in Sect. 3; the results and discussions are shown in Sect. 4; and finally, Sect. 5 presents conclusion of the article.

2 Mathematical model of ELD problem

The fuel cost function for this problem follows a quadratic form, and the total fuel costs take into account the valve-point effects in accordance with the output of thermal generations while satisfying their respective constraints. The function can be expressed as follows [49]:

$$F_1 = \mathop \sum \limits_{i = 1}^{N_G } \left[ {a_i + b_i P_{Gi} + c_i P_{Gi}^2 + \left| {d_i \sin \left( {e_i \left( {P_{Gi}^{min} - P_{Gi} } \right)} \right)} \right|} \right]$$
(1)

where ai; bi; and ci are the cost coefficients for the ith unit; Pi refers to the power output of these units; and NG denotes the number of generations.

The balance of power constraint in this problem ensures that the total output power generation PT (in MW) is equal to the sum of the total load demand PD (in MW) and the power loss PLoss (in MW) in the entire system. This equality constraint can be mathematically represented as follows [50]:

$$P_T = \sum_{i - 1}^{N_G } {P_{Gi} } = P_D + P_{Loss} ,$$
(2)

PLoss denotes the active output power of the units, and it can be calculated from Kron’s loss formula as below:

$${P}_{Loss}=\sum_{i=1}^{{N}_{G}}\sum_{j=1}^{{N}_{G}}{P}_{Gi}{B}_{ij}{P}_{Gj}+\sum_{i=1}^{{N}_{G}}{B}_{0i}{P}_{Gi}+{B}_{00},$$
(3)

where Boo, Boi, and Bij refer to the coefficients of the power loss.

The inequality bound is attained during each thermal generator works within its operating constraints as follows:

$${P}_{Gi}^{min}\le {P}_{Gi}\le {P}_{Gi}^{max},$$
(4)

where \({P}_{Gi}^{min}\),, and \({P}_{Gi}^{max}\) represent the operating bounds of generator i.

The constraint violation can be expressed as follows [51]:

$$V=\left|\sum_{i=1}^{{N}_{G}}{P}_{Gi}-{P}_{D}-{P}_{Loss}\right|$$
(5)

3 Methodology

3.1 Conventional WSO

The WSO algorithm is inspired by the behaviors of the white sharks when hunting to assist them to live in the ocean depths [46]. Its results prove its strength in solving different types of optimization problems. Therefore, the WSO provides numerous advantages for composite optimization problems. The models of the WSO algorithm determine the optimal value of the fuel cost. This section briefly describes the basics of the proposed WSO algorithm.

3.1.1 Initialization of WSO

The initialization position of each white shark can be calculated from the following equation [47]:

$$w = \left[ {\begin{array}{*{20}c} {w_1^1 } & {w_2^1 ~} & { \ldots \;..} & {w_d^1 } \\ {w_1^2 } & {w_2^2 } & { \ldots \;..} & {w_d^2 } \\ { \ldots \;.} & { \ldots \;.} & { \ldots \;..} & { \ldots \;..} \\ {w_1^n } & {w_2^n } & { \ldots \;..} & {w_d^n } \\ \end{array} } \right]$$
(6)

In this context, the variable w represents the position of the white sharks in the search area, while the variable d represents the number of variables in the problem.

3.1.2 Update the parameters of the WSO algorithm

$$v=\left[n\times rand(1,n)\right]+1$$
(7.1)
$${p}_{1}={p}_{max}+\left({p}_{max}-{p}_{min}\right)\times {e}^{-{(4\times \frac{k}{K})}^{2}}$$
(7.2)
$${p}_{2}={p}_{min}+\left({p}_{max}-{p}_{min}\right)\times {e}^{-{(4\times \frac{k}{K})}^{2}}$$
(7.3)
$$\upmu =\frac{2}{\left|2-\tau -\sqrt{{\tau }^{2}-4\tau }\right|}$$
(7.4)
$$a=sgn({w}_{k}^{j}-u)>0$$
(7.5)
$$b=sgn({w}_{k}^{j}-u)<0$$
(7.6)
$$w_0 = \oplus \left( {a,b} \right)$$
(7.7)
$$f = f_{\min } + \frac{{f_{\max } - f_{\min } }}{{f_{\max } + f_{\min } }}$$
(7.8)
$$mv=\frac{1}{{a}_{0}+{e}^{(\frac{k}{2}-K)/{a}_{1}}}$$
(7.9)
$${S}_{S}=\left|1-{e}^{(-{a}_{2}\times \frac{k}{K})}\right|$$
(7.10)

where \(v\) refers to the white sharks’ index vector getting the optimal location defined \({p}_{1}\) and \({p}_{2}\) denote the white sharks’ forces, and \(\mu\) denotes the constriction factor proposed in WSO. \(a\) and \(b\) refer to one-dimensional binary vectors \({w}_{0}\) denotes a logical vector. f represents the frequency of the white shark’s wavy motion. mv denotes the movement force which is related to the number of iterations. ss denotes a parameter proposed to rapid the sense's strength of smell and sight of the sharks during following other white sharks that are close to optimum prey.

3.1.3 Speed of movement to prey

When a white shark identifies a prey’s position using hearing a pause in the waves because the prey moves, as below:

$$u_{k + 1}^i = \mu \left[ {u_k^i + p_1 \left( {w_{gbest_k } - w_k^i } \right) \times c_1 + p_2 \left( {w_{best}^{v_k^i } - w_k^i } \right) \times c_2 } \right]$$
(8)

the new rapidity vector of the ith shark can be represented by vik+1.

3.1.4 Movement in the best prey’s way

In this scenario, the movement of sharks as their approached fish was depicted.

$$w_{k + 1}^i = \left\{ \begin{gathered} w_k^i . \to \oplus w_0 + u.a + l.b;\,rand < mv \hfill \\ w_k^i + u_k^i /f;\,rand \ge mv \hfill \\ \end{gathered} \right.$$
(9)

3.1.5 Movement in the way of the best shark

Equation (10) expresses how the white sharks can maintain their position ahead of the most beneficial one that is closer to the goal. This phenomenon is achieved through the following equation:

$${\mathop {w_{k = 1}^i }\limits^{{{\prime} }}} = w_{gbestk} + r_1 \vec{D}_w \text{sgn} (r_2 - 0.5)\;r_3 < S_s$$
(10)

ik+1 is the upgraded shark’s location, sgn(r2 − 0.5) returns 1 or −1 to adapt the search track, and r1, r2 and r3 are the random values. Dw denotes the length for both goal and shark, and it can be calculated as follows:

$${\mathop D\limits^\to }_w = \left| {rand \times \left( {w_{gbest} - w_k^i } \right)} \right|$$
(11)

The flowchart of the WSO algorithm is shown in Fig. 1.

Fig. 1
figure 1

The flowchart of the proposed WSO algorithm

3.2 The procedure of the improved LWSO algorithm

The proposed method to address the possibility of the optimum value dropping into local minima is called leader-based mutation selection [52]. This modification relies on the best position vector (\({w}_{best-1}^{iter}\)), the second-best position vector (\({w}_{best-1}^{iter}\)), and the third-best position vector (\({x}_{best-2}^{t}\)) based on their objective function values for the new position vector (\({w}_{i}\left(new\right)\)) between the members of the population. The new mutation position vector (\({w}_{i}\left(mut\right)\)) is calculated using the following equation:

$${w}_{i}\left(mut\right)={w}_{i}\left(new\right)+2\times \left(1-\frac{iter}{{\text{Max}}\_iters}\right)\times \left(2\times rand-1\right)\left(2\times {w}_{best}^{iter}-\left({w}_{best-1}^{iter}+{w}_{best-2}^{iter}\right)\right)+\left(2\times rand-1\right)\left({w}_{best}^{iter}-{w}_{i}\left(new\right)\right)$$
(12)

After that, the following location is reorganized as follows:

$${w}_{i}\left(iter+1\right)=\left\{\begin{array}{c}{w}_{i}\left(mut\right) f\left({w}_{i}\left(mut\right)\right)<f\left({w}_{i}\left(new\right)\right)\\ {w}_{i}\left(new\right) f\left({w}_{i}\left(mut\right)\right)\ge f\left({w}_{i}\left(new\right)\right)\end{array}\right.$$
(13)

Lastly, the optimal solution is updated by the following equation:

$${w}_{best}=\left\{\begin{array}{c}{w}_{i}\left(mut\right) f\left({w}_{i}\left(mut\right)\right)<f\left({w}_{best}\right)\\ {w}_{i}\left(new\right) f\left({w}_{i}\left(new\right)\right)<f\left({w}_{best}\right)\end{array}\right.$$
(14)

Figure 2 displays the flowchart of the LWSO algorithm, which includes the residence of the leader-based mutation selection. Moreover, Algorithm 1 describes the LWSO algorithm’s pseudocode. This improvement enhances the exploration of the LWSO technique through simultaneous crossover and mutation using the three best leaders. The combination of crossover and mutation in genetic algorithms is a powerful strategy to address trapping and slow convergence. Crossover facilitates the sharing of valuable genetic information, while mutation introduces randomness and diversity, collectively promoting a more effective and efficient exploration–exploitation trade-off. The proposed LWSO algorithm offers several advantages over the original WSO technique:

Fig. 2
figure 2

Flowchart of proposed LO algorithm

The advantages of LWSO can be concluded as follows:

  1. 1.

    Enhanced Exploration: Simultaneous crossover and mutation using the three best leaders can lead to increased diversity in the search space. This enhancement allows the algorithm to explore a wider range of solutions, potentially leading to better optimization outcomes.

  2. 2.

    Improved Convergence: Combining crossover and mutation can help the algorithm converge faster to better solutions. Crossover promotes the sharing of genetic information between solutions, while mutation introduces random variations that can help escape local optima.

  3. 3.

    Better Solution Quality: By leveraging the best leaders, the algorithm can focus on the most promising regions of the search space, increasing the likelihood of finding high-quality solutions.

However, like any algorithm, LWSO may have its own shortcomings. One potential disadvantage of the proposed LWSO algorithm could be:

Increased Computational Complexity: Simultaneous crossover and mutation can significantly increase the computational requirements of the algorithm. This can lead to longer execution times and higher resource usage, making it less suitable for problems with strict time or resource constraints.

figure a

Algorithm 1: Pseudocode of the LWSO algorithm

3.3 Analysis of algorithm computational complexity

The time complexity of the proposed LWSO algorithm depends on the population size (N), the maximum number of iterations (T), the dimensions of the problem (D), and the function assessment’s cost (C). In the original WSO, the time complexity of initializing the population is O(N x D). The time complexity of the assessment of the cost function demands is O(N x C x T). The time complexity of updating positions is O(N x D x T). Therefore, the general time complexity of WSO is O(N x D + N x C x D + N x D x T). The time complexity of LWSO is O(2 × N x D x T + N x D + N x D x T).

3.4 Taxonomy of leader-based mutation selection

Forming a taxonomy for leader-based mutation selection includes categorizing and organizing the key elements related to this specific optimization technique. Figure 3 shows a taxonomy for leader-based mutation selection.

Fig. 3
figure 3

The taxonomy of leader-based mutation selection

4 Simulation results and discussion

4.1 Simulation results of real-world engineering problems

To evaluate the performance of the LWSO algorithm in solving the real-world non-convex, constrained engineering optimization problems, it is conducted tests on 13 optimization problems in chemical and mechanical engineering, sourced from CEC 2020. The constraint functions' lower and upper limits violation were obtained from [53], and the obtained results were compared with other optimization solvers including DBO [54], WSO, FOX [55], and MFO [56]. Table 2 provides essential information about the benchmark functions used in the study. As all these problems have multiple inequality constraints, any algorithm designed to solve them must integrate a constraint-handling technique. Common approaches include repairing, decoding, preserving, and penalizing, among others. In the presented case studies, the firm penalty method was implemented to handle the constraints. The population is set as 200 for all 13 benchmarks. The maximum iterations equal 500 for the case studies.

Table 2 Real-world optimization engineering benchmark cases included in the CEC 2020 and their bounds [53]

Table 3 presents the results of statistical indices for CEC 2020 optimization problems, compared the performance of the LWSO algorithm and other competitive optimization algorithms and further indicates ranking for all the 13 case studies. From this table, the applied techniques are sorted. It can be seen from this ranking order that the LWSO algorithm superiors the other compared algorithms on 13 function problems. MFO and DBO display strong efficiency that are the second and third optimal. It can be concluded from this discussion that the LWSO algorithm is an effective algorithm for acquiring the optimal solutions of these non-convex constrained f problems. The convergence rates of these algorithms for the tested functions are shown in Fig. 4. To approve the performance of the proposed algorithm, a boxplot of each algorithm and objective function is presented in Fig. 5. Figure 5 displays the boxplots of the LWSO algorithm, for most of the functions, these plots are narrow and among the smallest values.

Table 3 Statistical indices for the engineering benchmark studied cases
Fig. 4
figure 4

The convergence curves for all techniques and benchmark functions

Fig. 5
figure 5

Boxplots for all techniques and benchmark functions

4.2 Wilcoxon's rank test results

In this subsection, the differences between the proposed LWSO and well-known optimization algorithms are further analyzed statistically using the Wilcoxon rank-sum test (WRST), which is a paired test that checks for significant differences between two algorithms. The results of the test between LWSO and each technique at a significance level of α = 0.05 are presented in Table 4, where the symbols "+/=/−" show whether LWSO executes better, similarly, or worse than the comparison technique. This table also presents the statistical results of LWSO in different dimensions and functions, signifying whether LWSO performs better, similarly, or worse than the comparison algorithm. LWSO outperforms other comparative techniques in the statistics of 13 optimization problems in chemical and mechanical engineering, sourced from CEC 2020, which approves the significant dominance of LWSO in most functions compared to other techniques. Therefore, it can be concluded that the proposed LWSO technique exhibits the best performance compared to other algorithms.

Table 4 Statistical results of the Wilcoxon rank-sum test

4.3 Friedman’s rank test results

Table 5 presents the statistical results obtained by Friedman tests [57]. The smaller the ranking value, the better the performance of the algorithm. From the results, we can get the ranks of five algorithms as follows: LWSO, MFO, DBO, WSO, and FOX. The highest-ranking shows that LWSO is the best algorithm among the five algorithms.

Table 5 Friedman test for the five algorithms

4.4 Results of the studied cases

The LWSO technique is investigated on several ELD problems. Also, a comparison is performed between the LWSO and other optimization algorithms including GJO [58], NGO [59], FOX, and conventional WSO algorithms. The coding and simulation of the LWSO technique are accomplished in the Matlab 2016a software. The LWSO technique and other well-known algorithms are run using a laptop with a core i5 processor and 8 GB RAM. Table 6 records the parameters’ settings of the tested algorithms. Four power systems with different generators and load levels are considered as: The first one has six generators and the load demand equals 283.4 MW; the second system involve 10 generators and the load demand increased to 2000 MW; and the third test system has 11 generators with loading level of 2500 MW. The last test system has 40 generators, and the loading level reaches 10,500 MW.

Table 6 Parameter settings of the competitive algorithms and the proposed LWSO algorithm

4.4.1 System 1: six thermal generators

Six generator units make up this system, and together they must provide 2.834 p.u. of power to meet the load requirement. The system characteristics include the cost coefficients and generation limits taken from [49]. Table 7 depicts the power outputs of each generator, total power loss, the total constraint violation (V), and total fuel cost associated with the six-unit power system and their comparison with numerous algorithms. It can be detected that LWSO algorithm gives the lowest value of total fuel cost compared with these recent techniques. The LWSO technique shows the effectiveness of objective function values and attains cogent and plausible results. Furthermore, the system constraints are satisfied.

Table 7 Optimum solution values for the fuel cost of the first test system with six generators

The program implementation records the optimal fuel cost for each run, resulting in a collection of 20 optimal values per algorithm. These values are then used to generate boxplots, as shown in Fig. 6. A thorough analysis of these boxplots confirms the superior performance of LWSO technique compared to established optimization techniques. Additionally, comparing the techniques' performances can be achieved by observing the fuel cost across iterations. Figure 7 presents the convergence curves of the techniques used in this test case. This figure approves the competence of the LWSO algorithm in reaching the lowest cost in minimum iterations. Furthermore, the comparison of the best, average, median, worst, and std values of the proposed LWSO and most recently published ELD algorithms such as ISMA [10], SMA [10], HHO [10], TSA [10], PSO[10], and JS [10] is tabulated in Table 8. It is clear from this table that the proposed LWSO technique succeeds in achieving the optimum solution for the ELD problem in this case.

Fig. 6
figure 6

Boxplots of various algorithms (system 1)

Fig. 7
figure 7

Fuel cost convergence curves of various algorithms (system 1)

Table 8 Statistical results for fuel cost $/h (case study 1)

4.4.2 System 2: ten thermal generators

In this system, the LWSO algorithm and the other techniques are verified on the ten-generator system. The population size and maximum iterations equal 1000 and 500, respectively. The generation bounds and coefficients of fuel cost were taken from the solution [10]. Table 9 shows the optimal fuel costs acquired using all techniques. It was proven that the LWSO technique achieves the best value of 111,497.63 $/h, and the least violation 1.47E-06 MW compared with the original WSO, GJO, NGO, and FOX. The performance of the studied algorithms on the ELD problem is illustrated in Fig. 8, which depicts a boxplot. It is noteworthy that the LWSO algorithm has a narrower boxplot than the original WSO and other established algorithms in many instances, indicating greater consistency in terms of median, maximum, and minimum values. Figure 9 displays the convergence curves of the fuel cost. According to Fig. 9, the proposed LWSO algorithm converges to the minimum value in a number of iterations which is lower than the one for the original WSO technique. Furthermore, the comparison of the statistical measures’ values of the proposed LWSO and most recently published ELD algorithms such as ISMA [10], SMA [10], HHO [10], TSA [10], PSO [10], and JS [10] is presented in Table 10. It is observable that the LWSO succeeds in achieving the optimum solution for this system.

Table 9 Optimal solution of the fuel cost of the second test system with 10 generators
Fig. 8
figure 8

Boxplots of various algorithms (System 2)

Fig. 9
figure 9

Fuel cost convergence curves of various algorithms (System 2)

Table 10 Statistical results for fuel cost $/h (System 2)

4.4.3 System 3: eleven thermal generators

In case 3, the solution of ELD problem is obtained by the LWSO algorithm, and the load demand is PD = 2500 MW. The generation bounds and coefficients of fuel cost were taken from the solution [10]. The results acquired using the LWSO are compared with GJO, NGO, and FOX methods, as well as the original WSO algorithm which is shown in Table 11. These results show that the optimal solution found using the LWSO algorithm is less than the solution found using other well-known techniques. Figure 10 presents the convergence curve of the LWSO algorithm and other algorithms, which demonstrates the high accuracy and speed of the LWSO to reach the best solution compared to that of the studied intelligent techniques. The results of all algorithms for this case are represented in boxplots shown in Fig. 11 and show that the quartile of LWSO has a smaller range as compared to that of these recent techniques. Table 12 tabulates the best, worst, average, median, and std values of various ELD solutions among 20 trial runs, which proves that LWSO succeeded in determining the optimal solution in comparison with other techniques including EBWO [45], BWO [45], SCSO [45], and SOA [45], ISMA [10], SMA [10], HHO [10], JS [10], TSA [10], and PSO [10].

Table 11 Optimal solution for the total generation cost of the third test system with 11-generator
Fig. 10
figure 10

Fuel cost convergence curves of various algorithms (System 3)

Fig. 11
figure 11

Boxplots of different algorithms (case study 3)

Table 12 Statistical results for fuel cost $/h (System 3)

4.4.4 System 4: forty generators

In the fourth system, assessments are executed on the forty-unit system. The generation bounds and coefficients of fuel cost were taken from [10]. The maximum iterations of the proposed LWSO, original WSO, and other studied techniques are increased to 1500 to increase the whole implementation for a large-scale power system. Table 13 shows the power schedules achieved using execution least economics. In this table, the fuel costs obtained by the LWSO algorithm are less than WSO, GJO, NGO, and FOX algorithms. The convergence curves of this case of the forty-unit system for reducing the total cost by the proposed LWSO and other studied techniques are displayed in Fig. 12. It is obvious that the performance of the LWSO for attaining the optimal solution to the economic load dispatch approves the strength of the LWSO algorithm. Figure 13 shows the boxplots of classification accuracy results achieved using the proposed LWSO and conventional WSO, GJO, NGO, and FOX algorithms for fuel cost. The boxplot represents the spread of classification precision values for each technique on a given dataset, with each technique being run twenty times. The boxplot enables comparison of techniques based on five essential statistical measures: minimum precision value, maximum precision value, lower quartile, upper quartile, and median. The higher the boxplot, the greater the classification accuracy achieved by the technique. The LWSO consistently delivers the highest classification accuracy values across most datasets. Figures demonstrate that the LWSO technique has a higher median and smaller interquartile ranges in most datasets, which serves as evidence of the technique's effectiveness and robustness.

Table 13 The optimal solution for the fuel cost of the forty-unit system
Fig. 12
figure 12

Fuel cost convergence curves of various algorithms (System 4)

Fig. 13
figure 13

Boxplots of various algorithms (System 4)

Moreover, Table 14 shows the five essential statistical measures values of various ELD solutions via 20 individual runs. Additionally, Table 14 includes results from alternative techniques such as enhanced beluga whale optimization (EBWO) [45], beluga whale optimization (BWO) [45], sand cat swarm optimization (SCSO) [45], skill optimization algorithm (SOA) [45], ISMA [10], SMA [10], HHO [10], JS [10], TSA [10], PSO [10], parallel particle swarm optimization (PPSO) [16], slap swarm algorithm (SSA) [16], marine predator algorithm (MPA) [16], multigroup marine predator algorithm (MGMPA) [16], and hybrid slap swarm algorithm (HSSA) [2]. These algorithms show varying levels of performance in terms of fuel cost optimization. Overall, the statistical results in Table 14 affirm the effectiveness of the LWSO algorithm in achieving lower fuel costs compared to other techniques, showcasing its potential as a robust optimization approach for the forty-unit power system.

Table 14 Statistical results for fuel cost $/h (System 4)

Table 15 presents the value of the objective function for various cases using different algorithms, demonstrating the effectiveness of the proposed LWSO algorithm. In Case 1, the LWSO algorithm yields a highly competitive objective function value of 605.9984, identical to the WSO algorithm. However, as we move on to the more complex scenarios, such as Case 2, Case 3, and Case 4, LWSO consistently outperforms other algorithms. Notably, in Case 2, it produces a significantly lower objective function value of 111,497.63 compared to the next best, WSO, with 111,497.8. These results highlight LWSO's exceptional ability to optimize and find solutions that outshine its counterparts, offering a promising solution for a wide range of real-world problems and optimization tasks.

Table 15 The value of the objective function for the studied cases using the proposed algorithms

4.5 Wilcoxon's rank test results

Table 16 displays the outcomes of the test conducted between LWSO and each technique, employing a significance level of α = 0.05. Additionally, the table presents the statistical findings for LWSO across various scenarios, indicating its superior, comparable, or inferior performance relative to the comparison algorithm. LWSO demonstrates superiority over other comparative techniques in the statistical results for four instances of ELD optimization problems, underscoring its substantial dominance in most functions compared to alternative techniques. Hence, it can be inferred that the proposed LWSO technique showcases the most effective performance when juxtaposed with other algorithms.

Table 16 Statistical results of the Wilcoxon rank-sum test

4.6 Friedman’s rank test results

In Table 17, the statistical results derived from Friedman tests are showcased. A smaller ranking value corresponds to a superior algorithmic performance. Based on the results, the rankings of the five algorithms are as follows: LWSO, WSO, NGO, GJO, and FOX. The highest rank signifies that LWSO stands out as the top-performing algorithm among the five considered.

Table 17 Friedman test for the five algorithms

5 Conclusion

In this article, an efficient LWSO algorithm has been proposed to attain the optimum solution to the ELD problem. Using the leader strategy in LWSO enhances the exploitation capability to avoid local optima and improve the local and global search. The performance of the LWSO algorithm has been assessed by using thirteen benchmark optimization problems that exist in the CEC2020 test suite, and it has been found that LWSO achieved better or similar results than DBO, FOX, and MFO algorithms and the conventional WSO. The efficacy of the LWSO has been assessed using evaluation metrics and statistical tests. Results from the Friedman ranking test and the Wilcoxon signed-rank test indicate a significant enhancement in the solution accuracy of the sizing problem when employing the LWSO, surpassing the performance of these recent algorithms. On another problem set, the proposed LWSO algorithm is verified on 6-, 10-, 11-, and 40-thermal units-based test systems. Furthermore, the performance of LWSO in addressing the ELD problem has been scrutinized, revealing a consistently superior success rate compared to WSO, GJO, NGO, and FOX algorithms. The statistical analysis based on 20 individual runs has been carried out for each case, and the results are compared with the previous works of the literature. The dominance of the LWSO algorithm over others has been confirmed. In the future work, the LWSO algorithm could be applied to effectively solve other complex optimization problems in several fields.