Method and system for generating a natural gas site constraint holding logic topology

CN122965052APending Publication Date: 2026-10-23CHONGQING JINYUYUN ENERGY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611454052.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0006]第三类通过路径枚举或节点拆分保留部分连通关系,但把共用汇管、阀组或调压设备的全部通流能力分别赋给经过它的每一条逻辑边,同一台设备的能力在调度模型中被重复计入,导致调度求解器算出的转输量高于站场实际能够承担的转输量,造成仿真失真,不利于实现精准调度

Benefits of technology

[0032]1.与把站场缩并为单节点或对端口做完全连接的方式相比,本发明从当前工况下的有效有向子图出发搜索实际可行的路径,逻辑边的存在性由物理连通性直接支撑,简化模型中不再出现物理上不成立的端口连通。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965052A_ABST
    Figure CN122965052A_ABST
Patent Text Reader

Abstract

The application discloses a method and system for generating a natural gas station constraint holding logic topology, and belongs to the technical field of natural gas pipeline network digital modeling. The method constructs an effective directed subgraph from station equipment configuration and measured operating state, wherein each physical resource limited by flow capacity is represented as a unique capacity resource edge, and a feasible gas transmission path between boundary ports is searched; resource occupation vectors and pressure transmission signatures of each path are generated according to a current resource index, paths with the same ordered port pair, occupation vector and pressure signature are classified into the same logic path class, and a logic topology and capacity coupling constraints are generated; the maximum transferable capacity of an ordered source-sink combination is compared between a physical layer and a logic layer, when the maximum transferable capacity is inconsistent, an unrepresented resource is added to the index or the occupation coefficient of the unrepresented resource is refined from a physical difference cut, and then the resource is re-vectorized and re-grouped for comparison again; when the maximum transferable capacity is consistent, the logic topology, the capacity coupling constraints and a reverse mapping are output for calling by a simulation or a scheduling solver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of digital modeling and scheduling optimization methods for natural gas pipeline networks, specifically to a method and system for generating constraint-preserving logical topology for natural gas stations. Background Technology

[0002] Simulation and scheduling solutions for natural gas pipeline networks require first converting pipelines, valves, metering equipment, pressure regulating equipment, compression equipment, and internal station connections into a computer-processable network model. For natural gas station scenarios in natural gas pipeline network simulation and scheduling solutions: for simple single-inlet, single-outlet stations, the entire station can be represented by a single node, thus defining its boundary conditions. However, multi-inlet, multi-outlet stations are different: parallel branches, shared manifolds, bypasses, and pressure regulating and boosting equipment exist within the station. Changes in the state of any single device will simultaneously alter port reachability, available flow capacity, and pressure transmission relationships.

[0003] Currently, there are roughly three types of methods for simplifying multiple entry and exit station areas:

[0004] One type still shrinks the station into a single node, thus losing the directional constraints and pressure effects within the station, and the scheduling model cannot distinguish whether gas can actually be transmitted between different ports of the same station.

[0005] Another type establishes a complete connection between all boundary ports, which simplifies the model by creating gas transmission paths that do not physically exist.

[0006] The third type retains some connectivity through path enumeration or node splitting, but assigns the full flow capacity of shared manifolds, valve groups, or pressure regulating equipment to each logical edge passing through it. The capacity of the same equipment is repeatedly counted in the scheduling model, causing the transfer volume calculated by the scheduling solver to be higher than the actual transfer volume that the station can bear, resulting in simulation distortion and hindering the realization of accurate scheduling.

[0007] The three methods described above share a common drawback: the verification scope only extends to "whether ports are reachable"; consistent reachability does not mean that the simplified model retains the physical station's transferability under various boundary partitions, and transferability is precisely the quantity that scheduling solutions truly depend on. If the minimum cut of edge-by-edge capacity is used for verification, since the same physical resource is distributed across multiple logical edges, the cut value will still be repeatedly accumulated, distorting the verification result itself. Furthermore, a further problem arises after verification failure. If two paths have already been classified into the same logical path class under the current resource dimension, judging whether they need to be split based on the same dimension will not yield any new distinguishing information, and the feedback process will fall into an intractable loop.

[0008] Furthermore, the existing technology, document CN114091723B, discloses a method and device for detecting the reliability of natural gas pipeline supply based on cross-entropy theory. This technical solution uses mixed-integer linear programming to calculate the gas supply in any state of the pipeline network, simplifies the compressor station as a booster system and applies flow and pressure constraints; it also simplifies the station area to an overall equivalent. This solution does not retain the capacity coupling relationship of shared resources within the station and the differences in directional connectivity between ports, which is still not conducive to the accurate simulation of multi-entry and multi-outlet stations, thus hindering the realistic simulation and accurate scheduling of natural gas pipeline networks.

[0009] Therefore, it is necessary to consider designing a method and system for generating constrained logical topology for natural gas stations that provides better simulation results and can provide a compact and distortion-free station model for scheduling solutions. Summary of the Invention

[0010] In view of the shortcomings of the prior art, the technical problem to be solved by the present invention is:

[0011] How to provide a method and system for generating a constrained logical topology for natural gas stations that provides better simulation results and can provide a compact and distortion-free station model for scheduling solutions.

[0012] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0013] A method for generating a constraint-preserving logical topology for a natural gas station includes the following steps:

[0014] S1. Construct an effective directed subgraph based on the station equipment configuration and operating status. Each physical resource limited by flow capacity is represented as a unique capacity resource edge. Search for feasible gas transmission paths between boundary ports.

[0015] S2. Generate resource occupancy vectors and pressure transfer signatures for each feasible gas transmission path according to the current resource index. Group feasible gas transmission paths with the same start and end port ordered pairs, resource occupancy vectors and pressure transfer signatures into the same logical path class. Generate logical topology and capacity coupling constraints with boundary ports as nodes and logical path classes as edges.

[0016] S3. For an ordered source-sink combination consisting of a source port set and a sink port set, compare the port reachability and maximum transferability of the efficient directed subgraph and logical topology.

[0017] S4. When the port reachability is inconsistent or the difference in maximum transferability exceeds the capacity tolerance, add the physical resources in the physical difference cut to the resource index or refine their occupancy coefficient, and return to S2; the physical difference cut is the set of physical resources in the minimum cut of the effective directed subgraph that have not yet been correctly represented by the logical topology.

[0018] S5. When the port reachability is consistent and the difference in maximum transferability does not exceed the capacity tolerance, output the logical topology, capacity coupling constraints and reverse mapping to the simulation or scheduling solver. The reverse mapping is the mapping relationship between the logical path class and its member paths and the physical resources they occupy.

[0019] In step S1, the operating status is obtained from the measurement data uploaded by the field instruments at the station through the data acquisition and monitoring control system and aggregated in the data lake, rather than manually entered rated values ​​or nameplate values. The measurement data includes both real-time data such as pressure, instantaneous flow rate, valve position, and equipment operating status, as well as non-real-time data uploaded according to statistical periods, such as daily throughput and pipe inventory. Both types of data are converted to the same metering period before forming the flow capacity vector. When constructing an effective directed subgraph, edges connecting closed valves, unavailable equipment nodes, and edges opposite to the currently allowed direction are deleted.

