CN115187409A - Method, device, electronic device and storage medium for determining energy investment strategy - Google Patents
Method, device, electronic device and storage medium for determining energy investment strategy Download PDFInfo
- Publication number
- CN115187409A CN115187409A CN202211107479.XA CN202211107479A CN115187409A CN 115187409 A CN115187409 A CN 115187409A CN 202211107479 A CN202211107479 A CN 202211107479A CN 115187409 A CN115187409 A CN 115187409A
- Authority
- CN
- China
- Prior art keywords
- energy
- mayfly
- mayflies
- target
- individual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 238000003860 storage Methods 0.000 title claims abstract description 12
- 241001414834 Ephemeroptera Species 0.000 claims abstract description 593
- 229910052799 carbon Inorganic materials 0.000 claims abstract description 95
- 238000010276 construction Methods 0.000 claims abstract description 87
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 claims abstract description 85
- 108091026890 Coding region Proteins 0.000 claims description 98
- 238000011156 evaluation Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 8
- 230000013011 mating Effects 0.000 claims 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 47
- 239000007789 gas Substances 0.000 description 19
- 239000011159 matrix material Substances 0.000 description 18
- 239000002245 particle Substances 0.000 description 11
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000002922 simulated annealing Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 4
- 230000002068 genetic effect Effects 0.000 description 3
- 238000012804 iterative process Methods 0.000 description 2
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000001149 cognitive effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- ZZUFCTLCJUWOSV-UHFFFAOYSA-N furosemide Chemical compound C1=C(Cl)C(S(=O)(=O)N)=CC(C(O)=O)=C1NCC1=CC=CO1 ZZUFCTLCJUWOSV-UHFFFAOYSA-N 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000003345 natural gas Substances 0.000 description 1
- 230000002028 premature Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/06—Asset management; Financial planning or analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/26—Government or public services
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/80—Management or planning
- Y02P90/84—Greenhouse gas [GHG] management systems
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Development Economics (AREA)
- Tourism & Hospitality (AREA)
- Human Resources & Organizations (AREA)
- General Health & Medical Sciences (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Health & Medical Sciences (AREA)
- Finance (AREA)
- General Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Technology Law (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Educational Administration (AREA)
- Entrepreneurship & Innovation (AREA)
- Primary Health Care (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明提供一种能源投资策略的确定方法、装置、电子设备及存储介质,该方法涉及综合能源技术领域,包括:获取目标数据;目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各能源所能产生的碳排放量信息;基于建设成本信息和碳排放量信息,采用精英策略和蜉蝣算法确定各能源站点对应的目标能源类型,精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;基于目标能源类型,确定各能源站点的能源投资策略。本发明提供的方法,能够提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和碳排放量。
The invention provides a method, device, electronic device and storage medium for determining an energy investment strategy. The method relates to the technical field of comprehensive energy, and includes: acquiring target data; the target data includes the construction costs of multiple energy sources corresponding to multiple energy sites respectively Information and carbon emissions information that can be generated by each energy source; based on the construction cost information and carbon emissions information, the elite strategy and the mayfly algorithm are used to determine the target energy type corresponding to each energy site, and the elite strategy is used to select the top M in the elite pool The first target mayfly individual with the lowest fitness value is replaced with the second target mayfly individual with the highest fitness value in the initial mayfly population of the next iteration of the mayfly algorithm; based on the target energy type, the energy investment strategy of each energy site is determined . The method provided by the invention can improve the convergence speed of the mayfly algorithm, thereby improving the precision of the energy investment strategy, and reducing the construction cost and carbon emission of each energy site.
Description
技术领域technical field
本发明涉及综合能源技术领域,尤其涉及一种能源投资策略的确定方法、装置、电子设备及存储介质。The invention relates to the technical field of comprehensive energy, and in particular, to a method, device, electronic device and storage medium for determining an energy investment strategy.
背景技术Background technique
综合能源系统是一种新型一体化能源系统,与传统供能方式相比,不仅向用户提供单一能源,而且在信息化技术和互联网、大数据技术的基础上,整合区域内水能、电能、热能、天然气等多种能源,实现多能耦合、协同互补,满足当前用户多元丰富的用能需求,实现能源的梯级利用,从而提高各类能源的利用效率。根据我国能源供给侧结构的革新策略,推进能源出产以及消耗方式的改变,建设清洁低碳、安全有效的现代能源系统,是能源革新的重要作用。在“碳达峰、碳中和”的宏伟目标下,市场环境下市场环境下减碳潜力巨大。The integrated energy system is a new type of integrated energy system. Compared with the traditional energy supply method, it not only provides users with a single energy source, but also integrates water energy, electric power, Thermal energy, natural gas and other energy sources, realize multi-energy coupling, synergy and complementarity, meet the diversified and abundant energy demand of current users, realize the cascade utilization of energy, and improve the utilization efficiency of various energy sources. According to the reform strategy of my country's energy supply side structure, promoting the change of energy production and consumption patterns, and building a clean, low-carbon, safe and effective modern energy system is an important role in energy innovation. Under the ambitious goal of "carbon peaking and carbon neutrality", the carbon reduction potential in the market environment is huge.
目前,应用于市场背景下的综合能源最优低碳投资的方法主要包括:遗传算法、粒子群算法等经典元启发式算法,使用遗传算法和粒子群算法求解出一种满足要求的投资策略。例如,基于改进粒子群算法的综合能源系统设备容量优化方法,其利用改进的动态多种群无速度项粒子群算法,结合综合能源系统模型的目标函数以及约束条件,完成对综合能源系统设备容量配置的求解,得到最优的容量配置策略。然而,遗传算法和粒子群算法存在着收敛不稳定,导致确定的能源投资策略的精度低。At present, the methods of comprehensive energy optimal low-carbon investment in the market background mainly include: genetic algorithm, particle swarm algorithm and other classical meta-heuristic algorithms, using genetic algorithm and particle swarm algorithm to solve an investment strategy that meets the requirements. For example, the capacity optimization method of integrated energy system equipment based on the improved particle swarm optimization algorithm, which uses the improved dynamic multi-swarm velocity-free particle swarm algorithm, combined with the objective function and constraint conditions of the integrated energy system model, completes the configuration of the equipment capacity of the integrated energy system. to obtain the optimal capacity allocation strategy. However, genetic algorithm and particle swarm algorithm have convergence instability, which leads to low accuracy of the determined energy investment strategy.
发明内容SUMMARY OF THE INVENTION
本发明提供一种能源投资策略的确定方法、装置、电子设备及存储介质,用以解决现有技术中确定的能源投资策略的精度低的缺陷,实现较高精度的确定的能源投资策略。The invention provides a method, device, electronic device and storage medium for determining an energy investment strategy, which are used to solve the defect of low precision of the determined energy investment strategy in the prior art, and realize a higher precision determined energy investment strategy.
本发明提供一种能源投资策略的确定方法,包括:The present invention provides a method for determining an energy investment strategy, comprising:
获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;Obtaining target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites and information on carbon emissions that each of the energy sources can generate;
基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前G个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前G个适应度值最高的第二目标蜉蝣个体进行替换;Based on the construction cost information and the carbon emission information, the elite strategy and the mayfly algorithm are used to determine the target energy type corresponding to each of the energy sites. The elite strategy is used to select the top G lowest fitness values in the elite pool The first target mayfly individual is replaced with the first G second target mayfly individuals with the highest fitness values in the initial mayfly population of the next iteration of the mayfly algorithm;
基于所述目标能源类型,确定各所述能源站点的能源投资策略。Based on the target energy type, an energy investment strategy for each of the energy sites is determined.
根据本发明提供的一种能源投资策略的确定方法,所述基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,包括:According to a method for determining an energy investment strategy provided by the present invention, the elite strategy and the mayfly algorithm are used to determine the target energy type corresponding to each energy site based on the construction cost information and the carbon emission information, including:
步骤A:基于所述建设成本信息和所述碳排放量信息,对所述蜉蝣算法所涉及的初始蜉蝣种群中多个蜉蝣个体进行编码,确定多个第一编码序列;所述第一编码序列用于表示对各所述能源站点分别投资的初始能源类型;所述初始蜉蝣种群包括多个雄性蜉蝣个体和多个雌性蜉蝣个体;Step A: Based on the construction cost information and the carbon emission information, encode multiple mayfly individuals in the initial mayfly population involved in the mayfly algorithm, and determine multiple first coding sequences; the first coding sequence Used to represent the initial energy type invested in each of the energy sites; the initial mayfly population includes a plurality of male mayfly individuals and a plurality of female mayfly individuals;
步骤B:基于各所述第一编码序列、所述成本信息和所述碳排放量信息,分别计算各所述雄性蜉蝣个体和各所述雌性蜉蝣个体的适应度值;所述适应度值用于表示各所述能源站点对应的投入评价指标;所述投入评价指标表示用户在使用所述能源站点的能源时产生的碳排放量;Step B: Calculate the fitness value of each individual male mayfly and each individual female mayfly based on each of the first coding sequences, the cost information and the carbon emission amount information; the fitness value is calculated as: represents the input evaluation index corresponding to each of the energy sites; the input evaluation index represents the carbon emissions generated by the user when using the energy of the energy site;
步骤C:基于所述适应度值,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置;Step C: Based on the fitness value, determine the target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively;
步骤D:基于所述目标位置,各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别向所述目标位置移动,得到所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的第二编码序列;Step D: Based on the target position, each of the male mayfly individuals and each of the female mayfly individuals move to the target position, respectively, to obtain second coding sequences corresponding to the male mayfly individual and each of the female mayfly individuals respectively ;
步骤E:基于所述第二编码序列,各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别进行配对,交叉产生多个子代蜉蝣个体;各所述子代蜉蝣个体的位置分别对应第三编码序列;Step E: Based on the second coding sequence, each of the male mayfly individuals and each of the female mayfly individuals are paired respectively, and crossed to generate a plurality of progeny mayfly individuals; the positions of each of the progeny mayfly individuals correspond to the third code respectively sequence;
步骤F:在迭代次数不满足预设迭代次数的情况下,基于所述第二编码序列、所述第三编码序列和所述精英策略,更新所述初始蜉蝣种群中的蜉蝣个体;Step F: when the number of iterations does not meet the preset number of iterations, update the mayfly individuals in the initial mayfly population based on the second coding sequence, the third coding sequence and the elite strategy;
步骤G:将更新后的初始蜉蝣种群中的蜉蝣个体对应的第四编码序列作为新的第一编码序列,并迭代执行步骤A-步骤G,直至迭代次数满足预设迭代次数,基于最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各所述能源站点对应的目标能源类型。Step G: take the fourth coding sequence corresponding to the individual mayfly in the updated initial mayfly population as the new first coding sequence, and iteratively execute steps A-step G until the number of iterations meets the preset number of iterations, based on the final updated The first coding sequence corresponding to the individual mayfly in the initial mayfly population determines the target energy type corresponding to each of the energy stations.
根据本发明提供的一种能源投资策略的确定方法,所述基于所述第二编码序列、所述第三编码序列和所述精英策略,更新所述初始蜉蝣种群中的蜉蝣个体,包括:According to a method for determining an energy investment strategy provided by the present invention, the updating of mayfly individuals in the initial mayfly population based on the second coding sequence, the third coding sequence and the elite strategy includes:
基于所述第二编码序列和所述第三编码序列,判断各蜉蝣个体是否越界;Based on the second coding sequence and the third coding sequence, determine whether each individual mayfly crosses the boundary;
在各所述蜉蝣个体不存在越界的情况下,计算各蜉蝣个体的适应度值;In the case that each individual mayfly does not cross the boundary, calculate the fitness value of each individual mayfly;
将各所述蜉蝣个体的所述适应度值进行排序;sorting the fitness values of each individual mayfly;
基于精英策略,将最低适应度值对应的第一目标蜉蝣个体存储至精英池中,所述精英池包括多个所述第一目标蜉蝣个体;根据所述多个第一目标蜉蝣个体的适应度值,更新所述初始蜉蝣种群中的蜉蝣个体。Based on the elite strategy, the first target mayfly individual corresponding to the lowest fitness value is stored in the elite pool, and the elite pool includes a plurality of the first target mayfly individuals; according to the fitness of the plurality of first target mayfly individuals value, update the mayfly individuals in the initial mayfly population.
根据本发明提供的一种能源投资策略的确定方法,所述根据所述多个所述第一目标蜉蝣个体的适应度值,更新所述初始蜉蝣种群中的蜉蝣个体,包括:According to a method for determining an energy investment strategy provided by the present invention, updating the mayfly individuals in the initial mayfly population according to the fitness values of the plurality of first target mayfly individuals includes:
将所述精英池中多个所述第一目标蜉蝣个体中适应度值最低的前M个第一目标蜉蝣个体,替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;M为正整数;Replace the top M first target mayfly individuals with the lowest fitness value among the plurality of first target mayfly individuals in the elite pool with the top M second target mayfly individuals with the highest fitness value in the current mayfly population; M is a positive integer;
将替换后的所述当前蜉蝣种群更新所述初始蜉蝣种群中的蜉蝣个体。The mayfly individuals in the initial mayfly population are updated with the replaced current mayfly population.
根据本发明提供的一种能源投资策略的确定方法,所述基于最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各所述能源站点对应的目标能源类型,包括:According to a method for determining an energy investment strategy provided by the present invention, determining the target energy type corresponding to each energy site based on the first coding sequence corresponding to the individual mayfly in the final updated initial mayfly population, including:
将最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体的第一编码序列,确定为所述目标能源类型。The first coding sequence of the target mayfly individual corresponding to the lowest fitness value among the mayfly individuals in the final updated initial mayfly population is determined as the target energy type.
根据本发明提供的一种能源投资策略的确定方法,所述基于所述适应度值,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置,包括:According to a method for determining an energy investment strategy provided by the present invention, determining the target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals based on the fitness value, including:
将各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的适应度值进行排序,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体在所述初始蜉蝣种群中的适应度值排名;Ranking the fitness values corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively, and determining the fitness value ranking of each of the male mayfly individuals and each of the female mayfly individuals in the initial mayfly population;
基于所述适应度值排名,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置。Based on the ranking of the fitness values, target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively are determined.
根据本发明提供的一种能源投资策略的确定方法,所述基于所述适应度值排名,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置,包括:According to a method for determining an energy investment strategy provided by the present invention, determining the target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals based on the fitness value ranking, including:
针对各所述雄性蜉蝣个体,将所述适应度值排名中排名最高的雄性蜉蝣个体对应的第一编码序列为目标位置;For each of the male mayfly individuals, the first coding sequence corresponding to the highest-ranked male mayfly individual in the fitness value ranking is the target position;
针对各所述雌性蜉蝣个体,与各所述雌性蜉蝣个体的适应度值排名相同的雄性蜉蝣个体对应的第一编码序列为目标位置。For each of the female mayfly individuals, the first coding sequence corresponding to the male mayfly individual with the same fitness value ranking of each of the female mayfly individuals is the target position.
本发明还提供一种能源投资策略的确定装置,包括:The present invention also provides a device for determining an energy investment strategy, comprising:
获取模块,用于获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;an acquisition module, configured to acquire target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites and information on carbon emissions that can be generated by each of the energy sources;
第一确定模块,用于基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;所述M为正整数;The first determination module is used for determining the target energy type corresponding to each of the energy sites based on the construction cost information and the carbon emission information, using the elite strategy and the mayfly algorithm, and the elite strategy is used to put the elite pool before The M first target mayfly individuals with the lowest fitness values are replaced with the first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next iteration of the mayfly algorithm; the M is a positive integer;
第二确定模块,用于基于所述目标能源类型,确定各所述能源站点的能源投资策略。The second determination module is configured to determine, based on the target energy type, an energy investment strategy for each of the energy sites.
本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述能源投资策略的确定方法。The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor implements any one of the energy investment strategies described above when the processor executes the program method of determination.
本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述能源投资策略的确定方法。The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method for determining an energy investment strategy as described above.
本发明提供的能源投资策略的确定方法、装置、电子设备及存储介质,通过获取目标数据;目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;基于建设成本信息和碳排放量信息,采用精英策略和蜉蝣算法确定各能源站点对应的目标能源类型,精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;M为正整数;基于目标能源类型,确定各能源站点的能源投资策略。本发明提供的方法,通过精英策略对蜉蝣算法中下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换,实现了各能源站点的能源投资策略,能够提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The method, device, electronic device and storage medium for determining an energy investment strategy provided by the present invention obtain target data; the target data includes construction cost information of various energy sources corresponding to a plurality of energy sites and the amount of energy generated by each energy source. Carbon emission information; based on the construction cost information and carbon emission information, the elite strategy and the mayfly algorithm are used to determine the target energy type corresponding to each energy site. The elite strategy is used to select the first target with the lowest fitness value in the top M in the elite pool. The mayfly individuals are replaced with the first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next iteration of the mayfly algorithm; M is a positive integer; based on the target energy type, the energy investment strategy of each energy site is determined. The method provided by the invention replaces the first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next generation iteration in the mayfly algorithm through the elite strategy, thereby realizing the energy investment strategy of each energy site and improving the mayfly population. The convergence speed of the algorithm improves the accuracy of the energy investment strategy, reduces the construction cost of each energy site and the carbon emissions caused by the use of energy by users.
附图说明Description of drawings
为了更清楚地说明本发明或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are the For some embodiments of the invention, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本发明提供的能源投资策略的确定方法的流程示意图之一;Fig. 1 is one of the schematic flow charts of the determination method of the energy investment strategy provided by the present invention;
图2是本发明提供的能源投资策略的确定方法的流程示意图之二;Fig. 2 is the second schematic flow chart of the method for determining an energy investment strategy provided by the present invention;
图3是本发明提供的投入评价指标的对比结果示意图;Fig. 3 is the comparison result schematic diagram of the input evaluation index provided by the present invention;
图4是本发明提供的能源投资策略的确定装置的结构示意图;4 is a schematic structural diagram of a device for determining an energy investment strategy provided by the present invention;
图5是本发明提供的电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device provided by the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明中的附图,对本发明中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention. , not all examples. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
下面结合附图,通过一些实施例及其应用场景对本发明提供的能源投资策略的确定方法进行详细地说明。The method for determining an energy investment strategy provided by the present invention will be described in detail below with reference to the accompanying drawings through some embodiments and application scenarios thereof.
本发明提供一种能源投资策略的确定方法,该能源投资策略的确定方法适用于工业园区综合能源投资策略的确定场景中,通过获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;所述M为正整数;基于所述目标能源类型,确定各所述能源站点的能源投资策略。本发明提供的方法,通过精英策略对蜉蝣算法中下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换,实现了各能源站点的能源投资策略,能够提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The present invention provides a method for determining an energy investment strategy. The method for determining an energy investment strategy is applicable to the determination scenario of a comprehensive energy investment strategy in an industrial park by acquiring target data; The construction cost information of each energy source and the carbon emission information that can be produced by each energy source; based on the construction cost information and the carbon emission amount information, the elite strategy and the mayfly algorithm are used to determine the target energy corresponding to each energy site. Type, the elite strategy is used to combine the first M first target mayfly individuals with the lowest fitness values in the elite pool with the first M second target mayflies with the highest fitness values in the initial mayfly population of the next iteration of the mayfly algorithm The individual is replaced; the M is a positive integer; based on the target energy type, the energy investment strategy of each of the energy sites is determined. The method provided by the invention replaces the first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next generation iteration in the mayfly algorithm through the elite strategy, thereby realizing the energy investment strategy of each energy site and improving the mayfly population. The convergence speed of the algorithm improves the accuracy of the energy investment strategy, reduces the construction cost of each energy site and the carbon emissions caused by the use of energy by users.
下面结合图1-图3描述本发明的能源投资策略的确定方法。The method for determining the energy investment strategy of the present invention will be described below with reference to FIGS. 1 to 3 .
图1是本发明提供的能源投资策略的确定方法的流程示意图之一,如图1所示,该方法包括步骤101-步骤105,其中:FIG. 1 is one of the schematic flowcharts of the method for determining an energy investment strategy provided by the present invention. As shown in FIG. 1 , the method includes steps 101 to 105, wherein:
步骤101,获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息。Step 101: Obtain target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites and information on carbon emissions that can be generated by each of the energy sources.
需要说明的是,本发明提供的能源投资策略的确定方法可适用于工业园区综合能源投资策略的确定场景中。该方法的执行主体可以为能源投资策略的确定装置,例如电子设备、或者该能源投资策略的确定装置中的用于执行能源投资策略的确定方法的控制模块。It should be noted that the method for determining the energy investment strategy provided by the present invention can be applied to the determination scenario of the comprehensive energy investment strategy of the industrial park. The execution subject of the method may be a device for determining an energy investment strategy, such as an electronic device, or a control module for executing the method for determining an energy investment strategy in the device for determining an energy investment strategy.
具体地,可以通过评估市场环境下的综合能源投资策略组合的影响因素,即每种能源形式所需的建设成本、每种能源形式带来的碳排放量,从而获取到目标数据,其中,目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各能源所能产生的碳排放量信息。Specifically, the target data can be obtained by evaluating the influencing factors of the comprehensive energy investment strategy portfolio under the market environment, that is, the construction cost required by each energy form and the carbon emissions brought by each energy form. The data includes the construction cost information of multiple energy sources corresponding to multiple energy sites and the carbon emission information that each energy source can produce.
实际中,可以根据市场环境下的综合能源投资策略组合的影响因素,建立一个综合能源建站投资模型,该综合能源建站投资模型可以使用本发明提供的方法,实现各能源站点的能源投资策略。In practice, a comprehensive energy station construction investment model can be established according to the influencing factors of the comprehensive energy investment strategy combination in the market environment, and the comprehensive energy station construction investment model can use the method provided by the present invention to realize the energy investment strategy of each energy station.
需要说明的是,能源站点的数量可以根据实际需求进行设定,例如,能源站点的数量为9个;能源的数量也可以根据实际需求进行设定,例如,水、电、热、气等6种能源。It should be noted that the number of energy stations can be set according to actual needs, for example, the number of energy stations is 9; the number of energy can also be set according to actual needs, such as water, electricity, heat, gas, etc. 6 energy.
步骤102,基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;所述M为正整数。
具体地,根据获取的多个能源站点分别对应的多种能源的建设成本信息和各能源所能产生的碳排放量信息,采用精英策略和蜉蝣算法可以确定各能源站点对应的目标能源类型;其中,精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换,精英池中存储了多个第一目标蜉蝣个体。Specifically, according to the obtained construction cost information of multiple energy sources corresponding to multiple energy sites and the carbon emission information that each energy source can generate, the elite strategy and the mayfly algorithm can be used to determine the target energy type corresponding to each energy site; wherein , the elite strategy is used to replace the first M first target mayfly individuals with the lowest fitness values in the elite pool with the first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next iteration of the mayfly algorithm , there are multiple first target mayfly individuals stored in the elite pool.
步骤103,基于所述目标能源类型,确定各所述能源站点的能源投资策略。Step 103: Determine an energy investment strategy for each of the energy sites based on the target energy type.
具体地,根据目标能源类型,确定各能源站点的最优低碳投资策略,从而可以根据最优低碳投资策略进行综合能源站点的部署。Specifically, according to the target energy type, the optimal low-carbon investment strategy of each energy site is determined, so that comprehensive energy sites can be deployed according to the optimal low-carbon investment strategy.
需要说明的是,在进行综合能源最优低碳投资策略分配之前,具体的能源站点建设位置已经确定,则需要考虑的问题是在哪个能源站点建设何种能源类型的站点。在市场环境下的水电热气综合能源最优低碳投资策略主要涉及两个方面的因素,分别是不同种类的能源站点的建设成本和用户对于不同能源带来的碳排放量,因此可以根据各能源站点对应的目标能源类型,确定各能源站点的能源投资策略。It should be noted that, before the optimal low-carbon investment strategy allocation of comprehensive energy, the specific energy site construction location has been determined, and the question that needs to be considered is which energy site is to be constructed with what type of energy site. In the market environment, the optimal low-carbon investment strategy for integrated hydropower, heat and gas energy mainly involves two factors, namely the construction costs of different types of energy sites and the carbon emissions caused by users for different energy sources. The target energy type corresponding to the site determines the energy investment strategy of each energy site.
本发明提供的能源投资策略的确定方法,通过获取目标数据;目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;基于建设成本信息和碳排放量信息,采用精英策略和蜉蝣算法确定各能源站点对应的目标能源类型,精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;M为正整数;基于目标能源类型,确定各能源站点的能源投资策略。本发明提供的方法,通过精英策略对蜉蝣算法中下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换,实现了各能源站点的能源投资策略,能够提升了蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The method for determining an energy investment strategy provided by the present invention obtains target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites respectively and information on carbon emissions that can be generated by each of the energy sources; based on the construction cost Information and carbon emission information, the elite strategy and the mayfly algorithm are used to determine the target energy type corresponding to each energy site, and the elite strategy is used to compare the top M first target mayfly individuals with the lowest fitness value in the elite pool with the mayfly algorithm. The first M second target mayfly individuals with the highest fitness value in the initial mayfly population of a generation iteration are replaced; M is a positive integer; based on the target energy type, the energy investment strategy of each energy site is determined. In the method provided by the present invention, the first M second target mayfly individuals with the highest fitness value are replaced in the initial mayfly population of the next generation iteration in the mayfly algorithm through the elite strategy, so as to realize the energy investment strategy of each energy site, and can improve the The convergence speed of the mayfly algorithm improves the accuracy of the energy investment strategy, reduces the construction cost of each energy site and the carbon emissions caused by the use of energy by users.
可选地,上述步骤102的具体实现方式包括以下步骤:Optionally, the specific implementation of the
步骤A:基于所述建设成本信息和所述碳排放量信息,对所述蜉蝣算法所涉及的初始蜉蝣种群中多个蜉蝣个体进行编码,确定多个第一编码序列;所述第一编码序列用于表示对各所述能源站点分别投资的初始能源类型;所述初始蜉蝣种群包括多个雄性蜉蝣个体和多个雌性蜉蝣个体。Step A: Based on the construction cost information and the carbon emission information, encode multiple mayfly individuals in the initial mayfly population involved in the mayfly algorithm, and determine multiple first coding sequences; the first coding sequence It is used to represent the initial energy type invested in each of the energy stations; the initial mayfly population includes a plurality of male mayfly individuals and a plurality of female mayfly individuals.
具体地,根据多个能源站点分别对应的多种能源的建设成本信息和各能源所能产生的碳排放量信息,对蜉蝣算法所涉及的初始蜉蝣种群中多个蜉蝣个体进行编码,确定多个第一编码序列;其中,编码方式可以采用实数编码,也可以采用其他编码方式,例如,二进制编码。Specifically, according to the construction cost information of multiple energy sources and the carbon emissions information that each energy source can generate, encode multiple mayfly individuals in the initial mayfly population involved in the mayfly algorithm, and determine multiple mayfly individuals. The first encoding sequence; wherein, the encoding mode may adopt real number encoding, and may also adopt other encoding modes, such as binary encoding.
需要说明的是,第一编码序列用于表示对各能源站点分别投资的初始能源类型,即第一编码序列可以表示一种可行的市场环境下的综合能源投资策略;初始蜉蝣种群包括多个雄性蜉蝣个体和多个雌性蜉蝣个体。It should be noted that the first coding sequence is used to represent the initial energy type for investment in each energy site, that is, the first coding sequence can represent a comprehensive energy investment strategy in a feasible market environment; the initial mayfly population includes multiple males Mayfly individual and multiple female mayfly individuals.
例如,市场环境下需要进行投资策略分配的能源分别为水能、电能、热能、气能等4种综合能源,其中,用数字1表示水能,数字2表示电能,数字3表示热能,数字4表示气能;在划分的区域地点需要建设的能源站点数量为9个,则初始蜉蝣种群的蜉蝣个体对应的一个可行的第一编码序列为[2,1,3,4,1,1,2,3,2],该第一编码序列表示第一个能源站点对应的目标能源类型为电能,即对第一个能源站点拟进行电能能源建站投资;第二个能源站点对应的目标能源类型为水能,即对第二个能源站点拟进行水能能源建站投资;第三个能源站点对应的目标能源类型为热能,即对第三个能源站点拟进行热能能源建站投资;第四个能源站点对应的目标能源类型为气能,即对第四个能源站点拟进行气能能源建站投资;以此类推。For example, the energy that needs to be allocated in the investment strategy in the market environment are 4 kinds of comprehensive energy, such as water energy, electric energy, thermal energy, and gas energy. Represents gas energy; the number of energy stations to be constructed in the divided area is 9, then a feasible first coding sequence corresponding to the mayfly individual of the initial mayfly population is [2, 1, 3, 4, 1, 1, 2 , 3, 2], the first coding sequence indicates that the target energy type corresponding to the first energy site is electric energy, that is, the first energy site is to be invested in electric energy energy station construction; the target energy type corresponding to the second energy site is Water energy, that is, the investment in the construction of hydro energy energy for the second energy site; the target energy type corresponding to the third energy site is thermal energy, that is, the investment in the construction of thermal energy for the third energy site; the fourth energy site The corresponding target energy type is gas energy, that is, the investment in the construction of a gas energy energy station is planned for the fourth energy site; and so on.
进一步地,根据建设成本信息和碳排放量信息,可以确定建设成本比重矩阵和碳排放量比重矩阵,其中,建设成本比重矩阵表示每种能源在某能源站点建站所需要的成本投入占所有能源在该能源站点建站所需总成本投入的比重,碳排放量比重矩阵表示每种能源在某能源站点建站所带来的碳排放量占所有能源在该能源站点建站带来的碳排放量的比重。Further, according to the construction cost information and carbon emission information, the construction cost proportion matrix and the carbon emission proportion matrix can be determined, wherein, the construction cost proportion matrix indicates that the cost input of each energy source required to build a station at an energy site accounts for the proportion of all energy in the energy site. The proportion of the total cost input required for the construction of the energy site, and the carbon emission proportion matrix represents the proportion of the carbon emissions brought by the construction of each energy site at an energy site to the carbon emissions brought by the construction of all energy sites at the energy site.
例如,市场环境下中拟建设的能源站点为9个,涉及到的能源分别为水能、电能、热能、气能等4种综合能源,则根据在各能源站点建设各能源的建设成本信息,可以确定建设成本比重矩阵W,其中,建设成本比重矩阵W表示为:For example, in the market environment, there are 9 energy stations to be built, and the energy involved are 4 kinds of integrated energy, such as water energy, electric energy, heat energy, and gas energy. The construction cost proportion matrix W can be determined, wherein the construction cost proportion matrix W is expressed as:
其中,建设成本比重矩阵W的行表示水能、电能、热能、气能等4种综合能源,建设成本比重矩阵W的列表示9个能源站点,例如,第一行第一列表示第一个能源站点建设水能源的建设成本。Among them, the row of the construction cost proportion matrix W represents 4 comprehensive energy sources such as water energy, electric energy, heat energy, and gas energy, and the column of the construction cost proportion matrix W represents 9 energy stations. For example, the first row and the first column represent the first The construction cost of water energy for energy site construction.
根据各能源所能产生的碳排放量信息,可以确定碳排放量比重矩阵P,其中,碳排放量比重矩阵P为:According to the carbon emission information that each energy source can generate, the carbon emission proportion matrix P can be determined, wherein the carbon emission proportion matrix P is:
其中,碳排放量比重矩阵P的行表示水能、电能、热能、气能等4种综合能源,碳排放量比重矩阵P的列表示9个能源站点,例如,第一行第一列表示第一个能源站点建设水能源所能产生的碳排放量。Among them, the rows of the carbon emission proportion matrix P represent four comprehensive energy sources such as water energy, electric energy, heat energy, and gas energy, and the columns of the carbon emissions proportion matrix P represent 9 energy stations. For example, the first row and the first column represent the first The amount of carbon emissions that can be produced by building water energy at an energy site.
接着,对蜉蝣算法中的初始蜉蝣种群进行初始化,并设置初始化参数,其中,参数包括初始蜉蝣种群的大小C,蜉蝣种群中各蜉蝣个体的位置L(即第一编码序列),综合能源系统中建设的能源站点的数量N,最大迭代次数MaxIteration,当前迭代次数Iteration,各蜉蝣个体的初始速度;例如,初始蜉蝣种群中蜉蝣个体数量为60个,各蜉蝣的位置维度为4,最大迭代次数为100次,当前迭代次数为0,各蜉蝣个体的初始速度为0。Next, initialize the initial mayfly population in the mayfly algorithm, and set the initialization parameters, wherein the parameters include the size C of the initial mayfly population, the position L of each individual mayfly in the mayfly population (ie the first coding sequence), and the integrated energy system. The number N of energy stations constructed, the maximum iteration times MaxIteration, the current iteration times Iteration, and the initial speed of each individual mayfly; for example, the number of mayflies in the initial mayfly population is 60, the position dimension of each mayfly is 4, and the maximum number of iterations is 100 times, the current iteration number is 0, and the initial speed of each individual mayfly is 0.
步骤B:基于各所述第一编码序列、所述建设成本信息和所述碳排放量信息,分别计算各所述雄性蜉蝣个体和各所述雌性蜉蝣个体的适应度值;所述适应度值用于表示各所述能源站点对应的投入评价指标;所述投入评价指标表示用户在使用所述能源站点的能源时产生的碳排放量。Step B: Calculate the fitness value of each individual male mayfly and each individual female mayfly based on each of the first coding sequences, the construction cost information and the carbon emission information; the fitness value It is used to indicate the input evaluation index corresponding to each of the energy stations; the input evaluation index indicates the carbon emissions generated when the user uses the energy of the energy station.
具体地,根据在各能源站点建设各能源的建设成本信息,可以确定建设成本比重矩阵W,以及根据各能源所能产生的碳排放量信息,可以确定碳排放量比重矩阵P,采用下述公式(1)可以计算出各蜉蝣个体的适应度值,其中,公式(1)表示为:Specifically, the construction cost proportion matrix W can be determined according to the construction cost information of each energy source at each energy site, and the carbon emission proportion matrix P can be determined according to the information on the carbon emissions that can be generated by each energy source, using the following formula (1) The fitness value of each individual mayfly can be calculated, where formula (1) is expressed as:
其中,fitness表示适应度值,W表示各第一编码序列对应的各能源站点的建设成本比重矩阵,P表示各第一编码序列对应的各能源所能产生的碳排放量比重矩阵。Among them, fitness represents the fitness value, W represents the construction cost proportion matrix of each energy site corresponding to each first coding sequence, and P represents the proportion matrix of carbon emissions that can be generated by each energy source corresponding to each first coding sequence.
例如,蜉蝣算法中涉及的初始蜉蝣种群中包括3个蜉蝣个体,其中,蜉蝣个体1的第一编码序列为[2,3,1,1,2,3,4,1,2],蜉蝣个体2的第一编码序列为[4,3,1,1,2,3,3,4,2],蜉蝣个体3的第一编码序列为[1,2,3,2,4,3,2,4,4]。则蜉蝣个体1的第一编码序列表示对各能源站点分别投资的初始能源类型为:电能、热能、水能、水能、电能、热能、气能、水能、电能,蜉蝣个体2的第一编码序列表示对各能源站点分别投资的初始能源类型为:气能、热能、水能、水能、电能、热能、热能、气能、电能,蜉蝣个体3的第一编码序列表示对各能源站点分别投资的初始能源类型为:水能、电能、热能、电能、气能、热能、电能、气能、气能。For example, the initial mayfly population involved in the mayfly algorithm includes 3 mayfly individuals, wherein the first coding sequence of mayfly individual 1 is [2, 3, 1, 1, 2, 3, 4, 1, 2], The first coding sequence of 2 is [4, 3, 1, 1, 2, 3, 3, 4, 2], and the first coding sequence of mayfly individual 3 is [1, 2, 3, 2, 4, 3, 2 , 4, 4]. Then the first coding sequence of the mayfly individual 1 indicates that the initial energy types invested in each energy station are: electric energy, thermal energy, water energy, water energy, electric energy, thermal energy, gas energy, water energy, electric energy, and the first coding sequence of the mayfly individual 2 The coding sequence indicates that the initial energy types invested in each energy station are: gas energy, thermal energy, water energy, water energy, electric energy, thermal energy, thermal energy, gas energy, and electric energy. The initial energy types invested separately are: water energy, electrical energy, thermal energy, electrical energy, gas energy, thermal energy, electrical energy, gas energy, and gas energy.
蜉蝣个体1的建设成本比重矩阵W1为:[0.32,0.16,0.24,0.22,0.14,0.21,0.08,0.26,0.25],蜉蝣个体1的碳排放量比重矩阵P1为:[0.37,0.26,0.14,0.22,0.14,0.21,0.17,0.16,0.35];蜉蝣个体2的建设成本比重序列W2为:[0.18,0.16,0.24,0.22,0.14,0.21,0.32,0.30,0.25],蜉蝣个体2的碳排放量比重序列P2为:[0.29,0.26,0.14,0.22,0.14,0.21,0.33,0.40,0.35];蜉蝣个体3的建设成本比重序列W3为:[0.35,0.27,0.35,0.28,0.32,0.21,0.20,0.30,0.18],蜉蝣个体3的碳排放量比重序列P3为:[0.15,0.26,0.35,0.28,0.30,0.21,0.26,0.40,0.28]。The proportion matrix W1 of construction cost of individual mayfly 1 is: [0.32, 0.16, 0.24, 0.22, 0.14, 0.21, 0.08, 0.26, 0.25], and the proportion matrix P1 of carbon emissions of individual mayfly 1 is: [0.37, 0.26, 0.14, 0.22, 0.14, 0.21, 0.17, 0.16, 0.35]; the proportion sequence W2 of the construction cost of individual mayfly 2 is: [0.18, 0.16, 0.24, 0.22, 0.14, 0.21, 0.32, 0.30, 0.25], the carbon emission of individual mayfly 2 The weight proportion sequence P2 is: [0.29, 0.26, 0.14, 0.22, 0.14, 0.21, 0.33, 0.40, 0.35]; the construction cost proportion sequence W3 of the mayfly individual 3 is: [0.35, 0.27, 0.35, 0.28, 0.32, 0.21, 0.20, 0.30, 0.18], the carbon emission proportion sequence P3 of individual mayfly 3 is: [0.15, 0.26, 0.35, 0.28, 0.30, 0.21, 0.26, 0.40, 0.28].
根据上述公式(1)可以分别计算出蜉蝣个体1的适应度值为fitness1=0.4484,蜉蝣个体2的适应度值为fitness2=0.5526,蜉蝣个体3的适应度值为fitness3=0.6861。According to the above formula (1), the fitness value of individual mayfly 1 can be calculated as fitness1=0.4484, the fitness value of individual mayfly 2 is fitness2=0.5526, and the fitness value of individual mayfly 3 is fitness3=0.6861.
步骤C:基于所述适应度值,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置。Step C: Based on the fitness value, determine the target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively.
具体地,根据计算的各蜉蝣个体的适应度值,可以分别确定出各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的目标位置。Specifically, according to the calculated fitness value of each individual mayfly, the target positions corresponding to each individual male mayfly and each individual may be determined respectively.
步骤D:基于所述目标位置,各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别向所述目标位置移动,得到所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的第二编码序列。Step D: Based on the target position, each of the male mayfly individuals and each of the female mayfly individuals move to the target position, respectively, to obtain second coding sequences corresponding to the male mayfly individual and each of the female mayfly individuals respectively .
具体地,基于各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的目标位置,各雄性蜉蝣个体和各雌性蜉蝣个体分别向目标位置移动,得到雄性蜉蝣个体和各雌性蜉蝣个体分别对应的第二编码序列。Specifically, based on the target positions corresponding to each male mayfly individual and each female mayfly individual, respectively, each male mayfly individual and each female mayfly individual move to the target position, respectively, to obtain the second coding sequences corresponding to the male mayfly individual and each female mayfly individual respectively .
实际中,针对雄性蜉蝣个体,雄性蜉蝣个体的位置更新采用如下公式(2),其中:In practice, for male mayfly individuals, the position update of male mayfly individuals adopts the following formula (2), where:
其中,i表示第i个雄性蜉蝣个体,t表示第t次迭代,表示第t+1次迭代时第i个 雄性蜉蝣个体对应的第二编码序列,表示第t次迭代时i个雄性蜉蝣个体对应的第一编码 序列,表示第t+1次迭代时i个雄性蜉蝣个体对应的飞行速度。 Among them, i represents the i-th male mayfly individual, t represents the t-th iteration, represents the second coding sequence corresponding to the i-th male mayfly individual at the t+1-th iteration, represents the first coding sequence corresponding to i male mayfly individuals at the t-th iteration, Represents the flight speed corresponding to i male mayfly individuals at the t+1th iteration.
考虑到雄性蜉蝣个体总是在靠近水面的地方斗舞,所以雄性蜉蝣个体的飞行速度并不会很快,采用如下公式(3)表示,其中:Considering that male mayflies always dance near the water surface, the flight speed of male mayflies is not very fast, which is expressed by the following formula (3), where:
其中,表示第t+1次迭代时第i个雄性蜉蝣个体第j维度所对应的飞行速度, 表示第t次迭代时第i个雄性蜉蝣个体第j维度所对应的飞行速度,表示第t次迭代时第i 个雄性蜉蝣个体第j维度的第一编码序列,和表示正吸引常数,分别用于衡量认知成分 和社会成分的贡献,通俗来讲就是当前个体及最优个体对当前飞行速度的影响程度,表示第i个雄性蜉蝣个体的历史最优位置,表示最优雄性蜉蝣个体的位置,表示蜉蝣的能见度系数,控制着可见范围,表示与之间的笛卡尔距离,表 示与之间的笛卡尔距离。 in, represents the flight speed corresponding to the jth dimension of the i-th male mayfly individual at the t+1-th iteration, represents the flight speed corresponding to the jth dimension of the i-th male mayfly individual at the t-th iteration, represents the first coding sequence of the j-th dimension of the i-th male mayfly individual at the t-th iteration, and Represents the positive attraction constant, which is used to measure the contribution of the cognitive component and the social component respectively. Generally speaking, it is the degree of influence of the current individual and the optimal individual on the current flight speed. represents the historical optimal position of the i-th male mayfly individual, represents the position of the optimal male mayfly individual, Indicates the mayfly's visibility coefficient, which controls the visible range, express and the Cartesian distance between, express and Cartesian distance between.
需要说明的是,对于当前的舞王(适应度值最低的雄性蜉蝣个体),该适应度值最低的雄性蜉蝣个体的飞行速度采用如下公式(4)表示,其中:It should be noted that, for the current dance king (male mayfly individual with the lowest fitness value), the flying speed of the male mayfly individual with the lowest fitness value is expressed by the following formula (4), where:
其中,为雄性蜉蝣个体的舞技系数,为[-1,1]内的随机值,表示第t+1次迭 代时第i个雄性蜉蝣个体第j维度所对应的飞行速度,表示第t次迭代时第i个雄性蜉蝣个 体第j维度所对应的飞行速度。 in, is the dance skill coefficient of the individual male mayfly, is a random value in [-1,1], represents the flight speed corresponding to the jth dimension of the i-th male mayfly individual at the t+1-th iteration, Represents the flight speed corresponding to the jth dimension of the i-th male mayfly individual at the t-th iteration.
针对雌性蜉蝣个体,雌性蜉蝣个体的位置更新采用如下公式(5),其中:For individual female mayflies, the following formula (5) is used to update the position of individual female mayflies, where:
其中,表示第t+1次迭代时第i个雌性蜉蝣个体的第二编码序列,第t次迭代 时第i个雌性蜉蝣个体的第一编码序列,表示第t+1次迭代时i个雌性蜉蝣个体对应的 飞行速度。 in, represents the second coding sequence of the i-th female mayfly individual at the t+1-th iteration, The first coding sequence of the i-th female mayfly individual at the t-th iteration, Indicates the flight speed corresponding to i female mayfly individuals at the t+1th iteration.
由于雌性蜉蝣个体的目标位置是与该蜉蝣个体的适应度值排名相同的雄性蜉蝣个体的位置,则雌性蜉蝣个体的飞行速度采用如下供水(6)表示,其中:Since the target position of the female mayfly individual is the position of the male mayfly individual whose fitness value ranks the same, the flight speed of the female mayfly individual is represented by the following water supply (6), where:
其中,表示第t+1次迭代时第i个雌性蜉蝣个体第j维度所对应的飞行速度, 表示第t次迭代时第i个雌性蜉蝣个体第j维度所对应的飞行速度,表示正吸引常数,用于 衡量社会成分的贡献,表示蜉蝣的能见度系数,控制着可见范围,表示第i个雌性蜉蝣 个体与该雌性蜉蝣个体适应度值排名相同的雄性蜉蝣个体之间的距离,表示常量,一般 取值为0.1,为[-1,1]内的随机值,表示第i个雄性蜉蝣个体的适应度值,表示第i 个雌性蜉蝣个体的适应度值。 in, represents the flight speed corresponding to the jth dimension of the ith female mayfly individual at the t+1th iteration, represents the flight speed corresponding to the jth dimension of the i-th female mayfly individual at the t-th iteration, represents the positive attraction constant, which measures the contribution of social components, Represents the mayfly's visibility coefficient, which controls the visible range, represents the distance between the i-th female mayfly individual and the male mayfly individual whose fitness value ranks the same as the female mayfly individual, Represents a constant, generally the value is 0.1, is a random value in [-1,1], represents the fitness value of the i-th male mayfly individual, Represents the fitness value of the i-th female mayfly individual.
根据上述公式(6)可见,当适应度值排名相同的第i个雌性蜉蝣个体的适应度值小于第i个雄性蜉蝣个体的适应度值时,该雌性蜉蝣个体以公式(6)中的上式的速度更新方式向雄性蜉蝣个体移动;当适应度值排名相同的第i个雌性蜉蝣个体的适应度值大于第i个雄性蜉蝣个体的适应度值时,该雌性蜉蝣个体以公式(6)中的下式的速度更新方式自行搜索目标位置。According to the above formula (6), it can be seen that when the fitness value of the i-th female mayfly individual with the same fitness value ranking is smaller than the fitness value of the i-th male mayfly individual, the female mayfly individual will use the above value in formula (6). When the fitness value of the i-th female mayfly individual with the same fitness value ranking is greater than the fitness value of the i-th male mayfly individual, the female mayfly individual uses formula (6) The speed update method in the following formula searches for the target position by itself.
步骤E:基于所述第二编码序列,各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别进行配对,交叉产生多个子代蜉蝣个体;各所述子代蜉蝣个体的位置分别对应第三编码序列。Step E: Based on the second coding sequence, each of the male mayfly individuals and each of the female mayfly individuals are paired respectively, and crossed to generate a plurality of progeny mayfly individuals; the positions of each of the progeny mayfly individuals correspond to the third code respectively sequence.
具体地,根据各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的第二编码序列,各雄性蜉蝣个体和各雌性蜉蝣个体分别进行配对,采用如下公式(7),交叉产生多个子代蜉蝣个体;其中,公式(7)表示为:Specifically, according to the respective second coding sequences corresponding to each male mayfly individual and each female mayfly individual, each male mayfly individual and each female mayfly individual are paired respectively, and the following formula (7) is used to generate multiple offspring mayfly individuals by crossover; , formula (7) is expressed as:
其中,和表示一对雄性蜉蝣个体和雌性蜉蝣个体交叉产生的 两个子代蜉蝣个体,L表示随机数,取值范围是[0,1],male表示父代雄性蜉蝣个体,female 表示母代雌性蜉蝣个体。 in, and Represents the two offspring mayfly individuals generated by the crossover of a pair of male and female mayfly individuals, L represents a random number, the value range is [0,1], male represents the male mayfly individual of the parent generation, and female represents the female mayfly individual of the mother generation.
需要说明的是,在每一次迭代的过程中,将N对雄性蜉蝣个体和雌性蜉蝣个体交叉产生的两N个子代蜉蝣个体,选择N个子代蜉蝣个体,而且,子代蜉蝣个体为雌性或者雄性,是随机产生的;子代蜉蝣个体的位置分别对应第三编码序列,可以由上述公式(7)计算得到。It should be noted that, in the process of each iteration, two N progeny mayfly individuals generated by crossing N pairs of male mayfly individuals and female mayfly individuals are selected, and N progeny mayfly individuals are selected, and the progeny mayfly individuals are female or male. , is randomly generated; the positions of the individual progeny mayflies correspond to the third coding sequence, which can be calculated by the above formula (7).
步骤F:在迭代次数不满足预设迭代次数的情况下,基于所述第二编码序列、所述第三编码序列和所述精英策略,更新所述初始蜉蝣种群中的蜉蝣个体。Step F: If the number of iterations does not meet the preset number of iterations, update mayfly individuals in the initial mayfly population based on the second coding sequence, the third coding sequence and the elite strategy.
具体地,在迭代次数不满足预设迭代次数的情况下,即在当前迭代次数小于预设迭代次数的情况下,根据各雌性蜉蝣个体和各雄性蜉蝣个体对应的对应的第二编码序列、子代蜉蝣个体对应的第三编码序列和精英策略,可以更新当前迭代次数中的初始蜉蝣种群中的蜉蝣个体。Specifically, when the number of iterations does not meet the preset number of iterations, that is, when the current number of iterations is less than the preset number of iterations, according to the corresponding second coding sequence, sub-coding sequence and sub-coding sequence corresponding to each female mayfly individual and each male mayfly individual The third coding sequence corresponding to the individual mayfly and the elite strategy can update the individual mayfly in the initial mayfly population in the current iteration number.
步骤G:将更新后的初始蜉蝣种群中的蜉蝣个体对应的第四编码序列作为新的第一编码序列,并迭代执行步骤A-步骤G,直至迭代次数满足预设迭代次数,基于最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各所述能源站点对应的目标能源类型。Step G: take the fourth coding sequence corresponding to the individual mayfly in the updated initial mayfly population as the new first coding sequence, and iteratively execute steps A-step G until the number of iterations meets the preset number of iterations, based on the final updated The first coding sequence corresponding to the individual mayfly in the initial mayfly population determines the target energy type corresponding to each of the energy stations.
具体地,第四编码序列包括第二编码序列和第三编码序列,将更新后的初始蜉蝣种群中的蜉蝣个体对应的第四编码序列作为新的第一编码序列,并重复迭代执行上述步骤A-步骤G,直至迭代次数大于预设迭代次数,此时根据最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各能源站点对应的目标能源类型。Specifically, the fourth coding sequence includes a second coding sequence and a third coding sequence, and the fourth coding sequence corresponding to the individual mayfly in the updated initial mayfly population is taken as the new first coding sequence, and the above step A is repeatedly and iteratively executed - Step G, until the number of iterations is greater than the preset number of iterations, at this time, the target energy type corresponding to each energy station is determined according to the first coding sequence corresponding to the individual mayfly in the final updated initial mayfly population.
本发明提供的能源投资策略的确定方法,通过步骤A:基于建设成本信息和碳排放量信息,对蜉蝣算法所涉及的初始蜉蝣种群中多个蜉蝣个体进行编码,确定多个第一编码序列;第一编码序列用于表示对各能源站点分别投资的初始能源类型;初始蜉蝣种群包括多个雄性蜉蝣个体和多个雌性蜉蝣个体;步骤B:基于各第一编码序列、建设成本信息和碳排放量信息,分别计算各雄性蜉蝣个体和各雌性蜉蝣个体的适应度值;适应度值用于表示各能源站点对应的投入评价指标;投入评价指标表示用户在使用能源站点的能源时产生的碳排放量;步骤C:基于适应度值,确定各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的目标位置;步骤D:基于目标位置,各雄性蜉蝣个体和各雌性蜉蝣个体分别向目标位置移动,得到雄性蜉蝣个体和各雌性蜉蝣个体分别对应的第二编码序列;步骤E:基于第二编码序列,各雄性蜉蝣个体和各雌性蜉蝣个体分别进行配对,交叉产生多个子代蜉蝣个体;各子代蜉蝣个体的位置分别对应第三编码序列;步骤F:在迭代次数不满足预设迭代次数的情况下,基于第二编码序列、第三编码序列和精英策略,更新初始蜉蝣种群中的蜉蝣个体;步骤G:将更新后的初始蜉蝣种群中的蜉蝣个体对应的第四编码序列作为新的第一编码序列,并迭代执行步骤A-步骤G,直至迭代次数满足预设迭代次数,基于最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各所述能源站点对应的目标能源类型。本发明提供的方法,通过精英策略对蜉蝣算法进行改进,使用精英策略对蜉蝣算法中下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换,实现了各能源站点的能源投资策略,能够提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The method for determining an energy investment strategy provided by the present invention includes step A: encoding multiple mayfly individuals in the initial mayfly population involved in the mayfly algorithm based on construction cost information and carbon emission information, and determining multiple first coding sequences; The first coding sequence is used to represent the initial energy type invested in each energy site; the initial mayfly population includes multiple male mayfly individuals and multiple female mayfly individuals; step B: based on each first coding sequence, construction cost information and carbon emissions The fitness value of each individual male mayfly and each individual female mayfly is calculated separately; the fitness value is used to represent the input evaluation index corresponding to each energy site; the input evaluation index represents the carbon emission generated by the user when using the energy of the energy site Step C: Based on the fitness value, determine the target positions corresponding to each male mayfly individual and each female mayfly individual respectively; Step D: Based on the target position, each male mayfly individual and each female mayfly individual move to the target position, respectively, to obtain a male The second coding sequence corresponding to the individual mayfly and each individual female mayfly; Step E: Based on the second coding sequence, each male individual mayfly and each individual female mayfly are paired respectively, and a plurality of progeny mayfly individuals are generated by crossover; The positions of , respectively correspond to the third coding sequence; Step F: when the number of iterations does not meet the preset number of iterations, update the mayfly individuals in the initial mayfly population based on the second coding sequence, the third coding sequence and the elite strategy; Step G : take the fourth coding sequence corresponding to the individual mayfly in the updated initial mayfly population as the new first coding sequence, and iteratively execute steps A-step G until the number of iterations meets the preset number of iterations, based on the final updated initial The first coding sequence corresponding to the individual mayfly in the mayfly population determines the target energy type corresponding to each of the energy stations. In the method provided by the invention, the mayfly algorithm is improved through the elite strategy, and the first M second target mayfly individuals with the highest fitness value in the initial mayfly population of the next iteration in the mayfly algorithm are replaced by the elite strategy, and various energy sources are realized. The energy investment strategy of the site can improve the convergence speed of the mayfly algorithm, thereby improving the accuracy of the energy investment strategy, reducing the construction cost of each energy site and the carbon emissions caused by the use of energy by users.
可选地,上述步骤F的具体实现方式包括以下步骤:Optionally, the specific implementation of the above step F includes the following steps:
步骤1)基于所述第二编码序列和所述第三编码序列,判断各蜉蝣个体是否越界。Step 1) Based on the second coding sequence and the third coding sequence, determine whether each individual mayfly crosses the boundary.
具体地,根据第二编码序列和所述第三编码序列,判断各蜉蝣个体是否越界,即第二编码序列和第三编码序列中各维度的值是否超过目标值,例如,目标值为4。Specifically, according to the second coding sequence and the third coding sequence, it is determined whether each individual mayfly crosses the boundary, that is, whether the value of each dimension in the second coding sequence and the third coding sequence exceeds the target value, for example, the target value is 4.
步骤2)在各所述蜉蝣个体不存在越界的情况下,计算各蜉蝣个体的适应度值。Step 2) Calculate the fitness value of each mayfly individual under the condition that each individual mayfly does not cross the boundary.
具体地,在各所述蜉蝣个体不存在越界的情况下,根据各蜉蝣个体的第二编码序列和子代蜉蝣个体的第三编码序列,分别采用上述公式(1)计算各蜉蝣个体的适应度值,其中,各蜉蝣个体包括初始蜉蝣种群中的蜉蝣个体和子代蜉蝣个体。Specifically, in the case that each individual mayfly does not cross the boundary, according to the second coding sequence of each individual mayfly and the third coding sequence of the individual progeny mayfly, the above formula (1) is used to calculate the fitness value of each individual mayfly. , wherein each mayfly individual includes mayfly individuals and progeny mayfly individuals in the initial mayfly population.
步骤3)将各所述蜉蝣个体的所述适应度值进行排序。Step 3) Rank the fitness values of each mayfly individual.
步骤4)基于精英策略,将最低适应度值对应的第一目标蜉蝣个体存储至精英池中,所述精英池包括多个所述第一目标蜉蝣个体;根据所述多个第一目标蜉蝣个体的适应度值,更新所述初始蜉蝣种群中的蜉蝣个体。Step 4) Based on the elite strategy, store the first target mayfly individual corresponding to the lowest fitness value in the elite pool, where the elite pool includes a plurality of the first target mayfly individuals; according to the plurality of first target mayfly individuals The fitness value of , update the mayfly individuals in the initial mayfly population.
具体地,使用精英策略,将排序结果中最低适应度值对应的第一目标蜉蝣个体存储至精英池中,在不断的迭代过程中,精英池包括多个第一目标蜉蝣个体;再根据多个第一目标蜉蝣个体的适应度值,更新初始蜉蝣种群中的蜉蝣个体。Specifically, using the elite strategy, the first target mayfly individual corresponding to the lowest fitness value in the sorting result is stored in the elite pool. In the continuous iterative process, the elite pool includes multiple first target mayfly individuals; The fitness value of the first target mayfly individual is to update the mayfly individual in the initial mayfly population.
本发明提供的能源投资策略的确定方法,根据第二编码序列和第三编码序列,判断各蜉蝣个体是否越界;在各蜉蝣个体不存在越界的情况下,计算各蜉蝣个体的适应度值;将各蜉蝣个体的所述适应度值进行排序;基于精英策略,将最低适应度值对应的第一目标蜉蝣个体存储至精英池中,精英池包括多个所述第一目标蜉蝣个体;根据多个第一目标蜉蝣个体的适应度值,更新初始蜉蝣种群中的蜉蝣个体,从而实现了各能源站点的能源投资策略,能够提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。In the method for determining the energy investment strategy provided by the present invention, according to the second coding sequence and the third coding sequence, it is judged whether each individual mayfly crosses the boundary; if the individual mayfly does not cross the boundary, the fitness value of each individual mayfly is calculated; The fitness value of each mayfly individual is sorted; based on the elite strategy, the first target mayfly individual corresponding to the lowest fitness value is stored in the elite pool, and the elite pool includes a plurality of the first target mayfly individuals; The fitness value of the first target mayfly individual is to update the individual mayfly in the initial mayfly population, thereby realizing the energy investment strategy of each energy site, which can improve the convergence speed of the mayfly algorithm, thereby improving the accuracy of the energy investment strategy and reducing the cost of energy investment. The construction cost of energy sites and the carbon emissions that users can bring from using energy.
可选地,上述步骤4)中的所述根据所述多个所述第一目标蜉蝣个体的适应度值,更新所述初始蜉蝣种群中的蜉蝣个体,包括:Optionally, the updating of the mayfly individuals in the initial mayfly population according to the fitness values of the plurality of first target mayfly individuals in the above step 4) includes:
将所述精英池中多个所述第一目标蜉蝣个体中适应度值最低的前M个第一目标蜉蝣个体,替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;将替换后的所述当前蜉蝣种群更新所述初始蜉蝣种群中的蜉蝣个体。Replace the top M first target mayfly individuals with the lowest fitness value among the plurality of first target mayfly individuals in the elite pool with the top M second target mayfly individuals with the highest fitness value in the current mayfly population; The replaced mayfly population updates the mayfly individuals in the initial mayfly population.
具体地,将精英池中多个第一目标蜉蝣个体对应的适应度值进行排序,选择适应度值最低的前M个第一目标蜉蝣个体,将该M个第一目标蜉蝣个体替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;再将替换后的当前蜉蝣种群中的蜉蝣个体作为下一代初始蜉蝣种群中的蜉蝣个体,以此更新初始蜉蝣种群中的蜉蝣个体。Specifically, the fitness values corresponding to multiple first target mayfly individuals in the elite pool are sorted, the top M first target mayfly individuals with the lowest fitness values are selected, and the M first target mayfly individuals are replaced by the current mayfly population The first M second target mayfly individuals with the highest fitness value in the middle; and then the mayfly individuals in the current mayfly population after replacement are used as mayfly individuals in the next generation of the initial mayfly population, so as to update the mayfly individuals in the initial mayfly population.
本发明提供的能源投资策略的确定方法,通过将精英池中多个第一目标蜉蝣个体中适应度值最低的前M个第一目标蜉蝣个体,替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;将替换后的当前蜉蝣种群更新初始蜉蝣种群中的蜉蝣个体,提升了蜉蝣算法的收敛速度,能够较快实现各能源站点的能源投资策略,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The method for determining the energy investment strategy provided by the present invention replaces the top M first target mayfly individuals with the lowest fitness value among the multiple first target mayfly individuals in the elite pool with the highest fitness value in the current mayfly population. A second target mayfly individual; update the mayfly individual in the initial mayfly population with the replaced current mayfly population, which improves the convergence speed of the mayfly algorithm, and can quickly implement the energy investment strategy of each energy site, thereby improving the efficiency of the energy investment strategy. Accuracy reduces the construction cost of each energy site and the carbon emissions that users can bring from using energy.
可选地,上述步骤G中的基于最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各所述能源站点对应的目标能源类型,包括:将最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体的第一编码序列,确定为所述目标能源类型。Optionally, in the above-mentioned step G, based on the first coding sequence corresponding to the individual mayfly in the final updated initial mayfly population, determining the target energy type corresponding to each of the energy sites includes: the final updated initial mayfly population. The first coding sequence of the target mayfly individual corresponding to the lowest fitness value among the mayfly individuals in the mayfly is determined as the target energy type.
具体地,在将替换后的当前蜉蝣种群更新初始蜉蝣种群中的蜉蝣个体之后,判断当前的迭代次数是否大于预设迭代次数;若当前迭代次数不大于预设迭代次数,则继续下一次迭代的过程;若当前迭代次数大于预设迭代次数,则算法迭代过程结束,将最后一次迭代过程中的初始蜉蝣种群作为最终更新后的初始蜉蝣种群,并将最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体的第一编码序列作为目标投资方案,根据第一编码序列中各能源站点对应的实数编码,确定各能源站点的目标能源类型。Specifically, after updating the mayfly individuals in the initial mayfly population with the replaced current mayfly population, determine whether the current number of iterations is greater than the preset number of iterations; if the current number of iterations is not greater than the preset number of iterations, continue the next iteration process; if the current number of iterations is greater than the preset number of iterations, the algorithm iteration process ends, the initial mayfly population in the last iteration process is taken as the final updated initial mayfly population, and the mayfly individuals in the final updated initial mayfly population The first coding sequence of the target mayfly individual corresponding to the lowest fitness value is used as the target investment plan, and the target energy type of each energy site is determined according to the real number codes corresponding to each energy site in the first coding sequence.
需要说明的是,还可以将最终更新后的初始蜉蝣种群中的蜉蝣个体的最低适应度值作为全局最优值,即表示各能源站点的投入评价指标最低。It should be noted that the lowest fitness value of the individual mayfly in the final updated initial mayfly population can also be taken as the global optimum value, which means that the input evaluation index of each energy station is the lowest.
例如,最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体1的第一编码序列[2,3,1,1,2,3,4,1,2]作为目标投资方案,根据第一编码序列中各能源站点对应的实数编码,即编号为1的能源站点对应的实数编码为2,编号为2的能源站点对应的实数编码为3,编号为3的能源站点对应的实数编码为1,编号为4的能源站点对应的实数编码为1,编号为5的能源站点对应的实数编码为2,编号为6的能源站点对应的实数编码为3,编号为7的能源站点对应的实数编码为4,编号为8的能源站点对应的实数编码为1,编号为9的能源站点对应的实数编码为2,从而可以确定编号为1的能源站点的目标能源类型为电能,即在第一个既定区域建设电能源站点;确定编号为2的能源站点的目标能源类型为热能,即在第一个既定区域建设热能源站点;确定编号为3的能源站点的目标能源类型为水能,即在第一个既定区域建设水能源站点;确定编号为4的能源站点的目标能源类型为水能,即在第一个既定区域建设水能源站点;确定编号为5的能源站点的目标能源类型为电能,即在第一个既定区域建设电能源站点;确定编号为6的能源站点的目标能源类型为热能,即在第一个既定区域建设热能源站点;确定编号为7的能源站点的目标能源类型为气能,即在第一个既定区域建设气能源站点;确定编号为8的能源站点的目标能源类型为水能,即在第一个既定区域建设水能源站点;确定编号为9的能源站点的目标能源类型为电能,即在第一个既定区域建设电能源站点。For example, the first coding sequence [2, 3, 1, 1, 2, 3, 4, 1, 2] of the target mayfly individual 1 corresponding to the lowest fitness value of the mayfly individuals in the final updated initial mayfly population is used as the target The investment plan, according to the real number codes corresponding to each energy site in the first coding sequence, that is, the real number code corresponding to the energy site number 1 is 2, the real number code corresponding to the energy site number 2 is 3, and the energy site number 3 corresponds to the real number code 3. The corresponding real number code is 1, the real number code corresponding to the energy station number 4 is 1, the real number code corresponding to the energy station number 5 is 2, the real number code corresponding to the energy station number 6 is 3, and the real number code corresponding to the energy station number 7 is 3. The real number code corresponding to the energy site is 4, the real number code corresponding to the energy site number 8 is 1, and the real number code corresponding to the energy site number 9 is 2, so it can be determined that the target energy type of the energy site number 1 is electric energy , that is, to build an electric energy station in the first predetermined area; determine the target energy type of the energy station numbered 2 as thermal energy, that is, to build a thermal energy station in the first predetermined area; determine the target energy type of the energy station numbered 3 It is hydropower, that is, the construction of a water energy station in the first given area; the target energy type of the energy station numbered 4 is determined to be hydropower, that is, the construction of a water energy station in the first predetermined area; the energy station numbered 5 is determined The target energy type is electric energy, that is, the electric energy station is constructed in the first given area; the target energy type of the energy station numbered 6 is determined to be thermal energy, that is, the thermal energy station is constructed in the first predetermined area; The target energy type of the energy station is gas energy, that is, the gas energy station is built in the first predetermined area; the target energy type of the energy station numbered 8 is determined to be water energy, that is, the water energy station is built in the first predetermined area; determine The target energy type of the energy station numbered 9 is electric energy, that is, the construction of an electric energy station in the first given area.
在考虑了综合能源站点的建设成本和用户对于各种能源的需求程度后,蜉蝣个体1对应的投资策略的适应度值为0.4484,即为全局最优值,各能源站点的投入评价指标最低。After considering the construction cost of the comprehensive energy site and the user's demand for various energy sources, the fitness value of the investment strategy corresponding to the mayfly individual 1 is 0.4484, which is the global optimal value, and the investment evaluation index of each energy site is the lowest.
可选地,上述步骤C的具体实现方式包括以下步骤:Optionally, the specific implementation of the above step C includes the following steps:
步骤1)将各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的适应度值进行排序,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体在所述初始蜉蝣种群中的适应度值排名。Step 1) Rank the fitness values corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively, and determine the fitness of each of the male mayfly individuals and each of the female mayfly individuals in the initial mayfly population value ranking.
具体地,将各雄性蜉蝣个体的适应度值进行排序,确定各雄性蜉蝣个体在初始蜉蝣种群中的适应度值排名;再将各雌性蜉蝣个体的适应度值进行排序,确定各雌性蜉蝣个体在初始蜉蝣种群中的适应度值排名。Specifically, the fitness value of each male mayfly individual is sorted to determine the fitness value ranking of each male mayfly individual in the initial mayfly population; and then the fitness value of each female mayfly individual is sorted to determine the Ranking of fitness values in the initial mayfly population.
步骤2)基于所述适应度值排名,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置。Step 2) Based on the ranking of the fitness values, determine the target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively.
具体地,各雄性蜉蝣个体和各雌性蜉蝣个体在初始蜉蝣种群中的适应度值排名,可以确定各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的目标位置。Specifically, the fitness value ranking of each male mayfly individual and each female mayfly individual in the initial mayfly population can determine the target positions corresponding to each male mayfly individual and each female mayfly individual respectively.
可选地,上述步骤2)的具体实现方式包括:Optionally, the specific implementation of the above step 2) includes:
2-1)针对各所述雄性蜉蝣个体,将所述适应度值排名中排名最高的雄性蜉蝣个体对应的第一编码序列为目标位置。2-1) For each male mayfly individual, take the first coding sequence corresponding to the male mayfly individual with the highest ranking in the fitness value ranking as the target position.
具体地,针对各雄性蜉蝣个体,根据各雄性蜉蝣个体的适应度值排名顺序,将适应度值排名中排名最高的雄性蜉蝣个体对应的第一编码序列作为其他雄性蜉蝣个体的目标位置,而针对排名最高的雄性蜉蝣个体,该雄性蜉蝣个体对应的第一编码序列为该雄性蜉蝣个体的目标位置,且该雄性蜉蝣个体在该目标位置展示舞技。Specifically, for each male mayfly individual, according to the ranking order of the fitness value of each male mayfly individual, the first coding sequence corresponding to the male mayfly individual with the highest ranking in the fitness value ranking is used as the target position of other male mayfly individuals, and for The highest ranked male mayfly individual, the first coding sequence corresponding to the male mayfly individual is the target position of the male mayfly individual, and the male mayfly individual displays dance skills at the target position.
2-2)针对各所述雌性蜉蝣个体,与各所述雌性蜉蝣个体的适应度值排名相同的雄性蜉蝣个体对应的第一编码序列为目标位置。2-2) For each of the female mayfly individuals, the first coding sequence corresponding to the male mayfly individual with the same fitness value ranking of each of the female mayfly individuals is the target position.
具体地,针对各雌性蜉蝣个体,根据各雄性蜉蝣个体的适应度值排名顺序和根据各雌性蜉蝣个体的适应度值排名顺序,与各雌性蜉蝣个体的适应度值排名相同的雄性蜉蝣个体对应的第一编码序列作为各雌性蜉蝣个体的目标位置。Specifically, for each female mayfly individual, according to the ranking order of the fitness value of each male mayfly individual and according to the ranking order of the fitness value of each female mayfly individual, the corresponding male mayfly individual with the same fitness value ranking of each female mayfly individual The first coding sequence serves as the target location for each individual female mayfly.
本发明提供的能源投资策略的确定方法,通过将各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的适应度值进行排序,确定各雄性蜉蝣个体和各雌性蜉蝣个体在初始蜉蝣种群中的适应度值排名,针对各雄性蜉蝣个体,将适应度值排名中排名最高的雄性蜉蝣个体对应的第一编码序列为目标位置,针对各雌性蜉蝣个体,与各雌性蜉蝣个体的适应度值排名相同的雄性蜉蝣个体对应的第一编码序列为目标位置,通过不断迭代优化各蜉蝣个体的适应度值,从而实现各能源站点的能源投资策略,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The method for determining the energy investment strategy provided by the present invention determines the fitness value of each male mayfly individual and each female mayfly individual in the initial mayfly population by sorting the corresponding fitness values of each male mayfly individual and each female mayfly individual. Ranking, for each male mayfly individual, take the first coding sequence corresponding to the male mayfly individual with the highest ranking in the fitness value ranking as the target position, and for each female mayfly individual, the male mayfly whose fitness value ranks the same as that of each female mayfly individual The first coding sequence corresponding to the individual is the target position. By continuously optimizing the fitness value of each mayfly individual, the energy investment strategy of each energy site can be realized, thereby improving the accuracy of the energy investment strategy and reducing the construction cost of each energy site. and carbon emissions from energy use by users.
图2是本发明提供的能源投资策略的确定方法的流程示意图之二,如图2所示,该方法包括步骤201-步骤212,其中:Fig. 2 is the second schematic flowchart of the method for determining an energy investment strategy provided by the present invention. As shown in Fig. 2, the method includes
步骤201,获取目标数据;目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各能源所能产生的碳排放量信息。In
步骤202,对蜉蝣算法中的初始蜉蝣种群中多个蜉蝣个体进行编码。基于建设成本信息和碳排放量信息,对蜉蝣算法所涉及的初始蜉蝣种群中多个蜉蝣个体进行编码,确定多个第一编码序列;第一编码序列用于表示对各所述能源站点分别投资的初始能源类型;初始蜉蝣种群包括多个雄性蜉蝣个体和多个雌性蜉蝣个体。
步骤203,初始化蜉蝣算法的参数。初始化初始蜉蝣种群的大小C,蜉蝣种群中各蜉蝣个体的位置L(即第一编码序列),综合能源系统中建设的能源站点的数量N,最大迭代次数MaxIteration,当前迭代次数Iteration,各蜉蝣个体的初始速度;例如,初始蜉蝣种群中蜉蝣个体数量为60个,各蜉蝣的位置维度为4,最大迭代次数为100次,当前迭代次数为0,各蜉蝣个体的初始速度为0。
步骤204,计算各蜉蝣个体的适应度值。基于各第一编码序列、建设成本信息和碳排放量信息,分别计算各雄性蜉蝣个体和各雌性蜉蝣个体的适应度值;适应度值用于表示各所述能源站点对应的投入评价指标;投入评价指标表示用户在使用能源站点的能源时产生的碳排放量。Step 204: Calculate the fitness value of each individual mayfly. Based on each first coding sequence, construction cost information and carbon emission information, the fitness value of each male mayfly individual and each female mayfly individual is calculated respectively; the fitness value is used to represent the input evaluation index corresponding to each of the energy sites; input The evaluation index represents the carbon emissions generated by the user when using the energy of the energy site.
步骤205,确定各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的目标位置。将各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的适应度值进行排序,确定各雄性蜉蝣个体和各雌性蜉蝣个体在初始蜉蝣种群中的适应度值排名;基于适应度值排名,针对各雄性蜉蝣个体,将适应度值排名中排名最高的雄性蜉蝣个体对应的第一编码序列为目标位置;针对各雌性蜉蝣个体,与各雌性蜉蝣个体的适应度值排名相同的雄性蜉蝣个体对应的第一编码序列为目标位置。Step 205: Determine the target positions corresponding to each male mayfly individual and each female mayfly individual respectively. Rank the respective fitness values of each male mayfly individual and each female mayfly individual to determine the fitness value ranking of each male mayfly individual and each female mayfly individual in the initial mayfly population; Individual, take the first coding sequence corresponding to the male mayfly individual with the highest ranking in the fitness value ranking as the target position; for each female mayfly individual, the first coding sequence corresponding to the male mayfly individual whose fitness value is the same as that of each female mayfly individual The sequence is the target position.
步骤206,更新各蜉蝣个体的位置。基于目标位置,各雄性蜉蝣个体和各雌性蜉蝣个体分别向目标位置移动,得到雄性蜉蝣个体和各雌性蜉蝣个体分别对应的第二编码序列。
步骤207,交叉配对。各雄性蜉蝣个体和各雌性蜉蝣个体分别进行配对,交叉产生多个子代蜉蝣个体;各子代蜉蝣个体的位置分别对应第三编码序列。
步骤208,判断各蜉蝣个体是否越界。基于第二编码序列和所述第三编码序列,判断各蜉蝣个体是否越界。在各蜉蝣个体不存在越界的情况下,计算各蜉蝣个体的适应度值。在各蜉蝣个体存在越界的情况下,对各蜉蝣个体进行调整之后,计算各蜉蝣个体的适应度值。Step 208: Determine whether each individual mayfly crosses the boundary. Based on the second coding sequence and the third coding sequence, determine whether each individual mayfly crosses the boundary. In the case that each individual mayfly does not cross the boundary, the fitness value of each individual mayfly is calculated. In the case that each individual mayfly is out of bounds, after adjusting each individual mayfly, the fitness value of each individual mayfly is calculated.
步骤209,将各蜉蝣个体的所述适应度值进行排序。基于精英策略,将最低适应度值对应的第一目标蜉蝣个体存储至精英池中,精英池包括多个所述第一目标蜉蝣个体。Step 209: Rank the fitness values of each individual mayfly. Based on the elite strategy, the first target mayfly individual corresponding to the lowest fitness value is stored in the elite pool, and the elite pool includes a plurality of the first target mayfly individuals.
步骤210,将精英池中多个第一目标蜉蝣个体中适应度值最低的前M个第一目标蜉蝣个体,替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;根据多个第一目标蜉蝣个体的适应度值,更新初始蜉蝣种群中的蜉蝣个体。
步骤211,判断迭代次数是否大于预设迭代次数(最大迭代次数)。在迭代次数不大于预设迭代次数的情况下,转至步骤203;在迭代次数大于预设迭代次数的情况下,转至步骤212。
步骤212,确定各能源站点的能源投资策略。将最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体的第一编码序列,确定为目标能源类型。基于目标能源类型,确定各能源站点的能源投资策略,即在各能源站点投资建设各能源站点对应的目标能源类型的站点。Step 212: Determine the energy investment strategy of each energy station. The first coding sequence of the target mayfly individual corresponding to the lowest fitness value of the mayfly individuals in the final updated initial mayfly population is determined as the target energy type. Based on the target energy type, determine the energy investment strategy of each energy site, that is, invest in each energy site to build a site of the target energy type corresponding to each energy site.
本发明提供的能源投资策略的确定方法,通过获取目标数据;目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各能源所能产生的碳排放量信息;对蜉蝣算法中的初始蜉蝣种群中多个蜉蝣个体进行编码;初始化蜉蝣算法的参数;计算各蜉蝣个体的适应度值;确定各雄性蜉蝣个体和各雌性蜉蝣个体分别对应的目标位置;更新各蜉蝣个体的位置;各雄性蜉蝣个体和各雌性蜉蝣个体分别进行配对,交叉产生多个子代蜉蝣个体;各子代蜉蝣个体的位置分别对应第三编码序列;判断是否越界,在各蜉蝣个体不存在越界的情况下,计算各蜉蝣个体的适应度值,在各蜉蝣个体存在越界的情况下,对各蜉蝣个体进行调整之后,计算各蜉蝣个体的适应度值;将各蜉蝣个体的所述适应度值进行排序,基于精英策略,将最低适应度值对应的第一目标蜉蝣个体存储至精英池中,精英池包括多个所述第一目标蜉蝣个体,将精英池中多个第一目标蜉蝣个体中适应度值最低的前M个第一目标蜉蝣个体,替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;根据多个第一目标蜉蝣个体的适应度值,更新初始蜉蝣种群中的蜉蝣个体,判断迭代次数是否大于预设迭代次数,在迭代次数不大于预设迭代次数的情况下,继续下一次迭代;在迭代次数大于预设迭代次数的情况下,将最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体的第一编码序列,确定为目标能源类型,从而确定各能源站点的能源投资策略,通过不断迭代优化各蜉蝣个体的适应度值,能够实现各能源站点的能源投资策略,提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The method for determining the energy investment strategy provided by the present invention obtains target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites and information of carbon emissions that can be generated by each energy source; Encoding multiple mayfly individuals in the initial mayfly population; initializing the parameters of the mayfly algorithm; calculating the fitness value of each mayfly individual; determining the target positions corresponding to each male and female mayfly individuals; The male mayfly individual and each female mayfly individual are paired respectively, and the crossover produces multiple progeny mayfly individuals; the positions of each progeny mayfly individual correspond to the third coding sequence respectively; judge whether it is out of bounds. The fitness value of each individual mayfly, in the case that each individual mayfly is out of bounds, after adjusting each individual mayfly, calculate the fitness value of each individual mayfly; sort the fitness value of each individual mayfly, based on the elite The strategy is to store the first target mayfly individual corresponding to the lowest fitness value in the elite pool, the elite pool includes a plurality of the first target mayfly individuals, and store the first target mayfly individual with the lowest fitness value in the elite pool. The first M first target mayfly individuals replace the first M second target mayfly individuals with the highest fitness values in the current mayfly population; update the mayfly individuals in the initial mayfly population according to the fitness values of multiple first target mayfly individuals, Determine whether the number of iterations is greater than the preset number of iterations, and if the number of iterations is not greater than the number of preset iterations, continue to the next iteration; if the number of iterations is greater than the preset number of iterations, the final updated initial mayfly population The first coding sequence of the target mayfly individual corresponding to the lowest fitness value among the mayfly individuals is determined as the target energy type, so as to determine the energy investment strategy of each energy site. The energy investment strategy of the site improves the convergence speed of the mayfly algorithm, thereby improving the accuracy of the energy investment strategy, reducing the construction cost of each energy site and the carbon emissions caused by the use of energy by users.
图3是本发明提供的投入评价指标的对比结果示意图,如图3所示,分别与现有技术中的模拟退火算法和粒子群算法进行100次迭代后的市场环境下的水能、电能、热能、气能等综合能源的最优低碳投资策略评价指标值的对比,图中最上方为模拟退火算法所得的投入评价指标结果,中间曲线为粒子群算法得到的投入评价指标结果,最下方曲线为本发明提供的方法得到的投入评价指标结果。Fig. 3 is a schematic diagram of the comparison result of the input evaluation index provided by the present invention. As shown in Fig. 3, the water energy, electric energy, water energy, electric energy, water energy, electric energy, water energy, water energy, electric energy, water energy, water energy, water energy, water energy, electric energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy, water energy and water energy in the market environment after 100 iterations with the simulated annealing algorithm and the particle swarm algorithm in the prior art are respectively shown in Fig. 3. Comparison of the evaluation index values of the optimal low-carbon investment strategies for comprehensive energy such as thermal energy and gas energy. The top part of the figure is the input evaluation index result obtained by the simulated annealing algorithm, the middle curve is the input evaluation index result obtained by the particle swarm algorithm, and the bottom The curve is the input evaluation index result obtained by the method provided by the present invention.
从图3可以看出,在经过100次迭代运算后,本发明提供的方法最终得到的市场环境下的水能、电能、热能、气能等综合能源最优低碳投资策略的投入评价指标值为0.40,粒子群算法得到的最优低碳投资策略的投入评价指标值为0.47,模拟退火算法得到的最优低碳投资策略的投入评价指标值为0.50,即本发明提供的蜉蝣算法所需的投入量分别比粒子群算法和模拟退火算法在求解投资序列时降低了约14%和20%,说明采用本发明提供的方法得出的市场环境下综合能源投资序列能够有效的平衡能源站点的建设成本和用户对于不同能源带来的碳排放量,降低了建设成本和用户对于不同能源带来的碳排放量。同时,从图3中还可以看出,相比于粒子群算法和模拟退火算法,本发明提供的方法的收敛速度明显更快,且粒子群算法和模拟退火算法在迭代过程中陷入了早熟收敛,并且无法跳出局部最优,得到的投资序列质量较低,不利于实际采用。It can be seen from Figure 3 that after 100 iterations, the method provided by the present invention finally obtains the investment evaluation index value of the optimal low-carbon investment strategy for comprehensive energy such as water energy, electric energy, thermal energy, and gas energy under the market environment. is 0.40, the input evaluation index value of the optimal low-carbon investment strategy obtained by the particle swarm algorithm is 0.47, and the input evaluation index value of the optimal low-carbon investment strategy obtained by the simulated annealing algorithm is 0.50, which is the required value of the mayfly algorithm provided by the present invention. Compared with the particle swarm algorithm and simulated annealing algorithm in solving the investment sequence, the input amount is reduced by about 14% and 20% respectively, indicating that the comprehensive energy investment sequence obtained by the method provided by the present invention under the market environment can effectively balance the energy consumption of the site. Construction costs and users' carbon emissions from different energy sources reduce construction costs and users' carbon emissions from different energy sources. At the same time, it can also be seen from FIG. 3 that, compared with the particle swarm algorithm and the simulated annealing algorithm, the convergence speed of the method provided by the present invention is significantly faster, and the particle swarm algorithm and the simulated annealing algorithm fall into premature convergence in the iterative process , and cannot jump out of the local optimum, and the quality of the obtained investment sequence is low, which is not conducive to practical adoption.
下面对本发明提供的能源投资策略的确定装置进行描述,下文描述的能源投资策略的确定装置与上文描述的能源投资策略的确定方法可相互对应参照。The device for determining an energy investment strategy provided by the present invention is described below. The device for determining an energy investment strategy described below and the method for determining an energy investment strategy described above can be referred to each other correspondingly.
图4是本发明提供的能源投资策略的确定装置的结构示意图,如图4所示,该能源投资策略的确定装置400,包括:获取模块401、第一确定模块402和第二确定模块404;其中,FIG. 4 is a schematic structural diagram of a device for determining an energy investment strategy provided by the present invention. As shown in FIG. 4 , the
获取模块401,用于获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;The
第一确定模块402,用于基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;所述M为正整数;The
第二确定模块404,用于基于所述目标能源类型,确定各所述能源站点的能源投资策略。The second determining module 404 is configured to determine, based on the target energy type, an energy investment strategy for each of the energy sites.
本发明提供的能源投资策略的确定装置,通过获取目标数据;目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;基于建设成本信息和碳排放量信息,采用精英策略和蜉蝣算法确定各能源站点对应的目标能源类型,精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;M为正整数;基于目标能源类型,确定各能源站点的能源投资策略。本发明提供的装置,通过精英策略对蜉蝣算法中下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换,实现了各能源站点的能源投资策略,能够提升蜉蝣算法的收敛速度,从而提升了能源投资策略的精度,降低了各能源站点的建设成本和用户使用能源所能带来的碳排放量。The device for determining an energy investment strategy provided by the present invention obtains target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites and information on carbon emissions that can be generated by each of the energy sources; based on the construction cost Information and carbon emission information, the elite strategy and the mayfly algorithm are used to determine the target energy type corresponding to each energy site, and the elite strategy is used to compare the top M first target mayfly individuals with the lowest fitness value in the elite pool with the mayfly algorithm. The first M second target mayfly individuals with the highest fitness value in the initial mayfly population of a generation iteration are replaced; M is a positive integer; based on the target energy type, the energy investment strategy of each energy site is determined. The device provided by the invention replaces the first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next generation iteration in the mayfly algorithm through the elite strategy, thereby realizing the energy investment strategy of each energy site and improving the mayfly The convergence speed of the algorithm improves the accuracy of the energy investment strategy, reduces the construction cost of each energy site and the carbon emissions caused by the use of energy by users.
可选地,所述第一确定模块402,具体用于:Optionally, the first determining
步骤A:基于所述建设成本信息和所述碳排放量信息,对所述蜉蝣算法所涉及的初始蜉蝣种群中多个蜉蝣个体进行编码,确定多个第一编码序列;所述第一编码序列用于表示对各所述能源站点分别投资的初始能源类型;所述初始蜉蝣种群包括多个雄性蜉蝣个体和多个雌性蜉蝣个体;Step A: Based on the construction cost information and the carbon emission information, encode multiple mayfly individuals in the initial mayfly population involved in the mayfly algorithm, and determine multiple first coding sequences; the first coding sequence Used to represent the initial energy type invested in each of the energy sites; the initial mayfly population includes a plurality of male mayfly individuals and a plurality of female mayfly individuals;
步骤B:基于各所述第一编码序列、所述建设成本信息和所述碳排放量信息,分别计算各所述雄性蜉蝣个体和各所述雌性蜉蝣个体的适应度值;所述适应度值用于表示各所述能源站点对应的投入评价指标;所述投入评价指标表示用户在使用所述能源站点的能源时产生的碳排放量;Step B: Calculate the fitness value of each individual male mayfly and each individual female mayfly based on each of the first coding sequences, the construction cost information and the carbon emission information; the fitness value Used to represent the input evaluation index corresponding to each of the energy sites; the input evaluation index represents the carbon emissions generated by the user when using the energy of the energy site;
步骤C:基于所述适应度值,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置;Step C: Based on the fitness value, determine the target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively;
步骤D:基于所述目标位置,各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别向所述目标位置移动,得到所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的第二编码序列;Step D: Based on the target position, each of the male mayfly individuals and each of the female mayfly individuals move to the target position, respectively, to obtain second coding sequences corresponding to the male mayfly individual and each of the female mayfly individuals respectively ;
步骤E:基于所述第二编码序列,各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别进行配对,交叉产生多个子代蜉蝣个体;各所述子代蜉蝣个体的位置分别对应第三编码序列;Step E: Based on the second coding sequence, each of the male mayfly individuals and each of the female mayfly individuals are paired respectively, and crossed to generate a plurality of progeny mayfly individuals; the positions of each of the progeny mayfly individuals correspond to the third code respectively sequence;
步骤F:在迭代次数不满足预设迭代次数的情况下,基于所述第二编码序列、所述第三编码序列和所述精英策略,更新所述初始蜉蝣种群中的蜉蝣个体;Step F: when the number of iterations does not meet the preset number of iterations, update the mayfly individuals in the initial mayfly population based on the second coding sequence, the third coding sequence and the elite strategy;
步骤G:将更新后的初始蜉蝣种群中的蜉蝣个体对应的第四编码序列作为新的第一编码序列,并迭代执行步骤A-步骤G,直至迭代次数满足预设迭代次数,基于最终更新后的初始蜉蝣种群中的蜉蝣个体对应的第一编码序列,确定各所述能源站点对应的目标能源类型。Step G: take the fourth coding sequence corresponding to the individual mayfly in the updated initial mayfly population as the new first coding sequence, and iteratively execute steps A-step G until the number of iterations meets the preset number of iterations, based on the final updated The first coding sequence corresponding to the individual mayfly in the initial mayfly population determines the target energy type corresponding to each of the energy stations.
可选地,所述第一确定模块402,具体用于:Optionally, the first determining
基于所述第二编码序列和所述第三编码序列,判断各蜉蝣个体是否越界;Based on the second coding sequence and the third coding sequence, determine whether each individual mayfly crosses the boundary;
在各所述蜉蝣个体不存在越界的情况下,计算各蜉蝣个体的适应度值;In the case that each individual mayfly does not cross the boundary, calculate the fitness value of each individual mayfly;
将各所述蜉蝣个体的所述适应度值进行排序;sorting the fitness values of each individual mayfly;
基于精英策略,将最低适应度值对应的第一目标蜉蝣个体存储至精英池中,所述精英池包括多个所述第一目标蜉蝣个体;根据所述多个第一目标蜉蝣个体的适应度值,更新所述初始蜉蝣种群中的蜉蝣个体。Based on the elite strategy, the first target mayfly individual corresponding to the lowest fitness value is stored in the elite pool, and the elite pool includes a plurality of the first target mayfly individuals; according to the fitness of the plurality of first target mayfly individuals value, update the mayfly individuals in the initial mayfly population.
可选地,所述第一确定模块402,具体用于:Optionally, the first determining
将所述精英池中多个所述第一目标蜉蝣个体中适应度值最低的前M个第一目标蜉蝣个体,替换当前蜉蝣种群中适应度值最高的前M个第二目标蜉蝣个体;replacing the top M first target mayfly individuals with the lowest fitness values among the plurality of first target mayfly individuals in the elite pool with the top M second target mayfly individuals with the highest fitness values in the current mayfly population;
将替换后的所述当前蜉蝣种群更新所述初始蜉蝣种群中的蜉蝣个体。The mayfly individuals in the initial mayfly population are updated with the replaced current mayfly population.
可选地,所述第一确定模块402,具体用于:Optionally, the first determining
将最终更新后的初始蜉蝣种群中的蜉蝣个体中最低适应度值对应的目标蜉蝣个体的第一编码序列,确定为所述目标能源类型。The first coding sequence of the target mayfly individual corresponding to the lowest fitness value among the mayfly individuals in the final updated initial mayfly population is determined as the target energy type.
可选地,所述第一确定模块402,具体用于:Optionally, the first determining
将各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的适应度值进行排序,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体在所述初始蜉蝣种群中的适应度值排名;Ranking the fitness values corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively, and determining the fitness value ranking of each of the male mayfly individuals and each of the female mayfly individuals in the initial mayfly population;
基于所述适应度值排名,确定各所述雄性蜉蝣个体和各所述雌性蜉蝣个体分别对应的目标位置。Based on the ranking of the fitness values, target positions corresponding to each of the male mayfly individuals and each of the female mayfly individuals respectively are determined.
可选地,所述第一确定模块402,具体用于:Optionally, the first determining
针对各所述雄性蜉蝣个体,将所述适应度值排名中排名最高的雄性蜉蝣个体对应的第一编码序列为目标位置;For each of the male mayfly individuals, the first coding sequence corresponding to the highest-ranked male mayfly individual in the fitness value ranking is the target position;
针对各所述雌性蜉蝣个体,与各所述雌性蜉蝣个体的适应度值排名相同的雄性蜉蝣个体对应的第一编码序列为目标位置。For each of the female mayfly individuals, the first coding sequence corresponding to the male mayfly individual with the same fitness value ranking of each of the female mayfly individuals is the target position.
图5是本发明提供的一种电子设备的实体结构示意图,如图5所示,该电子设备500可以包括:处理器(processor)510、通信接口(Communications Interface)520、存储器(memory)530和通信总线550,其中,处理器510,通信接口520,存储器530通过通信总线550完成相互间的通信。处理器510可以调用存储器530中的逻辑指令,以执行能源投资策略的确定方法,该方法包括:获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;所述M为正整数;基于所述目标能源类型,确定各所述能源站点的能源投资策略。FIG. 5 is a schematic diagram of the physical structure of an electronic device provided by the present invention. As shown in FIG. 5 , the
此外,上述的存储器530中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the
又一方面,本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各方法提供的能源投资策略的确定方法,该方法包括:获取目标数据;所述目标数据包括多个能源站点分别对应的多种能源的建设成本信息和各所述能源所能产生的碳排放量信息;基于所述建设成本信息和所述碳排放量信息,采用精英策略和蜉蝣算法确定各所述能源站点对应的目标能源类型,所述精英策略用于将精英池中前M个适应度值最低的第一目标蜉蝣个体与所述蜉蝣算法下一代迭代的初始蜉蝣种群中前M个适应度值最高的第二目标蜉蝣个体进行替换;所述M为正整数;基于所述目标能源类型,确定各所述能源站点的能源投资策略。In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it is implemented to execute the method for determining an energy investment strategy provided by the above methods, the The method includes: acquiring target data; the target data includes construction cost information of multiple energy sources corresponding to multiple energy sites and information on carbon emissions that each energy source can produce; based on the construction cost information and the carbon emissions Emission information, using the elite strategy and the mayfly algorithm to determine the target energy type corresponding to each of the energy sites, the elite strategy is used to compare the top M first target mayfly individuals with the lowest fitness values in the elite pool with the mayfly algorithm The first M second target mayfly individuals with the highest fitness values in the initial mayfly population of the next generation iteration are replaced; the M is a positive integer; based on the target energy type, the energy investment strategy of each energy site is determined.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic A disc, an optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211107479.XA CN115187409B (en) | 2022-09-13 | 2022-09-13 | Method, device, electronic device and storage medium for determining energy investment strategy |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211107479.XA CN115187409B (en) | 2022-09-13 | 2022-09-13 | Method, device, electronic device and storage medium for determining energy investment strategy |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115187409A true CN115187409A (en) | 2022-10-14 |
CN115187409B CN115187409B (en) | 2023-01-31 |
Family
ID=83524560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211107479.XA Active CN115187409B (en) | 2022-09-13 | 2022-09-13 | Method, device, electronic device and storage medium for determining energy investment strategy |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115187409B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210175720A1 (en) * | 2019-12-06 | 2021-06-10 | Enel X North America, Inc. | Systems and apparatuses to aggregate distributed energy resources |
CN113128618A (en) * | 2021-05-10 | 2021-07-16 | 江西理工大学 | Parallel spectrum clustering method based on KD tree and chaotic mayfly optimization algorithm |
CN113887973A (en) * | 2021-10-09 | 2022-01-04 | 国网河北省电力有限公司经济技术研究院 | A multi-objective planning method, device and terminal equipment for an integrated energy system |
CN114154744A (en) * | 2021-12-13 | 2022-03-08 | 国网新疆电力有限公司经济技术研究院 | Expansion planning method, device and electronic equipment for integrated energy system |
CN114595961A (en) * | 2022-03-04 | 2022-06-07 | 国能生物发电集团有限公司 | Scheduling method and device for biomass energy multi-energy utilization system |
-
2022
- 2022-09-13 CN CN202211107479.XA patent/CN115187409B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210175720A1 (en) * | 2019-12-06 | 2021-06-10 | Enel X North America, Inc. | Systems and apparatuses to aggregate distributed energy resources |
CN113128618A (en) * | 2021-05-10 | 2021-07-16 | 江西理工大学 | Parallel spectrum clustering method based on KD tree and chaotic mayfly optimization algorithm |
CN113887973A (en) * | 2021-10-09 | 2022-01-04 | 国网河北省电力有限公司经济技术研究院 | A multi-objective planning method, device and terminal equipment for an integrated energy system |
CN114154744A (en) * | 2021-12-13 | 2022-03-08 | 国网新疆电力有限公司经济技术研究院 | Expansion planning method, device and electronic equipment for integrated energy system |
CN114595961A (en) * | 2022-03-04 | 2022-06-07 | 国能生物发电集团有限公司 | Scheduling method and device for biomass energy multi-energy utilization system |
Non-Patent Citations (1)
Title |
---|
石华: "高校区域能源需求预测分析", 《煤气与热力》 * |
Also Published As
Publication number | Publication date |
---|---|
CN115187409B (en) | 2023-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110389819B (en) | Method and system for scheduling calculation intensive batch processing tasks | |
CN107067121A (en) | A kind of improvement grey wolf optimized algorithm based on multiple target | |
CN108805349A (en) | A kind of crop-planting spatial configuration optimal method based on improvement cuckoo algorithm | |
CN103426027B (en) | A kind of intelligence of the normal pool level based on genetic algorithm back propagation neural network model method for optimizing | |
CN101916400A (en) | An ACE Simulation Method of Power Market Using Cooperative Particle Swarm Optimization Algorithm | |
CN110751293B (en) | Cloud manufacturing multi-task scheduling optimization method based on game theory | |
CN111612252A (en) | Automatic location method, device and readable storage medium for large-scale emergency facilities | |
CN113627533B (en) | A method for generating power equipment maintenance decisions based on reinforcement learning | |
CN101908172A (en) | A Hybrid Simulation Method of Power Market Using Multiple Intelligent Agent Algorithms | |
CN115963731B (en) | Command control system network structure optimization method based on improved genetic algorithm | |
CN112836885B (en) | Combined load prediction method, combined load prediction device, electronic equipment and storage medium | |
CN112580259A (en) | Intelligent mine automatic ore blending method and system based on genetic algorithm | |
CN105512755A (en) | Decomposition-based multi-objective distribution estimation optimization method | |
CN111105077B (en) | DG-containing power distribution network reconstruction method based on firefly mutation algorithm | |
CN104392317A (en) | Project scheduling method based on genetic culture gene algorithm | |
CN103279796A (en) | Method for optimizing genetic algorithm evolution quality | |
CN111652413B (en) | Industrial power load prediction method based on multi-Agent distributed mass data processing | |
CN115187409A (en) | Method, device, electronic device and storage medium for determining energy investment strategy | |
CN110880775B (en) | Game model-based frequency-stabilized load shedding strategy optimization method and device | |
CN113705098A (en) | Air duct heater modeling method based on PCA and GA-BP network | |
CN114723217B (en) | Comprehensive energy supply side configuration method and system under carbon neutralization target | |
CN103116805B (en) | A kind of segmentation replacement method upgrading genetic groups | |
CN114565241B (en) | Electric-gas comprehensive energy system scheduling method and device considering carbon cost | |
CN114118805B (en) | A demand response scheduling method for flexible manufacturing workshop based on hierarchical game | |
CN114565242A (en) | An intelligent optimization method and device for site selection of a comprehensive low-carbon energy base |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |