An Optimization Method for Energy Management System of Petrochemical Refining Unit

By optimizing the energy management system of petrochemical refining units using an improved moth flame optimization algorithm, the difficulties of local optimization and system parameter setting were solved, resulting in improved energy utilization, reduced costs, and enhanced environmental benefits.

CN115577870BActive Publication Date: 2026-05-26LIAONING UNIVERSITY OF PETROLEUM AND CHEMICAL TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LIAONING UNIVERSITY OF PETROLEUM AND CHEMICAL TECHNOLOGY
Filing Date
2022-09-05
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The optimization of existing energy management systems for oil refining units in petrochemical enterprises faces difficulties in local optimization and system parameter setting, making it difficult to improve energy utilization and reduce costs.

Method used

An improved moth-flame optimization algorithm is adopted, combined with a multi-objective optimization model for petrochemical refining units, including maximizing revenue, minimizing downtime losses, and maximizing environmental benefits. By constructing constraints for boilers, gas turbines, pipeline systems, and refining systems, the energy management system of petrochemical refining units is optimized.

Benefits of technology

It has improved the energy utilization rate of petrochemical enterprises, reduced operating costs, reduced downtime losses, and enhanced environmental benefits, providing petrochemical enterprises with a more efficient energy management solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_5
    Figure QLYQS_5
  • Figure SMS_325
    Figure SMS_325
Patent Text Reader

Abstract

This invention relates to an optimization method for the energy management system of a petrochemical enterprise's oil refining unit; it includes the following construction steps: Step 1, constructing an optimization model of the energy management system of the petrochemical enterprise's oil refining unit; Step 2, constructing an improved moth-flame optimization algorithm; Step 3, collecting basic data of the energy management system of the petrochemical enterprise's oil refining unit; Step 4, solving the optimization model of the energy management system of the petrochemical enterprise's oil refining unit using the constructed improved moth-flame algorithm. The above-constructed optimization method for the energy management system of a petrochemical enterprise's oil refining unit can effectively improve the utilization rate of petrochemical energy, reduce the operating cost of the petrochemical energy system, and ensure sustainable environmental development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an optimization method for the energy management system of a petrochemical enterprise's oil refining unit, and more particularly to an optimization method for the energy management system of a petrochemical enterprise's oil refining unit based on an improved moth flame algorithm. Background Technology

[0002] With global warming, energy conservation and emission reduction are receiving increasing attention. China, a major energy consumer, still faces many serious challenges in this area. Through concerted efforts, China's carbon dioxide emissions per unit of GDP decreased by 3.8% year-on-year in 2021, a 50.3% decrease compared to 2005. The petrochemical industry is a crucial pillar of the national economy. It is a high-input, high-output, high-tech, and high-energy-consuming industry. Petrochemical enterprises have consistently strived to improve energy efficiency, reduce energy consumption, flexibly respond to market competition, and build green, environmentally friendly, and low-carbon world-class energy and chemical enterprises. Upgrading the petrochemical industry through technological innovation, industrial restructuring, information technology development, and the development of a circular economy is of great significance to promoting my country's ecological civilization construction. Constructing a comprehensive energy management system covering refining and chemical enterprises is an effective way to maximize energy efficiency.

[0003] Energy optimization is a core technology in petrochemical enterprise energy management. An optimization model for petrochemical energy systems, aiming at minimizing energy consumption, transportation energy consumption, and production capacity, has been established. Currently, research on petrochemical energy system optimization is relatively limited. Furthermore, intelligent algorithms are effective tools for optimizing energy systems, with particle swarm optimization and genetic algorithms being the main ones. While these algorithms have certain advantages in system optimization, they are difficult to avoid getting trapped in local optimization. In addition, the setting of critical thresholds and system optimization parameters brings difficulties to the practical application of these algorithms. Therefore, effective optimization algorithms should be selected to optimize energy management systems. Summary of the Invention

[0004] This invention addresses the problems existing in the prior art by providing an optimization method for the energy management system of petrochemical refining units based on an improved moth-flame algorithm. This method can effectively improve the utilization rate of petrochemical energy, reduce the operating costs of petrochemical energy systems, and ensure sustainable environmental development.