[0020] In step S2, the elements of the resource occupancy vector can be either binary identifiers or occupancy coefficients of unit logical flow on the corresponding physical resources; the pressure transmission signature is stored separately from the resource occupancy vector, including the pressure application type, parameter range, and allowed direction.

[0021] In step S3, the maximum transferability of the effective directed subgraph is obtained by calculating the maximum flow or minimum cut at the physical layer, while the maximum transferability of the logical topology is obtained by maximizing the sum of logical edge flows from the source port set to the sink port set under capacity coupling constraints. Both quantities take values ​​under the same ordered source-sink combination, and therefore can be directly subtracted for comparison.

[0022] In step S5, the reverse mapping is used for local updates when the device state changes, and for physical device location when scheduling conflicts occur.

[0023] Furthermore, S2 also includes: selecting a pressure constraint template according to the pressure action type in the pressure transmission signature of each logical path class, writing the parameter range and allowed direction in the signature into the selected template, and binding the inlet pressure variable and outlet pressure variable in the template to the start and end ports of the logical path class to obtain the pressure constraint corresponding to the logical path class, which is output together with the logical topology and capacity coupling constraints. The beneficial technical effect of adopting the above further technical solution is that the pressure transmission signature is automatically converted into a pressure constraint that the solver can directly execute after template selection, parameter writing, and port variable binding, and is output together with the logical topology. This eliminates the step of manually adding constraints after the simplified model loses pressure boundaries, and the pressure constraints correspond one-to-one with the logical path classes, which is convenient for verification and maintenance.

[0024] Furthermore, the pressure action types include resistance pressure drop type, pressure regulating type, pressure boosting type, and isobaric transmission type. The resistance pressure drop type template generates a constraint that the outlet pressure is not higher than the inlet pressure and the pressure drop falls within the pressure drop range; the pressure regulating type template generates a constraint that the outlet pressure falls within the set pressure tolerance zone and is not higher than the inlet pressure; the pressure boosting type template generates a constraint that the pressure rise falls within the pressure boosting range or the pressure ratio falls within the pressure ratio range; and the isobaric transmission type template generates a constraint that the absolute value of the difference between the inlet pressure and the outlet pressure does not exceed the isobaric tolerance. The beneficial technical effects of adopting the above-mentioned further technical solution are: the four pressure action types cover the typical process actions of the station, such as the resistance pressure drop of pipe sections and valves, the constant pressure output of pressure regulating equipment, the pressure boosting of compression equipment, and the isobaric transmission of bypass short-circuit connections. All pressure constraints can be generated in a standardized manner with a limited number of templates, avoiding manual modeling of each piece of equipment and reducing the possibility of errors in constraint generation.

[0025] Furthermore, in S1, the physical resource is represented as a unique capacity resource edge, including: splitting the device node corresponding to the physical resource into a resource inlet node and a resource outlet node; establishing a directed edge between them with a capacity equal to the current available flow capacity of the physical resource; and connecting the upstream connection of the original device node to the resource inlet node and the downstream connection to the resource outlet node, so that the same physical resource is counted at most once in any ordered boundary cut. The beneficial technical effect of adopting the above further technical solution is: through node splitting, each constrained physical resource has one and only one capacity resource edge at the physical layer; the maximum flow and minimum cut at the physical layer are measured by resource capacity rather than by the number of adjacent connections; the same physical resource is counted at most once in any ordered boundary cut, providing a correct physical benchmark for verification and differential cut feedback based on the maximum transferable capacity.

[0026] Further, in S1, searching for the feasible gas transmission path includes: traversing the valid directed subgraph from the allowed input boundary port to the allowed output boundary port; deleting candidate paths that repeatedly pass through the same physical resource, violate valve opening / closing states, violate unidirectional equipment directions, cross unavailable equipment, or do not meet series-parallel process rules; and limiting the search scale by at least one of the maximum path length, maximum branch depth, and maximum number of candidate paths for each port ordered pair. The beneficial technical effect of adopting the above further technical solution is that it effectively controls the search scale without introducing physically infeasible paths, enabling the method to complete the path search within an engineering-acceptable time in stations with many parallel branches and bypasses, while balancing the correctness of the model and the feasibility of the calculation.

[0027] Furthermore, in S2, the dimension of the resource occupancy vector corresponds one-to-one with the physical resources in the resource index. The elements of the resource occupancy vector are binary identifiers indicating whether the path occupies the corresponding physical resource, or the occupancy coefficient of the corresponding physical resource per unit logical flow. The pressure transmission signature includes the pressure action type, corresponding parameter range, and allowed direction, which is obtained by combining the pressure action of each device on the path in chronological order, and is stored separately from the resource occupancy vector. The beneficial technical effects of adopting the above-mentioned further technical solutions are as follows: the resource occupancy vector and the resource index dimension strictly correspond, and when adding a new resource dimension, it can be directly re-vectorized. The occupancy matrix corresponds one-to-one with physical resources by row, ensuring the correct generation of shared resource coupling constraints. When the elements are identified by binary values, the computation and storage overhead is minimized. When the occupancy coefficient is used, it can accurately express non-equal occupancy conditions such as diversion, compression, and conversion, taking into account both efficiency and accuracy. Pressure actions are combined according to the order of equipment, retaining the sequence information of process actions, and paths with different action sequences will not be mixed and grouped. The pressure transmission signature and the resource occupancy vector are stored separately, and the resource sharing relationship and the pressure process action do not obscure each other. They independently support the generation of capacity constraints and pressure constraints. When the feedback refinement only updates the occupancy vector, there is no need to regenerate the pressure constraints.

[0028] Further, in S2, the capacity coupling constraint is expressed as the product of the occupancy matrix and the logical edge flow vector not being greater than the current available flow capacity vector of the physical resource. The rows of the occupancy matrix correspond to the physical resources in the resource index, and the columns correspond to the logical edges. The maximum transferable capacity of the effective directed subgraph is obtained by calculating the maximum flow or minimum cut after connecting each port in the source port set to the super source point and each port in the sink port set to the super sink point. The maximum transferable capacity of the logical topology is obtained by maximizing the sum of the logical edge flows from the source port set to the sink port set under the capacity coupling constraint and non-negative flow conditions. For reverse gas transmission, the comparison is performed independently after exchanging the source port set and the sink port set. The beneficial technical effect of adopting the above further technical solution is that all logical edges sharing the same physical resource are uniformly constrained by the same row of the occupancy matrix, and the flow capacity of the same device is only counted once in the scheduling model, fundamentally eliminating the problem that the shared resource capacity is repeatedly counted in the existing edge-by-edge capacity simplification method, resulting in the calculated transfer volume being higher than the actual capacity of the station.

