Research on Dynamic Economic Dispatch Optimization Problem Based on Improved Grey Wolf Algorithm

: The dynamic economic dispatch (DED) problem is a typical complex constrained optimization problem with non-smooth, nonlinear, and nonconvex characteristics, especially considering practical situations such as valve point effects and transmission losses, and its objective is to minimize the total fuel costs and total carbon emissions of generating units during the dispatch cycle while satisfying a series of equality and inequality constraints. For the challenging DED problem, a model of a dynamic economic dispatch problem considering fuel costs is first established, and then an improved grey wolf optimization algorithm (IGWO) is proposed, in which the exploitation and exploration capability of the original grey wolf optimization algorithm (GWO) is enhanced by initializing the population with a chaotic algorithm and introducing a nonlinear convergence factor to improve weights. Furthermore, a simple and effective constraint-handling method is proposed for the infeasible solutions. The performance of the IGWO is tested with eight benchmark functions selected and compared with other commonly used algorithms. Finally, the IGWO is utilized for three different scales of DED cases, and compared with existing methods in the literature. The results show that the proposed IGWO has a faster convergence rate and better global optimization capabilities, and effectively reduces the fuel costs of the units, thus proving the effectiveness of IGWO.


Introduction 1.Power Dispatch Problem
Over the years, with the rapid development of science and technology and the improvement of people's living standard, the consumption of energy has been increasing, and especially the large amount of electricity used will inevitably bring a huge burden to the power grid; thus, in order to optimize the scheduling of the power system and the utilization efficiency of electricity, dynamic economic dispatch has become a popular research topic for meeting the actual situation of electricity consumption at home and abroad [1].
The dynamic economic dispatch (DED) problem was first proposed by Bechert and Kwanty in 1971 as an extension of static economic dispatch (SED) [1].It mainly refers to dividing a day into several periods and optimizing daily economic dispatches based on daily load forecasts, and takes into account various constraints of thermal power units, which is more consistent with the actual power system operation than static economic dispatch.Economic load allocation (ELD) is a typical optimization problem in power systems and one of the most fundamental optimization tasks in dynamic economic dispatching problems, aiming at a reasonable distribution of power among specific units and minimizing the economic cost while satisfying certain constraints imposed; improving the arrangement of Energies 2024, 17, 1491 2 of 29 the unit output can result in significant savings [2].Some simple scheduling problems are generally solved using traditional mathematical methods, such as the prioritization method, dynamic programming method, equal micro-increment rate criterion, and gradient projection method, but modern economic scheduling problems are often much more complex, due to the introduction of network transmission losses and valve point effects of thermal units.As a result, today's scheduling problems are essentially non-convex, nonlinear, high-dimensional, multi-constrained, multi-objective optimization problems, making such problems unable to be satisfactorily solved by traditional mathematical methods [2].In order to solve the modern economic scheduling problem, some random search algorithms and heuristic swarm intelligence algorithms based on the behavior laws of biological populations are proposed.They can obtain the optimal solution in a reasonable time and avoid falling into the local optimal solution prematurely in the iterative process, and have certain advantages in multi-objective, nonlinear and high-dimensional optimization problems.
Domestic and foreign research on the DED problem has been continuously improving and deepening, and the research directions are also different.At present, domestic current research in power systems mainly conforms to the requirements of low-carbon transition, the construction of clean energy-based power systems has become an important task, and the vigorous development and use of renewable energy has become the main trend of the domestic economic dispatch research.Recently, Yang et al. [3] developed a novel power system dispatching model that incorporates a significant number of plug-in electric vehicle charging and discharging behaviors.They conducted a study on a 10-unit power system with 50,000 plug-in electric vehicles to investigate strategies for mitigating the impact of new energy vehicles on the power grid, ultimately achieving low carbonization.Yang et al. [4] also studied a new hybrid unit commitment problem considering renewable energy generation scenarios and plug-in electric vehicles' charging and discharging management.Due to the vigorous development of renewable energy and the large-scale launch of plug-in electric vehicles, the traditional power system scheduling problem is faced with greater challenges.A series of metaheuristic optimization algorithms are proposed to solve the dilemma, and the effectiveness of these methods for the power scheduling problem is verified by comparison experiments.Foreign scholars, on the other hand, have focused on the aspect of saving energy usage.Liu et al. [5] constructed a hybrid economic emission dispatch (HDEED) mathematical model considering renewable energy generation, which is based on wind-photothermal integrated energy, a moth-flame optimization algorithm was proposed to solve it, and finally three experimental cases were tested to verify the effectiveness of the study.Acharya et al. [6] proposed a multi-objective multiscale optimization scheme for minimizing the dynamic economic load scheduling problem with the valve point effect, and the algorithm retains the ramp constraints on the required rate of the generator units.This method eliminates the discontinuities in the operation of the power system, which leads to a better solution of the dynamic economic load dispatch problem, and makes the generators output the optimal power.Shaheen et al. [7] proposed a manta ray foraging (MRF) optimizer to solve the economic dispatching of the combined heat and power system problem including valve point shocks and wind power.In order to obtain the optimal solution of the EDCS problem, the MRF optimizer with an adaptive penalty function was designed to deal with the constraints of the model efficiently, and the validity of the methodology has been verified through experiments on two kinds of test systems, large and small.

