A method for automatically generating drawings of the general plan design of a natural gas pressure regulating station

By adopting the automatic method of dividing and governance strategies and force-oriented layout algorithms in the design of natural gas pressure regulating stations, the problem of inefficient manual drawing in the existing technology is solved, and a more efficient and accurate generation of overall graphic design schemes is achieved.

CN116383906BActive Publication Date: 2025-06-06SHENZHEN URBAN PLANNING & LAND RES CENT
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211397256.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-06-06
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

The drawing of the existing natural gas pressure regulating station's overall graphic design plan depends on manual operation, is inefficient, and has problems such as qualitative analysis, subjective conjecture, time-consuming and labor-intensive, and difficult technology inheritance.

Method used

An automated solution generation and drawing method based on partitioning and governance strategies and force-oriented layout algorithm is adopted to realize the automatic generation of the overall graphic design plan drawings of the natural gas pressure regulating station through steps such as discretization of land use, component diagram generation, random layout, layout plan screening and automatic vectorization drawing.

Benefits of technology

It improves the accuracy and optimization of the design plan, significantly improves work efficiency, and can complete the overall graphic design plan drawings of medium-sized natural gas pressure regulating stations within 5 minutes, and lowers the operating threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116383906B_ABST
    Figure CN116383906B_ABST
Patent Text Reader

Abstract

The invention discloses an automatic generation method of a general plan design scheme drawing of a natural gas pressure regulating station, comprising the following steps: S10, rasterizing vector data of an original land use range and converting the data into a land use range discretization matrix; S20, selecting components in a basic functional component set according to the horizontal clear distance and mutually exclusive relationship between the components for combination to obtain a component drawing; S30, randomly laying out the component drawing within the land use range; S40, automatically screening all generated random layout schemes to obtain a feasible layout scheme; S50, selecting components from a composite functional component set and adding them to the component drawing until there are no selectable components in the composite functional component set or the remaining land use area is less than the remaining component area, thereby obtaining a final layout scheme; S60, automatically drawing the components in a vector drawing software according to the center point coordinates and rotation angle of each component in the final layout scheme, and forming a final general plan design scheme drawing of the natural gas pressure regulating station.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of natural gas station design, and in particular to an automatic generation method of drawings of a general plan design method of a natural gas pressure regulating station. Background Art

[0002] Scientifically and reasonably drawing the master plan design drawings of the natural gas pressure regulating station design stage is an important step in guiding the construction of the natural gas pressure regulating station, and is also an important guarantee for the safe, reliable and economical operation of the natural gas pressure regulating station. Various municipal design institutes or gas professional design institutes across the country have conducted a lot of technical exploration and engineering practice in drawing the master plan design drawings of natural gas pressure regulating stations.

[0003] Since my country began to use pipeline natural gas on a large scale at the beginning of this century, my country's natural gas industry has been increasingly demanding the construction of natural gas pressure regulating stations, which has put forward higher requirements on the speed and efficiency of designers in drawing the general plan design drawings of natural gas pressure regulating stations. According to actual work experience, the owner hopes that the designer can show him the preliminary plan of the general plan design drawings that are quickly drawn, so as to communicate in a timely manner and carry out subsequent modifications and improvements. At the same time, he also hopes to be able to dynamically view the three-dimensional simulation model, component size and horizontal clearance on electronic equipment, so as to facilitate the owner to accurately purchase components. However, when the drawing of the general plan design drawings of the natural gas pressure regulating station relies solely on CAD drawing by designers, it is impossible to quickly lay out the general plan design drawings, which cannot meet the market development needs that keep pace with the times.