[0029] Furthermore, the execution of S2 stops when any of the following preset termination conditions are met: First termination condition: all allowed ordered source-sink combinations satisfy the port reachability consistency and the difference in maximum transferable capacity does not exceed the capacity tolerance; Second termination condition: there are no physical resources that can be added to the resource index and there are no granular occupancy coefficients; Third termination condition: the preset maximum number of iterations is reached; when the second termination condition or the third termination condition is met but the first termination condition is not met, the non-converged state and the corresponding physical difference cut are output, and the valid directed subgraph is retained as a backoff model. The beneficial technical effects of adopting the above further technical solution are: the feedback process can terminate to a limited extent, and simplified models that fail the verification will not be directly sent to the scheduling solution; even in the case of non-convergence, the difference cut and physical backoff model are output, ensuring that the scheduling side has a usable and undistorted model under any circumstances.

[0030] This invention also provides a system for generating a constraint-preserving logical topology for a natural gas station, comprising a data interface, a memory, and a processor; the data interface is used to acquire station equipment configuration data, measured operating status, flow capacity, and pressure transmission attributes; the memory stores a computer program; when the processor executes the computer program, it implements the above-mentioned method for generating a constraint-preserving logical topology for a natural gas station.

[0031] Compared with the prior art, the method and system for generating the constraint-preserving logic topology of natural gas stations of the present invention have at least the following beneficial technical effects:

[0032] 1. Compared with reducing the station to a single node or making full connections to the ports, the present invention searches for practically feasible paths starting from the effective directed subgraph under the current working conditions. The existence of logical edges is directly supported by physical connectivity, and physically invalid port connections no longer appear in the simplified model.

[0033] 2. Since each constrained physical resource has only one capacity resource edge at the physical layer, and its logical edge is occupied by the same row constraint of the occupancy matrix at the logical layer, the capacity of shared manifolds, valve groups or pressure regulating equipment will not be assigned to multiple logical edges separately, nor will it be repeatedly accumulated in the ordered boundary cut. This is something that the edge-by-edge capacity simplification method cannot do (the same device appears on several logical edges, and the cut value is counted several times).

[0034] 3. By storing pressure transfer signatures and resource occupancy vectors separately, resource sharing relationships and process action types are not obscured: two paths with the same resource vector but different pressure signatures will not be merged, and pressure drop, pressure regulation, pressure boosting, and isobaric transfer can still be distinguished after simplification; at the same time, the signature is not only used as a grouping label, but also directly converted into pressure constraints that can be executed by the solver through template selection, parameter writing, and port variable binding, avoiding the need for manual constraint addition after the simplified model loses pressure boundaries.

[0035] 4. The input to the feedback loop comes from physical difference cuts rather than the original identical resource vectors. Each round adds at least one physical resource dimension or refines the occupancy coefficient of a state. The state does change, so it can terminate in a limited way when the number of representable resources and states is limited. This is fundamentally different from the practice of repeatedly trying to split within the same vector space. The latter does not generate new distinguishing information and therefore has no definite termination condition.

[0036] 5. The capacity vector is derived from field measurement data rather than nameplate ratings, ensuring that the physical layer's maximum transferable capacity reflects the actual transfer volume under current operating conditions. When equipment is de-capacitated, undergoing maintenance, or partially operational, the capacity constraints of the logical model tighten accordingly, preventing a situation where the simplified model allows a transfer volume exceeding the actual capacity of the site. Real-time data and non-real-time data uploaded according to statistical periods are converted to the same metering period upon reading. Therefore, the physical layer's maximum flow and the logical layer's linear programming are valued under the same criteria; the difference between the two represents the deviation inherent in the model simplification itself, without incorporating the inconsistency introduced by the metering period.

[0037] 6. The verification measures the maximum transferability under ordered source-sink combinations, rather than undirected port reachability, so that unidirectional devices and switchable port roles can be handled correctly; when convergence fails, the differential cut and physical backoff model are output, and the simplified model that fails the verification will not be directly sent to the scheduling solution. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the composition and data flow of the natural gas station constraint-preserving logic topology generation system in an embodiment of the present invention;

[0039] Figure 2 This is a flowchart illustrating the method for generating a natural gas station constraint-preserving logic topology in an embodiment of the present invention.

[0040] Figure 3 This is a schematic diagram of the physical resource topology of the desensitized four-port station in an embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram illustrating the mapping between the physical path layer and the port-path logic layer in an embodiment of the present invention;

[0042] Figure 5 This is a schematic diagram illustrating resource index expansion, re-vectorization, and path class refinement in an embodiment of the present invention;

[0043] Figure 6 This is a schematic diagram illustrating the instantiation of capacity resource edges, capacity, and pressure constraints in an embodiment of the present invention;

[0044] Figure 7 This is a schematic diagram of the ordered boundary cut verification and differential resource feedback process in an embodiment of the present invention;

[0045] Figure 8 This is a schematic diagram of the logic topology verification software interface in an embodiment of the present invention;

[0046] Figure 9 This is a schematic diagram of the interface for extracting pipeline network operation status and target stations in an embodiment of the present invention;

[0047] Figure 10 This is a schematic diagram of the target station multi-view linkage and difference cut feedback verification interface in an embodiment of the present invention;

[0048] Figure 11 This is a schematic diagram of the physical topology, pressure constraint generation chain, and feedback convergence results of the six-port desensitized extended station in an embodiment of the present invention.

[0049] The diagram is marked as follows:

[0050] 100. Data interface;

[0051] 101. Station process topology data;

[0052] 102. Equipment status and permissible direction data;

[0053] 103. Flow capacity data;

[0054] 104. Pressure transmission attribute data;

[0055] 110. Data acquisition and monitoring control system;

[0056] 120. Data Lake;

[0057] 200. Valid directed subgraph construction module;

[0058] 300. Boundary Ports and Feasible Paths Module;

[0059] 400. Resource Indexing and Vectorization Module;

[0060] 500. Path equivalence grouping and regrouping module;

[0061] 600. Shared resource and pressure constraint module;

[0062] 700. Reverse Mapping and Model Output Module;

[0063] 800. Ordered boundary cut verification and differential resource feedback module;

[0064] 900. Pipeline operation status and station extraction interface;

[0065] 910. Scene and Layer Control Area;

[0066] 920. Network topology display area;

[0067] 930. Status Summary Area;

[0068] 940. Target station extraction area;

[0069] 1000. Target station multi-view linkage interface;

[0070] 1010. Physics Subgraph View Area;

[0071] 1020. Logical topology view area;

[0072] 1030. Path and Resource Matrix View Area;

[0073] 1040. Ordered boundary cut verification area;

[0074] 1050. Feedback and reverse mapping recording area;

[0075] 1100. Six-port physical topology area;

[0076] 1110. Sign the pressure constraint to the pressure constraint generation area;

[0077] 1120. Feedback convergence record area;

[0078] 2000. Logical topology verification interface;

[0079] 2010. Physical Topology and Operating Condition Input Area;

[0080] 2020. Physical and Logical Topology Canvas Area;