Intelligent Optimization Algorithm
Swarm intelligent optimization algorithms were first explored for application in power systems in the 1970s and are still widely used in various scheduling problems until now.Intelligent optimization algorithms are search techniques based on biological evolution as well as objective laws of nature, and the more typical ones are the genetic algorithm (GA) [8], evolutionary planning algorithm (EP), simulated annealing algorithm (SA) [9], particle swarm optimization algorithm (PSO) [10], whale optimization algorithm (WOA) [11], ant colony optimization algorithm (ACO) [12], etc.These methods have been proven to be very effective for solving nonlinear ELD problems.Many scholars at home and abroad have carried out a large amount of research on the application of intelligent algorithms for economic scheduling in the past decades, and these algorithms are still being tested and improved continuously.Liu et al. [13] proposed a niche differential evolutionary algorithm (NDE) to solve a large-scale cogeneration economic dispatch problem, which is inspired by the neighborhood concept of the niche approach, and utilized a deterministic congested niche approach and a two-phase selection design of greedy selection, which balanced the algorithm's global and local search capabilities, and thus the algorithm could solve the DED problem more efficiently.A genetic algorithm based on the concept of energy-conserving space and the parallel population technique to solve the DED problem was proposed by Silva et al. [14], who added a new repair strategy based on real value coding, and applied the algorithm to four power systems of different sizes for testing to verify the effectiveness of the improved algorithm.Based on the consideration of fuel prices, Mahdavi et al. [15] proposed a scenario-based model to evaluate the impact of substation expansion on TEP from the perspective of voltage level.Discrete artificial bee colony (DABC)-and quadratic programming (OP)-based methods were used to verify the effectiveness of the model in the actual transmission network, and the aim was to economically determine the optimal number, timing, and location of new transmission lines.Li et al. [16] proposed an optimization algorithm combining a chaotic search based on tent mapping and nonlinear adaptive particle swarm optimization, and established a multi-objective optimization model aiming at determining the operating costs, pollutant emissions, and energy efficiency of the cogeneration system.Simulation results showed that the proposed algorithm applied to the model can effectively improve these objectives.Wang et al. [17] established an economic dispatch model based on regional interconnected multi-microgrid systems, and proposed an improved whale algorithm using five strategies, namely adaptive inertia weight, dynamic spiral search and generalized binary learning, to solve this problem.The improved algorithm was applied to two arithmetic models of the grid-connected operation and non-grid-connected operation for testing, and it was found that the convergence accuracy and speed of the algorithm have been improved and the results obtained were good.
The gray wolf optimization algorithm (GWO) is a novel pack intelligence optimization algorithm proposed in 2014 by Seyedali Mirjalili, an Australian scholar, inspired by the predatory behavior of gray wolf packs [18], which is based on the mechanism of wolf pack collaboration to achieve the purpose of optimization.The gray wolf algorithm has the advantages of a simple structure, few parameters to be adjusted, and easy implementation; it has good performance in terms of its problem-solving accuracy and convergence speed, and is now widely used in various scheduling problems.Ge et al. [19] used an improved GWO to optimize the UAV path-planning problem in an oilfield environment and achieved satisfactory results.Wang et al. [20] used a discrete GWO to solve the stacking problem, which effectively solved this problem and surpassed most of the previously reported metaheuristics; Yuan et al. [21] used GWO to solve the lightning whistle acoustic voice recognition problem, and the accuracy of its recognition results was 2% higher compared to the common recognition methods.Dokur et al. [22] used GWO to solve a short-term wind speed-prediction problem with a multilayer perceptron, and the results showed that the algorithm was more effective than other algorithms.Song et al. [23] used GWO to optimize the shaft straightness error assessment of shaft hole-type parts, and the results confirmed that the algorithm was more accurate in solving this problem.
However, like most intelligent algorithms, the gray wolf optimization algorithm has shortcomings, and the most obvious ones are the balance of exploration and exploitation capability of the algorithm and the tendency to fall into local optimal solutions.In order to solve these problems, scholars have made corresponding improvements.Yan et al. [24] proposed a nonlinear convergence factor combining tangent and logarithmic functions to dynamically adjust the global search ability of the gray wolf algorithm, and also introduced an adaptive position update strategy, which led to a significant improvement in the performance of the algorithm.Mostafa et al. [25] proposed an improved gray wolf algorithm to find an optimal solution for the combined economic and emission dispatch problem, so as to minimize the generation costs and achieve emission reduction.Six mutation operators were applied to the GWO to enhance its performance.A test system that consists of 10 units was simulated, and the results showed the effect of applying the mutation operators to the IGWO.Sahoo et al. [26] proposed a coming-of-age improved version of the conventional grey wolf optimization technique to solve the ELD problem.In the improved GWO, the leadership hierarchy of the grey wolf is ameliorated by taking the random walking behavior of the grey wolfs into consideration.The algorithm aims to modify the existing leaders with the best leaders in order to overcome the drawbacks of the conventional GWO.It was found that the performance of the improved gray wolf algorithm was significantly improved through the test of the unit.Mohamed et al. [27] proposed a hybrid whale-wolf optimization method to accurately solve the economic dispatch problem.The proposed method efficiently integrates the mechanisms of the whale optimization algorithm and gray wolf optimization with crossover and mutation operators.To demonstrate the effectiveness of the proposed method, it was compared with six other optimization methods.Two different test systems (six and ten generating units) were used to evaluate the performance of the proposed method.The experimental results showed that the hybrid whale-wolf optimization method showed better performance in finding the optimal solution to the economic dispatch problem compared to the other methods.Paramguru et al. [28] proposed a new modified grey wolf algorithm to solve the economic dispatch problem.The modification was carried out by the incorporation of the exponential operators into the conventional GWO.The constraints with non-linearities of generating units like ramp rate constraints, effect of valve-point loading, and prohibited operating zones were considered for practical application.Compared with other algorithms, the results show that the proposed algorithm is effective in solving the real ELD problem.This optimization process provides a better capability of exploration and exploitation.According to the above literature, it can be concluded that the improvement of the gray wolf optimization algorithm is mainly based on the following three points: first, introducing strategies such as chaos initialization or reverse learning strategies to enhance the diversity of the initial population.Second, introducing nonlinear convergence factors or designing adaptive parameters to automatically adjust the global and local search ability of the algorithm.Third, changing the weight of the iterative formula or mixing it with other algorithms, and combining the search strategies of different algorithms, can improve the GWO algorithm.

