Energy internet system scheduling model solving method based on niche genetic algorithm

By constructing a multi-objective optimization model of niche genetic algorithm, and combining real number encoding, tournament selection, simulated binary crossover and adaptive mutation, the diversity of solutions and local optima in the scheduling of multi-energy complementary energy internet system are solved, and efficient and stable global optimal solution output is achieved.

CN121745709APending Publication Date: 2026-03-27STATE GRID DIGITAL TECHNOLOGY HOLDING CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing genetic algorithms struggle to maintain solution diversity when dealing with the scheduling of multi-energy complementary energy internet systems. They also suffer from local optima, slow convergence, and difficulty in obtaining high-quality global optimal solutions.

Method used

A scheduling model based on a niche genetic algorithm is constructed. By building a multi-objective optimization mathematical model, a niche control mechanism is introduced. Real number encoding, tournament selection, simulated binary crossover and adaptive non-uniform mutation strategies are adopted, combined with an elite retention mechanism, to optimize population update and optimal solution output.

Benefits of technology

It effectively maintains the diversity of solutions, enhances global optimization capabilities and convergence speed, enables efficient scheduling of multi-energy complementary systems, meets energy balance and equipment capacity constraints, and supports energy optimization operation under the "dual carbon" objective.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745709A_ABST
    Figure CN121745709A_ABST
Patent Text Reader

Abstract

The invention relates to an energy internet system scheduling model solving method based on a niche genetic algorithm, and the method comprises the following steps: S1, constructing a multi-objective optimization mathematical model containing an economic cost objective function and an environmental protection cost objective function at the same time, and determining constraint conditions in the operation of a scheduling system; s2, representing candidate solution individuals by adopting a real number coding mode; s3, calculating fitness values of all individuals in the current population, and entering a main optimization iteration process until a termination condition is met; s4, in each round of iteration, according to the current individual fitness value, executing genetic operator operation to generate a next generation of filial generation population; s5, by calculating the normalized Euclidean distance between individuals, only the individual with the optimal local fitness is reserved; and S6, outputting the individual with the highest fitness value as the optimal solution of the final scheduling model parameters of the multi-energy complementary system. According to the method, the overall economy, the environmental protection property and the operation reliability of the scheduling scheme can be remarkably improved, and the method has good engineering applicability and popularization value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy system optimization scheduling, and more specifically, to a method for solving the scheduling model of an energy internet system based on a niche genetic algorithm. Background Technology

[0002] The operational optimization problem of multi-energy complementary energy internet typically involves a large number of decision variables, complex and nonlinear objective functions, and a wide variety of constraints covering all aspects of energy production, transmission, storage, and consumption. Especially when multiple energy forms (such as electricity, heat, and gas) are used in synergy, the coupling relationships between different energy sources further increase the complexity of the optimization problem. These characteristics make solving this type of problem challenging, and traditional optimization methods often struggle to efficiently handle such large-scale, multi-constrained, high-dimensional problems.

[0003] Against this backdrop, genetic algorithms (GA), as a typical global optimization method, are widely used in energy system optimization problems. By simulating natural selection and biological evolution, GA searches the global solution space through crossover and mutation operations, avoiding the local optima problems that may occur with traditional methods. However, the crossover and mutation factors in basic genetic algorithms are random, and the system may get trapped in regions of local optima or invalid solutions when seeking the optimal solution. This randomness leads to slow convergence speed and poor solution stability when dealing with large-scale optimization problems, making it difficult to obtain high-quality global optima. Especially when facing highly nonlinear and multi-objective optimization problems, the performance of basic genetic algorithms is unsatisfactory, exhibiting significant limitations.

[0004] To address this problem, researchers have proposed some improvement schemes. For example, the existing microhabitat-based genetic algorithm (SGA) constructs multiple relatively independent small populations (microhabitats), each with high diversity and less gene exchange between different small populations. This not only avoids premature convergence but also increases the diversity of solutions. The existing adaptive genetic algorithm dynamically adjusts the probability of crossover and mutation operations based on the fitness information of individuals, thereby enhancing the algorithm's adaptive ability and improving global search and local optimization capabilities. Reference [5] uses a genetic-population intelligence fusion algorithm to find the optimal solution of the model, which has better convergence efficiency and real-time processing capabilities. By introducing an adaptive mechanism into the genetic operator, the quality of the solution can be improved and the convergence speed can be effectively accelerated. However, these methods still have some shortcomings. For example, although the microhabitat genetic algorithm has made some improvements in maintaining the diversity of solutions, it may still face the dilemma of local optimal solutions. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide a solution method for the scheduling model of the energy Internet system based on niche genetic algorithm, which can better maintain the diversity of solutions, while having high global optimization ability and convergence speed.

[0006] The technical solution adopted by this invention to solve its technical problem is: constructing a method for solving the scheduling model of an energy internet system based on a niche genetic algorithm, including the following steps: S1. Construct a multi-objective optimization mathematical model that simultaneously includes economic cost objective function and environmental cost objective function, and clarify the constraints in the operation of the scheduling system; S2. Preset the key control parameters of the genetic algorithm, use real number encoding to represent candidate solution individuals, and generate the initial population through uniform random sampling. S3. Calculate the fitness value of all individuals in the current population, enter the main optimization iteration process, and the algorithm continuously updates and evolves the population according to the preset evolution mechanism until the termination condition is met. S4. In each iteration, genetic operators are executed based on the current individual fitness value to generate the next generation of offspring. S5. Introduce a niche control mechanism: by calculating the normalized Euclidean distance between individuals, divide the area into several niche regions, retain only the individuals with the best local fitness, and mark the rest of the individuals as redundant and eliminate them. S6. Integrate the current elite individuals, the retained offspring individuals, and the newly generated random individuals to form a new generation of population, and output the individual with the highest fitness value as the optimal solution for the final scheduling model parameters of the multi-energy complementary system.

[0007] According to the above scheme, in step S1, the constraints include equality constraints and inequality constraints of equipment capacity constraints, energy balance constraints, and operating time window limits.