[0081] 2030. Verification Result Area. Detailed Implementation

[0082] The embodiments of the present invention will be further described below with reference to the accompanying drawings. The terms "comprising" and "including" in this technical solution are open-ended and do not exclude the existence of other unlisted elements or steps. The step numbers in this technical solution are for convenience of reference only and do not constitute a limitation on the order of execution of the steps. The steps can be interchanged or executed in parallel without conflict.

[0083] I. Explanation of Terminology and Data Structures

[0084] In this technical solution, "constraint preservation" means that in the process of simplifying the physical topology of a natural gas station (hereinafter referred to as "station") to a logical topology, the flow capacity constraints and pressure constraints of the physical resources are equivalently preserved in the simplified model, so that the port reachability and maximum transferable capacity of the logical topology under any ordered source-sink combination are consistent with the physical station; the logical topology generated accordingly is the constraint-preserved logical topology.

[0085] The station's physical topology is represented as a directed graph, with nodes including boundary port nodes, connection nodes, and equipment nodes, and edges representing permitted connections. Equipment status includes at least one of the following: available, unavailable, under maintenance, bypass, and switching. Permitted flow directions are given by process data or current operating conditions.

[0086] Physical resources refer to equipment or pipe sections that need to maintain capacity, availability, or pressure. For any physical resource with capacity constraints, it is divided into a resource inlet node and a resource outlet node, and a capacity resource edge is established between them. The capacity of this edge is taken as the current available flow capacity of the resource. The capacity of other connection edges that do not constitute bottlenecks can be set to a large number not less than the sum of the capacities of all boundaries of the station.

[0087] Boundary port: This refers to the location on the station boundary that connects to an external pipeline segment. Boundary port data must include at least the port identifier, the external pipeline segment identifier, adjacent resources within the station, the allowed role set, and the boundary pressure range. The allowed role set can contain only inputs, only outputs, or both; the latter corresponds to reversible ports.

[0088] Feasible gas transmission path: A simple directed path from an allowed input port to an allowed output port. Resource index: An ordered set of physical resources or resource state dimensions explicitly included in the constraint maintenance in the current round. In this technical solution, the resource index of the k-th round is denoted as I(k), where k is the feedback round number. The resource occupancy vector has the same length as the resource index; when a path occupies a resource, the corresponding element is 1 or the occupancy coefficient of that path for that resource; otherwise, it is 0.

[0089] The pressure transfer signature and resource occupancy vector are stored separately, consisting of three parts: pressure action type, parameters, and permissible direction. The pressure action type can be one of the following: resistance pressure drop type, pressure regulating type, pressure boosting type, or isobaric transfer type. The parameters are correspondingly selected as the pressure drop range, outlet set pressure and its tolerance, pressure boosting range, or pressure ratio range. The permissible direction records the gas transmission direction in which the pressure action is valid. The pressure actions of each device along the path are combined in chronological order to obtain the pressure transfer signature for that path. Paths with the same resource vector but different pressure signatures are not merged.

[0090] The rows of the occupancy matrix correspond to the physical resources in the resource index, and the columns correspond to the logical edges formed in this round. The element in the j-th row and l-th column represents the unit flow occupancy coefficient of logical edge l for physical resource j. It should be noted that the occupancy matrix described in this technical solution always adopts the direction of "rows as resources, columns as logical edges", and is not represented in its transpose form, so as to avoid dimension misalignment when interfacing with the solver.

[0091] A logical path class is a set of feasible paths that satisfy preset equivalence conditions. Each logical edge stores the member path identifier, resource occupancy vector, pressure transmission signature, and reverse mapping of that class. The reverse mapping refers to the mapping relationship between a logical path class and its member paths and the physical resources they occupy: the member physical paths and the physical resources they occupy can be found from the logical edge, and the logical edge occupying the resource and its member path can be found from the physical resource identifier. The graph formed by boundary ports as nodes and logical path classes as edges constitutes the logical layer of this invention, and the physical topology and its capacity resource edges constitute the physical resource layer. It should be noted that: in this technical solution, "physical layer" is an abbreviation of "physical resource layer"; "logical layer" is an abbreviation of "port-path logical layer", that is, the aforementioned logical layer, and the abbreviation and the full name have the same meaning.

[0092] To avoid ambiguity, the terms related to "cut" in this technical solution are explained uniformly. "Cut" follows the meaning in graph theory, referring to the set of edges that cut off all gas transmission paths between a given set of source ports and a set of sink ports. Minimum cut refers to the cut with the smallest sum of capacities, whose capacity equals the maximum transferable capacity under that ordered source-sink combination. Ordered boundary cut refers to the division of the station boundary according to a set of ordered source and sink port sets and its corresponding cuts. Physical difference cut refers to the set of physical resources in the minimum cut of the physical layer that have not yet been correctly represented by the logical layer when the physical layer and logical layer are inconsistent; it indicates the objects that need to be added to the resource index or have their occupancy coefficients refined in the next round. Capacity tolerance refers to the maximum allowable deviation when determining whether the maximum transferable capacity of the physical layer and the logical layer are consistent; it can be preset according to metering resolution, scheduling step size, or data quality level. Maximum absolute capacity difference refers to the maximum absolute value of the difference between the maximum transferable capacity of the physical layer and the logical layer across all verified ordered source-sink combinations. Port reachability refers to the set of judgment results on whether there is a feasible gas transmission path for all allowed ordered port pairs (source port, sink port) in the station. Since there are unidirectional devices in the station, reachability distinguishes directions. Reachability from source port to sink port does not mean that it is reachable in the reverse direction. The port reachability in this technical solution is consistent, which means that the physical layer and the logic layer have the same judgment on whether each ordered port pair can transmit gas.

[0093] An ordered source-sink combination refers to an ordered binary pair consisting of a source port set and a sink port set. Ports in the source port set have the role of input, and ports in the sink port set have the role of output. The two sets are disjoint. Combinations obtained by exchanging source and sink roles are considered different ordered source-sink combinations.

[0094] II. Regarding the generation of effective directed subgraphs and feasible paths in this technical solution

[0095] See Figure 1 and Figure 2 The pressure transmitters, flow meters, valve position feedback, and equipment operating status signals at the station site are collected and uploaded by the data acquisition and monitoring control system 110, and aggregated in the data lake 120 according to station identifier, equipment identifier, and time scale. The data interface 100 reads the station process topology data 101, equipment status and permissible direction data 102, flow capacity data 103, and pressure transmission attribute data 104 from the data lake 120. The effective directed subgraph construction module 200 deletes the edges connected to closed valves, unavailable equipment nodes, and edges opposite to the current permissible direction, and performs node splitting on physical resources with capacity limitations.