Constraint-Handling Methods
Since the DED problem has strong constraints, it is necessary to address these constraints to ensure that the generated solution becomes feasible as the number of generations increases [29].In some past studies, the most commonly used constraint-handling methods include the penalty function method, feasibility-based rule method [30], ε-constrainthandling method [31], repair method, and random ordering method [32].Although these methods can effectively deal with the constraint problem, they all have obvious drawbacks, and the main shortcomings are as follows: first, some processing methods cannot accurately set the parameters or penalty factors, which will affect the feasibility of the final solution; second, some processing methods cannot solve the constraint problem with a small feasible domain or a complex scale; in addition, some constraint processing methods do not work well with algorithms, and cannot be combined with algorithms to solve multi-objective optimization problems.Due to these shortcomings, many scholars have also studied improvement strategies.Jin et al. [33] proposed an improved penalty function method to solve multi-objective optimization problems, in which the optimal initial iteration points are obtained via the pseudo-random sequence correlation method, and continuous, non-segmented exponential penalty functions are constructed for the sparse decomposition of high-dimensional vectors.
It was found that the accuracy of the improved penalty function method is nearly twice that of the original method; considering the drawbacks of feasibility rules, Bcw et al. [34] designed an individual-dependent feasibility rule that can enhance the utilization of objective function information in the problem and is combined with a differential evolutionary algorithm to achieve good results in dealing with the constraints of optimization problems.Yang et al. [35] proposed an augmented generalized ε-constraint processing method to solve the multi-objective optimal scheduling model of a cogeneration microgrid, which can better obtain the Pareto optimal solution set of the model, and the experimental results demonstrated that this method can better realize the economic optimization of the model than other constraint methods.Yang et al. [36] proposed an adaptive assignment constraintprocessing technique that can decompose the multi-objective optimization problem into several optimization subproblems.Each subproblem has a subentry in a subregion, and the constraint processing method is adaptively assigned to each subregion according to the index, so as to solve the constraint problem better.Liu et al. [37] proposed a double random ordering encryption algorithm based on the form of measurement data, which on the one hand uses randomness to ensure the uncertainty of random sequences and improves the security of measurement data, and on the other hand proposes an approximate recovery strategy based on CGAN to ensure the accuracy of decryption, and finally analyzed the effectiveness of the method through experiments on wind power and photovoltaic datasets.

The Innovation of This Paper and the Arrangement of the Remaining Content
Considering that there are few studies on solving DED problems by using the grey wolf optimization algorithm, this paper focuses on improving the grey wolf algorithm and using the improved algorithm to optimize the fuel costs of the unit, considering transmission losses and valve point effects.On the one hand, this paper adopts an improved scheme that is more suitable for solving DED problems for the gray wolf optimization algorithm, including a new chaotic mapping for population initialization, a more appropriate improvement of the convergence factors and control parameters, and an improvement of the weight of the position-updating formula.On the other hand, this paper uses a more novel method to deal with constraints, which combines a heuristic repair method and a direct repair method to deal with constraints in the model better.
The rest of this study is organized as follows: first, a mathematical model of a dynamic economic dispatch considering unit fuel costs is given, the original gray wolf algorithm is briefly described, and an improved grey wolf algorithm (IGWO) is introduced according to the initialization and updating formula.Then, a hybrid constraint-processing method combining heuristic repair and direct repair is proposed, in which the feasibility rule method is used to filter out high-quality infeasible solutions, a rough adjustment of the heuristic repair is used to make infeasible solutions closer to feasible solutions, and finetuning of the direct repair is used to force infeasible solutions to feasible solutions.Finally, the improved algorithm and constraint processing techniques are applied to the DED problem, the experimental results are observed in comparison with other methods, and the conclusions of the study and the outlook for further research work in the future are given.

Dynamic Economic Dispatch Model
The goal of the DED problem is to determine the optimal power generation level for all online units within a specified scheduling time (e.g., 24 h per day) with the minimum power generation fuel cost under various equation and inequality constraints, taking into account the valve point effect (VPE) and network losses.The detailed mathematical expression of the whole problem is as follows.

Optimization Objective Function
The fuel cost objective function considering the valve point effect can be approximated as a smooth quadratic function with the following expression: Energies 2024, 17, 1491 6 of 29 In Equation ( 1), F(P) denotes the total fuel cost of thermal generating units; P is the output power of all online units; T is the whole dispatch cycle of 24 h; N is the total number of system generators; a i , b i , c i , d i , e i are the consumption characteristic coefficients of the ith generator; p t,i is the output power of the ith thermal generating unit at moment t; and p min i is the minimum value of its active output.The part of the formula with the absolute value is the valve point effect.

Constraints
The dynamic economic dispatch problem contains several equality and inequality constraints, including generation capacity constraints, unit ramp constraints, power balance constraints, and transmission loss constraints.