[0008] According to the above scheme, in step S1, the constructed multi-objective optimization mathematical model includes an economic cost objective function C1 and an environmental cost objective function C2. The specific calculation formula for the objective function F is as follows:

[0009] In the formula, and The preset non-negative weighting coefficients satisfy... This is used to balance the contributions of different objectives to the optimization result. Let $\mathbf$ and $\mathbf$ represent the minimum and maximum values ​​of economic and environmental costs in the current population, respectively. By normalizing the maximum and minimum values, the units are unified. The fitness function is constructed by weighting the unconstrained objective function under ideal conditions and the penalty function obtained under the constraints, thereby achieving multi-objective collaborative optimization and constraint feasibility control.

[0010] According to the above scheme, in step S2, the key control parameters of the preset genetic algorithm include population size, maximum number of iterations, crossover probability, mutation probability, and elite retention ratio. Set the population size Npop, which can range from 50 to 200; Set the maximum number of iterations Gmax, with a value ranging from 500 to 2000; Set the crossover probability Pc, which ranges from 0.7 to 0.95; Set the mutation probability Pm, which ranges from 0.01 to 0.1; Set the elite retention ratio Pe, with a value ranging from 0.05 to 0.2.

[0011] According to the above scheme, in step S3, the objective function value is calculated by substituting all individuals in the initial population into the objective function of the multi-objective optimization mathematical model. This involves checking whether the individual violates the defined constraints; if a violation occurs, the corresponding penalty is calculated based on the severity of the violation. If all constraints are satisfied, then the penalty term... ; Calculate the final fitness And convert it into fitness function value. Furthermore, after calculating the fitness value, the individuals in the population are sorted in descending order according to the calculated fitness value, and the process enters the main optimization iteration process until the preset termination condition is met. According to the above scheme, the termination conditions include at least one of the following: a) Current iteration number Reaching the maximum number of iterations This triggers the algorithm to terminate; b) A fitness value in the current population Exceeding or reaching a preset threshold Output the optimal individual in advance and terminate the operation. According to the above scheme, step S4, the genetic operation specifically includes the following steps: S401. The selection operation is carried out by tournament selection. In each round of selection, k individuals are randomly selected from the current population without replacement. Their overall performance as a scheduling scheme is evaluated. The individual with the highest fitness is selected to enter the next generation of parent population. The selection operation is repeated Npop times to form a complete parent population, which serves as the input for subsequent crossover operations. S402. Simulated binary crossover is used to perform pairwise crossover of parent individuals with a preset crossover probability Pc. For any selected pair of parent individuals p1 and p2, two offspring c1 and c2 are generated for each gene locus. The calculation method is as follows:

[0012] in, The crossover factor is a random number between [0,1]. and cross-distribution index Sure; S403. Adopt an adaptive non-uniform mutation strategy to perform mutation operations, with a preset mutation probability. The offspring produced by the crossover are mutated, and a specific gene locus in the selected individuals is selected. its mutated value Calculate using the following formula: (2) in, and These represent the upper and lower limits of the gene locus, respectively. Let the current iteration algebra be... For the maximum number of iterations, To control for the nonnegativity of the variation intensity, For the range of values ​​in [ A uniform random number between [1, 1]. According to the above scheme, the specific operation process in step S5 includes the following steps: S501. Calculate the "strategy similarity" between scheduling schemes for any two individuals in the population. and Calculate their normalized Euclidean distance in the decision variable space. :

[0013] in, It is the first The first individual One decision variable, It is the first The first individual There are several decision variables, and the denominator is used for normalization. S502, Divide into niches and perform elimination operations, set the niche radius. For each candidate individual in the population Calculate its relationship with other individuals in turn. Normalized Euclidean distance between ,when When that time, individuals that meet the conditions will be... Classified by individual In the small habitat centered around it.

[0014] According to the above scheme, the method for population update and optimal solution output in step S6 includes the following steps: S601. Select the top N individuals with the highest fitness values ​​from the parent population and directly copy them into the new generation population to ensure that local optima are not eliminated during the evolutionary process. S602. High-fitness offspring individuals preserved through genetic manipulation and niche elimination mechanisms are added to the new population; S603. When the number of individuals in the current new population does not reach the preset population size Npop, generate new random individuals according to the random generation method in step S2. S604. When the termination condition is met, the evolution process is terminated, and the individual with the highest fitness value in the current population is selected as the final optimization result. By decoding this individual, the optimal scheduling parameters of the multi-energy complementary energy internet system within the scheduling cycle can be obtained.

[0015] This invention also provides a solution system for the optimal solution of a multi-energy complementary energy internet system optimization scheduling model based on an adaptive niche genetic algorithm, comprising: An optimization model and fitness function module are established to construct a multi-objective optimization mathematical model that simultaneously includes economic cost objective function and environmental cost objective function, and to clarify the constraints in the operation of the scheduling system; The initialization module for algorithm parameters and population is used to preset the key control parameters of the genetic algorithm. It uses real number encoding to represent candidate solution individuals and generates the initial population through uniform random sampling. The fitness evaluation module is used to calculate the fitness value of all individuals in the current population and enter the main optimization iteration process. The algorithm continuously updates and evolves the population according to the preset evolution mechanism until the termination condition is met. The genetic operation module is used to perform genetic operator operations to generate the next generation of offspring population based on the current individual fitness value in each iteration. The niche elimination mechanism module is used to introduce a niche control mechanism. By calculating the normalized Euclidean distance between individuals, several niche regions are divided, and only the locally optimal individual is retained. The remaining individuals are marked as redundant and eliminated. The population update and optimal solution output module is used to merge the current elite individuals, the retained offspring individuals, and the newly generated random individuals to form a new generation of population, and outputs the individual with the highest fitness value as the optimal solution for the final scheduling model parameters of the multi-energy complementary system.

[0016] The energy internet system scheduling model solution method based on niche genetic algorithm of the present invention has the following beneficial effects: 1. This invention has significant advantages in terms of optimization accuracy, global search capability, adaptability to complex systems with multiple constraints, and maintenance of population diversity. By constructing a multi-objective optimization model that includes economic and environmental costs, it achieves an organic unity of scheduling economy and green low-carbon performance under the operating constraints of energy balance, equipment capacity, and operating window, effectively supporting energy optimization operation under the "dual carbon" objective. 2. This invention introduces an adaptive niche mechanism, dynamically dividing the search region based on normalized Euclidean distance. Within each niche, locally optimal individuals are retained while redundant solutions are eliminated, thereby enhancing global search capabilities, preventing premature convergence, and maintaining population structural diversity. This effectively supports high-quality solution mining in complex nonlinear target spaces and improves selection, crossover, and mutation strategies: In the selection phase, a tournament mechanism is used to increase the inheritance probability of excellent individuals; the crossover operation employs simulated binary crossover (SBX) to enhance the recombination potential between real-valued genes; and in the mutation phase, an adaptive non-uniform mutation operator is introduced, dynamically adjusting the perturbation amplitude based on the number of generations, expanding the search range in the early stages and focusing on local optimization in the later stages, effectively improving the convergence accuracy and global stability of the solution.

[0017] 3. This invention integrates an elite retention mechanism and a random replenishment strategy in population updates. While retaining the dominant solutions, it continuously introduces new genes, expands the solution space boundary, and maintains population vitality, avoiding stagnation or local optima. By setting a fitness stability threshold and a maximum number of iterations as termination conditions, it outputs a globally optimal scheduling scheme after the population evolution stabilizes, thus achieving efficient operation of the multi-energy system under practical engineering constraints. 4. This invention proposes a targeted and systematic improvement mechanism, which demonstrates superior global search capability, convergence accuracy, and solution stability in solving multi-objective, multi-constraint, and nonlinear scheduling models. It is applicable to new power system scenarios such as distributed multi-energy complementary systems and integrated energy stations, and has good engineering practical value and prospects for promotion and application. Attached Figure Description

[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of the structure of the energy internet system scheduling model solution method based on niche genetic algorithm of the present invention.

[0019] Figure 2 This is a schematic diagram of the algorithm convergence curve of Embodiment 2 of the present invention.

[0020] Figure 3 This is a schematic diagram of the optimized scheduling result of the multi-energy complementary system in Embodiment 2 of the present invention. Detailed Implementation

[0021] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0022] Example 1 like Figure 1 As shown, the energy internet system scheduling model solution method based on niche genetic algorithm of the present invention includes the following steps: S1. Establishing the Optimization Model and Fitness Function: Construct a multi-objective optimization mathematical model that simultaneously includes economic cost objective functions and environmental cost objective functions. Clarify the constraints in the operation of the scheduling system, including constraints such as equipment capacity constraints, energy balance constraints, operating time window limits, etc., as well as inequality constraints, to ensure the model's engineering feasibility. By weighting and normalizing the multi-objective functions and combining them with a penalty function, the constraints are uniformly mapped into a single, dimensionless fitness function, which serves as an optimization evaluation index to measure the quality of the scheduling solution.

[0023] To establish an optimization model and fitness function, firstly, the system objective function and constraints are determined, and a mathematical model describing the operational performance of the energy internet is established. Taking into account the operational and environmental costs of the distributed energy internet to ensure its overall operational benefits, the overall objective function is determined as follows: (3) In the formula, For the economic operating cost target, For environmental protection goals.

[0024] objective function To minimize operation and maintenance costs, a conventional day-ahead scheduling model is adopted. The system cost function mainly considers various operating costs during system operation, namely: (4) (5) (6) (7) in, It is the first in the energy internet The operation and maintenance cost of a distributed generation unit It is the first Fuel consumption cost of a distributed generation unit It refers to the cost of purchasing and selling electricity between the energy internet and the external power grid. It is the first Depreciation and maintenance costs of each distributed generation unit It is the operating cost of the energy storage system. It is the sum of the equipment degradation costs of all distributed generation units. The specific calculation method is given in formula (5) to quantify the equipment lifespan loss. It refers to the number of distributed generation units in the energy internet. It is the first The operation and maintenance cost per unit output of a power generation unit It is the first The output power of each power generation unit That is the price per unit of natural gas. It is the power generation capacity (kW) of the gas-fired internal combustion engine. It is the low calorific value of natural gas. It refers to the power generation efficiency of gas-fired internal combustion engine units. It refers to the power that the energy internet purchases from the external power grid. It is the unit price of electricity purchased from the power grid. It is the electrical power sold to the power grid. It is the unit price of electricity sold by the power grid. This is the depreciation cost per unit discharge of the battery. It is the battery. Discharge power at any given time It is the total number of time steps within the scheduling cycle (i.e., the total number of discharge time periods). It is the first The unit capacity installation cost of the power generation unit, It is the first Capital recovery factor for power generation units, It is the first Capacity utilization rate of power generation units It is the first Generating units in Output power at any given moment.

[0025] objective function The lowest environmental protection cost, that is: (8) (9) and The cost of wastewater treatment for the combined heat and power (CHP) systems and external power grids in the distributed energy internet. For power generation unit i ( , The environmental treatment costs, For emission type ( ) They are the types of power generation units. When the type of pollution emission is Unit pollution treatment cost and emission coefficient at that time Type of power generation unit . output power.

[0026] The constraints specifically include: (1) Equality constraints ① The power balance constraint is: (10) In the formula, For the park at all times The total electrical load includes user electricity consumption and equipment cooling / heating, etc. Power exchange between the energy internet and the external power grid; for The constant charging and discharging amounts of the energy storage battery are recorded, with negative values ​​for charged batteries and positive values ​​for discharged batteries. For power generation unit type , , . output power.

[0027] ② Cooling / Heating Power Balance Constraint. Combined cooling, heating, and power (CCHP) units must satisfy the cooling / heating power balance equation constraint, i.e.: (11) in, for All heat / cooling loads of the system at any given time; Heating / cooling capacity of lithium bromide chiller / thermal water unit; This refers to the cooling capacity of the centrifugal refrigeration unit. For the heating supply of the air source heat pump; For cooling / heating of the energy storage tank.

[0028] (2) Inequality constraints ① Power constraints of gas internal combustion engines: During operation, the output of gas internal combustion engines is also subject to technical limitations, namely: (12) In the formula, This represents the current power generation capacity of the internal combustion engine; This represents the power generation capacity of the internal combustion engine in the previous period. and These represent the maximum increase and maximum decrease in the power generation of the internal combustion engine during that time period.

[0029] ② Renewable energy power generation output constraints: Renewable energy power generation output must meet unit capacity limits for stable operation. Specifically, the photovoltaic power generation constraint is as follows: (13) In the formula, for The maximum output capacity of the photovoltaic power generation unit at any given time. Indicates the photovoltaic power generation unit at time . output power.

[0030] Wind power output constraints are: (14) In the formula, for The maximum output capacity of a wind power generation unit at any given time. Indicates the wind power generation unit at time . output power.

[0031] ③ Power constraints of flue gas hot water type lithium bromide chiller / thermal water unit: During operation, the output cooling / heating power of the lithium bromide chiller / thermal water unit is limited by its own characteristics and cannot exceed the rated power of the equipment itself.

[0032] (15) In the formula, No. The unit's output power (cooling or heating) at any time. This is the minimum output of the unit. This is the rated maximum output of the unit.

[0033] ④ The power output constraint formula for centrifugal chiller units is as follows: The power output constraint for centrifugal chiller units is: (16) In the formula, This refers to the cooling capacity of the centrifugal chiller under rated power operation. This refers to the output power of the centrifugal refrigeration unit.

[0034] (17) In the formula, This refers to the operating status of the electric centrifugal chiller unit. The coefficient of performance (COP) of a centrifugal chiller unit. The amount of electricity required for the centrifugal refrigeration unit to provide cooling.

[0035] The above model is a multi-objective optimization model that can simultaneously consider economic costs and environmental impacts. It systematically defines various operational constraints during the scheduling process. To enable objective functions with different dimensions to collaboratively optimize and compare each other during the evolutionary process, the multi-objective function is mapped to a dimensionless fitness function, thereby improving the convergence efficiency of the adaptive niche algorithm. The objective function of the multi-objective optimization mathematical model is thus obtained as follows: (18) In the formula, The weighting coefficients for economic efficiency and environmental friendliness (adjustable) need to meet the following requirements. . Considering the current economic and environmental costs for individuals. These are the minimum and maximum economic and environmental costs across the entire population, used for normalization. The objective function value calculated by formula (16) This only represents the ideal performance of an individual in terms of economic and environmental goals. To ensure the feasibility of the final solution, a penalty function mechanism is further introduced to handle various constraints when calculating the final fitness. For any individual (i.e., the scheduling scheme), it is first determined whether it violates any constraint such as power balance constraint (Equation 8-9) or equipment output constraint (Equation 10-15). If an individual violates a constraint, a penalty term positively correlated with the degree of violation is added to its final evaluation value. The final evaluation value of a solution Represented as: (19) In the formula, It is the sum of the penalty values ​​resulting from all breaches of contract. A brief explanation follows. Definition method, (20) In the formula, The sum of the penalty values ​​for all equality constraints. Let be the sum of the penalty values ​​for all inequality constraints, where the penalty treatment for equality constraints is as follows: For any equality constraint in the system, its corresponding penalty term It can be calculated using the following formula: (twenty one) In the formula, A vector of decision variables representing an individual. This represents the difference between the left and right sides of the constraint equation. It is a sufficiently large positive number, serving as the penalty factor for this equality constraint. When the constraint is satisfied, The penalty term is zero. When the constraint is violated, the penalty term will increase sharply with the square of the difference.

[0036] For any inequality constraint in the system, such as in formula (10-15), the corresponding penalty term... It can be calculated using the following formula: (twenty two) in, It is the penalty factor for the inequality constraint. The operator acts as a "switch": When the constraint is satisfied (i.e.) ), The result is 0, and the penalty is zero.

[0037] When the constraint is violated (i.e.) ), The result is The penalty will increase with the square of the degree of violation. If the individual satisfies all constraints, then... In this way, any unfeasible solution will receive a very poor evaluation value due to its huge penalty, and will thus be naturally eliminated in the evolutionary process.