[0096] It should be noted that data 102 and 103 are based on on-site measurement data and the calculated current available current capacity, not the rated capacity on the equipment nameplate. For example, a voltage regulator undergoing maintenance and de-capacity operation may have the same nameplate capacity, but its available current capacity has decreased. The capacity on the capacity resource side should be the former (nameplate value), as the maximum physical transferable capacity is the actual transfer volume that can be handled under the current operating conditions. It is only meaningful to use this as a verification benchmark in the future. If the nameplate value is used, the verified logical model will only be consistent with another distorted model, and no amount of feedback refinement can correct this deviation.

[0097] Data lake 120 plays a crucial role in data aggregation and conversion between data acquisition and monitoring control system 110 and this method; this step is indispensable. The data uploaded from the station is not at the same temporal granularity: pressure, instantaneous flow, valve position, and equipment operating status are real-time data updated according to operating conditions, while quantities such as daily throughput and pipe inventory are uploaded according to statistical periods and are considered non-real-time data. If both types of data are directly filled into the same flow capacity vector, the various components of the vector actually correspond to different lengths of measurement intervals. The logical maximum transferable capacity calculated from this vector is not on the same scale as the physical maximum transferable capacity. The difference between the two includes deviations caused by model simplification and deviations caused by inconsistent measurement periods. This discrepancy fails to accurately identify the truly missing physical resources. Therefore, data interface 100 performs two tasks during reading: firstly, conversion: integrating or averaging real-time data over a selected measurement period, and expanding non-real-time data according to its statistical period, ensuring all components fall within the same measurement period. Secondly, alignment: values ​​within the same time window are used to form the throughput capacity vector for this round, and the time window length can be set according to the scheduling step size. After calculation and alignment, the two capacity quantities of the physical layer and the logical layer can be directly subtracted in this round. It should be noted that the statistical period of non-real-time data itself will bring measurement uncertainty, and capacity tolerance is used to absorb this part—if the tolerance is set to zero, the feedback process will be repeatedly triggered by small differences at the measurement level, and convergence will not meet the termination condition.

[0098] Specifically, when performing capacity-based processing on device nodes, all connections that originally entered the device are reconnected to the resource entry node, and all connections that originally left the device are connected to the resource exit node. Capacity resource edges appear only once. After this processing, the maximum flow and minimum cut at the physical layer are measured by resource capacity, not by the number of adjacent connections—this is the structural reason why the same physical resource is counted at most once in an ordered boundary cut, and it is also the premise for subsequently using physical layer capacity as a verification benchmark.

[0099] The boundary port and feasible path module 300 identifies boundary ports and searches for paths. The search can employ depth-first search, breadth-first search, or the k-shortest simple path algorithm. During the search, visited physical resources are recorded, and a path is prohibited from repeatedly traversing the same physical resource. The growth of the search is limited by the maximum path length, maximum branch depth, or the maximum number of candidate paths for each port's ordered pair. After a candidate path reaches the output port, the valve status, unidirectional equipment direction, series-parallel process rules, and pressure feasibility are checked sequentially. Paths containing valve closures, equipment shutdowns, reverse unidirectional equipment, or incompatible combinations of pressure regulation and boosting are deleted.

[0100] The three parameters limiting the search size each have their own focus: maximum path length suppresses paths that go too far around the edges, maximum branch depth suppresses the combination explosion of parallel branches, and the maximum number of candidate paths for each port ordered pair directly controls the upper limit of the number of members on a single logical edge. In engineering implementation, only one of these three parameters can be enabled, or all of them can be enabled simultaneously.

[0101] III. Regarding the resource indexing, path grouping, and constraint generation in the system generated by this technical solution

[0102] The resource indexing and vectorization module 400 first establishes an initial index I(0). The initial index can include restricted resources at the boundary entry point, devices with clearly marked capacity limits, and resources whose unavailability status will affect multiple paths simultaneously. It is not necessary to include all physical resources at once; any omissions will be supplemented by subsequent differential cut feedback—a smaller initial index can actually make the feedback process more clearly show which resources are the real bottlenecks.

[0103] For the resource index in the kth round, the resource occupancy vector of the path is assigned a value element by element: 0 indicates that the path does not occupy the corresponding resource, and 1 indicates that the unit path traffic occupies the resource in equal amounts; for resources with splitting ratio, compression ratio or conversion factor, the corresponding element takes a non-negative occupancy factor.

[0104] The path equivalence grouping and regrouping module 500 uses an equivalence key composed of ordered pairs of start and end ports, resource occupancy vectors, and pressure transmission signatures. Paths with the same equivalence key are grouped into the same logical path class. When a new resource dimension causes members in the same old path class to obtain different vectors, the old path class is split into multiple new path classes—this is a direct manifestation of feedback refinement at the logical layer.

[0105] The shared resource and pressure constraint module 600 forms an occupancy matrix, and uses the occupancy matrix, logical edge flow vector, and physical resource current available flow capacity vector to form a capacity coupling constraint. The meaning is that for any physical resource, the flow of each logical edge occupying it, after being weighted and summed according to the occupancy coefficient, is not greater than the current available flow capacity of the physical resource.

[0106] The generation of pressure constraints involves four steps: reading the pressure transmission signature of the logical path class; selecting a pressure drop, pressure regulating, pressure boosting, or isobaric transmission template from the template library using the pressure action type as an index; writing the parameter range and permissible direction into the selected template; and binding the inlet and outlet pressure variables in the template to the start and end ports of the logical path class. The output pressure constraints include logical edge identifiers, variable identifiers, parameter identifiers, and direction identifiers. In this technical solution, pressure constraint groups are counted on a "one logical path class corresponds to one pressure constraint group," and a pressure constraint group can contain multiple scalar inequalities.

[0107] For example, when the pressure signature is "resistance pressure drop type, pressure drop range from lower limit to upper limit, positive," the generated constraint is that the outlet pressure is not higher than the inlet pressure, and the difference between the inlet and outlet pressures falls within the pressure drop range. When the signature is pressure regulating type, it generates a constraint that the outlet pressure falls within the tolerance band of the set pressure and is not higher than the inlet pressure, while also verifying the permissible direction. When the signature is pressure boosting type, it generates a constraint that the pressure rise falls within the pressure boosting range, or it can be expressed as a pressure ratio range. When the signature is isobaric transmission type, it generates a constraint that the absolute value of the difference between the inlet and outlet pressures does not exceed the isobaric tolerance. Therefore, the pressure transmission signature is not only a label for path grouping, but it is also the source of pressure constraints.

[0108] IV. Regarding the ordered boundary cut verification and feedback refinement in the system generated by this technical solution

[0109] The ordered boundary cut verification and differential resource feedback module enumerates the allowed source port set and sink port set for the current operating condition, or filters a portion of them based on risk. The two sets are disjoint; ports in the source port set have input roles, and ports in the sink port set have output roles. For reverse gas transmission operating conditions, the source and sink roles are swapped before re-verification; the results of forward undirected cuts cannot be directly reused.

[0110] At the physical layer, super sources are connected to each port in the source port set, and super sinks are connected to each port in the sink port set. Calculating the maximum flow yields the maximum physical transferable capacity under this ordered source-sink combination, and the minimum physical cut is obtained from the residual network. Since each constrained device is represented by only one capacity resource edge, the same resource is counted only once in the physical cut.