[0005] The technical solution of the present invention includes the following steps:

[0006] Step 1: Construct an optimization model for the energy management system of petrochemical enterprise refining units.

[0007] Step 1-1: Determine the optimization objectives of the energy management system for petrochemical refinery units.

[0008] Objective function 1: The revenue maximization function for the energy system of a petrochemical enterprise's refining unit, and its corresponding expression is shown below:

[0009] Objective function 1: The revenue maximization function for the energy system of a petrochemical enterprise's refining unit, and its corresponding expression is shown below:

[0010] (1)

[0011] In the formula, This refers to the revenue earned by petrochemical companies from the sale of energy products. This represents the domestic sales revenue of petrochemical companies' energy products. This indicates the energy conservation and emission reduction benefits achieved through energy-saving measures;

[0012] (2)

[0013] In the formula, Indicates time Sales volume of delivered petroleum energy products. Indicates time Sales volume of delivered natural gas energy products Indicates the sales price of petroleum products. Indicates the sales price of natural gas products. Indicates time Energy consumption of Class 3 energy emissions and usage. Indicates the first The price of similar energy sources;

[0014] Economic Costs Calculate using the following formula:

[0015] (3)

[0016] In the formula, This represents the average annual investment cost over the system's lifecycle, primarily including the construction costs of boilers, steam turbines, pipelines, and refining units. It is calculated using the following formula:

[0017] (4)

[0018] In the formula, Indicates the total number of energy types. This indicates the energy system of a petrochemical enterprise's oil refining unit. Unit investment cost of energy-type products This indicates the energy system of a petrochemical enterprise's oil refining unit. Energy unit capacity, This indicates the energy system of a petrochemical enterprise's oil refining unit. Energy allocation quantity; The capital recovery factor is expressed as follows:

[0019] (5)

[0020] In the formula, This indicates the lifecycle of the energy system in a petrochemical enterprise's refining unit. Indicates a fixed annual interest rate;

[0021] The operation and maintenance cost is expressed and calculated using the following formula:

[0022] (6)

[0023] In the formula, Indicates the first The operation and maintenance cost per unit output of this type of energy. Indicates the first Production of energy-related products;

[0024] Fuel costs are expressed and calculated using the following formula:

[0025] (7)

[0026] In the formula, Represents the first time t Fuel costs for energy-like products;

[0027] Objective function 2: The cost function for minimizing downtime losses for petrochemical enterprises, as shown below:

[0028] (8)

[0029] In the formula, This indicates the economic losses caused by the shutdown of petrochemical enterprises. This indicates that the shutdown of petrochemical companies has caused economic losses to customers.

[0030] (9)

[0031] In the formula, This indicates the maintenance costs of petrochemical equipment. Indicates the profit or loss from the shutdown of petrochemical plants;

[0032] Objective function 3: The function for maximizing environmental benefits, as shown below:

[0033] (10)

[0034] In the formula, Indicates domestic energy output, Indicates the standard coal consumption coefficient. The number of standard coal emissions per unit of combustion Number of pollutants.

[0035] Step 1-2: Determine the boundary conditions of the optimization model

[0036] Boiler constraints:

[0037] (11)

[0038] In the formula, This indicates the boiler's heat production capacity over time. This indicates the lower limit of the boiler's heat production capacity. Indicates the upper limit of the boiler's heat output;

[0039] Gas turbine constraints:

[0040] (12)

[0041] In the formula, Indicates the gas turbine in time The running status, Indicates the gas turbine in time heat production capacity, This indicates the lower limit of the heat production capacity of a gas turbine. This indicates the upper limit of the heat production capacity of the gas turbine;

[0042] Pipeline constraints

[0043] (13)

[0044] (14)

[0045] (15)

[0046] (16)

[0047] (17)

