Search

CN-121998209-A - Natural gas pipe network-based conveying path optimization method, system, device and storage medium

CN121998209ACN 121998209 ACN121998209 ACN 121998209ACN-121998209-A

Abstract

The invention provides a natural gas pipe network-based conveying path optimization method, a system, a device and a storage medium, wherein the method comprises the steps of acquiring all natural gas pipeline and station data in a natural gas pipe network database, and preprocessing all the natural gas pipeline and station data; and carrying out path searching and updating operation according to a path planning algorithm, backtracking from the end point to the start point after searching is completed, and generating a shortest path and the corresponding minimum transportation cost and path information thereof. The invention can efficiently search a shortest path from a starting point to a final destination through the appointed intermediate node in the complex natural gas pipe network topological structure, effectively improves the applicability and flexibility of the algorithm and reduces the cost in the natural gas conveying process.

Inventors

  • ZHANG YUANTAO
  • LIU DINGZHI
  • PAN KAI
  • ZHANG XI
  • YU ZHIJIN
  • XIE XIANG
  • GUO JIAYU

Assignees

  • 中国石油天然气股份有限公司

Dates

Publication Date
20260508
Application Date
20241107

Claims (14)

  1. 1. The natural gas pipe network conveying path optimizing method is characterized by comprising the following steps of: acquiring all natural gas pipeline and station data in a natural gas pipeline network database, and preprocessing all natural gas pipeline and station data; based on the preprocessed natural gas pipeline and station data, path planning is carried out from a starting point to an ending point and considering intermediate nodes; and carrying out path searching and updating operation according to a path planning algorithm, and after searching is completed, backtracking from the end point to the start point to generate the shortest path and the minimum transportation cost and path information corresponding to the shortest path.
  2. 2. A method of optimizing a natural gas pipeline network transport path as claimed in claim 1, wherein said preprocessing all natural gas pipeline and station data comprises: The pipe transmission cost from the starting station to each other station is initially set to be positive infinity; a data table is established to store all natural gas pipeline data.
  3. 3. A method of optimizing a delivery path of a natural gas pipeline network as defined in claim 1, wherein said performing a path plan from a start point to an end point and taking into account intermediate nodes comprises: initializing a starting station, setting the pipe transmission cost of a given starting station to be 0, and keeping the pipe transmission cost of other nodes to be positive infinity; According to a preset sequence, constructing an ordered node set by all intermediate nodes and end points which need to pass through in sequence; traversing pipeline data in a natural gas pipeline network, creating a downstream path set corresponding to a starting point node of each pipeline, and adding related information of the corresponding pipeline; and creating a linked list linklist to be accessed to complete intermediate node path planning.
  4. 4. A method for optimizing a delivery path of a natural gas pipeline network according to claim 3, wherein creating a linked list linklist to be accessed, completing intermediate node path planning, further comprises: Setting a Boolean variable for each node; Initializing a linked list linklist of nodes to be accessed; After accessing the nodes in the linked list linklist, the connected non-accessed downstream nodes are added into the linked list linklist to be accessed, and are ordered according to the management cost.
  5. 5. A method of optimizing a natural gas pipeline network transport path as claimed in claim 1, wherein: and performing path searching and updating operations according to the planned path, including ordered path planning and unordered path planning, wherein: Ordered path planning means that the access sequence of intermediate nodes is fixed and known, other nodes may exist between each intermediate node, and the shortest path obtained by searching needs to pass through each intermediate node in turn according to a preset sequence until reaching the end point; unordered path planning means that the access sequence of intermediate nodes is not fixed, the search path does not need to traverse the intermediate nodes according to a preset sequence, and the path search process dynamically decides which intermediate nodes to pass through.
  6. 6. The method for optimizing a conveying path of a natural gas pipeline network according to claim 5, wherein the ordered path planning specifically comprises: Checking whether the selected access node has determined the shortest path, if so, skipping the node, and if not, marking as accessed; traversing all downstream paths of the nodes, calculating the pipe transmission cost to the downstream nodes, and if the current path can reduce the pipe transmission cost of the downstream nodes, updating the cost and recording the preposed nodes; adding the updated downstream node into a linked list to be accessed; Processing the intermediate nodes based on the access linked list until path planning of all the intermediate nodes and the end point is completed; and after the path planning of all the intermediate nodes and the end point is completed, backtracking from the end point to the start point, and generating the shortest path and the minimum transportation cost and path information corresponding to the shortest path.
  7. 7. A method of optimizing a natural gas pipeline network transport path as defined in claim 6, wherein: And checking whether the selected access node has determined the shortest path or not, if yes, skipping the node, and if not, marking as accessed.
  8. 8. The method for optimizing a transmission path of a natural gas pipeline network according to claim 6, wherein the processing the intermediate nodes based on the access linked list until the path planning of all the intermediate nodes and the destination is completed, further comprises: if the accessed node is an intermediate node, locking the transportation cost of the node and clearing the linked list of the node to be accessed currently; Setting an intermediate node as a new starting point, and removing the intermediate node from the ordered node set, wherein the node linked list to be accessed is empty; and (5) re-planning the path until all the intermediate nodes and the end points are processed.
  9. 9. A method of optimizing a natural gas pipeline network transport path as defined in claim 8, wherein: Setting the intermediate node as a new starting point, removing the intermediate node from the ordered node set, specifically, the first value in the ordered node set formed by the intermediate node and the end point, if the ordered node set is empty after the intermediate node is removed, indicating that the end point is found, and ending the searching process.
  10. 10. A method of optimizing a delivery path of a natural gas pipeline network as defined in claim 5, wherein said unordered path planning differs from an ordered path planning primarily by: Unordered path planning, namely, not needing to access intermediate nodes according to a specific sequence, only needing to form a set of all intermediate nodes needing to pass, representing the nodes needing to pass in the path searching process, and removing the nodes from the set when the searched nodes are the intermediate nodes needing to pass; when all intermediate nodes are processed, i.e. the intermediate node set is empty, adding an endpoint to the set to ensure that the endpoint is not reached in advance, resulting in some intermediate nodes not being passed; after all the nodes are processed, if the intermediate node set is empty, the path covers all the necessary nodes after the search is successfully finished, otherwise, the node which does not pass through is indicated, and the shortest path which can pass through all the intermediate nodes and reach the end point does not exist.
  11. 11. The method for optimizing a conveying path of a natural gas pipeline network according to any one of claims 1 to 10, wherein in the whole path planning process, whether a shortest path exists is determined, specifically, the method comprises the following steps: if all the nodes which need to pass through are processed in sequence, the ordered node set is empty, the searching is finished, otherwise, the non-access nodes exist, and the shortest path which passes through all the intermediate nodes in sequence does not exist.
  12. 12. A natural gas network delivery path optimization system, the system comprising: The data acquisition preprocessing module is used for acquiring all the natural gas pipeline and station data in the natural gas pipeline network database and preprocessing all the natural gas pipeline and station data; The path planning module is used for planning the path from the starting point to the end point by taking the intermediate node into consideration according to the preprocessed natural gas pipeline and station data; And the path searching and updating module is used for carrying out path searching and updating operation according to a path planning algorithm, and after searching is completed, backtracking from the end point to the starting point to generate the shortest path and the minimum transportation cost and path information corresponding to the shortest path.
  13. 13. A natural gas network transport path optimization apparatus comprising a memory and a processor, the memory storing a computer program, wherein the computer program, when executed by the processor, causes the processor to perform a natural gas network transport path optimization method according to any one of claims 1 to 11.
  14. 14. A computer storage medium having stored thereon a computer program, which when executed by a processor implements a natural gas network transportation path optimization method according to any one of claims 1 to 11.