[0038] Ultimately, the evaluation value that needs to be minimized is... Transform into a fitness function that needs to be maximized. The fitness function value is calculated by taking the reciprocal. This serves as the basis for selection, crossover, and other operations in genetic algorithms. After constructing a complete fitness function evaluation system, the algorithm possesses the fundamental ability to evaluate the merits of any candidate solution.

[0039] S2. Initialize algorithm parameters and population: Preset key control parameters of the genetic algorithm, including population size, maximum number of iterations, crossover probability, mutation probability, and elite retention ratio, to ensure that the algorithm has stable evolutionary performance. Within the domain of each decision variable, candidate solution individuals are represented by real number encoding, and an initial population is generated by uniform random sampling to ensure solution space coverage and population diversity, providing good initial conditions for the evolutionary process. The control parameters for the genetic algorithm include: setting the population size Npop, ranging from 50 to 200, to ensure population diversity during genetic operations; setting the maximum number of iterations Gmax, ranging from 500 to 2000, to ensure sufficient generations for the optimization process; setting the crossover probability Pc, ranging from 0.7 to 0.95, to enhance gene exchange between chromosomes; setting the mutation probability Pm, ranging from 0.01 to 0.1, to improve global search capability and prevent the algorithm from getting trapped in local optima; and setting the elite retention ratio Pe, ranging from 0.05 to 0.2, to retain superior individuals and ensure that the algorithm does not lose local optima during evolution. Firstly, based on the actual physical meaning and value range of various scheduling variables in a multi-energy complementary energy internet system, the decision variables in the optimization problem are encoded with real numbers to construct individual chromosomes. Decision variables include, but are not limited to: the output power of distributed power sources, the charging and discharging power of energy storage devices, and the power of electricity purchased by the system from the external power grid. After being encoded as real numbers, various variables are arranged in a preset order to form chromosome individuals. Each individual represents a complete scheduling scheme of the system within a certain scheduling cycle. During the population initialization phase, a uniform random sampling method is used to generate several initial individuals within the feasible solution space of each variable to form the initial population. The number of individuals in the initial population is determined comprehensively based on the dimension of the scheduling problem and the efficiency of the optimization algorithm, aiming to improve the search space coverage and reduce the risk of getting trapped in local optima. S3. Fitness assessment: Calculate the fitness value of all individuals in the current population, sort them according to fitness, and enter the main optimization iteration process. The algorithm continuously updates and evolves the population according to the preset evolution mechanism, repeatedly executing steps such as fitness assessment, genetic operations, niche elimination, and population update, gradually improving the overall fitness of the population until the termination condition is met.