[0111] At the logical layer, under the constraints of capacity coupling and non-negative flow, the maximum transferable capacity is obtained by maximizing the sum of the flow of logical edges pointing from the source port set to the sink port set and satisfying the port roles. This yields the transferable capacity under shared resource coupling conditions, rather than simply adding the nominal capacities of the logical edges.

[0112] If the port reachability relationships between the physical layer and the logical layer are different, or if the difference between the two capabilities exceeds the capacity tolerance, a differential cut is formed. In this case, first check if there are any capacity resources in the physical minimum cut that have not yet entered the resource index; if so, select at least one and add it to the next round of indexing. If all resources in the differential cut are already in the index, check if multiple paths are still indistinguishable due to direction status, operating condition status, or excessively coarse occupancy coefficients, and refine the corresponding dimensions accordingly.

[0113] In one implementation, when multiple candidate physical resources exist in a physical difference cut, they can be sorted according to their contribution to the capacity difference. The physical resource located in the physical minimum cut, with the lowest currently available flow capacity, or shared by the most member paths, is prioritized for inclusion in the next round of resource indexing. This ensures that each round of feedback eliminates as much capacity difference as possible, thereby reducing the number of feedback rounds. The candidate sorting does not change the finite termination property; it only affects the convergence speed.

[0114] After updating the index, the resource occupancy vector and pressure signature of the affected paths are recalculated, equivalence key grouping is re-executed, capacity coupling constraints are re-established, and then verification is performed again. Each round records the resource index, path class, difference cut, and capacity difference to avoid repeatedly performing splits without state changes under the same vector. A passed state is output when all allowed ordered source-sink combinations have passed; an unconverged state is output when no new resources or coefficients can be added, or when the iteration limit is reached. The iteration limit can be set as the sum of the number of candidate resource dimensions and the number of allowed refined states, or it can be directly given by the project configuration.

[0115] V. Implementation Examples of the Desensitized Four-Port Station

[0116] See Figures 3 to 7 This example is a de-identified four-port station. The four boundary ports are designated P1, P2, P3, and P4, where P1 and P2 allow input, and P3 and P4 allow output. The available capacities of the inlet physical resources r1 and r2 are 4.5 million cubic meters (in this technical solution, "10,000 cubic meters" refers to 10,000 standard cubic meters, the same below) and 4.8 million cubic meters, respectively. The available capacity of the shared manifold rH is 4.8 million cubic meters, and the available capacity of the bypass rB is 0.8 million cubic meters. The boundary pressures of the four ports are 5.6 MPa, 5.3 MPa, 4.3 MPa, and 4.1 MPa, respectively.

[0117] The connection relationships of the desensitized physical topology are as follows: P1 enters the sink node H0 via the ingress resource r1, and P2 enters H0 via the ingress resource r2; H0 connects to P3 and P4 via the shared manifold rH respectively; in addition, P1 can also reach P3 via r1 and the bypass rB. This yields 5 feasible paths, denoted as π13H, π13B, π14H, π23H, and π24H, where π13H is P1 via r1 and rH to P3, π13B is P1 via r1 and rB to P3, π14H is P1 via r1 and rH to P4, π23H is P2 via r2 and rH to P3, and π24H is P2 via r2 and rH to P4.

[0118] The initial index is I(0) = {r1, r2}. At this time, π13H and π13B have the same start and end port order pair, the same resource occupancy vector (1, 0), and the same pressure signature, so they are classified into the same logical path class. The 5 physical paths form a total of 4 logical path classes, such as... Figure 5 As shown on the left; Figure 4 The diagram shows the mapping relationship between the 5 physical paths and the 5 logical path classes after feedback convergence.

[0119] The verification procedure traverses nine allowed ordered source-sink combinations consisting of non-empty subsets of P1 and P2 and non-empty subsets of P3 and P4. Taking a combination with source port set {P1, P2} and sink port set {P4} as an example: the minimum cut at the physical layer is the shared port rH, with a maximum physical transfer capacity of 4.8 million cubic meters; while the initial logic model is only constrained by r1 and r2, with a maximum logical transfer capacity of 9.3 million cubic meters. The difference between the two is 4.5 million cubic meters, which is the largest absolute capacity difference among the nine combinations. The difference cut is thus located at the shared port rH.

[0120] Adding rH to the index, we get I(1)={r1,r2,rH}. At this point, the vector of π13H becomes (1,0,1), and the vector of π13B becomes (1,0,0), and the two are no longer the same. The original path class L13 is split into L13H and L13B, and the number of logical path classes changes from 4 to 5. After re-verification, the maximum absolute capacity difference of the 9 combinations is reduced to 3.7 million square kilometers, which occurs in the combination where the source port set is {P1,P2} and the sink port set is {P3,P4}: the minimum cut of the physical layer at this time is the sum of rH and rB, which is 5.6 million square kilometers, while the logical layer can still give 9.3 million square kilometers because the bypass rB has not yet been included in the index.

[0121] The second round of differential cuts points to rB. After adding, we get I(2)={r1,r2,rH,rB}, and the capacity coupling constraints are expanded into four: the sum of the flows of the three logical edges occupying r1 does not exceed 450, the sum of the flows of the two logical edges occupying r2 does not exceed 480, the sum of the flows of the four logical edges occupying rH does not exceed 480, and the flow of the one logical edge occupying rB does not exceed 80.

[0122] Under I(2), the maximum logical transferable capacity when the source port set is {P1,P2} and the sink port set is {P3,P4} is 5.6 million cubic meters, which is equal to the maximum physical transferable capacity; the maximum absolute capacity difference between the 9 allowed ordered source-sink combinations is 0, the port reachability difference number is 0, and the verification status is passed. The above results are obtained by solving the physical maximum flow and logical linear programming respectively using a repeatable reference verification program, and the feedback process is as follows: Figure 7 As shown.

[0123] Table 1. Four-port station verification input

[0124]

[0125] Table 2. Verification Results of Four-Port Stations

[0126]

[0127] The site names and connection identifiers in this example have been anonymized. The numerical values ​​are used to illustrate the data structure, feedback process, and repeatability of the algorithm, and do not constitute a limitation on the number of ports, resources, metering cycles, or capacity units in actual engineering projects.

[0128] VI. Implementation Examples of the Six-Port Station after Desensitization

[0129] See also Figure 11 To verify path grouping, pressure constraint generation, and ordered source-sink capacity verification after increasing the number of ports, this embodiment presents a six-port desensitized station. P1, P2, and P3 are allowed input ports, and P4, P5, and P6 are allowed output ports.