[0048] In the formula, Indicates steam network time The switching power, This indicates the lower limit of the steam pipeline network's exchange capacity. Indicates the upper limit of the steam pipeline network's exchange capacity; Indicates water network time The switching power, Indicates the lower limit of the water network's exchange capacity. Indicates the upper limit of the water network's exchange power; Indicates nitrogen pipeline time The switching power, This indicates the lower limit of nitrogen pipeline network exchange power. Indicates the upper limit of nitrogen pipeline network exchange power; Indicates oxygen pipeline time The switching power, This indicates the lower limit of the oxygen pipeline network's exchange capacity. Indicates the upper limit of oxygen pipeline network exchange power; Indicates hydrogen pipeline network time The switching power, This indicates the lower limit of the hydrogen pipeline network's exchange power. This indicates the upper limit of the hydrogen pipeline network's exchange power;

[0049] Constraints of oil refining units:

[0050] (18)

[0051] (19)

[0052] (20)

[0053] (twenty one)

[0054] (twenty two)

[0055] In the formula, This represents the power of the atmospheric and vacuum distillation apparatus during time t. This indicates the lower limit of the power output of the atmospheric and vacuum distillation unit. This indicates the upper limit of the power of the atmospheric and vacuum distillation unit; This represents the power of the catalytic converter at time t. Indicates the lower limit of the catalytic converter's power. Indicates the upper limit of the catalytic converter's power; This represents the power of the hydrogenation unit at time t. This indicates the lower limit of the power output of the hydrogenation unit. Indicates the upper limit of the power output of the hydrogen refueling unit; This represents the power of the coking unit over time t. This indicates the lower limit of the power output of the coking unit. Indicates the upper limit of the power of the coking unit; This represents the power output of the ethylene plant at time t. This indicates the lower limit of the power output of the ethylene plant. Indicates the upper limit of the power output of the ethylene plant;

[0056] Pollution emission constraints:

[0057] (twenty three)

[0058] In the formula, Indicates the first The device Pollutant time Emissions, Indicates the petrochemical enterprise's first Maximum emission limits for various pollutants;

[0059] Petrochemical plant downtime constraints:

[0060] (twenty four)

[0061] In the formula, Indicates the system's first Downtime of a petrochemical unit Indicates the system's first The maximum permissible downtime for each petrochemical unit;

[0062] Step 2: Construct an improved moth-flame optimization algorithm

[0063] Step 2-1: Population initialization. The moth population is represented by a matrix.

[0064] Step 2: Construct an improved moth-flame optimization algorithm, the specific steps of which are as follows:

[0065] Step 2-1: Population initialization. The moth population is represented by a matrix.

[0066] (25)

[0067] In the formula, Indicates the number of moths. Indicates the number of variables;

[0068] For all moths, an array is used to store the corresponding fitness values, as shown in formula (26):

[0069] (26)

[0070] Step 2-2: Update the moth's position, calculated using the following formula:

[0071] (27)

[0072] In the formula, Indicates the distance between the moth and the flame. Indicates the helical coefficient. Represents a random number. The adaptive weights are calculated using the following formula:

[0073] (28)

[0074] In the formula, and Represents a constant;

[0075] Steps 2-3: Calculate the Euclidean distance between each moth and the current global best individual using the following formula:

[0076] (29)

[0077] In the formula, Indicates from the first The Euclidean distance from each individual moth to the current global optimum. Represents the globally optimal individual;

[0078] Then, the mean square Euclidean distance between the moth individual in the current iteration and the globally optimal individual is calculated using the following formula:

[0079] (30)

[0080] Steps 2-4: Determine if the Euclidean distance between each moth and the current global best individual is greater than the mean square Euclidean distance. If so, update the position of the individual moth using the following formula:

[0081] (31)

[0082] In the formula, Indicates expectation as The variance is Poisson random numbers;

[0083] (32)

[0084] (33)

[0085] In the formula, Represents a locally optimal individual;

[0086] Otherwise, a random elimination strategy is implemented for individuals to avoid local optimization, as follows:

[0087] (34)

[0088] In the formula, and Represents a random number that follows a uniform distribution. , , and Represents two random individuals;

[0089] Step 2-5: If the fitness of the individuals generated in Step 2-4 has improved, then continue to Step 2-3; otherwise, use the adaptive jump operation, calculated as follows:

[0090] (35)

[0091] In the formula, represents the Poisson random number, and represents the adaptive jump coefficient, which is calculated as follows:

[0092] (36)

[0093] In the formula, and These are the maximum and minimum adaptive jump coefficients, respectively;