[0040] For each individual in the initial population generated in step S2, the objective function value is first calculated by substituting it into equation (16). Next, it is checked whether the individual violates the defined constraints. If a violation occurs, the corresponding penalty is calculated based on the severity of the violation. If all constraints are satisfied, then the penalty term... Finally, calculate the final fitness. And convert it into fitness function value. After calculating the fitness value, the individuals in the population are sorted in descending order according to the calculated fitness value, and thus enter the main optimization iteration process. This iteration process will repeatedly execute the genetic operation in step S4, the niche elimination in step S5, and the population update in step S6 until the preset termination condition is met. The termination condition includes at least one of the following situations: a) Current iteration number Reaching the maximum number of iterations This triggers the algorithm to terminate.

[0041] b) A fitness value in the current population Exceeding or reaching a preset threshold The optimal individual is output in advance and the process is terminated. S4. Genetic Operations: In each iteration, genetic operators are executed based on the current fitness value of each individual to generate the next generation of offspring. The selection operation employs a tournament selection mechanism, using local competition to select individuals with higher fitness. The crossover operation uses a simulated binary crossover (SBX) strategy to simulate gene recombination in the real number space, enhancing the population's exploration capabilities. The mutation operation employs an adaptive non-uniform mutation mechanism, dynamically adjusting the perturbation amplitude according to the current iteration progress, achieving a natural transition from global exploration to local fine-grained search.

[0042] The merits and demerits of all scheduling schemes in the current population have been clearly quantitatively evaluated. Based on these evaluation results, evolutionary operations are performed on the current population by simulating the processes of "natural selection, crossover, and mutation" in biological evolution, with the aim of generating a next generation of offspring with better performance. Performing genetic operations to generate the next generation of offspring essentially simulates the process of biological evolution in nature. By selecting, recombinating, and mutating energy scheduling schemes with relatively good fitness, the existing solutions are inherited and optimized, thereby gradually approaching a next generation of scheduling schemes with better performance in the solution space, in order to improve the overall operational efficiency of the scheduling strategy. Specifically, this includes the following steps: S401, Select Operation The selection operation employs a tournament selection method. Specifically, in each round of selection, k individuals are randomly selected from the current population without replacement, where k is the tournament size, typically 3. Their fitness values ​​are compared, i.e., their overall performance as a scheduling scheme is evaluated, including economy, environmental friendliness, and feasibility. The individual with the highest fitness is selected to enter the next generation of parent population. This operation is repeated Npop times to form a complete parent population, which serves as the input for subsequent crossover operations.

[0043] S402, Cross Operation The crossover operation employs a simulated binary crossover strategy. Parent individuals are paired for crossover at a preset crossover probability Pc, for example, Pc=0.9. For any selected pair of parent individuals p1 and p2, each gene locus (i.e., the corresponding decision variable) generates two offspring, c1 and c2, calculated as follows: (twenty three) in, The crossover factor is a random number between [0,1]. and cross-distribution index The physical significance of this crossover operation lies in simulating the information exchange and reorganization between two superior parent "scheduling schemes," thereby generating two entirely new child "scheduling schemes" that inherit some of the superior characteristics of the parent schemes. For example, the child scheme might adopt the photovoltaic priority strategy of parent 1 during the morning period, while adopting the gas turbine and energy storage coordinated power supply strategy of parent 2 during the evening peak load period, thus exploring a better "multi-energy complementary" operation mode.