[0004] At present, in the process of drawing the master plan design drawings of natural gas pressure regulating stations, there are the following inherent problems: 1) The operation technology takes qualitative subjective analysis as the technical route: The drawing of the master plan design drawings of natural gas pressure regulating stations is mainly based on qualitative research, and mainly relies on the personal experience of professional and technical personnel to analyze, evaluate, optimize and improve a few limited layout plans, so as to obtain the master plan design drawings that are relatively reasonable in personal subjective opinion. It is impossible to exhaust all possible layout plans within the existing natural gas pressure regulating station land red line and select the optimal solution; 2) Low work efficiency: Professional and technical personnel usually use CAD and other vector drawing software to draw the master plan design drawings. In the process of solving the plan, they will definitely try many plans, repeatedly adjust, modify, or even start over, which is time-consuming and laborious, and the work efficiency is extremely low; 3) Design style differentiation and difficulty in technology inheritance: At present, natural gas pressure regulating stations are widely used in the field of land use. The drawing of the general plan design drawings of the gas pressure regulating station cannot be analyzed digitally and automatically iteratively. Therefore, there are strong personal subjective factors in the mutual communication and exchange between technical personnel in the drawing technology of the general plan design drawings of the natural gas pressure regulating station. As a result, different municipal design institutes or gas professional design institutes may argue and come up with very different plans for the same project, and form different design styles and design schools among various design institutes. At the same time, the internal technology inheritance of various municipal design institutes or gas professional design institutes is becoming increasingly inefficient, and can only rely on the traditional technology inheritance model of mentoring for a long time. Young technicians must rely on the master's words and deeds to prepare the plan, and slowly improve their own technical capabilities and professional levels based on the accumulation of project numbers and time. However, the technical characteristics passed down by different masters in the same unit may also vary greatly. Summary of the invention

[0005] The purpose of the present invention is to provide an automated scheme generation and drawing method based on a divide-and-conquer strategy and a force-directed layout algorithm, which is used to solve the problem that the drawing of the general plan design drawings of traditional natural gas pressure regulating stations is entirely completed manually, and has high requirements on the experience of designers, resulting in low work efficiency, as well as the existence of qualitative analysis, subjective conjecture, time-consuming, labor-intensive, and difficult technology inheritance. The method is used to assist designers in reasonably arranging the components of various types of natural gas pressure regulating stations in space.

[0006] The present invention solves the technical problem by adopting the following technical solution:

[0007] A method for automatically generating a general plan design drawing of a natural gas pressure regulating station comprises the following steps:

[0008] S10, discretization of land use range: rasterizing the vector data of the original land use range and converting it into a discretization matrix of the land use range;

[0009] S20, generating a component diagram: dividing the components of the natural gas pressure regulating station into a basic function component set and a composite function component set, selecting components in the basic function component set for combination according to the horizontal clearance and mutually exclusive relationship between the components, and obtaining a component diagram;

[0010] S30, random allocation layout: randomly layout the component diagram within the land range based on the force-directed algorithm, and update each grid value of the land range discretization matrix and the center point coordinates and rotation angle of each component;

[0011] S40, layout scheme screening: according to the reasonable constraints and judgment conditions of the general plan design scheme of the natural gas pressure regulating station, all generated random layout schemes are automatically screened to obtain a feasible layout scheme;

[0012] S50, generating a final layout plan: selecting components from the composite functional component set and adding them to the component diagram until there are no optional components in the composite functional component set or the remaining land area is less than the remaining component area, thereby obtaining a final layout plan;

[0013] S60, automatic vectorized drawing: according to the center point coordinates and rotation angle of each component in the final layout plan, the components are automatically drawn in the vector drawing software to form the final general plan design drawing of the natural gas pressure regulating station.

[0014] Furthermore, the discretization of land use range includes the following steps:

[0015] S101, read the vector boundary from the data of the land use range, input it into the computer program as the original data, and calculate the coordinates (x min ,y min ) and (x max ,y max );

[0016] S102, rasterize the minimum bounding rectangle in step S101 according to the set accuracy and convert it into a land range discretization matrix OG = {G ij}, where G ij is the occupancy rate, which indicates the occupancy status of the position in the i-th row and j-th column in the grid.

[0017] Furthermore, the minimum bounding rectangle is rasterized with an accuracy of 1 cm, i is (y max -y min ) / 0.1 rounded down, j is (x max -x min ) / 0.1 rounded down.

[0018] Further, generating the component drawing includes the following steps:

[0019] S201. According to the positional relationship between the gate of the natural gas pressure regulating station and the center point of the land use scope, a main plane coordinate system R of the plane design is constructed, wherein the origin of the main plane coordinate system R is the center point of the land use scope, the x-axis is parallel to the gate, and the y-axis is perpendicular to the x-axis; then, the rotation angle of the main plane coordinate system R relative to the original coordinate system is calculated, thereby obtaining the origin coordinates (x 0 ,y 0 ) and the rotation angle θ 0 ;