[0094] Steps 2-6: Adaptively reduce the number of flames until only the last optimal flame remains, calculated using the following formula:

[0095] (37)

[0096] In the formula, and They represent the first The number of flames at the next iteration and the maximum number of flames; Indicates the current iteration number. Indicates the maximum number of iterations. Represents the floor function;

[0097] Step 3: Collect basic data from the energy management system of petrochemical enterprises' refining units, including: dynamic data on the refining capacity of the units, the number of petrochemical units, energy load, heat load, and gas load, as well as historical profit data of petrochemical enterprises.

[0098] Step 4: Use the improved moth flame algorithm to solve the optimization model of the energy management system of the petrochemical enterprise's refining unit to obtain the optimal energy management system.

[0099] The advantages and effects of this invention are as follows:

[0100] This invention utilizes an improved moth-flame optimization algorithm to optimize the energy management system of petrochemical refining units. Addressing the multi-objective optimization problem of petrochemical refining unit energy systems, the optimization objectives are maximizing profits, minimizing downtime losses, and maximizing environmental benefits. An optimization model for the petrochemical energy system is established, incorporating constraints related to boilers, gas turbines, pipeline systems, and refining systems. The improved moth-flame optimization algorithm is then introduced into the solution process of this model. The proposed improved moth-flame optimization algorithm achieves better optimization results and higher optimization efficiency for petrochemical energy management systems. This invention effectively improves the economic benefits of petrochemical enterprises, reduces downtime losses, and enhances environmental benefits, providing a strong theoretical basis for optimizing energy management in petrochemical refining units. Attached Figure Description

[0101] Figure 1 Energy load, heat load and gas load variation diagram Detailed Implementation

[0102] Example

[0103] The technical solution of the present invention includes the following steps:

[0104] Step 1: Construct an optimization model for the energy management system of petrochemical enterprise refining units.

[0105] Step 1-1: Determine the optimization objectives of the energy management system for petrochemical refinery units.

[0106] Objective function 1: The revenue maximization function for the energy system of a petrochemical enterprise's refining unit, and its corresponding expression is shown below:

[0107] Objective function 1: The revenue maximization function for the energy system of a petrochemical enterprise's refining unit, and its corresponding expression is shown below:

[0108] (1)

[0109] In the formula, This refers to the revenue earned by petrochemical companies from the sale of energy products. This represents the domestic sales revenue of petrochemical companies' energy products. This indicates the energy conservation and emission reduction benefits achieved through energy-saving measures;

[0110] (2)

[0111] In the formula, Indicates time Sales volume of delivered petroleum energy products. Indicates time Sales volume of delivered natural gas energy products Indicates the sales price of petroleum products. Indicates the sales price of natural gas products. Indicates time Energy consumption of Class 3 energy emissions and usage. Indicates the first The price of similar energy sources;

[0112] Economic Costs Calculate using the following formula:

[0113] (3)

[0114] In the formula, This represents the average annual investment cost over the system's lifecycle, primarily including the construction costs of boilers, steam turbines, pipelines, and refining units. It is calculated using the following formula:

[0115] (4)

[0116] In the formula, Indicates the total number of energy types. This indicates the energy system of a petrochemical enterprise's oil refining unit. Unit investment cost of energy-type products This indicates the energy system of a petrochemical enterprise's oil refining unit. Energy unit capacity, This indicates the energy system of a petrochemical enterprise's oil refining unit. Energy allocation quantity; The capital recovery factor is expressed as follows:

[0117] (5)

[0118] In the formula, This indicates the lifecycle of the energy system in a petrochemical enterprise's refining unit. Indicates a fixed annual interest rate;

[0119] The operation and maintenance cost is expressed and calculated using the following formula:

[0120] (6)

[0121] In the formula, Indicates the first The operation and maintenance cost per unit output of this type of energy. Indicates the first Production of energy-related products;

[0122] Fuel costs are expressed and calculated using the following formula:

[0123] (7)

[0124] In the formula, Represents the first time t Fuel costs for energy-like products;

[0125] Objective function 2: The cost function for minimizing downtime losses for petrochemical enterprises, as shown below:

[0126] (8)

[0127] In the formula, This indicates the economic losses caused by the shutdown of petrochemical enterprises. This indicates that the shutdown of petrochemical companies has caused economic losses to customers.

[0128] (9)

[0129] In the formula, This indicates the maintenance costs of petrochemical equipment. Indicates the profit or loss from the shutdown of petrochemical plants;

[0130] Objective function 3: The function for maximizing environmental benefits, as shown below:

[0131] (10)

[0132] In the formula, Indicates domestic energy output, Indicates the standard coal consumption coefficient. The number of standard coal emissions per unit of combustion Number of pollutants.

[0133] Step 1-2: Determine the boundary conditions of the optimization model

[0134] Boiler constraints:

[0135] (11)

[0136] In the formula, This indicates the boiler's heat production capacity over time. This indicates the lower limit of the boiler's heat production capacity. Indicates the upper limit of the boiler's heat output;

[0137] Gas turbine constraints:

[0138] (12)

[0139] In the formula, Indicates the gas turbine in time The running status, Indicates the gas turbine in time heat production capacity, This indicates the lower limit of the heat production capacity of a gas turbine. This indicates the upper limit of the heat production capacity of the gas turbine;

[0140] Pipeline constraints

[0141] (13)

[0142] (14)

[0143] (15)

[0144] (16)

[0145] (17)

[0146] In the formula, Indicates steam network time The switching power, This indicates the lower limit of the steam pipeline network's exchange capacity. Indicates the upper limit of the steam pipeline network's exchange capacity; Indicates water network time The switching power, Indicates the lower limit of the water network's exchange capacity. Indicates the upper limit of the water network's exchange power; Indicates nitrogen pipeline time The switching power, This indicates the lower limit of nitrogen pipeline network exchange power. Indicates the upper limit of nitrogen pipeline network exchange power; Indicates oxygen pipeline time The switching power, This indicates the lower limit of the oxygen pipeline network's exchange capacity. Indicates the upper limit of oxygen pipeline network exchange power; Indicates hydrogen pipeline network time The switching power, This indicates the lower limit of the hydrogen pipeline network's exchange power. This indicates the upper limit of the hydrogen pipeline network's exchange power;

[0147] Constraints of oil refining units:

[0148] (18)

[0149] (19)

[0150] (20)

[0151] (twenty one)

[0152] (twenty two)

[0153] In the formula, This represents the power of the atmospheric and vacuum distillation apparatus during time t. This indicates the lower limit of the power output of the atmospheric and vacuum distillation unit. This indicates the upper limit of the power of the atmospheric and vacuum distillation unit; This represents the power of the catalytic converter at time t. Indicates the lower limit of the catalytic converter's power. Indicates the upper limit of the catalytic converter's power; This represents the power of the hydrogenation unit at time t. This indicates the lower limit of the power output of the hydrogenation unit. Indicates the upper limit of the power output of the hydrogen refueling unit; This represents the power of the coking unit over time t. This indicates the lower limit of the power output of the coking unit. Indicates the upper limit of the power of the coking unit; This represents the power output of the ethylene plant at time t. This indicates the lower limit of the power output of the ethylene plant. Indicates the upper limit of the power output of the ethylene plant;

[0154] Pollution emission constraints:

[0155] (twenty three)

[0156] In the formula, Indicates the first The device Pollutant time Emissions, Indicates the petrochemical enterprise's first Maximum emission limits for various pollutants;

[0157] Petrochemical plant downtime constraints:

[0158] (twenty four)

[0159] In the formula, Indicates the system's first Downtime of a petrochemical unit Indicates the system's first The maximum permissible downtime for each petrochemical unit;

[0160] Step 2: Construct an improved moth-flame optimization algorithm

[0161] Step 2-1: Population initialization. The moth population is represented by a matrix.

[0162] Step 2: Construct an improved moth-flame optimization algorithm, the specific steps of which are as follows:

[0163] Step 2-1: Population initialization. The moth population is represented by a matrix.

[0164] (25)

[0165] In the formula, Indicates the number of moths. Indicates the number of variables;

[0166] For all moths, an array is used to store the corresponding fitness values, as shown in formula (26):