Capacity Constraints
The generation capacity constraint is an inequality constraint, where the unit's generation capacity must be within an appropriate limit during optimal dispatch, and is expressed as Formula (2).
here, p max i and p min i are the upper and lower limits of the active output of each unit in the generator set, respectively.

Units Ramp Limits
Due to the large inertia of the thermal power unit, the climb limit constraint is introduced in order to extend the service life of the unit.That is, the output of the unit cannot be greatly adjusted in a short period of time, which is expressed by Formula (3).
In the above equation, UR i and DR i denote the maximum allowable rise and fall rate of the ith generation unit, respectively, and represent the generation inertia size of the thermal power unit.

Power Balance Constraint
The power balance constraint is the most important and complex equation constraint in the DED problem.In each time period, the sum of the active output p i,t must be equal to the sum of the total load demand p D,t and the network active loss p L,t of each generator in that time period, and the constraint relationship is expressed by Formula (4).
The mathematical model expression for the network transmission loss p L,t in the above equation is usually simplified as in the following Formula (5).

Description of the Gray Wolf Algorithm
The gray wolf optimization algorithm (GWO) is inspired by the social leadership and hunting behavior of gray wolves in nature.Compared with other metaheuristic algorithms, the GWO algorithm has the advantages of a simple structure, having few control parameters, being easy to improve, and having the ability to achieve a balance between local and global search.The GWO algorithm takes the three leading wolves α, β, and δ with the best adaptation in the population as the best solution and guides the remaining ω wolves in the direction closest to the prey so as to find the global optimal solution.Wolf hunting consists of three main steps: surrounding, hunting, and attacking prey.The number distribution of the social ranks of wolves is shown in Figure 1.
The mathematical model expression for the network transmission loss  , in the above equation is usually simplified as in the following Formula (5).

Description of the Gray Wolf Algorithm
The gray wolf optimization algorithm (GWO) is inspired by the social leadership and hunting behavior of gray wolves in nature.Compared with other metaheuristic algorithms, the GWO algorithm has the advantages of a simple structure, having few control parameters, being easy to improve, and having the ability to achieve a balance between local and global search.The GWO algorithm takes the three leading wolves α, β, and δ with the best adaptation in the population as the best solution and guides the remaining ω wolves in the direction closest to the prey so as to find the global optimal solution.Wolf hunting consists of three main steps: surrounding, hunting, and attacking prey.The number distribution of the social ranks of wolves is shown in Figure 1.

Surrounding
In the early stage of algorithm optimization, GWO is mainly expressed as encircling the prey, and its mathematical model is expressed as Formulas ( 6) and (7).
The two formulas above represent the distance between individual gray wolves and their prey and the position update of gray wolves, respectively, where  is the number of current iterations. ⃗ and  ⃗ are the position vectors of the prey and gray wolves, respectively, and  ⃗ and  ⃗ are the coefficient vectors, which are calculated using Formulas ( 8) and (9).
The number distribution of the social ranks of wolves.

Surrounding
In the early stage of algorithm optimization, GWO is mainly expressed as encircling the prey, and its mathematical model is expressed as Formulas ( 6) and (7).
The two formulas above represent the distance between individual gray wolves and their prey and the position update of gray wolves, respectively, where t is the number of current iterations.8) and (9).
In the above equations, → a is the convergence factor, and → r 1 and → r 2 are random numbers with values between 0 and 1, decreasing linearly from 2 to 0 with the number of iterations.

Hunting
In order to mathematically model the hunting behavior of wolves, it is assumed that the three leading wolves have a better ability to identify the location of their prey.Therefore, considering the leading role of the three wolves in searching for the optimal solution, other wolves must follow them.The mathematical model of the hunting behavior of wolves is shown in Equations ( 10)- (12).
and → C 3 in the above equation are calculated using Equation (9).
To better visualize the surrounding and hunting process of the gray wolf population, the 2D position of the updated gray wolf population is shown in the following Figure 2.
Energies 2024, 17, x FOR PEER REVIEW 8 In the above equations,  ⃗ is the convergence factor, and  ⃗ and  ⃗ are ran numbers with values between 0 and 1, decreasing linearly from 2 to 0 with the numb iterations.

Hunting
In order to mathematically model the hunting behavior of wolves, it is assumed the three leading wolves have a better ability to identify the location of their p Therefore, considering the leading role of the three wolves in searching for the opt solution, other wolves must follow them.The mathematical model of the hun behavior of wolves is shown in Equations ( 10)- (12).
and  ⃗ in the above equation represent the best three solutions in population iterated to moment t;  ⃗ ,  ⃗ , and  ⃗ are calculated using Equation ( 8);  ⃗ ,  ⃗ , and  ⃗ are calculated using Equation (10).

𝑋 ⃗ (𝑡 + 1) = 𝑋 ⃗ + 𝑋 ⃗ + 𝑋 ⃗ 3
To better visualize the surrounding and hunting process of the gray wolf popula the 2D position of the updated gray wolf population is shown in the following Figur

Attacking Prey
When the prey stops moving, the wolf pack terminates the hunting process and s attacking the prey.This can be achieved by controlling the value of the linear converg factor A in the iteration of exploration and development.During the iteration, half o iteration is used for exploration, and in the case of a smooth transition, the other h used for exploitation, in which case the wolves change their position to any pos between the prey's position and their current position.
In summary, the pseudo-code of the gray wolf optimization algorithm is sh bellow (Algorithm 1).First, the initial population of wolves is randomly generated i search space, then the position of the wolves is evaluated using the fitness function then the following steps are repeated until a predefined number of iterations is rea