Description

Natural gas pipe network-based conveying path optimization method, system, device and storage medium Technical Field The invention belongs to the technical field of natural gas transportation, and particularly relates to a method, a system, a device and a storage medium for optimizing a natural gas pipeline network transportation path. Background Currently, optimization of natural gas delivery paths typically relies on building topological network fabric diagrams for path planning. The natural gas conveying network mainly comprises a gas source, a station, a user, a gas storage, an LNG receiving station and pipelines therebetween. In the prior art, facilities such as a gas source, a station, a user, a gas storage, an LNG receiving station and the like are abstracted as nodes in a graph theory, pipelines connecting the facilities are regarded as edges, and the whole natural gas pipe network is modeled as a topological structure diagram. The shortest conveying path is then solved by applying a correlation algorithm of graph theory. In the prior art, a Dijkstra algorithm is mainly adopted to solve the shortest conveying path. The Dijkstra algorithm is a typical shortest path algorithm in graph theory for calculating the shortest path from one node to another. The method is mainly characterized in that the breadth-first traversal idea is used, and the method is extended outwards layer by taking the starting point as the center until the starting point is extended to the end point. However, dijkstra's algorithm can only solve the shortest path problem between two points, and has a great limitation, and mainly shows that first, important nodes which must pass through are important intermediate nodes which must pass through in the natural gas transportation process, but the conventional Dijkstra's algorithm cannot guarantee that the nodes are contained in the shortest path, so that the conventional Dijkstra's algorithm cannot cope with the problem scene in practice. Secondly, when the sequence of the intermediate nodes is known, the Dijiestra algorithm can be called for a plurality of times, shortest paths are solved for adjacent nodes one by one, and finally all results are combined into a complete shortest path. This method is applicable in the case of fewer intermediate nodes, but when the number of nodes increases and the topology is complex, it significantly increases the computation time and the resource consumption. Third, when the order of the intermediate nodes is unknown, an intuitive method is to perform full arrangement on all the intermediate nodes, sequentially calculate the shortest path between every two adjacent nodes for each possible intermediate node arrangement order, and combine the paths into a complete path. By comparing the full path lengths in all permutations, one of the shortest paths can be found, which is the shortest path that is sought. However, this method is not only computationally intensive, but also significantly increases the solution time and resource consumption. Therefore, how to efficiently and cost effectively select a transport path in a natural gas transport system, especially in the case of involving a plurality of intermediate nodes, is a core problem. The prior art still has limitations in path planning, especially when multiple intermediate nodes are involved, lacking flexibility and efficiency. Disclosure of Invention The invention provides a method, a system, a device and a storage medium for optimizing a conveying path based on a natural gas pipe network aiming at the defects existing in the prior art. On the basis of a topological structure diagram of the natural gas pipe network, a shortest-path related algorithm in a graph theory is combined with actual service demands, and the transmission paths of all resources in the pipe network are matched and optimized. The invention is realized by the following technical scheme: in one aspect of the invention, a method for optimizing a conveying path of a natural gas pipeline network is provided, and the method comprises the following steps: step 1, acquiring all natural gas pipeline and station data in a natural gas pipeline network database, and preprocessing all the natural gas pipeline and station data; step 2, carrying out path planning from a starting point to an end point and considering intermediate nodes based on the preprocessed natural gas pipeline and station data; And 3, carrying out path searching and updating operation according to a path planning algorithm, and after searching is finished, backtracking from the end point to the starting point to generate a shortest path and the corresponding minimum transportation cost and path information. In step 1, all the natural gas pipeline and station data are preprocessed, specifically, the pipeline cost from the starting station to each other station is initially set to be positive infinity, and a data table is established to store all the natural gas pipeline d