[0167] (26)

[0168] Step 2-2: Update the moth's position, calculated using the following formula:

[0169] (27)

[0170] In the formula, Indicates the distance between the moth and the flame. Indicates the helical coefficient. Represents a random number. The adaptive weights are calculated using the following formula:

[0171] (28)

[0172] In the formula, and Represents a constant;

[0173] Steps 2-3: Calculate the Euclidean distance between each moth and the current global best individual using the following formula:

[0174] (29)

[0175] In the formula, Indicates from the first The Euclidean distance from each individual moth to the current global optimum. Represents the globally optimal individual;

[0176] Then, the mean square Euclidean distance between the moth individual in the current iteration and the globally optimal individual is calculated using the following formula:

[0177] (30)

[0178] Steps 2-4: Determine if the Euclidean distance between each moth and the current global best individual is greater than the mean square Euclidean distance. If so, update the position of the individual moth using the following formula:

[0179] (31)

[0180] In the formula, Indicates expectation as The variance is Poisson random numbers;

[0181] (32)

[0182] (33)

[0183] In the formula, Represents a locally optimal individual;

[0184] Otherwise, a random elimination strategy is implemented for individuals to avoid local optimization, as follows:

[0185] (34)

[0186] In the formula, and Represents a random number that follows a uniform distribution. , , and Represents two random individuals;

[0187] Step 2-5: If the fitness of the individuals generated in Step 2-4 has improved, then continue to Step 2-3; otherwise, use the adaptive jump operation, calculated as follows:

[0188] (35)

[0189] In the formula, represents the Poisson random number, and represents the adaptive jump coefficient, which is calculated as follows:

[0190] (36)

[0191] In the formula, and These are the maximum and minimum adaptive jump coefficients, respectively;

[0192] Steps 2-6: Adaptively reduce the number of flames until only the last optimal flame remains, calculated using the following formula:

[0193] (37)

[0194] In the formula, and They represent the first The number of flames at the next iteration and the maximum number of flames; Indicates the current iteration number. Indicates the maximum number of iterations. Represents the floor function;

[0195] Step 3: Collect basic data from the energy management system of petrochemical enterprises' refining units, including: dynamic data on the refining capacity of the units, the number of petrochemical units, energy load, heat load, and gas load, as well as historical profit data of petrochemical enterprises.

[0196] Step 4: Use the improved moth flame algorithm to solve the optimization model of the energy management system of the petrochemical enterprise's refining unit to obtain the optimal energy management system.

[0197] Specific examples are shown below:

[0198] In this embodiment, a refinery of a petrochemical company is taken as the research object. This refinery has a refining capacity of tens of millions of tons and includes a total of 55 refining units. The energy load, heat load, and gas load are as follows: Figure 1 As shown.

[0199] The parameters for the moth-flame algorithm are set as follows: maximum number of iterations is 300, and population size is 45. =1, =35, =0.25, =0.85.

[0200] The improved moth-flame algorithm was used to optimize the refinery's energy management system. The benefits of the energy management system before and after optimization are shown in Table 1. As can be seen from Table 1, the petrochemical company's refinery profit was higher after optimization than before, thus the refinery's capacity was increased.

[0201] Table 1. Benefits of the refinery's energy management system before and after optimization (RMB / ton)

[0202]

[0203] After optimizing the moth-flame algorithm, the downtime losses of the refinery's energy management system were obtained. Table 2 shows the downtime losses before and after optimization. As can be seen from Table 2, the downtime losses of the refinery's energy management system after optimization using the improved moth-flame algorithm are less than the downtime losses before optimization.

[0204] Table 2. Downtime losses of the refinery's energy management system before and after optimization (10 3 Yuan)

[0205]

[0206] The environmental benefits of the petrochemical company's refinery were obtained through optimization using the improved moth-flame algorithm, as shown in Table 3. Table 3 shows that the environmental benefits of the refinery after optimization are lower than before. Therefore, the proposed improved moth-flame algorithm can effectively improve environmental benefits, mainly because it has the ability to search for global and local optima when solving the energy management system optimization model.

[0207] Table 3. Environmental benefits of the refinery's energy management system before and after optimization (10 3 Yuan)