[0044] S403, Mutation Operation The mutation operation employs an adaptive non-uniform mutation strategy, using a preset mutation probability. (For example The offspring produced by the crossover are subjected to mutation. A specific gene locus in the selected individual is mutated. its mutated value Calculate using the following formula: (twenty four) in, and These represent the upper and lower limits of the gene locus, respectively. Let the current iteration algebra be... For the maximum number of iterations, To control the nonnegativity of the variation intensity, for example , For the range of values ​​in [ A uniform random number between 1 and 1. This mutation mechanism can achieve variable asynchronous length decreasing with the iteration process, thereby strengthening the global search capability in the early stage and enhancing the local search accuracy in the later stage. It has good adaptive characteristics and improves the overall convergence performance of the algorithm. The physical meaning of this mutation operation is to conduct a small-scale random exploration of an existing "scheduling scheme" to discover a better solution that may exist in its neighborhood. For example, a small perturbation is made to the energy storage charging power or gas turbine output at a certain moment. Its adaptive characteristics ensure that a large-scale "strategy exploration" is carried out in the early stage of the algorithm, while in the later stage it turns into a fine "parameter fine-tuning". For example, fine-tuning the output of each unit based on the determined excellent strategy to further reduce costs. This is highly consistent with the actual needs of multi-energy complementary system optimization from coarse-scale to fine-scale adjustment.

[0045] Through the genetic operation in step S4, the algorithm has generated a batch of offspring individuals that inherit the excellent characteristics of their parents and possess a certain degree of innovation. However, if all offspring are included in the population without selection, it may lead to a large number of similar individuals in the population, thereby reducing search efficiency and risking getting trapped in local optima.

[0046] S5. Niche Elimination Mechanism: To maintain population diversity and delay premature convergence, a niche control mechanism is introduced. By calculating the normalized Euclidean distance between individuals, several niche regions are divided. In each niche, only the locally optimal individual is retained, and the rest are marked as redundant and eliminated. This strengthens the differences between individuals, effectively maintains the coexistence of multiple potential optimal solution regions, and improves the global search capability.

[0047] A niche elimination mechanism is introduced during the optimization scheduling process. Multiple niche regions are divided by calculating the normalized Euclidean distance between individuals. Within each niche, only the locally optimal individual is retained, while the remaining individuals are marked as redundant and eliminated. This strengthens the diversity within the population, delays premature convergence, and maintains the diversity of potential optimal solution regions, thereby effectively improving the algorithm's global search capability and scheduling optimization performance. The specific operation process includes the following steps: S501. Calculate the "policy similarity" between scheduling schemes: for any two individuals in the population... and , Calculate their normalized Euclidean distance in the decision variable space. (25) in, It is the first The first individual One decision variable, It is the first The first individual There are several decision variables, and the denominator is used for normalization. The smaller the distance value here, the more similar the equipment output and energy flow of the two scheduling schemes are in each time period, that is, they belong to the same type of "scheduling strategy". The normalization process ensures that different types of decision variables (such as power, electricity, etc.) can be compared fairly.

[0048] S502. Divide into niches and perform elimination operations: In actual operation, set the niche radius. For each candidate individual in the population Calculate its relationship with other individuals in turn. Normalized Euclidean distance between ,when When that time, individuals that meet the conditions will be... Classified by individual Within the centered niche, for the formed niche set, by comparing the fitness values ​​of each individual, only the individual with the best fitness is retained, and the remaining individuals are uniformly marked as "to be eliminated". The essence of this operation is that for each potential "scheduling strategy direction", only the direction with the best effect is retained, thereby effectively suppressing the phenomenon that a large number of individuals with high similarity but limited global fitness levels occupy too many survival resources in the population, significantly improving the diversity of the "scheduling strategy" structure within the population, and enhancing the algorithm's solution space coverage ability in the multi-energy system scheduling optimization process.

[0049] S6. Population Update and Optimal Solution Output: The current elite individuals, the retained offspring individuals, and the newly generated random individuals are merged to form a new generation of population. The elite retention mechanism ensures that local excellent solutions will not be eliminated by iteration, enhancing the stability of the algorithm. When any termination condition is met, the iteration process is terminated, and the individual with the highest fitness value is output as the optimal solution for the final scheduling model parameters of the multi-energy complementary system.

[0050] After the genetics process in step S4 and the elimination process in step S5, the algorithm has acquired the various types of individual resources needed to construct the next generation population. The core of step S6 lies in the orderly integration of the above-mentioned individual resources. Specifically, this includes integrating the "elite individuals" with the best fitness from the previous generation, the "high-quality offspring individuals" obtained through crossover mutation and fitness selection, and the "exploratory new individuals" randomly introduced to improve the algorithm's global search capability and mitigate the risk of premature convergence, according to a predetermined ratio and structural strategy to form a new generation population, thereby achieving dual optimization of population structure and search performance.

[0051] To ensure the efficient execution of the subsequent main evolutionary process, step S2 mainly completes the initialization preparation work for the algorithm operation, specifically including: setting the control parameters of the genetic algorithm, including population size, maximum number of iterations, crossover probability, mutation probability, etc., and generating initial population individuals that meet the constraints using a preset encoding method, so as to provide a representative and diverse initial distribution of the solution space for the evolutionary search process.

[0052] A new generation of population is constructed by merging current elite individuals, retaining offspring, and randomly generating individuals, and an elite retention mechanism is used to ensure that high-quality solutions are not eliminated; when the termination condition is met, the individual with the best fitness is output as the optimal scheduling solution of the system. The specific execution process is as follows: S601, Elite Preservation: From the parent population sorted in step S3, select the top N individuals with the highest fitness values ​​and directly copy them into the new generation population. N is the preset elite ratio to ensure that the local optimum is not eliminated during the evolution process and to enhance the stability of the algorithm.

[0053] S602, Offspring Supplementation: Offspring individuals generated during the crossover mutation process in step S4 and not marked as eliminated in S5 are supplemented into the new generation population to inherit high-quality genetic information and improve the overall quality of the population.

[0054] S603, Random Supplementation: When the number of individuals in the current new population does not reach the preset population size Npop, new random individuals are generated according to the random generation method described in S2 to maintain the population size and improve population diversity, enabling the agent to explore new "multi-functional complementarity" strategies.

[0055] S604. Optimal Solution Output: When the termination condition is met, such as the maximum number of iterations or the fitness convergence threshold, the evolution process is terminated. The individual with the highest fitness value in the current population is selected as the final optimization result. By decoding this individual, the optimal scheduling parameters of the multi-energy complementary energy internet system within the scheduling cycle can be obtained, including but not limited to: the precise output values ​​of each distributed power source in each time period, the charging and discharging strategies of the energy storage system, and the power purchase and sale plan with the main grid, thereby providing decision support for the economic, low-carbon, and reliable operation of the system.

[0056] Example 2 This embodiment selects a typical multi-energy complementary industrial park microgrid system for simulation experiments. 1. System parameter settings and initialization The simulation platform is based on the MATLAB R2021b environment, with a scheduling period of T=24 hours and a time step of Δt=1 hour.

[0057] Physical scenario parameters: The park is set to include photovoltaic (PV) power generation units, wind power generation units (WT), gas internal combustion engines (GE), battery energy storage systems (BT), and main grid interaction interfaces. The key technical parameters of each device are shown in Table 1. Table 1 Key Equipment Parameter Configuration for Energy Internet System

[0058] The time-of-use pricing for the external power grid is set as follows: 23:00-7:00: 0.35 yuan / kWh 7:00-10:00, 15:00-18:00, 21:00-23:00: 0.65 yuan / kWh 10:00-15:00, 18:00-21:00: 1.10 yuan / kWh 2. Algorithm Control Parameters: The key control parameters for the preset genetic algorithm are as follows: Population size: Npop=100 Maximum number of iterations: Gmax = 1000 Crossover probability: Pc = 0.9 Mutation probability: Pm=0.05 Elite retention rate: Pe=0.1 Microhabitat radius: σ = 0.2 Target weights: w1 = 0.6 (economic efficiency), w2 = 0.4 (environmental friendliness) 3. Algorithm Execution Process Taking the scheduling decision at the 12th hour (t=12, peak period) as an example, the specific calculation process of the algorithm in a single iteration is shown: Step S2 (Encoding and Initialization): Individuals are encoded using real numbers. The decision variable corresponding to the gene segment of the i-th individual at time t=12 is: Suppose that an initially generated individual Xa has the following gene sequence at t=12: [600kW, [30kW, 150kW] (This means the gas turbine output is 600kW, the battery charging is 30kW, and the electricity purchased from the grid is 150kW).

[0059] Step S3 (Fitness Assessment): Current load demand P Load,12 =900kW, photovoltaic predicted output P PV,12 =180kW.

[0060] Power balance check (Formula 10): Supply-side total = P Grid +P BT +P PV +P GE =150+( 30)+180+600=900kW.

[0061] Meeting load demand, power balance constraint penalty P eq =0.

[0062] Objective function calculation (Formula 4-9): Economic cost C1: Calculate gas costs, operation and maintenance costs, and peak electricity purchase price to obtain C. 1,a =850 yuan.

[0063] Environmental cost C2: Calculate the carbon emissions and pollutant treatment costs implied by the gas engine and electricity purchase, resulting in C. 2,a =45 yuan.

[0064] Normalization and weighting (Formula 18): Assume the current population extreme value C 1min =800, C 1max=1200, C 2min =40, C 2max =80 Then F = = 0.125 Fitness value: Fitness=1 / (1+0.125) ≈ 0.889.

[0065] Step S4 (Genetic Operation): For individual X a With individual X b Perform a simulated binary crossover (SBX). Assume a random number u = 0.4 and a crossover exponent η. c =20, calculate the distribution factor β, and generate offspring C1 and C2 according to formula (23). Then perform non-uniform mutation. If the current iteration number G=50, the mutation perturbation range is large. If G=900, the perturbation range is small, realizing fine search.

[0066] Step S5 (Narrow habitat elimination): Calculate individual X a Normalized Euclidean distance D from other individuals in the population (a,j) .

[0067] If individual X is found c With X a Distance D (a,c) =0.05<σ, and X c Its fitness (0.92) is higher than X's. a (0.889), then determine X. a Redundant and inferior solutions from the same habitat are discarded, and X is retained. c .

[0068] 4. Results Analysis like Figure 2-3 As shown, the simulation results are as follows: Economic operating cost (C1): 10575.59 yuan Environmental protection cost (C2): 711.97 yuan Weighted overall objective value F: 0.2866 like Figure 2As shown, the convergence curve of the niche genetic algorithm proposed in this invention is presented. The vertical axis represents the weighted objective function value calculated according to the patent formula (18). The lower the value, the better the overall performance of the scheme in terms of economy and environmental protection. As can be seen from the figure, the objective function value shows a significant rapid convergence characteristic in the early stage of iteration (the first 20 generations), and then stabilizes at a level close to 0. This is mainly due to the niche elimination mechanism introduced in step S5 and the adaptive mutation strategy in step S4. The former effectively eliminates redundant and inferior solutions and maintains population diversity, while the latter ensures refined search capability. The results show that the algorithm can quickly lock the globally optimal scheduling strategy within a short number of iterations.

[0069] like Figure 3 The figure shows the 24-hour operation of the multi-energy complementary system under the optimal scheduling strategy. The colored bars represent the output composition of different energy devices, and the black curve represents the real-time load demand of the park. The results show that the scheduling scheme generated by this invention achieves intelligent coordination of multiple energy sources: during periods of sufficient sunlight and wind (e.g., 8:00-16:00), the system prioritizes scheduling photovoltaic (yellow) and wind power (green). During peak load periods, the algorithm automatically schedules gas turbines (red) to operate at near full power, in conjunction with battery discharge (blue), significantly reducing the amount of electricity purchased from the grid at higher prices during this period (gray). During off-peak hours at night, the system rationally utilizes the lower-priced grid electricity to supplement the supply. This scheme ensures reliable energy supply while minimizing operating costs and carbon emissions, verifying the practicality of this invention in complex engineering scenarios. Example 3 This invention also provides a solution system for the optimal solution of a multi-energy complementary energy internet system optimization scheduling model based on an adaptive niche genetic algorithm, comprising: An optimization model and fitness function module are established to construct a multi-objective optimization mathematical model that simultaneously includes economic cost objective function and environmental cost objective function, and to clarify the constraints in the operation of the scheduling system; The initialization module for algorithm parameters and population is used to preset the key control parameters of the genetic algorithm. It uses real number encoding to represent candidate solution individuals and generates the initial population through uniform random sampling. The fitness evaluation module is used to calculate the fitness value of all individuals in the current population and enter the main optimization iteration process. The algorithm continuously updates and evolves the population according to the preset evolution mechanism until the termination condition is met. The genetic operation module is used to perform genetic operator operations to generate the next generation of offspring population based on the current individual fitness value in each iteration. The niche elimination mechanism module is used to introduce a niche control mechanism. By calculating the normalized Euclidean distance between individuals, several niche regions are divided, and only the locally optimal individual is retained. The remaining individuals are marked as redundant and eliminated. The population update and optimal solution output module is used to merge the current elite individuals, the retained offspring individuals, and the newly generated random individuals to form a new generation of population, and outputs the individual with the highest fitness value as the optimal solution for the final scheduling model parameters of the multi-energy complementary system.

[0070] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for solving the scheduling model of an energy internet system based on a niche genetic algorithm, characterized in that, Includes the following steps: S1. Construct a multi-objective optimization mathematical model that simultaneously includes economic cost objective function and environmental cost objective function, and clarify the constraints in the operation of the scheduling system; S2. Preset the key control parameters of the genetic algorithm, use real number encoding to represent candidate solution individuals, and generate the initial population through uniform random sampling. S3. Calculate the fitness value of all individuals in the current population, enter the main optimization iteration process, and the algorithm continuously updates and evolves the population according to the preset evolution mechanism until the termination condition is met. S4. In each iteration, genetic operators are executed based on the current individual fitness value to generate the next generation of offspring. S5. Introduce a niche control mechanism: by calculating the normalized Euclidean distance between individuals, divide the area into several niche regions, retain only the individuals with the best local fitness, and mark the rest of the individuals as redundant and eliminate them. S6. Integrate the current elite individuals, the retained offspring individuals, and the newly generated random individuals to form a new generation of population, and output the individual with the highest fitness value as the optimal solution for the final scheduling model parameters of the multi-energy complementary system.

2. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, In step S1, the constraints include equality constraints and inequality constraints such as equipment capacity constraints, energy balance constraints, and operating time window limits.

3. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 2, characterized in that, In step S1, the constructed multi-objective optimization mathematical model includes an economic cost objective function C1 and an environmental cost objective function C2. The specific calculation formula for the objective function F is as follows: In the formula, and The preset non-negative weighting coefficients satisfy... This is used to balance the contributions of different objectives to the optimization result. Let $\mathbf$ and $\mathbf$ represent the minimum and maximum values ​​of economic and environmental costs in the current population, respectively. By normalizing the maximum and minimum values, the units are unified. The fitness function is constructed by weighting the unconstrained objective function under ideal conditions and the penalty function obtained under the constraints, thereby achieving multi-objective collaborative optimization and constraint feasibility control.

4. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, In step S2, the key control parameters of the preset genetic algorithm include population size, maximum number of iterations, crossover probability, mutation probability, and elite retention ratio. Set the population size Npop, which can range from 50 to 200; Set the maximum number of iterations Gmax, with a value ranging from 500 to 2000; Set the crossover probability Pc, which ranges from 0.7 to 0.95; Set the mutation probability Pm, which ranges from 0.01 to 0.1; Set the elite retention ratio Pe, with a value ranging from 0.05 to 0.

2.

5. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, In step S3, the objective function value is calculated by substituting all individuals in the initial population into the objective function of the multi-objective optimization mathematical model. This involves checking whether the individual violates the defined constraints; if a violation occurs, the corresponding penalty is calculated based on the severity of the violation. If all constraints are satisfied, then the penalty term... ; Calculate the final fitness And convert it into fitness function value. Furthermore, after calculating the fitness value, the individuals in the population are sorted in descending order according to the calculated fitness value, and the process enters the main optimization iteration process until the preset termination condition is met.

6. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, The termination condition includes at least one of the following: a) Current iteration number Reaching the maximum number of iterations This triggers the algorithm to terminate; b) A fitness value in the current population Exceeding or reaching a preset threshold The optimal individual is output in advance and the process is terminated.

7. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, In step S4, the genetic operation specifically includes the following steps: S401. The selection operation is carried out by tournament selection. In each round of selection, k individuals are randomly selected from the current population without replacement. Their overall performance as a scheduling scheme is evaluated. The individual with the highest fitness is selected to enter the next generation of parent population. The selection operation is repeated Npop times to form a complete parent population, which serves as the input for subsequent crossover operations. S402. Simulated binary crossover is used to perform pairwise crossover of parent individuals with a preset crossover probability Pc. For any selected pair of parent individuals p1 and p2, two offspring c1 and c2 are generated for each gene locus. The calculation method is as follows: in, The crossover factor is a random number between [0,1]. and cross-distribution index Sure; S403. Adopt an adaptive non-uniform mutation strategy to perform mutation operations, with a preset mutation probability. The offspring produced by the crossover are mutated, and a specific gene locus in the selected individuals is selected. its mutated value Calculate using the following formula: (1) in, and These represent the upper and lower limits of the gene locus, respectively. Let the current iteration algebra be... For the maximum number of iterations, To control for the nonnegativity of the variation intensity, For the range of values ​​in [ A uniform random number between [1, 1].

8. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, In step S5, the specific operation process includes the following steps: S501. Calculate the "strategy similarity" between scheduling schemes for any two individuals in the population. and Calculate their normalized Euclidean distance in the decision variable space. : in, It is the first The first individual One decision variable, It is the first The first individual There are several decision variables, and the denominator is used for normalization. S502, Divide into niches and perform elimination operations, set the niche radius. For each candidate individual in the population Calculate its relationship with other individuals in turn. Normalized Euclidean distance between ,when When that time, individuals that meet the conditions will be... Classified by individual In the small habitat centered around it.

9. The method for solving the energy internet system scheduling model based on niche genetic algorithm according to claim 1, characterized in that, In step S6, the method for population update and optimal solution output includes the following steps: S601. Select the top N individuals with the highest fitness values ​​from the parent population and directly copy them into the new generation population to ensure that local optima are not eliminated during the evolutionary process. S602. High-fitness offspring individuals preserved through genetic manipulation and niche elimination mechanisms are added to the new population; S603. When the number of individuals in the current new population does not reach the preset population size Npop, generate new random individuals according to the random generation method in step S2. S604. When the termination condition is met, the evolution process is terminated, and the individual with the highest fitness value in the current population is selected as the final optimization result. By decoding this individual, the optimal scheduling parameters of the multi-energy complementary energy internet system within the scheduling cycle can be obtained.

10. A system for solving the optimal solution of an optimal scheduling model for a multi-energy complementary energy internet system based on an adaptive niche genetic algorithm, characterized in that, include: An optimization model and fitness function module are established to construct a multi-objective optimization mathematical model that simultaneously includes economic cost objective function and environmental cost objective function, and to clarify the constraints in the operation of the scheduling system; The initialization module for algorithm parameters and population is used to preset the key control parameters of the genetic algorithm. It uses real number encoding to represent candidate solution individuals and generates the initial population through uniform random sampling. The fitness evaluation module is used to calculate the fitness value of all individuals in the current population and enter the main optimization iteration process. The algorithm continuously updates and evolves the population according to the preset evolution mechanism until the termination condition is met. The genetic operation module is used to perform genetic operator operations to generate the next generation of offspring population based on the current individual fitness value in each iteration. The niche elimination mechanism module is used to introduce a niche control mechanism. By calculating the normalized Euclidean distance between individuals, several niche regions are divided, and only the locally optimal individual is retained. The remaining individuals are marked as redundant and eliminated. The population update and optimal solution output module is used to merge the current elite individuals, the retained offspring individuals, and the newly generated random individuals to form a new generation of population, and outputs the individual with the highest fitness value as the optimal solution for the final scheduling model parameters of the multi-energy complementary system.