[0020] S202, divide the components of the natural gas pressure regulating station into basic functional component set A 1 and composite functional component set A 2 , for A 1 Modeling is performed to obtain a component graph, and the component graph is abstracted into a graph data structure G = {V, E}, where V is a node, i.e. a component, storing the coordinates (x, y) of the center point of the component; E is an edge, i.e. the line connecting two components, and its length l is the horizontal mutually exclusive distance between the two components.

[0021] Further, the random allocation layout includes the following steps:

[0022] S301, according to the component graph G obtained in step S20, define the initialization parameters of the force-directed algorithm: S r is the area of ​​the minimum circumscribed rectangle, n is the number of components, k is the optimal distance parameter between components, L max is the maximum possible distance between components, the initial displacement distance of component a (Δx a , Δy a )=(0,0), the maximum displacement distance in the x-axis and y-axis directions t=(t x , t y ), ε θ is the rotation angle threshold;

[0023] S302, calculate the displacement caused by mutual exclusion between components: traverse all nodes of the component graph G, exhaustively list the combination of component a and any other component b, and when the distance between the two is less than L max , then calculate the displacement distance of component a according to the following formula:

[0024]

[0025] Among them, (x a ,y a ) is the coordinate of the center point of component a, (x b ,y b ) is the coordinate of the center point of component b;

[0026] S303, calculate the displacement caused by attraction between components: the displacement distance (Δx a , Δy a ), traverse all the edges of the component graph, and then update the displacement distances of components a and b that make up the edges according to the following formula:

[0027]

[0028]

[0029] Moreover, when the x-axis displacement distance Δx of component a a Greater than t x , then Δx a =t x , when the y-axis displacement distance Δy a Greater than t y , then Δy a =t y ;

[0030] S304, according to the displacement distance calculated in step S303, traverse all nodes of the component diagram and update the center point coordinates of all components in sequence;

[0031] S305, iterate steps S302 to S304, and after each iteration, determine the rotation angle θ of the component and the rotation angle θ of the main coordinate system R 0 Is the absolute value of the difference greater than the threshold ε θ , if it is greater than, the component's rotation angle is set to θ 0 ; Automatically generate all random layout schemes, and store and record the center point coordinates (x, y) and rotation angle value θ of each component in each scheme;

[0032] S306. Calculate the actual land occupation of each component based on the direct land occupation of each component and the indirect land occupation considering the extended horizontal distance, and update the land use range discretization matrix OG.

[0033] Further, the layout scheme screening includes the following steps:

[0034] S401, preliminarily screening all random layout schemes generated in step S30, wherein the screening conditions include: (1) components are not allowed to exceed the land use range; (2) other components are not allowed to appear within the horizontal clearance range of the components;

[0035] S402: Screen the best solution for the preliminary screening solution in step S401. The factors to be considered in the screening include: the difference ΔS between the existing natural gas pressure regulating station land area and the total land area of ​​each solution component, the horizontal clearance value ΔL between the production supporting and guarding rooms and the pressure regulating metering skid. 1, the reserved space ΔS between the emergency parking space component and other components 1 , production supporting and guard room components occupying area ΔS 2 The difference Δθ between the azimuth angle of the production supporting and guard room components and the pressure regulating and metering skid components and the upwind azimuth angle;

[0036] S403, calculate the comprehensive evaluation index P according to the following formula, and select the scheme with the largest comprehensive evaluation index P as the feasible layout scheme m of the basic functional components:

[0037]

[0038] Among them, w 1 ~w 5 It is the weight of each factor and can be set according to actual design requirements.

[0039] Further, generating the final layout solution includes the following steps:

[0040] S501, traverse all the vacant land of the feasible layout scheme m, and select the composite component set A 2 Select any component for random layout. The placement operations allowed by the random layout of the composite functional component include translation and rotation, and record the center point coordinates (x, y) and the rotation angle θ after each automatic layout adjustment of the component;

[0041] S502: Calculate the comprehensive evaluation weight of the layout scheme generated in each iteration of step S501 according to the formula in step S403, select the scheme with the largest comprehensive evaluation index P as the final layout scheme, and at the same time move the components from A to 2 Removed;

[0042] S503, repeat steps S501 and S502 until the composite component set A 2 Empty, or composite component set A 2 If the sum of the areas of the remaining components is smaller than the sum of the areas of the regions equal to 0 in the elements of the land use range discretization matrix OG, the traversal of step S501 is stopped to obtain the final layout solution M.