Attacking Prey
When the prey stops moving, the wolf pack terminates the hunting process and starts attacking the prey.This can be achieved by controlling the value of the linear convergence factor A in the iteration of exploration and development.During the iteration, half of the iteration is used for exploration, and in the case of a smooth transition, the other half is used for exploitation, in which case the wolves change their position to any position between the prey's position and their current position.
In summary, the pseudo-code of the gray wolf optimization algorithm is shown bellow (Algorithm 1).First, the initial population of wolves is randomly generated in the search space, then the position of the wolves is evaluated using the fitness function, and then the following steps are repeated until a predefined number of iterations is reached and stopped.In each iteration, three lead wolves with the optimal solution are identified, and then each wolf updates its position by following the three hunting steps mentioned earlier.The above steps are repeated until the algorithm stops and outputs the optimal position of the prey.for each search agent 10: Update the position of the current search agent by Equation ( 12) 11: end for 12: Update a, A, and C 13: Calculate the fitness of all search agents 14: Update X α , X β and X δ 15: t = t + 1 16: end while 17: return X α

Improvement of the Gray Wolf Algorithm
Although the gray wolf optimization algorithm has the advantages of a simple structure and easy implementation, the algorithm has some obvious shortcomings, such as a lack of diversity in the population, an imbalance between the exploitation and exploration phases, and premature convergence during the iterative process.In order to overcome these shortcomings, this study has made improvements in three aspects.First, the initial population individuals are distributed in a wider solution space through chaotic mapping, thereby improving the diversity of the initial population.Second, by improving the convergence factor of the algorithm model, the convergence accuracy of the algorithm in the later stage can be improved.The third is to change the weight of the iterative formula or combine the optimization ideas of other algorithms to improve the GWO algorithm so that the algorithm can jump out of the local optimum.

Algorithm Population Chaos Initialization
Since the initial population of the original gray wolf algorithm is randomly generated, the coverage of individuals in the solution space is not high, and the diversity of the population cannot be reflected, which affects the optimization search effect of the algorithm.By contrast, the typical features of chaotic mapping include randomness, ergodicity, and regularity, which can ensure the diversity of the population and achieve the purpose of a global search.Therefore, the Bernoulli chaotic mapping method is used to improve the initial population in order to enhance the searching effect of the gray wolf algorithm.Its mathematical model is expressed as Formulas ( 13) and (14).
In Equation ( 13), k is the population size, Z k is the generated chaotic sequence, and the value of λ is a random number between 0 and 1.Then, the chaotic sequence Z k is combined to further generate the initial position sequence X k of gray wolf individuals in the search area., so this study improves the control parameters by proposing an exponential convergence factor a updating strategy, which can better fit the actual nonlinear variation process of the convergence factor a. The formula is presented as Formulas ( 15) and (16).
In the above equation, l is the number of iterations, maxiter is the maximum number of iterations, λ 1 , λ 2 are random numbers between 1 and 6, and r 3 is a random number between 1 and 1.5.

Improvements of the Location Update Formula
In order to better develop the search-seeking capability of the gray wolf algorithm, weigh the different guiding effects of the best three wolves on the position updates of the remaining gray wolf individuals, and prevent falling into premature stagnation at a local scale, a dynamic weight factor b with linear decreasing variation is first introduced, followed by the adaptive scale factors v1, v2, and v3.The method is shown in Formulas ( 17)- (19).
In the above equations, b s takes the value of 0.5 and b f takes the value of 1 to denote the initial and final values of the weight factor, respectively, f α , f β , and f δ denote the adaptation values of the three wolves, and r 4 is a random number between 0.3 and 1.
To sum up, after applying the above three improvement points to the iterative process of the gray wolf algorithm, the pseudo-code of the improved gray wolf algorithm is shown bellow (Algorithm 2).

9:
for each search agent 10: Update the position of the current search agent by Equation ( 12).11: end for 12: Update improved parameters a, A, and C by Equations ( 15) and ( 16).13: Calculate the fitness of all search agents.14: Update X α , X β , and X δ with the improved position update formula by Equation (19).15: t = t + 1 16: end while 17: return X α

Constraint Handling
Considering that in solving DED problems, some updated candidate solutions are usually infeasible in the early stage of optimization, and it is difficult to meet all constraints, which is not conducive to exploring and developing feasible regions, this paper proposes a hybrid constraint-processing method combining heuristic repair and direct repair to ensure all solutions' feasibility.Different processing methods are used for equality constraints and inequality constraints.The specific constraint processing is as follows.

Boundary Constraint Handling
The generator units should not only meet the upper and lower limits of capacity constraints, but also meet the ramp constraints in different periods.The critical treatment or the random treatment within the boundary is generally used, and the critical proximity treatment is used for these constraints in this study.To facilitate the processing, a new boundary constraint is formed as shown in Formulas ( 20) and ( 21).
In the above equations, p min t,i and p max t,i denote the lower and upper bounds of the new bound synthesized by the ith unit at the tth moment.Then, any variable p t,i that exceeds its new bound is restricted to its upper and lower boundaries, and the model is expressed as Formula (22).
The repair method mentioned above can guarantee that both ramp constraints and capacity constraints are satisfied at the same time, which is simpler and more efficient than the traditional penalty function method.