[0130] The six-port physical subgraph includes inlet resources r1, r2, and r3, sharing a manifold rH, and three bypass resources rB1, rB2, and rB3; available capacities are 450, 480, 300, 600, 80, 120, and 1,000,000 cubic meters, respectively. The three inlet resources flow into node H0, then through rH to outlet node H1, and then to P4, P5, and P6 respectively. Bypass rB1 flows directly from r1 to P4, bypass rB2 flows directly from r2 to P5, and bypass rB3 flows directly from r3 to P6. Boundary port pressures are 5.8, 5.6, 5.4, 4.4, 4.2, and 4.0 MPa, respectively. Path search yields 12 physically feasible paths: 9 via rH and 3 via bypasses. The pressure signature for each path type is uniformly set to "resistance pressure drop type, pressure drop range 0 to 2.0 MPa, positive". The resistance pressure drop type template is selected from this signature to generate a pressure constraint group in which the outlet pressure is not higher than the inlet pressure and the pressure drop does not exceed 2.0 MPa.

[0131] The verification program enumerates 7 non-empty source port subsets of P1, P2, and P3 and 7 non-empty sink port subsets of P4, P5, and P6, forming 49 ordered source-sink combinations. When the initial index is I(0)={r1,r2,r3}, the 12 physical paths form 9 logical path classes—two paths from each entry port to its dedicated bypass destination port are merged because they have the same resource vector. The 9 classes correspond to 3 sets of capacity constraints and 9 sets of pressure constraints. At this time, the maximum absolute capacity difference of the 49 combinations is 5.5 million cubic meters, which occurs in the combination where the source port set is all input ports and the sink port set is {P4}: the minimum cut capacity of the physical layer is the sum of the available capacity of rH and rB1, which is 6.8 million cubic meters, but the logical layer gives 12.3 million cubic meters.

[0132] The differential cut sequentially feeds back the shared hub rH and bypass resources rB1, rB2, and rB3, with the corresponding maximum absolute capacity differences decreasing to 450, 410, 200, and 0 units, respectively. After adding rH, the three merged path classes are separated, and the number of logical path classes increases from 9 to 12, remaining unchanged thereafter; the number of capacity constraint groups increases with each round of indexing, ultimately reaching 7 capacity constraints and 12 pressure constraints, for a total of 19 groups. Table 3 records the number of physical paths, logical path classes, constraint groups, and the maximum absolute capacity difference before and after the correction for each feedback round.

[0133] Ultimately, the maximum absolute capacity difference of the 49 ordered source-sink combinations was 0, the port reachability difference was 0, and the verification status was passed. This indicates that even with an increase in the number of ports and bypass structures, the differential resource feedback can still introduce new distinguishing dimensions for the grouped paths and converge to the physical layer capacity result. It should be noted that the capacity and pressure values ​​in this embodiment are engineering configuration values ​​used to prove that the algorithm can be repeatedly executed, and are not equivalent to production acceptance or legal measurement reports.

[0134] Table 3 Six-Port Extension Verification Feedback Record

[0135]

[0136] VII. Software Implementation of This Technical Solution

[0137] See Figures 8 to 11 The software interface can be divided into a logical topology verification interface, a network-wide operational status and station extraction interface, and a target station multi-view linkage interface. Each interface uses the same station identifier, boundary port identifier, and physical resource identifier, ensuring that the target station in the network topology, the extracted effective directed subgraph, the logical topology, and the verification record can correspond to each other.

[0138] Figure 8 The logical topology verification interface 2000 shown includes a physical topology and operating condition input area 2010, a physical and logical topology canvas area 2020, and a verification result area 2030. The input area displays the capacity and load of each boundary port; the canvas area allows switching between physical layer, logical layer, and reverse mapping views; the result area displays the initial and final resource dimensions, number of logical path types, initial and final maximum absolute capacity difference, number of reachable differences, and verification status.

[0139] Figure 9The pipeline operation status and station extraction interface 900 shown includes a scene and layer control area 910, a full network topology display area 920, a status summary area 930, and a target station extraction area 940. The scene and layer control area is used to select the current scheduling scene and label pressure, flow rate, and pipeline inventory. The full network topology display area displays gas sources, gas transmission nodes, valve chambers, gas distribution stations, gas storage facilities, and their connections. The target station extraction area identifies boundary ports based on the user-selected station range or preset station boundaries and outputs a set of station equipment and connections for processing by the effective directed subgraph construction module 200. The above indicates that the data sources of this invention—physical topology, flow rate, pressure, pipeline inventory, and operating status fields—can be accessed on the same software interface, eliminating the need to maintain a separate set of data for logical topology generation.

[0140] Figure 10 The target station's multi-view linkage interface 1000 includes a physical subgraph view area 1010, a logical topology view area 1020, a path and resource matrix view area 1030, an ordered boundary cut verification area 1040, and a feedback and reverse mapping record area 1050. When a logical edge is selected, the interface synchronously identifies its member physical paths and the physical resources they occupy based on the reverse mapping. When the verification fails, the feedback and reverse mapping record area displays the status changes of differential cut resources, resource index update, re-vectorization, path class splitting, constraint reconstruction, and re-verification in rounds.

[0141] Figure 11 The six-port extended verification interface shown includes a six-port physical topology area 1100, a pressure signature to pressure constraint generation area 1110, and a feedback convergence record area 1120. The pressure constraint generation area sequentially displays signature reading, template selection, parameter and direction writing, port pressure variable binding, and pressure constraint output; the feedback convergence record area displays the number of logical path classes, the number of capacity constraint groups, the number of pressure constraint groups, and the maximum absolute capacity difference by round.

[0142] The software verification log should include at least the following: input parameter summary, physical edge and capacity resource identifiers, candidate path and member identifiers, resource index for each round, logical path class for each round, physical and logical transferability of each ordered source-sink combination, differential cut, termination reason, and output file summary check value. Saving these logs allows verification that the algorithm has indeed performed resource index expansion and regrouping without exposing sensitive site names.

[0143] In one implementation, the physical maximum transferable capacity is determined using the augmented path maximum flow algorithm, while the logical maximum transferable capacity is solved using linear programming. Both solvers use the same capacity unit and unify the metering period during the input phase as described above. Capacity tolerance can be set according to metering resolution, scheduling step size, or data quality level; the higher the proportion of non-real-time data in the station, the larger the tolerance is typically required.

[0144] When the equipment status changes, the reverse mapping and model output module 700 uses the physical resource identifier to find the affected logical edges and member paths. It only re-assesses the feasibility of the affected paths and regenerates vectors, then prioritizes verifying source-sink combinations involving the affected resources. Only when local verification fails is the scope expanded to all allowed source-sink combinations. Compared to recalculating the entire system for every change, this approach limits the recalculation to a subset of the affected components, which is particularly necessary for operating conditions where valves frequently switch.

[0145] This system can be deployed on a natural gas pipeline network simulation platform, a dispatch optimization platform, or a station digital twin system. The processor can be a server processor, a workstation processor, or an edge computing device processor; the memory is used to store physical topology, resource index, path class, occupancy matrix, pressure signature, verification record, and computer program.

[0146] The above methods can also be stored in the form of a computer program in a computer-readable storage medium, including a magnetic storage medium, an optical storage medium, a flash memory, or a server memory; when the computer program is executed by a processor, it implements S1 to S5 and any of the aforementioned further schemes.