[0043] Further, automatically vectorizing a drawing includes the following steps:

[0044] S601, calculating the distance difference (Δx, Δy) in the x-axis direction and the y-axis direction and the rotation angle difference Δθ of moving the component from the original position to the final position through the translation operation;

[0045] S602. According to the distance difference (Δx, Δy) and the rotation angle difference Δθ of step S601, a redrawing operation is performed in a vector drawing software, and the final drawing result is retained to form a final general plan design drawing of the natural gas pressure regulating station.

[0046] The present invention has the following beneficial effects:

[0047] 1. The method for automatically generating drawings of the master plan design scheme of a natural gas pressure regulating station of the present invention replaces subjective judgment with an automated method, and has obvious accuracy and optimality; the complex components of the natural gas pressure regulating station are decomposed and reorganized through a divide-and-conquer strategy to form a graph data structure, and a reasonable layout algorithm is used to randomly allocate them within the scope of the land use, exhaustively enumerate all feasible land use layout schemes, and combine compactness, safety and humanization as judgment rules and constraints to screen all feasible land use schemes, thereby selecting the optimal scheme as the final layout scheme. By comparison, the final layout scheme obtained by the present invention has an accuracy improvement of about 10%, and can make more reasonable and efficient use of limited urban land resources.

[0048] 2. The present invention uses high-performance computers in conjunction with automated processes to automatically complete a large number of layout plan generation and screening tasks through efficient algorithms such as rule judgment and loop iteration. Traditional technical methods completely rely on a large amount of repetitive work by designers. Through the present invention, the work efficiency of the general plan design of a natural gas pressure regulating station has been significantly improved. According to the technical solution of the present invention, from basic data input to the output of the general plan design drawing, all the general plan design drawings of a medium-sized natural gas pressure regulating station can be compiled within 5 minutes, and no manual operation is required throughout the process. Under the same basic data conditions, its operating efficiency is more than 100 times higher than that of the traditional manual method.

[0049] 3. Since the technical solution of the present invention is designed entirely based on the automated process, it has good applicability and promotion value. According to the technical solution of the present invention, manual experience has been converted into quantitative indicators, and there are no requirements for the designer's years of work, experience level, and professional qualifications. Designers only need to set relevant evaluation index parameters according to design requirements to obtain corresponding solution results, which greatly reduces the operation threshold; and because the efficiency of automated calculation is high, design solutions suitable for various scenarios can be obtained in a relatively short time, greatly improving the efficiency of solution comparison.

[0050] 4. The present invention can also better adapt to the equipment update needs and technological development trends of natural gas pressure regulating stations. In the future, with the equipment upgrade and high integration of various components in the natural gas pressure regulating station, the floor space of each component may be reduced. Secondly, with the gradual improvement of the level of information and intelligent operation and management, the relevant national standards tend to shorten the horizontal clearance between components. Therefore, when the floor space of some components is reduced and the horizontal clearance between some components is shortened, the present invention only needs to adjust the key parameters in the technical solution to automatically complete the drawing of the general plan design scheme of the natural gas pressure regulating station, so as to adapt to the equipment update needs and technological development trends of the future natural gas pressure regulating station. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The component structure and function diagram of the natural gas pressure regulating station of the present invention;

[0052] Figure 2 It is a flowchart of the present invention;

[0053] Figure 3 It is the general plan design scheme of the natural gas pressure regulating station in the compact layout scenario of the present invention;

[0054] Figure 4 It is the general plan design scheme of the natural gas pressure regulating station under the safety layout scenario of the present invention;

[0055] Figure 5 This is the general plan design of the natural gas pressure regulating station in the humanized scenario of the present invention. DETAILED DESCRIPTION

[0056] The technical solution of the present invention is further described below in conjunction with the embodiments and drawings.

[0057] Example 1

[0058] like Figure 2 As shown, a method for automatically generating a general plan design drawing of a natural gas pressure regulating station includes the following steps:

[0059] S10, discretization of land use range: rasterizing the vector data of the original land use range and converting it into a discretization matrix of the land use range;

[0060] Specifically, the discretization of land use range includes the following steps:

[0061] S101, read the vector boundary from the data of the land use range, input it into the computer program as the original data, and calculate the coordinates (x min ,y min ) and (x max ,ymax );