[0208]

[0209] Analysis results show that the improved moth flame algorithm has strong advantages in optimizing the energy management system of petrochemical refining units and has broad development prospects.

Claims

1. A method for optimizing the energy management system of a petrochemical enterprise's oil refining unit, characterized in that... Includes the following steps: Step 1: Construct an optimization model for the energy management system of a petrochemical enterprise's refining unit. The optimization objectives are to maximize the profit of the petrochemical energy system, minimize downtime loss costs, and maximize environmental benefits. Determine the boundary conditions of the optimization model: Boiler constraints: (11) In the formula, This indicates the boiler's heat production capacity over time. This indicates the lower limit of the boiler's heat production capacity. Indicates the upper limit of the boiler's heat output; Gas turbine constraints: (12) In the formula, Indicates the gas turbine in time The running status, Indicates the gas turbine in time heat production capacity, This indicates the lower limit of the heat production capacity of a gas turbine. This indicates the upper limit of the heat production capacity of the gas turbine; Pipeline constraints (13) (14) (15) (16) (17) In the formula, Indicates steam network time The switching power, This indicates the lower limit of the steam pipeline network's exchange capacity. Indicates the upper limit of the steam pipeline network's exchange capacity; Indicates water network time The switching power, Indicates the lower limit of the water network's exchange capacity. Indicates the upper limit of the water network's exchange power; Indicates nitrogen pipeline time The switching power, This indicates the lower limit of nitrogen pipeline network exchange power. Indicates the upper limit of nitrogen pipeline network exchange power; Indicates oxygen pipeline time The switching power, This indicates the lower limit of the oxygen pipeline network's exchange capacity. Indicates the upper limit of oxygen pipeline network exchange power; Indicates hydrogen pipeline network time The switching power, This indicates the lower limit of the hydrogen pipeline network's exchange power. This indicates the upper limit of the hydrogen pipeline network's exchange power; Constraints of oil refining units: (18) (19) (20) (21) (22) In the formula, This represents the power of the atmospheric and vacuum distillation apparatus during time t. This indicates the lower limit of the power output of the atmospheric and vacuum distillation unit. This indicates the upper limit of the power of the atmospheric and vacuum distillation unit; This represents the power of the catalytic converter at time t. Indicates the lower limit of the catalytic converter's power. Indicates the upper limit of the catalytic converter's power; This represents the power of the hydrogenation unit at time t. This indicates the lower limit of the power output of the hydrogenation unit. Indicates the upper limit of the power output of the hydrogen refueling unit; This represents the power of the coking unit over time t. This indicates the lower limit of the power output of the coking unit. Indicates the upper limit of the power of the coking unit; This represents the power output of the ethylene plant at time t. This indicates the lower limit of the power output of the ethylene plant. Indicates the upper limit of the power output of the ethylene plant; Pollution emission constraints: (23) In the formula, Indicates the first The device Pollutant time Emissions, Indicates the petrochemical enterprise's first Maximum emission limits for various pollutants; Petrochemical plant downtime constraints: (24) In the formula, Indicates the system's first Downtime of a petrochemical unit Indicates the system's first The maximum permissible downtime for each petrochemical unit; Step 2: Construct an improved moth-flame optimization algorithm, the specific steps of which are as follows: Step 2-1: Population initialization. The moth population is represented by a matrix. (25) In the formula, Indicates the number of moths. Indicates the number of variables; For all moths, an array is used to store the corresponding fitness values, as shown in formula (26): (26) Step 2-2: Update the moth's position, calculated using the following formula: (27) In the formula, Indicates the distance between the moth and the flame. Indicates the helical coefficient. Represents a random number. The adaptive weights are calculated using the following formula: (28) In the formula, and Represents a constant; Steps 2-3: Calculate the Euclidean distance between each moth and the current global best individual using the following formula: (29) In the formula, Indicates from the first The Euclidean distance from each individual moth to the current global optimum. Represents the globally optimal individual; Then, the mean square Euclidean distance between the moth individual in the current iteration and the globally optimal individual is calculated using the following formula: (30) Steps 2-4: Determine if the Euclidean distance between each moth and the current global best individual is greater than the mean square Euclidean distance. If so, update the position of the individual moth using the following formula: (31) In the formula, Indicates expectation as The variance is Poisson random numbers; (32) (33) In the formula, Represents a locally optimal individual; Otherwise, a random elimination strategy is implemented for individuals to avoid local optimization, as follows: (34) In the formula, and Represents a random number that follows a uniform distribution. , , and Represents two random individuals; Step 2-5: If the fitness of the individuals generated in Step 2-4 has improved, then continue to Step 2-3; otherwise, use the adaptive jump operation, calculated as follows: (35) In the formula, represents the Poisson random number, and represents the adaptive jump coefficient, which is calculated as follows: (36) In the formula, and These are the maximum and minimum adaptive jump coefficients, respectively; Steps 2-6: Adaptively reduce the number of flames until only the last optimal flame remains, calculated using the following formula: (37) In the formula, and They represent the first The number of flames at the next iteration and the maximum number of flames; Indicates the current iteration number. Indicates the maximum number of iterations. Represents the floor function; Step 3: Collect basic data from the energy management system of petrochemical enterprises' refining units, including: dynamic data on the refining capacity of the units, the number of petrochemical units, energy load, heat load, and gas load, as well as historical profit data of petrochemical enterprises. Step 4: Use the improved moth flame algorithm to solve the optimization model of the energy management system of the petrochemical enterprise's refining unit to obtain the optimal energy management system.