Power Balance Constraint Handling
Considering the network transmission loss, the power balance constraint is the most difficult to repair among all constraints, and it is more difficult to reduce and eliminate violations.Therefore, a hybrid constraint-processing method is proposed, and the whole process is divided into two stages.The first is the rough adjustment stage, which can quickly reduce the degree of violation, and for the infeasible solutions that still cannot solved, the next fine-tuning phase is entered, which helps to speed up the repair speed.The specific implementation steps are as follows.
The first step is to roughly calculate the cost of each unit and form a set E in ascending order to evaluate the real-time efficiency of each unit.The calculation is shown as Equation (23).
In the second step, a cell r is selected according to the efficiency from the set E, and the output power is roughly adjusted using the following Equation ( 24): where V(t) is the constraint violation size of the unit at moment t.If p t,r is on the new boundary, it means that the violation power is not repaired only by a single unit, and thus the r cell is removed from the set M, repeating step 2 until the set M is empty.Otherwise, the next step is executed.After the coarse tuning step, the solution is near the feasible domain.
In the third step, the fine-tuning step proceeds to obtain a feasible solution.Here, the output solution equation of the thermal power unit is rewritten as Formula (25) and the power balance constraint can be transformed into solving the quadratic equation.The unit r is selected according to the efficiency from the unit set U.
In the above equation, let a = B rr , b = 2∑ i∈M(Z),̸ =r B ri p t,i − 1, c = PD t + ∑ i∈M(Z),̸ =r ∑ j∈M(Z),̸ =r p t,i B ij p t,j − ∑ i∈M(Z),̸ =r p t,i .If the roots of the equation exist, then the two roots are −b± √ b 2 −4ac 2a .Two cases are to be discussed here: in case one, if the equation has no solution, the algorithm repeats the third step until the set U is empty.In case two, if there are solutions, the algorithm checks if they satisfy the boundary constraint.If they all satisfy it, p t,r is made equal to any solution.If only one solution satisfies it, p t,r is made equal to the solution that satisfies the constraint.
In the fourth step, Equation ( 26) is used to adjust the solution further while the feasible solution is not obtained using Equation (25).If it is feasible, the step ends.Otherwise, step 3 is repeated until the set M is empty.
Steps 1-2 can quickly reduce the amount of violation of the equation constraints associated with the power balance, and steps 3-4 can further reduce or eliminate the amount of constraint violation via fine tuning.If the solution is still infeasible, the overall feasible solution is rigorously screened using the feasibility rule method.In summary, the overall flow chart of the improved gray wolf optimization algorithm for solving the DED problem combining the hybrid constraint processing method can be obtained as shown in Figure 3.
This paper studies day-ahead scheduling and 24 h is a cycle.When continuous scheduling is considered, the generator set is continuous, and the power of the last hour of the previous day should be taken into the ramp constraint of the first hour of the following day.In other words, Formulas ( 20) and ( 21) should be modified as Formulas ( 27) and (28).
Here, p 0,i is the output power of the 24th time interval of the previous day.
feasible solution is rigorously screened using the feasibility rule method.In summary, the overall flow chart of the improved gray wolf optimization algorithm for solving the DED problem combining the hybrid constraint processing method can be obtained as shown in Figure 3.This paper studies day-ahead scheduling and 24 h is a cycle.When continuous scheduling is considered, the generator set is continuous, and the power of the last hour of the previous day should be taken into the ramp constraint of the first hour of the following day.In other words, Formulas ( 20) and ( 21) should be modified as Formulas ( 27) and (28).Here,  , is the output power of the 24th time interval of the previous day.