[0062] S102, rasterize the minimum bounding rectangle in step S101 according to the set accuracy and convert it into a land range discretization matrix OG = {G ij}, where G ij is the occupancy rate, which indicates the occupancy status of the position in the i-th row and j-th column in the grid.

[0063] In the embodiment of the present invention, the minimum bounding rectangle is rasterized according to the accuracy of 1 cm, i is (y max -y min ) / 0.1 rounded down, j is (x max -x min ) / 0.1 rounded down, G ij It is a value between 0 and 1. The closer it is to 1, the more suitable it is for occupation. 0 means completely vacant, and 1 means fully occupied.

[0064] S20, generating a component diagram: dividing the components of the natural gas pressure regulating station into a basic function component set and a composite function component set, selecting components in the basic function component set for combination according to the horizontal clearance and mutually exclusive relationship between the components, and obtaining a component diagram.

[0065] In the embodiment of the present invention, the components of the natural gas pressure regulating station are divided into a basic functional component set A according to Table 1. 1 and composite functional component set A 2 , and according to the horizontal clearance and mutual exclusion relationship between the components in Table 2, the components in the basic functional construction set are selected for combination to obtain the component diagram G.

[0066]

[0067] Table 1 Basic information of components of natural gas pressure regulating station

[0068]

[0069]

[0070] Table 2 Matrix table of mutually exclusive horizontal clearance distances between components and boundaries of natural gas pressure regulating station (unit: meter)

[0071] Specifically, generating a component drawing includes the following steps:

[0072] S201. According to the positional relationship between the gate of the natural gas pressure regulating station and the center point of the land use scope, a main plane coordinate system R of the plane design is constructed, wherein the origin of the main plane coordinate system R is the center point of the land use scope, the x-axis is parallel to the gate, and the y-axis is perpendicular to the x-axis; then, the rotation angle of the main plane coordinate system R relative to the original coordinate system is calculated, thereby obtaining the origin coordinates (x 0 ,y 0 ) and the rotation angle θ 0 ;

[0073] S202, divide the components of the natural gas pressure regulating station into basic functional component set A 1 and composite functional component set A 2 , for A 1 Modeling is performed to obtain a component graph, and the component graph is abstracted into a graph data structure G = {V, E}, where V is a node, i.e. a component, storing the coordinates (x, y) of the center point of the component; E is an edge, i.e. the line connecting two components, and its length l is the horizontal mutually exclusive distance between the two components.

[0074] S30, random allocation layout: randomly layout the component diagram within the land range based on the force-directed algorithm, and update each grid value of the land range discretization matrix as well as the center point coordinates and rotation angle of each component.

[0075] Specifically, the random allocation layout includes the following steps:

[0076] S301, according to the component graph G obtained in step S20, define the initialization parameters of the force-directed algorithm: S r is the area of ​​the minimum circumscribed rectangle, n is the number of components, k is the optimal distance parameter between components, L max is the maximum possible distance between components, the initial displacement distance of component a (Δx a , Δy a )=(0,0), the maximum displacement distance in the x-axis and y-axis directions t=(t x , t y ), ε θ is the rotation angle threshold;

[0077] S302, calculate the displacement caused by mutual exclusion between components: traverse all nodes of the component graph G, exhaustively list component a (center point coordinate x a ,y a ) and any other component b (center point coordinate x b ,y b ) combination, when the distance between the two is less than L max , then calculate the displacement distance of component a according to the following formula:

[0078]

[0079] S303, calculate the displacement caused by attraction between components: the displacement distance (Δx a , Δy a ), traverse all the edges of the component graph, and then update the displacement distances of components a and b that make up the edges according to the following formula:

[0080]

[0081]

[0082] Because the displacement distance of the component cannot exceed the maximum displacement distance t, if the x-axis displacement distance Δx of component a is a Greater than t x , then Δx a =t x , if the y-axis displacement distance Δy a Greater than t y , then Δy a =t y ;

[0083] S304, according to the displacement distance calculated in step S303, traverse all nodes of the component diagram and update the center point coordinates of all components in sequence;

[0084] S305, iterate steps S302 to S304, and after each iteration, determine the rotation angle θ of the component and the rotation angle θ of the main coordinate system R 0 Is the absolute value of the difference greater than the threshold ε θ , if it is greater than, the component's rotation angle is set to θ 0 ; Automatically generate all random layout schemes, and store and record the center point coordinates (x, y) and rotation angle value θ of each component in each scheme;