[0147] VIII. Other Implementation Methods

[0148] When the valve is closed, the connection passing through the valve is deleted from the effective directed subgraph, and the original member path passing through the valve is marked as infeasible; if there are no other feasible members in the corresponding logical path class, the logical edge is deleted and the reachability relationship is re-verified.

[0149] In reversible port operation mode, the port role set includes both input and output. An ordered source-sink combination is established for each actual scheduling direction, and the allowed direction in the pressure signature switches according to the operation mode. Different resource occupancy coefficients and capacity vectors can be used for forward and reverse directions.

[0150] When a physical path contains multiple cascaded capacity resources, its resource occupancy vector is non-zero in the corresponding dimension; when multiple logical edges share a resource, coupling constraints are formed by the same row of the occupancy matrix. For cases involving energy conversion, compressor fuel consumption, or multi-component gas conversion, the vector elements can take non-negative occupancy coefficients, and are not limited to binary values.

[0151] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Without departing from the resource index feedback, re-vectorization, regrouping, and ordered boundary cut coupling verification as defined in the claims, those skilled in the art can make equivalent substitutions for specific graph search algorithms, maximum flow algorithms, linear programming solvers, interface layouts, and data interfaces.

Claims

1. A method for generating a constraint-preserving logic topology for a natural gas station, characterized in that, Includes the following steps: S1. Construct an effective directed subgraph based on the station equipment configuration and operating status. Each physical resource limited by flow capacity is represented as a unique capacity resource edge. Search for feasible gas transmission paths between boundary ports. S2. Generate resource occupancy vectors and pressure transfer signatures for each feasible gas transmission path according to the current resource index. Group feasible gas transmission paths with the same start and end port ordered pairs, resource occupancy vectors and pressure transfer signatures into the same logical path class. Generate logical topology and capacity coupling constraints with boundary ports as nodes and logical path classes as edges. S3. For an ordered source-sink combination consisting of a source port set and a sink port set, compare the port reachability and maximum transferability of the efficient directed subgraph and logical topology. S4. When the port reachability is inconsistent or the difference in maximum transferability exceeds the capacity tolerance, add the physical resources in the physical difference cut to the resource index or refine their occupancy coefficient, and return to S2; the physical difference cut is the set of physical resources in the minimum cut of the effective directed subgraph that have not yet been correctly represented by the logical topology. S5. When the port reachability is consistent and the difference in maximum transferability does not exceed the capacity tolerance, output the logical topology, capacity coupling constraints and reverse mapping to the simulation or scheduling solver. The reverse mapping is the mapping relationship between the logical path class and its member paths and the physical resources they occupy.

2. The generation method according to claim 1, characterized in that, In S2, the method further includes: selecting a pressure constraint template according to the pressure action type in the pressure transmission signature of each logical path class, writing the parameter range and allowed direction in the signature into the selected template, and binding the inlet pressure variable and outlet pressure variable in the template to the start and end ports of the logical path class to obtain the pressure constraint corresponding to the logical path class; the pressure constraint, the logical topology and the capacity coupling constraint are output together.

3. The generation method according to claim 2, characterized in that, The pressure action types include resistance pressure drop type, pressure regulating type, pressure boosting type, and isobaric transmission type; the resistance pressure drop type template generates a constraint that the outlet pressure is not higher than the inlet pressure and the pressure drop falls within the pressure drop range; the pressure regulating type template generates a constraint that the outlet pressure falls within the set pressure tolerance zone and is not higher than the inlet pressure; the pressure boosting type template generates a constraint that the pressure rise falls within the pressure boosting range or the pressure ratio falls within the pressure ratio range; and the isobaric transmission type template generates a constraint that the absolute value of the difference between the inlet pressure and the outlet pressure does not exceed the isobaric tolerance.

4. The generation method according to claim 1, characterized in that, In S1, the physical resource is represented as a unique capacity resource edge, which includes: splitting the device node corresponding to the physical resource into a resource entry node and a resource exit node, establishing a directed edge between the two with a capacity equal to the current available flow capacity of the physical resource, and connecting the upstream of the original device node to the resource entry node and the downstream of the original device node to the resource exit node, so that the same physical resource is counted at most once in any ordered boundary cut.

5. The generation method according to claim 1, characterized in that, In S1, searching for the feasible gas transmission path includes: traversing from the boundary port of the allowed input along the effective directed subgraph to the boundary port of the allowed output; deleting candidate paths that repeatedly pass through the same physical resource, violate valve opening / closing status, violate unidirectional equipment direction, cross unavailable equipment, or do not meet the series-parallel process rules; and limiting the search size by at least one of the maximum path length, maximum branch depth, and maximum number of candidate paths for each port ordered pair.

6. The generation method according to claim 1, characterized in that, In S2, the dimension of the resource occupancy vector corresponds one-to-one with the physical resources in the resource index. The elements of the resource occupancy vector are binary identifiers indicating whether the path occupies the corresponding physical resource, or the occupancy coefficient of the corresponding physical resource per unit logical flow. The pressure transmission signature includes the pressure action type, corresponding parameter range, and allowed direction, which is obtained by combining the pressure action of each device on the path in chronological order, and is stored separately from the resource occupancy vector.

7. The generation method according to claim 1, characterized in that, In S2, the capacity coupling constraint is expressed as the product of the occupancy matrix and the logical edge flow vector being no greater than the current available flow capacity vector of the physical resource. The rows of the occupancy matrix correspond to the physical resources in the resource index, and the columns correspond to the logical edges. The maximum transferable capacity of the effective directed subgraph is obtained by finding the maximum flow or minimum cut after connecting each port in the source port set to the super source and each port in the sink port set to the super sink. The maximum transferable capacity of the logical topology is obtained by maximizing the sum of the logical edge flows from the source port set to the sink port set under the capacity coupling constraint and non-negative flow conditions. For the reverse gas transmission condition, the comparison is performed independently after exchanging the source port set and the sink port set.

8. The generation method according to claim 1, characterized in that, Execution of return S2 will stop when any of the following preset termination conditions are met: First termination condition: All allowed ordered source-sink combinations satisfy the condition that the port reachability is consistent and the difference in maximum transferable capacity does not exceed the capacity tolerance; Second termination condition: There are no physical resources that can be added to the resource index and there is no granular occupancy coefficient; Third termination condition: Reaching the preset maximum number of iterations; If the second or third termination condition is met but the first termination condition is not met, output the non-converged state and the corresponding physical difference cut, and retain the valid directed subgraph as a backoff model.

9. A system for generating a constraint-preserving logic topology for a natural gas station, characterized in that, This includes the data interface, memory, and processor; The data interface is used to acquire station equipment configuration data, measured operating status, flow capacity, and pressure transmission attributes; the memory stores computer programs; when the processor executes the computer programs, it implements the generation method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the generation method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Gas supply reliability detection method and device for natural gas pipeline network based on cross entropy theory

    CN114091723B