Feasibility Analysis of IGWO
To verify the performance of the improved gray wolf algorithm and to determine whether the algorithm is feasible for solving the DED problem, eight benchmark test functions listed in Table 1 were selected for testing, including five unimodal test functions and three multimodal test functions [38].Several representative intelligent optimization algorithms were then selected for test and comparison, including the original gray wolf algorithm (GWO) [18], the improved gray wolf algorithm based on dimensional learning hunting search strategy (IGWO1) [39], the particle swarm algorithm (PSO) [10], the whale optimization algorithm (WOA) [11], and the grasshopper optimization algorithm (GOA) [40].The experimental tool used was the computer software MATLAB (https://www.mathworks.com/products/matlab.html).In this experiment, the algorithm was used to test each function in 30, 50, and 100 dimensions and the maximum number of iterations was uniformly set to 2000, and the optimization process of the algorithm was terminated when the evaluation number of the function reaches the maximum number of iterations.In addition, the basic parameters information of each algorithm involved in the comparison test were set as shown in Table 2: Table 2. Parameter settings of each algorithm.

Performance Analysis
The performance of the optimization algorithm should be evaluated in terms of convergence accuracy, convergence speed, robustness, etc.Therefore, the results of 30 independent runs of different algorithms on functions in different dimensions of 30, 50, and 100 were evaluated.The information of the mean, best value, and standard deviation of the results is shown in Tables 3-5, and the comparison graphs of the convergence curves of the six algorithms for the test functions of 30 dimensions are shown in Figures 4-11.In Figures 4-11, iterative convergence curves are plotted for eight typical funct representing the full range of features from F1 to F8.It can be seen that the converge curves of the IGWO show a strong exploration and exploitation capability ov compared to other algorithms.In the F1, F2, F3, F6, and F8 test plots, it can be seen  In Figures 4-11, iterative convergence curves are plotted for eight typical functio representing the full range of features from F1 to F8.It can be seen that the convergen curves of the IGWO show a strong and exploitation capability over compared to other algorithms.In the F1, F2, F3, F6, and F8 test plots, it can be seen th the convergence curves of the algorithm change more drastically, which indicates that t improved A C and the updated Formula ( 19) provide better solutions In Figures 4-11, iterative convergence curves are plotted eight typical functions representing the full range of features from F1 to F8.It can be seen that the convergence curves of the IGWO show a strong exploration and exploitation capability overall com-pared to other algorithms.In the F1, F2, F3, F6, and F8 test plots, it can be seen that the convergence curves of the algorithm change more drastically, which indicates that the improved parameters A and C and the updated Formula (19) provide better solutions for the algorithm and speed up the convergence of the algorithm when dealing with singlemode and multi-mode problems.In the F4, F5, and F7 test plots, it can be seen that the convergence curve of the algorithm has an obvious turn in the iterative process, which indicates that the enhanced population diversity of the improved algorithm makes the convergence accuracy of the algorithm show a significant improvement compared with most other algorithms when dealing with single-mode and multi-mode problems, further verifying the detection capability of the IGWO.From the overall test results, it is clear that the first half of the improved algorithm's curve has completed convergence and that the convergence accuracy is closer to the optimal value, illustrating the important role of the proposed algorithm-improvement mechanism in the global search.In addition, compared with other algorithms, the IGWO had a faster convergence speed and maintained a better convergence accuracy, thus verifying the effectiveness of the improved gray wolf algorithm.
In addition, the comparisons of various stability metrics of the six algorithms tested against eight functions in three different dimensions, including the mean, standard deviation, optimal value, and running time, are presented in Tables 3-5, respectively.The meaning of the indicator Winner in the table is the superiority and inferiority of IGWO compared with the test results of other algorithms.Winner 1, 0, and −1 respectively mean that IGWO is superior to, comparable to, or worse than the other algorithms on the whole.First, it can be seen from the table that the performance of the algorithm did not change much as the function dimension increased, and the convergence accuracy of the algorithm improved, which depends on the improvement of the algorithm's exploration capability.Second, the overall test effect of the IGWO algorithm on the unimodal reference function is obviously better than that of other algorithms.Although the effect of the IGWO algorithm on F4 is not as good as that of the WOA and GWO algorithms, the difference of indicators is not large, and the results are still better than other algorithms.In addition, the IGWO algorithm showed good results in testing multimodal benchmark functions, except for the F6 and F7 test results, which were slightly worse than those of the WOA, while the other functional test indicators were better than most algorithms.Finally, compared with the original gray wolf algorithm, the improved gray wolf algorithm has improved all the indicators of the test functions.Only in test F4, the improved gray wolf algorithm was inferior to the original gray wolf algorithm, and the other test function indicators were basically better than the original gray wolf algorithm.Thus, on the whole, IGWO won 98 out of 120 comparisons, thus verifying the effectiveness of the improved gray wolf algorithm.
In summary, the IGWO has excellent performance in testing benchmark problems, especially compared with the original gray wolf algorithm; its exploration and exploitation capability has been greatly enhanced, which avoids the algorithm falling into local optimal solutions to a certain extent, but it needs to be strengthened in solving multimodal benchmark problems.

Results Analysis of IGWO Test Dynamic Economic Dispatch Model
In order to verify the reliability of the algorithm and constraint treatment proposed in this paper in solving the economic dispatch problem, three cases of different sizes of the single-objective dynamic economic dispatch model were considered, namely Case 1: 5 generating units; Case 2: 10 generating units; and Case 3: 15 generating units [41].The scheduling period was T = 24 h and the valve point effect and transmission loss constraints were considered for each case, with the corresponding B-factors taken from the studies of Qian and Mohammadi et al. [41,42].The maximum number of evaluations of the algorithm was D × 10,000, with D representing the dimensionality of the decision variables; in addition, the maximum allowable error at each moment in the process of repairing infeasible solutions was 0.001, and to avoid chance, each case was run 30 times independently.The experiments were simulated in MATLAB software.

Calculation Results and Comparison
To make the comparison results look more intuitive, the optimal solutions of the test results for GWO and IGWO under the three cases are summarized in Tables 6-8, including the feasibility verification of the optimal solutions and the fuel costs corresponding to the optimal solutions, and the optimal solutions for each case tested by other algorithms proposed in the literature are also listed for comparison.In addition, the power output information of the optimal solutions for GWO and IGWO under Case 1 and Case 2 is shown in Tables 9-12, and the stacked histograms of the optimal output results for GWO and IGWO under Case 3 are shown in Figures 12 and 13.The total fuel cost is $2.45 M.    The total fuel cost is $2.45 M.   Tables 6-8 show the comparison of a series algorithms from the literature with IGWO under three cases, including a comparison with the original GWO algorithm.As can be seen from the table, first, the optimal fuel costs solved by the IGWO are $43.16K, $2.45 M, and $0.65 M, which are better than the test results of all other algorithms proposed in the literature, which indicates that the innovative method proposed in this paper is effective.On the one hand, the chaotic initialization of the algorithm population makes the algorithm enhance a certain exploration capability in the initial stage, which can help avoid the algorithm falling too quickly into a local optimum; on the other hand, the introduction of the nonlinear convergence factor accelerates the convergence speed of the algorithm; furthermore, the adaptive strategy of the weight of the position update equation also improves the convergence accuracy of the algorithm and further enhances the exploration and exploitation capability of the algorithm.Second, the equation constraint violations of the IGWO are 2.51 × 10 −4 , −2.30 × 10 −4 , and 3.19 × 10 −5 , which are smaller than the constraint violations of most other algorithms, and the constraint violations under each case are smaller than 0.001, which illustrates the feasibility of the coarse and fine tuning, and further verifies that the hybrid constraint-processing method proposed in this paper is effective and thus greatly reduces the constraint violations.
In addition, according to Tables 9-12, comparing the power output information of the IGWO and GWO in the two cases, the GWO and IGWO ran for 18.32 s and 18.82 s on test Case 1, respectively, and 45.68 s and 45.97 s, respectively, on test Case 2. It is found that the optimal solution of the IGWO is significantly better than that of the GWO, which shows that although the constraints are also satisfied, the IGWO has higher exploration capability and convergence accuracy due to the improvement of the population initialization and position update strategy, and also as seen in the stacked histograms of Figures 12 and 13 (Case 3), the GWO and IGWO ran for 83.84 s and 84.24 s, respectively, on test Case 3. It is worth noting here that the disaster of dimension needs to be considered in the case of solving Case 3 (Unit 15).From the results of test Case 3, the operation time of the improved algorithm is shorter, and the obtained fuel cost is also better than in other algorithms, which indicates that the improved algorithm also shows a faster convergence speed and better convergence accuracy for solving high-dimensional problems.In addition, it can be seen from Figures 12 and 13 that the improved algorithm solves the array variance less, which indicates that the improved algorithm has a more stable performance in solving high-dimensional problems, and thus the method proposed in this paper can better reduce the impact of high-dimensional space.In summary, IGWO has an advantage over other algorithms when applied to the DED problem.

Conclusions
In order to alleviate the current energy problem and find an effective method to solve the DED problem, an improved gray wolf optimization algorithm (IGWO) and a constraintprocessing technique considering the efficiency of the unit are proposed in this paper, and it is proven by the benchmark experimental results that the proposed improving strategy does enhance the population diversity and convergence speed of the gray wolf algorithm, which makes the algorithm avoid falling into a local optimum.The test results of three other DED cases show that the proposed improved algorithm outperforms the original algorithm and other methods proposed in the literature, and that the proposed constraintprocessing technique is better able to repair infeasible solutions and thus transform them into high-quality solutions.Additionally, the advantage of IGWO becomes more obvious as the number of units increases, which is of course related to the strong population diversity in the early stage of the algorithm, thus verifying the effectiveness of the proposed method in solving the DED problem in this paper.
There are still several shortcomings in this study, and more factors need to be considered for improvement in solving the DED problem, so future work will start from the following two aspects: (1) In addition to thermal power, the model should also comprehensively consider hydropower, wind power, photovoltaic power, and other power generation types, carry out multi-objective dynamic economic dispatch, and further consider the impact on the environment and ensuring, so as to meet various constraints while ensuring the minimum economic cost and environmental pollution.(2) More work needs to better address the problem of combining constraint processing techniques with swarm intelligence algorithms, by combining the two to solve a case study of the DED problem.Furthermore, how constraint processing techniques affect the performance of intelligent optimization algorithms on a practical problem should be explored.

Figure 1 .
Figure 1.The number distribution of the social ranks of wolves.

→
X P and → X are the position vectors of the prey and gray wolves, respectively, and → A and → C are the coefficient vectors, which are calculated using Formulas ( and → X δ in the above equation represent the best three solutions in the population iterated to moment t; → A 1 , → A 2 , and → A 3 are calculated using Equation (8); and → D α , → D β , and → D δ are calculated using Equation (10).

Figure 2 .
Figure 2. The 2D position maps of the updated gray wolf population.

Figure 2 .
Figure 2. The 2D position maps of the updated gray wolf population.

Algorithm 1 :
The conventional grey wolf optimizer algorithm (GWO) Input: N, D, Maxiter Output: The global optimum 1: Begin 2: Initialize the grey wolf population X i (i = 1, 2, . .., n) 3: Initialize a, A, and C 4: Calculate the fitness of each search agent 5: X α = the best search agent 6: X β = the second best search agent 7: X δ = the third best search agent 8: While (t < Max number of iterations) 9:

2 .
Improvement of the Convergence Factor and Control Parameters In the mathematical model of the gray wolf algorithm, the coefficient vectors → controlling the search range of the wolf pack, where → A represents the search radius of the wolf pack, which is used to adjust the wolf-prey spacing in stages, and the control parameter → C also coordinates the global exploration and local exploitation of gray wolf algorithm.In turn, these two parameters are related to the convergence factor a and the random vectors → r 1 and → r 2

Figure 3 .
Figure 3. Flowchart of the IGWO for solving the DED problem.

Figure 3 .
Figure 3. Flowchart of the IGWO for solving the DED problem.

Figure 12 .
Figure 12.The best results of GWO for Case III.

Figure 13 .
Figure 13.The best results of IGWO for Case III.

Figure 12 .
Figure 12.The best results of GWO for Case III.

Figure 12 .
Figure 12.The best results of GWO for Case III.

Figure 13 .
Figure 13.The best results of IGWO for Case III.

Figure 13 .
Figure 13.The best results of IGWO for Case III.

Table 1 .
The basic information of eight benchmark functions.

Table 3 .
The statistics data of 30 runs of the benchmarks of 30 dimension.

Table 4 .
The statistics data of 30 runs of the benchmarks of 50 dimension.

Table 5 .
The statistics data of 30 runs of the benchmarks of 100 dimension.

7 .
Test result comparison chart of F4.

Table 6 .
Comparison of results with different algorithms for Case I.

Table 7 .
Comparison of results with different algorithms for Case II.

Table 8 .
Comparison of results with different algorithms for Case III.

Table 9 .
The best results of GWO for Case I.

Table 9 .
Cont.The total fuel cost is $47.15 K.