[0085] S306. Calculate the actual land occupation of each component based on the direct land occupation of each component and the indirect land occupation considering the extended horizontal distance, and update the land use range discretization matrix OG.

[0086] S40, layout scheme screening: according to the reasonable constraints and judgment conditions of the general plan design scheme of the natural gas pressure regulating station, all generated random layout schemes are automatically screened to obtain a feasible layout scheme;

[0087] Specifically, the layout scheme screening includes the following steps:

[0088] S401, preliminarily screening all random layout schemes generated in step S30, wherein the screening conditions include: (1) components are not allowed to exceed the land use range; (2) other components are not allowed to appear within the horizontal clearance range of the components;

[0089] S402, screening the optimal solution for the preliminary screening solution in step S401;

[0090] In the embodiment of the present invention, the following three design scenarios need to be considered when screening the best solution:

[0091] 1. Compact layout scenario: Under the premise of meeting the requirements of relevant specifications and the minimum horizontal clearance between basic functional components, the solution with the largest area of ​​reserved composite functional components is the best solution. According to the needs, the area of ​​the existing natural gas pressure regulating station is subtracted from the sum of the areas occupied by each solution component to obtain ΔS, and the solution with the largest ΔS is selected as the best solution;

[0092] 2. Safety layout scenario: Under the condition of meeting the safety regulations, the horizontal clearance value ΔL between the production supporting and guarding rooms and the pressure regulating and metering skid is required to be 1 The largest solution is the best solution;

[0093] 3. Humanized scenario: Under the condition of meeting the relevant specifications and the horizontal clearance between each component, the solution that makes the work and life of the management personnel most comfortable is selected as the best solution, which is converted into the following four quantitative conditions: the gap area ΔS between the parking space components of the repair vehicle and the on-duty vehicle and other components 1 Maximum area occupied by production supporting and guard room components ΔS 2 The maximum value is the largest, and the difference Δθ between the azimuth angle of the production supporting and guard room components and the pressure regulating and metering skid components and the upwind azimuth angle is the smallest;

[0094] S403, calculate the comprehensive evaluation index P according to the following formula, and select the scheme with the largest comprehensive evaluation index P as the feasible layout scheme m of the basic functional components:

[0095]

[0096] Among them, w 1 ~w 5 It is the weight of each factor and can be set according to actual design requirements.

[0097] S50, generating a final layout plan: selecting components from the composite functional component set and adding them to the component diagram G until there are no selectable components in the composite functional component set or the remaining land area is less than the remaining component area, thereby obtaining a final layout plan.

[0098] Specifically, generating the final solution includes the following steps:

[0099] S501, traverse all the vacant lands of the feasible layout scheme m, that is, the areas where the elements in the land range discretization matrix OG are 0, and select the composite component set A 2 Select any component for random layout, and place it in the free area near the located basic functional components according to the requirement that the basic functional components and the composite functional components are as compact as possible. The placement operations allowed by the random layout of composite functional components include translation and rotation, and the center point coordinates (x, y) and the rotation angle θ after each automatic layout adjustment of the component are recorded;

[0100] S502: Calculate the comprehensive evaluation weight of the layout scheme generated in each iteration of step S501 according to the formula in step S403, select the scheme with the largest comprehensive evaluation index P as the final layout scheme, and at the same time move the components from A to 2 Removed;

[0101] S503, repeat steps S501 and S502 until the composite component set A 2 Empty, or composite component set A 2 If the sum of the areas of the remaining components is smaller than the sum of the areas of the elements of the land use range discretization matrix OG that are equal to 0, the traversal of step S501 is stopped to obtain the final layout solution M;

[0102] S60, automatic vectorized drawing: according to the center point coordinates and rotation angle of each component in the final layout plan, the components are automatically drawn in the vector drawing software to form the final general plan design drawing of the natural gas pressure regulating station.

[0103] Specifically, automatic vectorization drawing includes the following steps:

[0104] S601, calculating the distance difference (Δx, Δy) in the x-axis direction and the y-axis direction and the rotation angle difference Δθ of moving the component from the original position to the final position through the translation operation;

[0105] S602. According to the distance difference (Δx, Δy) and the rotation angle difference Δθ of step S601, a redrawing operation is performed in a vector drawing software, and the final drawing result is retained to form a final general plan design drawing of the natural gas pressure regulating station.

