Natural gas pipeline network system toughness optimization method, device, equipment and medium
By analyzing and optimizing the model of the historical gas demand data of the natural gas pipeline system, the problem of dealing with the random risk of the natural gas pipeline system is solved, the safety and stability of the system are improved, and suitable for various scales and complexities Pipeline system.
Patent Information
- Application Number
- CN202411418754.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2024-12-31
AI Technical Summary
The prior art is difficult to effectively deal with the random risks in the natural gas pipeline system, resulting in insufficient gas supply or interruption of supply, and lack of reflection of the energy-saving and carbon reduction process. The research conclusions are biased from the actual situation.
By obtaining the user's historical gas demand data, calculating the daily average gas demand ratio, performing data grouping and probability density distribution tests, building a natural gas pipeline system optimization model, including objective functions and constraints, and optimizing the model to calculate under random risk situations Carbon emissions adjust the resilience of the natural gas pipeline system.
It has achieved timely handling of the random risks of natural gas pipeline systems, improved the safety, reliability and stability of the system. It is suitable for natural gas pipeline systems of different sizes and complexities, and is highly forward-looking and practical.
Smart Images

Figure CN119227895A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural gas technology, and in particular to a method, device, equipment and medium for optimizing the resilience of a natural gas pipeline network system. Background Art
[0002] During the operation of the natural gas pipeline network system, there are many random risks caused by system influencing factors, such as fluctuations in user gas demand caused by seasonal changes, market changes and other realistic reasons. In a networked operation environment, once such a situation occurs, if timely measures are not taken, users may face insufficient gas supply or even supply interruption. Most existing studies discuss energy-saving and carbon-reduction measures for pipeline networks from a general perspective, lacking the embodiment of energy-saving and carbon-reduction processes during the operation of natural gas pipeline networks, and the research on random risks of pipeline networks only stays on single-part system components, resulting in a certain deviation between the relevant research conclusions and the actual situation.
[0003] From the above, it can be seen that how to timely deal with the random risks of the natural gas pipeline network system, timely optimize the resilience of the natural gas pipeline network system, and improve the safety, reliability and stability of the natural gas pipeline network system are problems to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for optimizing the resilience of a natural gas pipeline network system, which can timely deal with the random risks of the natural gas pipeline network system, timely optimize the resilience of the natural gas pipeline network system, and improve the safety, reliability and stability of the natural gas pipeline network system. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a method for optimizing resilience of a natural gas pipeline network system, comprising:
[0006] Obtaining historical gas demand data of users, calculating the historical gas demand data to obtain the average daily gas demand of each month, calculating the corresponding average daily gas demand ratio according to the average daily gas demand of each month, performing data grouping and probability density distribution test on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio;
[0007] Setting an initial value and a boundary value of random sampling, randomly sampling the gas demand ratio probability density distribution curve according to the initial value and the boundary value to obtain a ratio value under a random risk situation, and calculating the daily planned gas demand of the user under the random risk situation based on the ratio value and a preset planned gas demand;
[0008] Constructing a natural gas pipeline network system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints, and actual production constraints of gas transmission pipeline sections;
[0009] The daily planned gas demand and the preset basic data of the natural gas pipeline network system are input into the natural gas pipeline network system optimization model to obtain the carbon emissions under random risk conditions, and the resilience of the natural gas pipeline network system is optimized according to the carbon emissions.
[0010] Optionally, the historical gas demand data is calculated to obtain the average daily gas demand of each month, and the corresponding average daily gas demand ratio is calculated according to the average daily gas demand of each month, including:
[0011] The historical gas demand data is calculated using the daily average gas demand calculation formula to obtain the daily average gas demand for each month; the daily average gas demand calculation formula is:
[0012] ;
[0013] Where i is the user serial number, y is the year, m is the month, d is the date, and D is the total number of days in the mth month. is the gas demand of user i on day d of month m of year y, is the average daily gas demand of user i on day d of month m of year y;
[0014] The daily average gas demand ratio calculation formula is used to calculate the corresponding daily average gas demand ratio according to the daily average gas demand of each month; the daily average gas demand ratio calculation formula is:
[0015] ;
[0016] in, is the daily gas demand ratio of user i on day d of month m of year y.
[0017] Optionally, the data grouping and probability density distribution test of the daily average gas demand ratio to obtain a probability density distribution curve of the gas demand ratio includes:
[0018] The daily average gas demand ratio is grouped according to a preset data grouping principle to obtain probability density curve fitting data of the user in each month;
[0019] A probability density distribution test is performed on the probability density curve fitting data of the user in each month to fit the probability density distribution curve of the gas demand ratio of the user in that month.
[0020] Optionally, the setting of the initial value and boundary value of random sampling includes:
[0021] The daily gas demand ratio is calculated using the initial value calculation formula to obtain the initial value of random sampling; the initial value calculation formula is:
[0022] ;
[0023] in, is the initial value of random sampling, i is the user serial number, y is the year, m is the month, d is the date, D is the total number of days in the mth month, is the total number of years selected, is the daily gas demand ratio of user i on day d of month m of year y;
[0024] The boundary values include a random sampling minimum boundary value and a random sampling maximum boundary value; the random sampling minimum boundary value is:
[0025] ;
[0026] The maximum boundary value of random sampling is:
[0027] ;
[0028] Accordingly, the ratio value under random risk conditions must satisfy ;
[0029] in, is the proportion of user i on the dth day of the mth month under random risk.
[0030] Optionally, the objective function is:
[0031] ;
[0032] in, It is the user supply priority weight coefficient, and its value range is [0,1]. is the total number of users in the system, For users The gas supply priority coefficient, For users The actual gas yield under the system random risk, For users The planned gas volume under the system random risk, For users The actual carbon emissions under system stochastic risk, For users The maximum carbon emissions under system stochastic risk, is the total number of gas sources in the pipe network system, For gas source The actual carbon emissions under system stochastic risk, For gas source The maximum carbon emissions under system stochastic risk, is the total number of intermediate stations in the system, For the middle station The actual carbon emissions under system stochastic risk, For the middle station Maximum carbon emissions under systemic stochastic risk.
[0033] Optionally, the gas source mass conservation constraint condition is:
[0034] ;
[0035] in, For gas source The actual gas supply, For gas source The sum of the gas flow rates of all directly connected gas pipeline sections, For gas source The gas pipeline section with the starting point as the starting point;
[0036] The actual production constraints of the gas source are:
[0037] ;
[0038] in, and Gas source The upper and lower limits of gas supply capacity;
[0039] The gas source carbon emission constraint condition is:
[0040] ;
[0041] in, For gas source The actual carbon emissions For gas source The maximum carbon emissions in a single day;
[0042] The user quality conservation constraint is:
[0043] ;
[0044] in, For users The actual gas volume, For users The sum of the gas flow rates of all directly connected gas pipeline sections, For users The gas pipeline section at the end point;
[0045] The actual production constraints of the user are:
[0046] ;
[0047] in, For users Daily planned gas demand;
[0048] The user carbon emission constraint condition is:
[0049] ;
[0050] in, For users The actual carbon emissions For users The maximum carbon emissions in a single day;
[0051] The mass conservation constraint condition of the intermediate station is:
[0052] ;
[0053] in, For the upstream actual entry station The volume of gas, For the station The gas pipeline section at the end point, For the station The actual amount of gas transported downstream, For the station The gas pipeline section with the starting point as the starting point;
[0054] The carbon emission constraints of the intermediate stations are:
[0055] ;
[0056] in, For the middle station The actual carbon emissions under the system stochastic risk scenario, For the middle station Maximum carbon emissions under the system stochastic risk scenario;
[0057] The actual production constraints of the gas pipeline section are:
[0058] ;
[0059] in, For gas pipeline section The actual output, For gas pipeline section Maximum input.
[0060] Optionally, the daily planned gas demand and preset natural gas pipeline network system basic data are input into the natural gas pipeline network system optimization model to obtain carbon emissions under a stochastic risk scenario, including:
[0061] The daily planned gas demand and the preset basic data of the natural gas pipeline network system are input into the natural gas pipeline network system optimization model, and solved in combination with the preset solver to obtain the carbon emissions under the random risk situation; the basic data of the natural gas pipeline network system include gas source node parameters, intermediate station node parameters, gas transmission pipeline section parameters and user node parameters; the solvers include CPLEX solver, FICO Xpress solver, MOSEK solver and Gurobi solver.
[0062] In a second aspect, the present application discloses a natural gas pipeline network system resilience optimization device, comprising:
[0063] A density distribution curve determination module is used to obtain historical gas demand data of users, calculate the historical gas demand data to obtain the average daily gas demand of each month, calculate the corresponding average daily gas demand ratio according to the average daily gas demand of each month, and perform data grouping and probability density distribution test on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio;
[0064] A daily planned gas demand calculation module is used to set an initial value and a boundary value of random sampling, and randomly sample the gas demand ratio probability density distribution curve according to the initial value and the boundary value to obtain a proportion value under a random risk situation, and calculate the daily planned gas demand of the user under a random risk situation based on the proportion value and a preset planned gas demand;
[0065] An optimization model building module is used to build a natural gas pipeline system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints and actual production constraints of gas transmission pipeline sections;
[0066] The resilience optimization module is used to input the daily planned gas demand and the preset basic data of the natural gas pipeline network system into the natural gas pipeline network system optimization model to obtain the carbon emissions under random risk conditions, and optimize the resilience of the natural gas pipeline network system according to the carbon emissions.
[0067] In a third aspect, the present application discloses an electronic device, comprising:
[0068] Memory, used to store computer programs;
[0069] A processor is used to execute the computer program to implement the aforementioned natural gas pipeline network system resilience optimization method.
[0070] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for optimizing the resilience of a natural gas pipeline network system are implemented.
[0071] It can be seen that the present application provides a method for optimizing the resilience of a natural gas pipeline network system, including obtaining historical gas demand data of users, calculating the historical gas demand data to obtain the average daily gas demand of each month, calculating the corresponding average daily gas demand ratio according to the average daily gas demand of each month, performing data grouping and probability density distribution test on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio; setting an initial value and a boundary value for random sampling, randomly sampling the probability density distribution curve of the gas demand ratio according to the initial value and the boundary value to obtain a proportion value under a random risk situation, and calculating the user's risk of gas demand under a random risk situation based on the proportion value and a preset planned gas demand. Daily planned gas demand; constructing a natural gas pipeline system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emissions constraints, user quality conservation constraints, user actual production constraints, user carbon emissions constraints, intermediate station quality conservation constraints, intermediate station carbon emissions constraints and gas pipeline section actual production constraints; inputting the daily planned gas demand and the preset natural gas pipeline system basic data into the natural gas pipeline system optimization model to obtain the carbon emissions under random risk conditions, and optimizing the resilience of the natural gas pipeline system according to the carbon emissions. This application obtains the probability density distribution curve of gas demand ratio by calculating historical gas demand data, grouping data and testing probability density distribution, sets the initial value and boundary value of random sampling, and then performs random sampling on the probability density distribution curve of gas demand ratio to obtain the proportion value under random risk situation, calculates the daily planned gas demand of users under random risk situation, combines complex network theory, probability fitting and random sampling method, so it can be applied to natural gas pipeline network systems of different scales and complexities, has strong universality, constructs a natural gas pipeline network system optimization model including objective function and various constraints, and uses the optimization method of natural gas pipeline network system to optimize the natural gas pipeline network system. The model calculates the carbon emissions under random risk conditions, fully considering the carbon emissions of the natural gas pipeline network system during operation. This application uses the pipeline system optimization model to solve the actual inlet and outlet gas volume and carbon emissions of each system component unit of the pipeline network system. The functional granularity is fine and based on the actual operation of the pipeline network system, it has high practicality. The resilience of the natural gas pipeline network system is optimized according to the carbon emissions of the natural gas pipeline network system during operation, which can provide a reference for the design and improvement of the natural gas pipeline network system, timely optimize the resilience of the natural gas pipeline network system, and improve the operating efficiency, safety, reliability and stability of the natural gas pipeline network system. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0073] Figure 1 A flow chart of a natural gas pipeline network system resilience optimization method disclosed in this application;
[0074] Figure 2 A topological structure diagram of a natural gas pipeline network system disclosed in this application;
[0075] Figure 3 A natural gas pipeline system user probability distribution curve fitting process diagram disclosed in this application;
[0076] Figure 4 A random sampling process diagram of planned gas demand of users in a natural gas pipeline network system disclosed in the present application;
[0077] Figure 5 This is a schematic diagram of the structure of a natural gas pipeline system resilience optimization device disclosed in this application;
[0078] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0080] During the operation of the natural gas pipeline network system, there are many random risks caused by system influencing factors, such as seasonal changes, market changes and other realistic reasons that cause fluctuations in user gas demand. In a networked operation environment, once such a situation occurs, if timely measures are not taken, users may face insufficient gas supply or even supply interruption. Most existing studies discuss energy-saving and carbon-reduction measures for pipeline networks from a general perspective, lacking the embodiment of energy-saving and carbon-reduction processes during the operation of natural gas pipeline networks, and the research on random risks of pipeline networks only stays on single-part system components, resulting in a certain deviation between the relevant research conclusions and the actual situation. As can be seen from the above, how to timely deal with the random risks of the natural gas pipeline network system, timely optimize the resilience of the natural gas pipeline network system, and improve the safety, reliability and stability of the natural gas pipeline network system are issues to be solved in this field.
[0081] See also Figure 1 As shown, the embodiment of the present invention discloses a method for optimizing the resilience of a natural gas pipeline network system, which may specifically include:
[0082] Step S11: Obtain the user's historical gas demand data, calculate the historical gas demand data to obtain the average daily gas demand for each month, calculate the corresponding average daily gas demand ratio based on the average daily gas demand for each month, and perform data grouping and probability density distribution test on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio.
[0083] In this embodiment, the historical gas demand data of the user is obtained, and the historical gas demand data is calculated using the daily average gas demand calculation formula to obtain the daily average gas demand of each month; the daily average gas demand calculation formula is:
[0084] ;
[0085] Where i is the user serial number, y is the year, m is the month, d is the date, and D is the total number of days in the mth month. is the gas demand of user i on day d of month m of year y, is the average daily gas demand of user i on day d of month m of year y;
[0086] The daily average gas demand ratio calculation formula is used to calculate the corresponding daily average gas demand ratio according to the daily average gas demand of each month; the daily average gas demand ratio calculation formula is:
[0087] ;
[0088] in, is the daily gas demand ratio of user i on day d of month m of year y.
[0089] Then, the average daily gas demand ratio is grouped according to a preset data grouping principle to obtain the probability density curve fitting data of the user in each month; a probability density distribution test is performed on the probability density curve fitting data of the user in each month to fit the probability density distribution curve of the user's gas demand ratio in that month.
[0090] In order to optimize the resilience of the natural gas pipeline network system under random risk conditions, the actual overall structure of the natural gas pipeline network system should first be simplified and represented through complex network theory, so as to reduce the complexity of calculations in subsequent optimization, and finally the technical solution of the present application is used to achieve the resilience optimization of the natural gas pipeline network system. In complex network theory, the natural gas pipeline network can be abstracted as a topological structure composed of nodes and edges between nodes. In this topological structure, each node represents a unit node in the pipeline system, such as a gas source node, a user node, an intermediate station node, etc. Each node has different attributes according to its role in the system; the edges between nodes represent a gas pipeline section between the unit nodes of the system, and its function is to realize the flow of natural gas between the nodes.
[0091] The topology of the natural gas pipeline network system is as follows: Figure 2 As shown. After simplifying the overall structure of the pipeline network system, the interconnection relationship between the nodes has become clearer. Next, the characteristics of each system component are described in detail: (1) Gas source node: The gas source node belongs to the upstream link of the natural gas pipeline network system. The sum of its values represents the total amount of natural gas entering the system, that is, the total gas supply of the system. There are many types of gas sources, including domestic gas sources, imported pipeline gas sources, offshore LNG (Liquefied Natural Gas) gas sources and unconventional gas sources; (2) Intermediate station node: The intermediate station node belongs to the midstream link of the natural gas pipeline network system. In the system, it plays the role of connecting the gas source and user nodes together with the gas pipeline segment component; (3) Gas pipeline segment: The gas pipeline segment belongs to the midstream link in the natural gas pipeline network system. It is the medium of the pipeline network system resources. It refers to a section of gas pipeline without an upstream point and a downstream distribution point. Each gas pipeline section is connected to each other to form a long-distance gas pipeline. Each long-distance gas pipeline is interconnected to form a complete gas pipeline network; (4) User node: The user is a subordinate downstream link in the natural gas pipeline network system, representing the total amount of natural gas consumed by the pipeline network system, that is, the total value of all user nodes represents the total demand of the system. User types include civil gas, industrial gas, transportation gas, etc. The detailed parameters involved in each system component are shown in Table 1:
[0092] Table 1
[0093]
[0094] The following explanation is given for the planned gas demand and actual gas volume parameters in the user node component in Table 1: When the pipeline network system is in a random risk situation, the daily gas demand of system users will fluctuate according to different user characteristics, while the daily supply of each gas source in the system is relatively stable due to the annual contract volume limit, and generally does not fluctuate too much. Therefore, the system often has a "supply exceeds demand" situation, that is, the total gas supply of the system is less than the system demand. At this time, the gas consumption of some users in the system will be reduced, that is, the gas consumption of these users cannot be fully met, and the planned gas demand of the users ≠ the actual gas consumption of the users. The different gas consumption characteristics of users lead to the continuous fluctuation of user gas demand, so the gas consumption characteristics of each user need to be characterized separately.
[0095] The specific process of characterizing the gas consumption characteristics of users includes: obtaining historical gas demand data, calculating the average daily gas demand, calculating the average daily gas demand ratio, and fitting the probability density distribution curve of the gas demand ratio. The fitting process of the probability distribution curve of users in the natural gas pipeline system is as follows: Figure 3 As shown in the figure, the process of characterizing the characteristics of users is as follows: (1) Obtain the historical gas demand data of users in recent years, with the time granularity of the data being days; (2) For the historical gas demand of users in each month of the same year, use the daily average gas demand calculation formula to calculate the monthly average daily gas demand of the user in that year and month; (3) Use the daily average gas demand ratio calculation formula and the daily average gas demand of each month to calculate the ratio of the user's daily gas demand in month m of year y to the daily average gas demand in month m of year y; (4) After calculating the daily gas demand ratio of users in each year and month, group the data. The grouping principle is: among all the data of each year, the gas demand ratio data of the same month is classified as A group is used as the probability density curve fitting data of a single user in a single month, and so on, to obtain the probability density curve fitting data of all users in each month; (5) After obtaining the above data, set the alternative probability density distribution, such as normal distribution, gamma distribution, uniform distribution, exponential distribution, etc., and use the KS (Kolmogorov–Smirnov) test to test the degree of fit between the user's single-month probability density curve fitting data and each alternative probability density distribution curve according to different test values. Finally, the curve with the highest degree of fit is selected as the probability density distribution curve of the user's gas demand ratio in that month. The above process can reflect the degree of random fluctuation of user gas demand and the differences in gas consumption characteristics in different months.
[0096] Step S12: Set the initial value and boundary value of random sampling, and randomly sample the gas demand ratio probability density distribution curve according to the initial value and the boundary value to obtain the proportion value under the random risk situation, and calculate the user's daily planned gas demand under the random risk situation based on the proportion value and the preset planned gas demand.
[0097] In this embodiment, the process of setting the initial value and boundary value of random sampling is: using the initial value calculation formula to calculate the daily gas demand ratio to obtain the initial value of random sampling; the initial value calculation formula is:
[0098] ;
[0099] in, is the initial value of random sampling, i is the user serial number, y is the year, m is the month, d is the date, D is the total number of days in the mth month, is the total number of years selected, is the daily gas demand ratio of user i on day d of month m of year y;
[0100] The boundary values include a random sampling minimum boundary value and a random sampling maximum boundary value; the random sampling minimum boundary value is:
[0101] ;
[0102] The maximum boundary value of random sampling is:
[0103] ;
[0104] Accordingly, the ratio value under random risk conditions must satisfy ;
[0105] in, is the proportion of user i on the dth day of the mth month under random risk.
[0106] In this embodiment, the random sampling process of the planned gas demand of users in the natural gas pipeline system is as follows: Figure 4 As shown in the figure, the daily planned gas demand of users under random risk conditions is calculated to reflect the fluctuation of user demand, and then the random risk conditions of the pipeline network system are constructed. The process of calculating the daily planned gas demand is as follows: (1) First, according to the obtained user gas demand ratio probability density distribution curve, the initial value and boundary value of random sampling are set; (2) Random sampling is performed on the gas demand ratio probability density distribution curve through the MH (Metropolis-Hastings) algorithm to obtain the ratio value under random risk conditions, and the extracted ratio value is multiplied by the user's preset planned gas demand to obtain the user's daily planned gas demand under random risk conditions. In addition, if the sampling process is less than 0, the sampling value is modified to 0, which indirectly indicates that the user's daily gas demand is 0; (3) After the random sampling process of all users in the system is carried out to obtain the daily planned gas demand of all users, the random risk construction process of the system is completed, and the random risk is subsequently handled by establishing a pipeline network system optimization model.
[0107] Step S13: Construct a natural gas pipeline system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints and actual production constraints of gas pipeline sections.
[0108] In this embodiment, the objective function is:
[0109] ;
[0110] in, It is the user supply priority weight coefficient, and its value range is [0,1]. is the total number of users in the system, For users The gas supply priority coefficient, For users The actual gas yield under the system random risk, For users The planned gas volume under the system random risk, For users The actual carbon emissions under system stochastic risk, For users The maximum carbon emissions under system stochastic risk, is the total number of gas sources in the pipe network system, For gas source The actual carbon emissions under system stochastic risk, For gas source The maximum carbon emissions under system stochastic risk, is the total number of intermediate stations in the system, For the middle station The actual carbon emissions under system stochastic risk, For the middle station Maximum carbon emissions under systemic stochastic risk;
[0111] The gas source mass conservation constraint condition is:
[0112] ;
[0113] in, For gas source The actual gas supply, For gas source The sum of the gas flow rates of all directly connected gas pipeline sections, For gas source The gas pipeline section with the starting point as the starting point;
[0114] The actual production constraints of the gas source are:
[0115] ;
[0116] in, and Gas source The upper and lower limits of gas supply capacity;
[0117] The gas source carbon emission constraint condition is:
[0118] ;
[0119] in, For gas source The actual carbon emissions For gas source The maximum carbon emissions in a single day;
[0120] The user quality conservation constraint is:
[0121] ;
[0122] in, For users The actual gas volume, For users The sum of the gas flow rates of all directly connected gas pipeline sections, For users The gas pipeline section at the end point;
[0123] The actual production constraints of the user are:
[0124] ;
[0125] in, For users Daily planned gas demand;
[0126] The user carbon emission constraint condition is:
[0127] ;
[0128] in, For users The actual carbon emissions For users The maximum carbon emissions in a single day;
[0129] The mass conservation constraint condition of the intermediate station is:
[0130] ;
[0131] in, For the upstream actual entry station The amount of gas, For the station The gas pipeline section at the end point, For the station The actual amount of gas transported downstream, For the station The gas pipeline section with the starting point as the starting point;
[0132] The carbon emission constraints of the intermediate stations are:
[0133] ;
[0134] in, For the middle station The actual carbon emissions under the system stochastic risk scenario, For the middle station Maximum carbon emissions under the system stochastic risk scenario;
[0135] The actual production constraints of the gas pipeline section are:
[0136] ;
[0137] in, For gas pipeline section The actual output, For gas pipeline section Maximum input.
[0138] In this embodiment, the establishment of the natural gas pipeline network system optimization model can be mainly divided into two parts: objective function and constraint conditions.
[0139] In the first part, the objective function of the model should be set according to actual production practices. It is necessary to minimize the carbon emissions of the system while taking into account the gas needs of users in the pipeline system. The objective function takes into account the different gas supply priorities of each user in the pipeline system, and comprehensively considers the user's gas supply satisfaction and the carbon emissions of system components. It aims to ensure that the actual gas volume of each user reaches the planned gas demand as much as possible while minimizing the carbon emissions of the pipeline system.
[0140] The second part, the meaning of the gas source mass conservation constraint is: The actual gas supply is equal to the gas source The sum of the gas transmission volumes of all directly connected gas pipeline sections;
[0141] The actual production constraints of gas sources mean: The actual gas supply will be automatically calculated by the optimization model according to the system's random risk situation, and the value will fluctuate between the upper and lower limits of its gas supply capacity.
[0142] The meaning of the gas source carbon emission constraint condition is: The actual carbon emissions fluctuate between 0 and the maximum carbon emissions per day. The actual carbon emissions will be automatically calculated by the optimization model based on the system's random risk situation.
[0143] The meaning of the user quality conservation constraint is: The actual gas volume is equal to the user The sum of the gas transmission volumes of all directly connected gas pipeline sections;
[0144] The meaning of the user's actual production constraints is: The actual gas volume will fluctuate between 0 and the planned gas demand for the day. The specific value of the actual gas volume will be automatically calculated by the optimization model based on the system's random risk situation.
[0145] The meaning of the user carbon emission constraint condition is: The actual carbon emissions will fluctuate between 0 and its maximum carbon emissions per day. The specific value of the actual carbon emissions will be automatically calculated by the optimization model based on the system's random risk situation.
[0146] The meaning of the intermediate station mass conservation constraint is: the actual upstream entering the station Gas volume and station The actual amount of gas exported downstream is equal;
[0147] The meaning of the carbon emission constraint condition of the intermediate station is: The actual carbon emissions will fluctuate between 0 and its maximum carbon emissions per day. The specific value of the actual carbon emissions will be automatically calculated by the optimization model based on the system's random risk situation.
[0148] The actual production constraints of the gas pipeline section mean: The actual output will fluctuate between 0 and the upper limit of the output. The actual output will be automatically calculated by the optimization model based on the system's random risk situation.
[0149] Step S14: input the daily planned gas demand and the preset basic data of the natural gas pipeline network system into the natural gas pipeline network system optimization model to obtain the carbon emissions under the random risk situation, and optimize the resilience of the natural gas pipeline network system according to the carbon emissions.
[0150] In this embodiment, the daily planned gas demand and the preset basic data of the natural gas pipeline network system are input into the natural gas pipeline network system optimization model, and are solved in combination with the preset solver to obtain the carbon emissions under the random risk situation, and the resilience of the natural gas pipeline network system is optimized according to the carbon emissions; the basic data of the natural gas pipeline network system include gas source node parameters, intermediate station node parameters, gas transmission pipeline section parameters and user node parameters; the solvers include CPLEX solver, FICO Xpress solver, MOSEK solver and Gurobi solver.
[0151] In this embodiment, after the objective function and constraint conditions of the pipeline system optimization model are set, the daily planned gas demand of the randomly sampled users and the basic data of the natural gas pipeline system can be input into the natural gas pipeline system optimization model for solution. In terms of solving the optimization model, the widely circulated commercial solvers on the market can be used, such as the CPLEX solver, which can be used to solve problems such as linear programming, integer programming, mixed integer programming, and quadratic programming; the FICOXpress solver supports various problems such as linear programming, integer programming, mixed integer programming, quadratic programming, and nonlinear programming; the MOSEK solver can be used to solve problems such as linear, quadratic, and mixed integer programming, and has the advantages of high performance and strong scalability. In addition, in recent years, Gurobi has gradually entered the public eye as a new large-scale mathematical solver, and has become a new leader in the field of optimizers with its extremely fast solution speed and accuracy. Gurobi is now widely used to solve linear programming, integer programming, and mixed integer programming problems.
[0152] By using commercial solvers to solve random risk situations in the pipeline network system, timely handling of risk situations can be achieved, and the optimal solution under random risk situations can be given. At the same time, it takes into account both meeting the gas needs of system users and reducing carbon emissions during system operation, so as to achieve the purpose of optimizing the resilience of the natural gas pipeline network system. This method is based on the overall natural gas pipeline network system, and the research angles cover the upstream, midstream and downstream. It can analyze and optimize pipelines of different sizes at all levels. In the future, it can be used as a practical method for pipeline system operation and maintenance personnel, providing scientific, reasonable, real and effective guidance for the stable and reliable operation of the pipeline network system and the optimization and improvement of resilience.
[0153] The technical effects of the present application are as follows: strong universality. Since most of the random risk scenarios of the natural gas pipeline system have certain similarities, the random risk resilience optimization method of the natural gas pipeline network considering carbon emissions proposed in the present invention is suitable for natural gas pipeline systems of different scales and complexities; high foresight. The present invention fully considers the carbon emissions of the natural gas pipeline system during operation, which is in line with the current trend of "energy conservation and carbon reduction" and "carbon neutrality", keeps pace with the times, and has strong foresight; strong feasibility and practicality. By solving the pipeline system optimization model proposed in the present invention, the actual inlet and outlet gas volume and carbon emissions of each part of the pipeline system can be obtained. The functional granularity is fine and based on the actual operation of the pipeline system, it has high practicality.
[0154] This application can optimize the solution of random risk situations in the natural gas pipeline network system and meet the gas needs of users to the greatest extent, while reducing the carbon emissions of the system and improving the overall resilience of the system. This method combines complex network theory, probability density fitting and random sampling methods, and optimization theory to simulate and deal with random risks of pipeline networks of different sizes based on historical gas demand data of users. It has the advantages of strong universality, high foresight, feasibility and practicality.
[0155] In addition, this application can also be applied to the monitoring, simulation and management of natural gas pipeline network systems. It can simulate and deal with random risks in the pipeline network system, and on this basis provide certain guidance for the formulation of emergency plans for the pipeline network system and post-processing of risk situations. It can also provide a reference for the design and improvement of the natural gas pipeline network system, optimize the topological structure of the pipeline network system, and improve its operating efficiency and safety.
[0156] In this embodiment, the historical gas demand data of the user is obtained, the historical gas demand data is calculated to obtain the average daily gas demand of each month, the corresponding average daily gas demand ratio is calculated according to the average daily gas demand of each month, the average daily gas demand ratio is grouped and the probability density distribution test is performed on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio; the initial value and boundary value of random sampling are set, the probability density distribution curve of the gas demand ratio is randomly sampled according to the initial value and the boundary value to obtain the proportion value under the random risk situation, and the daily planned gas demand of the user under the random risk situation is calculated based on the proportion value and the preset planned gas demand; the package is constructed A natural gas pipeline network system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints and gas pipeline section actual production constraints; the daily planned gas demand and preset natural gas pipeline system basic data are input into the natural gas pipeline network system optimization model to obtain the carbon emissions under random risk conditions, and the resilience of the natural gas pipeline network system is optimized according to the carbon emissions. This application obtains the probability density distribution curve of gas demand ratio by calculating historical gas demand data, grouping data and testing probability density distribution, sets the initial value and boundary value of random sampling, and then performs random sampling on the probability density distribution curve of gas demand ratio to obtain the proportion value under random risk situation, calculates the daily planned gas demand of users under random risk situation, combines complex network theory, probability fitting and random sampling method, so it can be applied to natural gas pipeline network systems of different scales and complexities, has strong universality, constructs a natural gas pipeline network system optimization model including objective function and various constraints, and uses the optimization method of natural gas pipeline network system to optimize the natural gas pipeline network system. The model calculates the carbon emissions under random risk conditions, fully considering the carbon emissions of the natural gas pipeline network system during operation. This application uses the pipeline system optimization model to solve the actual inlet and outlet gas volume and carbon emissions of each system component unit of the pipeline network system. The functional granularity is fine and based on the actual operation of the pipeline network system, it has high practicality. The resilience of the natural gas pipeline network system is optimized according to the carbon emissions of the natural gas pipeline network system during operation, which can provide a reference for the design and improvement of the natural gas pipeline network system, timely optimize the resilience of the natural gas pipeline network system, and improve the operating efficiency, safety, reliability and stability of the natural gas pipeline network system.
[0157] See also Figure 5 As shown, the embodiment of the present invention discloses a natural gas pipeline network system resilience optimization device, which may specifically include:
[0158] The density distribution curve determination module 11 is used to obtain the historical gas demand data of the user, calculate the historical gas demand data to obtain the daily average gas demand of each month, calculate the corresponding daily average gas demand ratio according to the daily average gas demand of each month, and perform data grouping and probability density distribution test on the daily average gas demand ratio to obtain a probability density distribution curve of the gas demand ratio;
[0159] The daily planned gas demand calculation module 12 is used to set the initial value and boundary value of random sampling, randomly sample the gas demand ratio probability density distribution curve according to the initial value and the boundary value to obtain the proportion value under the random risk situation, and calculate the daily planned gas demand of the user under the random risk situation based on the proportion value and the preset planned gas demand;
[0160] The optimization model construction module 13 is used to construct a natural gas pipeline system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints and actual production constraints of gas transmission pipeline sections;
[0161] The resilience optimization module 14 is used to input the daily planned gas demand and the preset basic data of the natural gas pipeline network system into the natural gas pipeline network system optimization model to obtain the carbon emissions under the random risk situation, and optimize the resilience of the natural gas pipeline network system according to the carbon emissions.
[0162] In this embodiment, the historical gas demand data of the user is obtained, the historical gas demand data is calculated to obtain the average daily gas demand of each month, the corresponding average daily gas demand ratio is calculated according to the average daily gas demand of each month, the average daily gas demand ratio is grouped and the probability density distribution test is performed on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio; the initial value and boundary value of random sampling are set, the probability density distribution curve of the gas demand ratio is randomly sampled according to the initial value and the boundary value to obtain the proportion value under the random risk situation, and the daily planned gas demand of the user under the random risk situation is calculated based on the proportion value and the preset planned gas demand; the package is constructed A natural gas pipeline network system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints and gas pipeline section actual production constraints; the daily planned gas demand and preset natural gas pipeline system basic data are input into the natural gas pipeline network system optimization model to obtain the carbon emissions under random risk conditions, and the resilience of the natural gas pipeline network system is optimized according to the carbon emissions. This application obtains the probability density distribution curve of gas demand ratio by calculating historical gas demand data, grouping data and testing probability density distribution, sets the initial value and boundary value of random sampling, and then performs random sampling on the probability density distribution curve of gas demand ratio to obtain the proportion value under random risk situation, calculates the daily planned gas demand of users under random risk situation, combines complex network theory, probability fitting and random sampling method, so it can be applied to natural gas pipeline network systems of different scales and complexities, has strong universality, constructs a natural gas pipeline network system optimization model including objective function and various constraints, and uses the optimization method of natural gas pipeline network system to optimize the natural gas pipeline network system. The model calculates the carbon emissions under random risk conditions, fully considering the carbon emissions of the natural gas pipeline network system during operation. This application uses the pipeline system optimization model to solve the actual inlet and outlet gas volume and carbon emissions of each system component unit of the pipeline network system. The functional granularity is fine and based on the actual operation of the pipeline network system, it has high practicality. The resilience of the natural gas pipeline network system is optimized according to the carbon emissions of the natural gas pipeline network system during operation, which can provide a reference for the design and improvement of the natural gas pipeline network system, timely optimize the resilience of the natural gas pipeline network system, and improve the operating efficiency, safety, reliability and stability of the natural gas pipeline network system.
[0163] In some specific embodiments, the density distribution curve determining module 11 may specifically include:
[0164] The daily average gas demand calculation module is used to calculate the historical gas demand data using the daily average gas demand calculation formula to obtain the daily average gas demand of each month; the daily average gas demand calculation formula is:
[0165] ;
[0166] Where i is the user serial number, y is the year, m is the month, d is the date, and D is the total number of days in the mth month. is the gas demand of user i on day d of month m of year y, is the average daily gas demand of user i on day d of month m of year y;
[0167] The daily average gas demand ratio calculation module is used to calculate the corresponding daily average gas demand ratio according to the daily average gas demand of each month using the daily average gas demand ratio calculation formula; the daily average gas demand ratio calculation formula is:
[0168] ;
[0169] in, is the daily gas demand ratio of user i on day d of month m of year y.
[0170] In some specific embodiments, the density distribution curve determining module 11 may specifically include:
[0171] A data grouping module, used for grouping the daily average gas demand ratio according to a preset data grouping principle to obtain probability density curve fitting data of the user in each month;
[0172] The probability density distribution test module is used to perform a probability density distribution test on the probability density curve fitting data of the user in each month, so as to fit the probability density distribution curve of the gas demand ratio of the user in that month.
[0173] In some specific embodiments, the daily planned gas demand calculation module 12 may specifically include:
[0174] The initial value calculation module is used to calculate the daily gas demand ratio using the initial value calculation formula to obtain the initial value of random sampling; the initial value calculation formula is:
[0175] ;
[0176] in, is the initial value of random sampling, i is the user serial number, y is the year, m is the month, d is the date, D is the total number of days in the mth month, is the total number of years selected, is the daily gas demand ratio of user i on day d of month m of year y;
[0177] The boundary values include a random sampling minimum boundary value and a random sampling maximum boundary value; the random sampling minimum boundary value is:
[0178] ;
[0179] The maximum boundary value of random sampling is:
[0180] ;
[0181] Accordingly, the ratio value under random risk conditions must satisfy ;
[0182] in, is the proportion of user i on the dth day of the mth month under random risk.
[0183] In some specific embodiments, the objective function is:
[0184] ;
[0185] in, It is the user supply priority weight coefficient, and its value range is [0,1]. is the total number of users in the system, For users The gas supply priority coefficient, For users The actual gas yield under the system random risk, For users The planned gas volume under the system random risk, For users The actual carbon emissions under system stochastic risk, For users The maximum carbon emissions under system stochastic risk, is the total number of gas sources in the pipe network system, For gas source The actual carbon emissions under system stochastic risk, For gas source The maximum carbon emissions under system stochastic risk, is the total number of intermediate stations in the system, For the middle station The actual carbon emissions under system stochastic risk, For the middle station Maximum carbon emissions under systemic stochastic risk.
[0186] In some specific embodiments, the gas source mass conservation constraint condition is:
[0187] ;
[0188] in, For gas source The actual gas supply, For gas source The sum of the gas flow rates of all directly connected gas pipeline sections, For gas source The gas pipeline section with the starting point as the starting point;
[0189] The actual production constraints of the gas source are:
[0190] ;
[0191] in, and Gas source The upper and lower limits of gas supply capacity;
[0192] The gas source carbon emission constraint condition is:
[0193] ;
[0194] in, For gas source The actual carbon emissions For gas source The maximum carbon emissions in a single day;
[0195] The user quality conservation constraint is:
[0196] ;
[0197] in, For users The actual gas volume, For users The sum of the gas flow rates of all directly connected gas pipeline sections, For users The gas pipeline section at the end point;
[0198] The actual production constraints of the user are:
[0199] ;
[0200] in, For users Daily planned gas demand;
[0201] The user carbon emission constraint condition is:
[0202] ;
[0203] in, For users The actual carbon emissions For users The maximum carbon emissions in a single day;
[0204] The mass conservation constraint condition of the intermediate station is:
[0205] ;
[0206] in, For the upstream actual entry station The amount of gas, For the station The gas pipeline section at the end point, For the station The actual amount of gas transported downstream, For the station The gas pipeline section with the starting point as the starting point;
[0207] The carbon emission constraints of the intermediate stations are:
[0208] ;
[0209] in, For the middle station The actual carbon emissions under the system stochastic risk scenario, For the middle station Maximum carbon emissions under the system stochastic risk scenario;
[0210] The actual production constraints of the gas pipeline section are:
[0211] ;
[0212] in, For gas pipeline section The actual output, For gas pipeline section Maximum input.
[0213] In some specific embodiments, the toughness optimization module 14 may specifically include:
[0214] The carbon emission determination module is used to input the daily planned gas demand and the preset basic data of the natural gas pipeline network system into the natural gas pipeline network system optimization model, and solve it in combination with the preset solver to obtain the carbon emissions under the random risk situation; the basic data of the natural gas pipeline network system includes gas source node parameters, intermediate station node parameters, gas transmission pipeline section parameters and user node parameters; the solver includes CPLEX solver, FICO Xpress solver, MOSEK solver and Gurobi solver.
[0215] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the natural gas pipeline system resilience optimization method performed by the electronic device disclosed in any of the aforementioned embodiments.
[0216] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0217] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0218] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the natural gas pipeline system resilience optimization method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device and received by the natural gas pipeline system resilience optimization device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0219] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0220] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the natural gas pipeline system resilience optimization method disclosed in any of the aforementioned embodiments are implemented.
[0221] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0222] The above is a detailed introduction to the natural gas pipeline system resilience optimization method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for optimizing the resilience of a natural gas pipeline network system, characterized in that: include: Obtaining historical gas demand data of users, calculating the historical gas demand data to obtain the average daily gas demand of each month, calculating the corresponding average daily gas demand ratio according to the average daily gas demand of each month, performing data grouping and probability density distribution test on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio; Setting an initial value and a boundary value of random sampling, randomly sampling the gas demand ratio probability density distribution curve according to the initial value and the boundary value to obtain a ratio value under a random risk situation, and calculating the daily planned gas demand of the user under the random risk situation based on the ratio value and a preset planned gas demand; Constructing a natural gas pipeline network system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints, and actual production constraints of gas transmission pipeline sections; The daily planned gas demand and the preset basic data of the natural gas pipeline network system are input into the natural gas pipeline network system optimization model to obtain the carbon emissions under random risk conditions, and the resilience of the natural gas pipeline network system is optimized according to the carbon emissions.
2. The natural gas pipeline network system resilience optimization method according to claim 1, characterized in that: The historical gas demand data is calculated to obtain the average daily gas demand of each month, and the corresponding average daily gas demand ratio is calculated according to the average daily gas demand of each month, including: The historical gas demand data is calculated using the daily average gas demand calculation formula to obtain the daily average gas demand for each month; the daily average gas demand calculation formula is: ; Where i is the user serial number, y is the year, m is the month, d is the date, and D is the total number of days in the mth month. is the gas demand of user i on day d of month m of year y, is the average daily gas demand of user i on day d of month m of year y; The daily average gas demand ratio calculation formula is used to calculate the corresponding daily average gas demand ratio according to the daily average gas demand of each month; the daily average gas demand ratio calculation formula is: ; in, is the daily gas demand ratio of user i on day d of month m of year y.
3. The natural gas pipeline network system resilience optimization method according to claim 1, characterized in that: The data grouping and probability density distribution test of the daily average gas demand ratio to obtain a probability density distribution curve of the gas demand ratio includes: The daily average gas demand ratio is grouped according to a preset data grouping principle to obtain probability density curve fitting data of the user in each month; A probability density distribution test is performed on the probability density curve fitting data of the user in each month to fit the probability density distribution curve of the gas demand ratio of the user in that month.
4. The natural gas pipeline network system resilience optimization method according to claim 1, characterized in that: The setting of the initial value and boundary value of random sampling includes: The daily gas demand ratio is calculated using the initial value calculation formula to obtain the initial value of random sampling; the initial value calculation formula is: ; in, is the initial value of random sampling, i is the user serial number, y is the year, m is the month, d is the date, D is the total number of days in the mth month, is the total number of years selected, is the daily gas demand ratio of user i on day d of month m of year y; The boundary values include a random sampling minimum boundary value and a random sampling maximum boundary value; the random sampling minimum boundary value is: ; The maximum boundary value of random sampling is: ; Accordingly, the ratio value under random risk conditions must satisfy ; in, is the proportion of user i on the dth day of the mth month under random risk.
5. The natural gas pipeline network system resilience optimization method according to claim 1, characterized in that: The objective function is: ; in, It is the user supply priority weight coefficient, and its value range is [0,1]. is the total number of users in the system, For users The gas supply priority coefficient, For users The actual gas yield under the system random risk, For users The planned gas volume under the system random risk, For users The actual carbon emissions under system stochastic risk, For users The maximum carbon emissions under system stochastic risk, is the total number of gas sources in the pipe network system, For gas source The actual carbon emissions under system stochastic risk, For gas source The maximum carbon emissions under system stochastic risk, is the total number of intermediate stations in the system, For the middle station The actual carbon emissions under system stochastic risk, For the middle station Maximum carbon emissions under systemic stochastic risk.
6. The natural gas pipeline network system resilience optimization method according to claim 1, characterized in that: The gas source mass conservation constraint condition is: ; in, For gas source The actual gas supply, For gas source The sum of the gas flow rates of all directly connected gas pipeline sections, For gas source The gas pipeline section with the starting point as the The actual production constraints of the gas source are: ; in, and Gas source The upper and lower limits of gas supply capacity; The gas source carbon emission constraint condition is: ; in, For gas source The actual carbon emissions For gas source The maximum carbon emissions in a single day; The user quality conservation constraint is: ; in, For users The actual gas volume, For users The sum of the gas flow rates of all directly connected gas pipeline sections, For users The gas pipeline section at the end point; The actual production constraints of the user are: ; in, For users Daily planned gas demand; The user carbon emission constraint condition is: ; in, For users The actual carbon emissions For users The maximum carbon emissions in a single day; The mass conservation constraint condition of the intermediate station is: ; in, For the upstream actual entry station The volume of gas, For the station The gas pipeline section at the end point, For the station The actual amount of gas transported downstream, For the station The gas pipeline section with the starting point as the The carbon emission constraints of the intermediate stations are: ; in, For the middle station The actual carbon emissions under the system stochastic risk scenario, For the middle station Maximum carbon emissions under the system stochastic risk scenario; The actual production constraints of the gas pipeline section are: ; in, For gas pipeline section The actual output, For gas pipeline section Maximum input.
7. The method for optimizing the resilience of a natural gas pipeline network system according to any one of claims 1 to 6, characterized in that: The inputting of the planned daily gas demand and the preset basic data of the natural gas pipeline network system into the natural gas pipeline network system optimization model to obtain the carbon emissions under the random risk situation includes: The daily planned gas demand and the preset basic data of the natural gas pipeline network system are input into the natural gas pipeline network system optimization model, and solved in combination with the preset solver to obtain the carbon emissions under the random risk situation; the basic data of the natural gas pipeline network system include gas source node parameters, intermediate station node parameters, gas transmission pipeline section parameters and user node parameters; the solvers include CPLEX solver, FICO Xpress solver, MOSEK solver and Gurobi solver.
8. A natural gas pipeline system resilience optimization device, characterized in that: include: A density distribution curve determination module is used to obtain historical gas demand data of users, calculate the historical gas demand data to obtain the average daily gas demand of each month, calculate the corresponding average daily gas demand ratio according to the average daily gas demand of each month, and perform data grouping and probability density distribution test on the average daily gas demand ratio to obtain a probability density distribution curve of the gas demand ratio; A daily planned gas demand calculation module is used to set an initial value and a boundary value of random sampling, and randomly sample the gas demand ratio probability density distribution curve according to the initial value and the boundary value to obtain a proportion value under a random risk situation, and calculate the daily planned gas demand of the user under a random risk situation based on the proportion value and a preset planned gas demand; An optimization model building module is used to build a natural gas pipeline system optimization model including an objective function and various constraints; the constraints include gas source quality conservation constraints, gas source actual production constraints, gas source carbon emission constraints, user quality conservation constraints, user actual production constraints, user carbon emission constraints, intermediate station quality conservation constraints, intermediate station carbon emission constraints and actual production constraints of gas transmission pipeline sections; The resilience optimization module is used to input the daily planned gas demand and the preset basic data of the natural gas pipeline network system into the natural gas pipeline network system optimization model to obtain the carbon emissions under random risk conditions, and optimize the resilience of the natural gas pipeline network system according to the carbon emissions.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, used to execute the computer program to implement the natural gas pipeline network system resilience optimization method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the method for optimizing the resilience of a natural gas pipeline network system as described in any one of claims 1 to 7 is implemented.