2. The method for optimizing the energy management system of a petrochemical enterprise refining unit according to claim 1, characterized in that... Determine the optimization objectives for the energy management system of petrochemical refinery units: Objective function 1: The revenue maximization function for the energy system of a petrochemical enterprise's refining unit, and its corresponding expression is shown below: (1) In the formula, This refers to the revenue earned by petrochemical companies from the sale of energy products. This represents the domestic sales revenue of petrochemical companies' energy products. This indicates the energy conservation and emission reduction benefits achieved through energy-saving measures; (2) In the formula, Indicates time Sales volume of delivered petroleum energy products. Indicates time Sales volume of delivered natural gas energy products Indicates the sales price of petroleum products. Indicates the sales price of natural gas products. Indicates time Energy consumption of Class 3 energy emissions and usage. Indicates the first The price of similar energy sources; Economic Costs Calculate using the following formula: (3) In the formula, This represents the average annual investment cost over the system's lifecycle, primarily including the construction costs of boilers, steam turbines, pipelines, and refining units. It is calculated using the following formula: (4) In the formula, Indicates the total number of energy types. This indicates the energy system of a petrochemical enterprise's oil refining unit. Unit investment cost of energy-type products This indicates the energy system of a petrochemical enterprise's oil refining unit. Energy unit capacity, This indicates the energy system of a petrochemical enterprise's oil refining unit. Energy allocation quantity; The capital recovery factor is expressed as follows: (5) In the formula, This indicates the lifecycle of the energy system in a petrochemical enterprise's refining unit. Indicates a fixed annual interest rate; The operation and maintenance cost is expressed and calculated using the following formula: (6) In the formula, Indicates the first The operation and maintenance cost per unit output of this type of energy. Indicates the first Production of energy-related products; Fuel costs are expressed and calculated using the following formula: (7) In the formula, Represents the first time t Fuel costs for energy-like products; Objective function 2: The cost function for minimizing downtime losses for petrochemical enterprises, as shown below: (8) In the formula, This indicates the economic losses caused by the shutdown of petrochemical enterprises. This indicates that the shutdown of petrochemical companies has caused economic losses to customers. (9) In the formula, This indicates the maintenance costs of petrochemical equipment. Indicates the profit or loss from the shutdown of petrochemical plants; Objective function 3: The function for maximizing environmental benefits, as shown below: (10) In the formula, Indicates domestic energy output, Indicates the standard coal consumption coefficient. The number of standard coal emissions per unit of combustion Number of pollutants.

3. The method for optimizing the energy management system of a petrochemical enterprise refining unit according to claim 1, characterized in that, In step 4, the parameters of the moth-flame algorithm are set as follows: maximum number of iterations is 300, and population size is 45. =1, =35, =0.25, =0.85.