[0106] The method for automatically generating drawings of the master plan design scheme of a natural gas pressure regulating station of the present invention decomposes and reorganizes the complex components of the natural gas pressure regulating station through a divide-and-conquer strategy to form a graph data structure, and randomly allocates them within the land use range through a reasonable layout algorithm, exhaustively enumerates all feasible land use layout schemes, and combines compactness, safety and humanization as judgment rules and constraints to screen all feasible land use schemes, thereby selecting the optimal scheme as the final layout scheme, which can make more reasonable and efficient use of limited urban land resources; with high-performance computers in conjunction with automated processes, a large number of layout scheme generation and screening tasks are automatically completed through efficient algorithms such as rule judgment and loop iteration, thereby improving work efficiency; and the design is completely based on automated processes, has good applicability and promotion value, and can also better adapt to the equipment update needs and technological development trends of natural gas pressure regulating stations.

[0107] The order of the above embodiments is only for the convenience of description and does not represent the advantages or disadvantages of the embodiments.

[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically generating drawings of the general plan design of a natural gas pressure regulating station. It is characterized in that The following steps are involved: S10, discretization of land use range: rasterizing the vector data of the original land use range and converting it into a discretization matrix of the land use range; S20, generating a component diagram: dividing the components of the natural gas pressure regulating station into a basic function component set and a composite function component set, selecting components in the basic function component set for combination according to the horizontal clearance and mutually exclusive relationship between the components, and obtaining a component diagram; S30, random allocation layout: randomly layout the component diagram within the land range based on the force-directed algorithm, and update each grid value of the land range discretization matrix and the center point coordinates and rotation angle of each component; S40, layout scheme screening: according to the reasonable constraints and judgment conditions of the general plan design scheme of the natural gas pressure regulating station, all generated random layout schemes are automatically screened to obtain a feasible layout scheme; S50, generating a final plan: selecting components from the composite functional component set and adding them to the component diagram until there are no selectable components in the composite functional component set or the remaining land area is less than the remaining component area, thereby obtaining a final layout plan; S60, automatic vector drawing: according to the center point coordinates and rotation angle of each component in the final layout plan, the components are automatically drawn in the vector drawing software, and the final general plan design drawing of the natural gas pressure regulating station is formed; The land use range discretization includes the following steps: S101, read the vector boundary from the data of the land use range, input it into the computer program as the original data, and calculate the coordinates (x min ,y min ) and (x max ,y max ); S102, rasterize the minimum bounding rectangle in step S101 according to the set accuracy and convert it into a land range discretization matrix OG = {G ij }, where G ij is the occupancy rate, which indicates the occupancy status of the position in the i-th row and j-th column in the grid; The generating component diagram comprises the following steps: S201. According to the positional relationship between the gate of the natural gas pressure regulating station and the center point of the land use scope, a main plane coordinate system R of the plane design is constructed, wherein the origin of the main plane coordinate system R is the center point of the land use scope, the x-axis is parallel to the gate, and the y-axis is perpendicular to the x-axis; then, the rotation angle of the main plane coordinate system R relative to the original coordinate system is calculated, thereby obtaining the origin coordinates (x 0 ,y 0 ) and the rotation angle θ 0 ; S202, divide the components of the natural gas pressure regulating station into basic functional component set A 1 and composite functional component set A 2 , for A 1 Modeling is performed to obtain a component graph, which is abstracted into a graph data structure G = {V, E}, where V is a node, i.e. a component, storing the coordinates (x, y) of the center point of the component; E is an edge, i.e. a line connecting two components, and its length is the horizontal mutually exclusive distance between the two components; The random allocation layout comprises the following steps: S301, according to the component graph G obtained in step S20, define the initialization parameters of the force-directed algorithm: S r is the area of ​​the minimum circumscribed rectangle, n is the number of components, k is the optimal distance parameter between components, L max is the maximum distance between components, the initial displacement distance of component a (Δx a , Δy a )=(0,0), the maximum displacement distance in the x-axis and y-axis directions t=(t x , t y ), ε θ is the rotation angle threshold; S302, calculate the displacement caused by mutual exclusion between components: traverse all nodes of the component graph G, exhaustively list the combination of component a and any other component b, and when the distance between the two is less than L max , then calculate the displacement distance of component a according to the following formula: Among them, (x a ,y a ) is the coordinate of the center point of component a, (x b ,y b ) is the coordinate of the center point of component b; S303, calculate the displacement caused by attraction between components: the displacement distance (Δx a , Δy a ), traverse all the edges of the component graph, and then update the displacement distances of components a and b that make up the edges according to the following formula: Moreover, when the x-axis displacement distance Δx of component a a Greater than t x , then Δx a =t x , when the y-axis displacement distance Δy a Greater than t y , then Δy a =t y ; S304, according to the displacement distance calculated in step S303, traverse all nodes of the component diagram and update the center point coordinates of all components in sequence; S305, iterate steps S302 to S304, and after each iteration, determine the rotation angle θ of the component and the rotation angle θ of the main coordinate system R 0 Is the absolute value of the difference greater than the threshold ε θ , if it is greater than, the component's rotation angle is set to θ 0 ; Automatically generate all random layout schemes, and store and record the center point coordinates (x, y) and rotation angle value θ of each component in each scheme; S306. Calculate the actual land occupation of each component based on the direct land occupation of each component and the indirect land occupation considering the extended horizontal distance, and update the land use range discretization matrix OG.

2. The method for automatically generating the master plan design drawing of the natural gas pressure regulating station according to claim 1, It is characterized in that The minimum bounding rectangle is rasterized with an accuracy of 1 cm, i is (y max -y min ) / 0.1 rounded down, j is (x max -x min ) / 0.1 rounded down.

3. The method for automatically generating the master plan design drawing of the natural gas pressure regulating station according to claim 1, It is characterized in that The layout scheme screening includes the following steps: S401, preliminarily screening all random layout schemes generated in step S30, wherein the screening conditions include: (1) components are not allowed to exceed the land use range; (2) other components are not allowed to appear within the horizontal clearance range of the components; S402: Screen the best solution for the preliminary screening solution in step S401. The factors to be considered in the screening include: the difference ΔS between the existing natural gas pressure regulating station land area and the total land area of ​​each solution component, the horizontal clearance value ΔL between the production supporting and guarding rooms and the pressure regulating metering skid. 1 , the reserved space ΔS between the emergency parking space component and other components 1 , production supporting and guard room components occupying area ΔS 2 The difference Δθ between the azimuth angle of the production supporting and guard room components and the pressure regulating and metering skid components and the upwind azimuth angle; S403, calculate the comprehensive evaluation index P according to the following formula, and select the scheme with the largest comprehensive evaluation index P as the feasible layout scheme m of the basic functional components: Among them, w 1 ~w 5 It is the weight of each factor and can be set according to actual design requirements.

4. The method for automatically generating the master plan design drawing of the natural gas pressure regulating station according to claim 1, It is characterized in that Generating the final layout solution includes the following steps: S501, traverse all the vacant land of the feasible layout scheme m, and select the composite component set A 2 Select any component for random layout. The placement operations allowed by the random layout of the composite functional component include translation and rotation, and record the center point coordinates (x, y) and the rotation angle θ after each automatic layout adjustment of the component; S502: Calculate the comprehensive evaluation weight of the layout scheme generated in each iteration of step S501 according to the formula in step S403, select the scheme with the largest comprehensive evaluation index P as the final layout scheme, and at the same time move the components from A to 2 Removed; S503, repeat steps S501 and S502 until the composite component set A 2 Empty, or composite component set A 2 If the sum of the areas of the remaining components is smaller than the sum of the areas of the regions equal to 0 in the elements of the land use range discretization matrix OG, the traversal of step S501 is stopped to obtain the final layout solution M.

5. The method for automatically generating the master plan design drawing of the natural gas pressure regulating station according to claim 1, It is characterized in that The automatic vectorization drawing comprises the following steps: S601, calculating the distance difference (Δx, Δy) in the x-axis direction and the y-axis direction and the rotation angle difference Δθ of moving the component from the original position to the final position through the translation operation; S602. According to the distance difference (Δx, Δy) and the rotation angle difference Δθ of step S601, a redrawing operation is performed in a vector drawing software, and the final drawing result is retained to form a final general plan design drawing of the natural gas pressure regulating station.

Citation Information

Patent Citations

  • Automatic layout method for urban development land with best road accessibility

    CN103150680A

  • Spatial layout optimization method based on discrete and heuristic evolutionary algorithms

    CN107330214A

  • Network topology layout algorithm based on improved force steering model

    CN116455761A