Power Simulation Modeling Wiring Optimization Method, Device, Equipment and Readable Storage Medium

By establishing a plane coordinate system and target rectangle in power system simulation and dividing grid lines, the problem of complex connections of electrical components is solved, and the determination of regular connection paths and the efficiency of power system simulation is improved.

CN115294237BActive Publication Date: 2025-06-13ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210779754.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2025-06-13
Estimated Expiration
2042-07-04

AI Technical Summary

Technical Problem

In power system simulation, it is difficult for the prior art to effectively regulate the connection of electrical components, resulting in complex connections and difficult to determine the connection relationship of components.

Method used

By establishing a planar coordinate system, the electrical components are abstracted into rectangles, the target rectangles surrounding all component rectangles, and lines are divided into parallel horizontal and vertical axis on the target rectangles to form a grid, thereby determining the regular connection path between components.

Benefits of technology

The connection between electrical components is regularized, complicated line interference is avoided, and clear connection paths are helpful for analysis and strategy formulation, and improve connection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294237B_ABST
    Figure CN115294237B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and readable storage medium for optimizing the connection of power simulation models. The method includes: establishing a plane coordinate system according to the positions of the rectangles of each component, and then determining a target rectangle that encloses all the rectangles of the components; then arbitrarily selecting two rectangles of the components, and respectively selecting a connection point on the sides of the two selected rectangles of the components as the first and second connection points; based on the two connection points, dividing a plurality of horizontal lines and vertical lines on the target rectangle to form a grid covering all the rectangles of the components, obtaining each intersection point divided by the grid, and determining the target path between the first and second connection points according to the candidate distances between each candidate intersection point adjacent to the current intersection point and the second connection point. Obviously, after dividing the grid, the connection points can be connected on the optional connection paths divided by the grid, ensuring that the connection between the two connection points is horizontal and vertical and regular.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power system simulation, and more specifically, to a method, device, equipment and readable storage medium for optimizing the connection of power simulation modeling wires. Background Art

[0002] Power system simulation is an effective means to understand the characteristics of power systems, support the research, planning, operation, production, equipment manufacturing of power systems, and ensure the safe and reliable operation of power systems. Existing power system simulations rely on graphical modeling, that is, connecting various electrical components to form a visual graph structure, and then generating subsequent electromagnetic transient algorithms based on the connected graph structure.

[0003] When performing graphical modeling, electrical components need to be connected at the ports. Referring to Figure 1, Figure 1(a) shows a simple example where the connections of various electrical components are irregular, and Figure 1(b) is an example of regular wiring. In Figure 1(b), the wires between various electrical components are horizontal and vertical, which is convenient for clearly viewing the connection relationships of each electrical component. When a large number of electrical components need to be connected, regular wiring can further avoid the interference of complex and messy lines on judging the connection relationships of each electrical component.

[0004] Therefore, regular wiring of electrical components in power system simulation plays an important role. Summary of the Invention

[0005] In view of this, the present application provides a method, device, equipment and readable storage medium for optimizing the connection of power simulation modeling wires, which is used for regular wiring of electrical components in power system simulation.

[0006] In order to achieve the above object, the following solutions are proposed:

[0007] A method for optimizing the connection of power simulation modeling wires includes:

[0008] Establish a plane coordinate system for each rectangular element at different positions. Each of the rectangular elements corresponds to an electrical component for power system simulation, and the sides of each of the rectangular elements are parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0009] Determine a target rectangle that encloses all of the rectangular elements. The sides of the target rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0010] Select a connection point on any side of two different rectangular elements respectively as a first connection point and a second connection point;

[0011] Based on the first and second connection points, a plurality of horizontal lines with equal spacing and parallel to the horizontal axis, and a plurality of vertical lines with equal spacing and parallel to the vertical axis are divided on the target rectangle, obtaining a plurality of intersection points formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, and the first and second connection points coincide with different intersection points;

[0012] Taking the first connection point as the current intersection point, determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point, and each candidate intersection point is an intersection point on the side and outside of each component rectangle;

[0013] From each of the candidate intersection points, a candidate intersection point with the shortest candidate distance to the second connection point is selected as the new current intersection point, and the steps of determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point are executed until the selected current intersection point is the second connection point, obtaining a target path composed of each of the current intersection points.

[0014] Preferably, the determining the target rectangle enclosing all the component rectangles includes:

[0015] Determining the side with the smallest abscissa in each of the component rectangles in the plane coordinate system, and determining the left side of the rectangle at its abscissa;

[0016] Determining the side with the largest abscissa in each of the component rectangles in the plane coordinate system, and determining the right side of the rectangle at its abscissa;

[0017] Determining the side with the smallest ordinate in each of the component rectangles in the plane coordinate system, and determining the bottom side of the rectangle at its ordinate;

[0018] Determining the side with the largest ordinate in each of the component rectangles in the plane coordinate system, and determining the top side of the rectangle at its ordinate;

[0019] The left side, right side, bottom side, and bottom side are combined into a candidate rectangle, and the candidate rectangle is expanded outward by a set distance to obtain the target rectangle.

[0020] Preferably, the dividing a plurality of horizontal lines with equal spacing and parallel to the horizontal axis, and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle based on the first and second connection points includes:

[0021] Respectively determining the coordinates of the first connection point and the second connection point, and determining the first spacing on the horizontal axis and the second spacing on the vertical axis of the first connection point and the second connection point in the plane coordinate system according to the two coordinates;

[0022] Divide the first spacing into a first set number of first unit spacings, and divide the second spacing into a second set number of second unit spacings;

[0023] Add a horizontal line parallel to the horizontal axis through the first connection point, and add multiple horizontal lines parallel to the horizontal axis on both sides of the first horizontal line at the second unit spacing until the multiple horizontal lines cover all the component rectangles;

[0024] Add a vertical line parallel to the vertical axis through the first connection point, and add multiple vertical lines parallel to the vertical axis on both sides of the first vertical line at the first unit spacing until the multiple vertical lines cover all the component rectangles.

[0025] Preferably, determining the candidate distance between each candidate intersection point and the second connection point includes:

[0026] For each candidate intersection point, determine its horizontal distance on the horizontal axis of the plane coordinate system from the second connection point, and its vertical distance on the vertical axis of the plane coordinate system;

[0027] The distance obtained by adding the horizontal distance and the vertical distance is determined as the candidate distance between the candidate intersection point and the second connection point.

[0028] An apparatus for optimizing power simulation modeling connection lines includes:

[0029] A coordinate system establishment unit for establishing a plane coordinate system for each component rectangle at different positions, each component rectangle corresponding to an electrical component for power system simulation, and the sides of each component rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0030] A target rectangle determination unit for determining a target rectangle that encloses all the component rectangles, the sides of the target rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0031] A connection point selection unit for respectively selecting a connection point on any side of two different component rectangles as the first connection point and the second connection point;

[0032] An intersection point division unit for, based on the first and second connection points, dividing multiple horizontal lines with equal spacing and parallel to the horizontal axis, and multiple vertical lines with equal spacing and parallel to the vertical axis on the target rectangle, to obtain multiple intersection points formed by the intersection of the multiple horizontal lines and the multiple vertical lines, where the first and second connection points coincide with different intersection points;

[0033] A candidate intersection determination unit, configured to use the first connection point as the current intersection, determine each candidate intersection adjacent to the current intersection and the candidate distance between each candidate intersection and the second connection point, where each candidate intersection is an intersection on and outside the sides of each component rectangle;

[0034] A target path determination unit, configured to select, from each of the candidate intersections, a candidate intersection with the shortest candidate distance to the second connection point as the new current intersection, and execute the step of determining each candidate intersection adjacent to the current intersection and the candidate distance between each candidate intersection and the second connection point, until the selected current intersection is the second connection point, to obtain a target path composed of each of the current intersections.

[0035] Preferably, the target rectangle determination unit includes:

[0036] A first target rectangle determination subunit, configured to determine the side with the smallest abscissa in each component rectangle in the plane coordinate system, and determine the left side of the rectangle at its abscissa;

[0037] A second target rectangle determination subunit, configured to determine the side with the largest abscissa in each component rectangle in the plane coordinate system, and determine the right side of the rectangle at its abscissa;

[0038] A third target rectangle determination subunit, configured to determine the side with the smallest ordinate in each component rectangle in the plane coordinate system, and determine the bottom side of the rectangle at its ordinate;

[0039] A fourth target rectangle determination subunit, configured to determine the side with the largest ordinate in each component rectangle in the plane coordinate system, and determine the top side of the rectangle at its ordinate;

[0040] A fifth target rectangle determination subunit, configured to combine the left side, the right side, the bottom side, and the top side into a candidate rectangle, and expand the candidate rectangle outward by a set distance to obtain a target rectangle.

[0041] Preferably, the intersection division unit includes:

[0042] A spacing determination unit, configured to respectively determine the coordinates of the first connection point and the second connection point, and determine a first spacing between the first connection point and the second connection point on the horizontal axis and a second spacing on the vertical axis in the plane coordinate system;

[0043] A unit spacing determination unit, configured to divide the first spacing into a first set number of first unit spacings, and divide the second spacing into a second set number of second unit spacings;

[0044] A horizontal line dividing unit, configured to add a horizontal line parallel to the horizontal axis through the first connection point, and add multiple horizontal lines parallel to the horizontal axis on both sides of the first horizontal line at the second unit interval until the multiple horizontal lines cover all the component rectangles;

[0045] A vertical line dividing unit, configured to add a vertical line parallel to the vertical axis through the first connection point, and add multiple vertical lines parallel to the vertical axis on both sides of the first vertical line at the first unit interval until the multiple vertical lines cover all the component rectangles.

[0046] Preferably, the target path determination unit includes:

[0047] A first target path determination subunit, configured to, for each of the candidate intersection points, determine its horizontal distance from the second connection point on the horizontal axis of the plane coordinate system and its vertical distance on the vertical axis of the plane coordinate system;

[0048] A second target path determination subunit, configured to determine the distance obtained by adding the horizontal distance and the vertical distance as the candidate distance between the candidate intersection point and the second connection point.

[0049] An electrical simulation modeling wire connection optimization device, including a memory and a processor;

[0050] The memory is configured to store a program;

[0051] The processor is configured to execute the program to implement each step of the above electrical simulation modeling wire connection optimization method.

[0052] A readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each step of the above electrical simulation modeling wire connection optimization method is implemented.

[0053] As can be seen from the above solution, in the electrical simulation modeling wire connection optimization method provided by the present application, the electrical components for power system simulation are first abstracted into rectangles to obtain multiple component rectangles, and a plane coordinate system is established according to the positions of the respective component rectangles. Then, a large rectangle enclosing all the component rectangles is determined as the target rectangle. Then, any two component rectangles are selected, and a connection point is respectively selected on the sides of the two selected component rectangles as the first and second connection points. Then, based on the two connection points, multiple horizontal lines and vertical lines are divided on the target rectangle to form a grid covering all the component rectangles, and each intersection point divided by the grid is obtained. And according to the candidate distances between the respective candidate intersection points adjacent to the current intersection point and the second connection point, the target path between the first and second connection points is determined.

[0054] Obviously, in this application, by abstracting electrical components into rectangles, it is avoided that when connecting various electrical components with different shapes, it is difficult to make the connections horizontal and vertical due to the different positions of the connection points of the electrical components. Moreover, after dividing the grid, the connections between the connection points can be made on the optional connection paths divided by the grid, ensuring that the connection between two connection points is horizontal and vertical and regular. Additionally, by selecting a new current intersection point according to the candidate distances between each candidate intersection point and the second connection point, the time for random traversal can be reduced, improving the connection efficiency. Description of the Drawings

[0055] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings described below are only the embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0056] FIG. 1(a)-(b) is a specific example diagram of optimizing the connection in power simulation modeling provided by the embodiment of this application;

[0057] Figure 2 is a schematic flowchart of a method for optimizing the connection in power simulation modeling provided by the embodiment of this application;

[0058] Figure 3 is a scene example diagram of determining a target rectangle disclosed by the embodiment of this application;

[0059] Figure 4 is a scene example diagram of dividing optional paths disclosed by the embodiment of this application;

[0060] Figure 5 is a scene example diagram of determining candidate distances disclosed by the embodiment of this application;

[0061] Figure 6 is a schematic structural diagram of a device for optimizing the connection in power simulation modeling disclosed by the embodiment of this application;

[0062] Figure 7 is a hardware structural block diagram of a device for optimizing the connection in power simulation modeling disclosed by the embodiment of this application. Detailed Embodiments

[0063] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

[0064] Next, a detailed introduction to the power simulation modeling wiring optimization method of this application will be given. Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a power simulation modeling wiring optimization method provided in an embodiment of this application. The method includes:

[0065] Step S100: Establish a plane coordinate system for each component rectangle at different positions.

[0066] Specifically, different types of electrical components may have different shapes and sizes, and the positions of the wiring ports of different types of electrical components may also be different. In order to standardize the shapes of each electrical component, the electrical components can be abstracted into rectangles, which are component rectangles. The size of each component rectangle can just enclose its corresponding electrical component.

[0067] Specifically, all component rectangles can fall into the coordinate system. Each component rectangle can be in a different position and there is no overlapping area.

[0068] In addition, in order to standardize the wiring process, each side of each component rectangle can be parallel or perpendicular to the coordinate axes of the plane coordinate system.

[0069] In an alternative implementation, each component rectangle can be made to be in the first quadrant of the coordinate system, which is convenient for subsequent operations.

[0070] Step S110: Determine a target rectangle that encloses all the component rectangles, and the sides of the target rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system.

[0071] Specifically, since each component rectangle is scattered in the plane coordinate system, in order to facilitate the analysis of the positional relationship of each component rectangle, a large rectangle that encloses all the component rectangles can be determined as the target rectangle. Among them, the sides of the target rectangle can be parallel to the coordinate axes of the coordinate system or perpendicular to the coordinate axes of the coordinate system.

[0072] Step S120: Select a connection point on any side of two different component rectangles respectively as the first connection point and the second connection point.

[0073] Specifically, any two component rectangles can be randomly selected from each component rectangle as the two component rectangles to be connected. Then, a connection point can be randomly selected on any side of each selected component rectangle as the first connection point and the second connection point respectively.

[0074] Step S130: Based on the first and second connection points, divide multiple horizontal lines with equal spacing and parallel to the horizontal axis, and multiple vertical lines with equal spacing and parallel to the vertical axis on the target rectangle.

[0075] Specifically, multiple horizontal and vertical alternating lines can be divided on the target rectangle according to the selected first connection point and second connection point. Among them, in the horizontal axis direction, multiple horizontal lines with equal spacing and parallel to the horizontal axis can be divided, and in the vertical axis direction, multiple vertical lines with equal spacing and parallel to the vertical axis can be divided. Furthermore, multiple intersection points and multiple line segments formed by the intersection of multiple horizontal lines and multiple vertical lines can be obtained.

[0076] It should be noted that the first and second connection points can be at different intersection points. In addition, the grid formed by multiple horizontal lines and multiple vertical lines can cover all component rectangles. The line segments outside each component rectangle can be used for the connection between connection points and thus can be used as optional connection paths.

[0077] Step S140: Take the first connection point as the current intersection point, and determine each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point.

[0078] Specifically, among the four intersection points adjacent to the current intersection point, some intersection points may be inside the component rectangle and these intersection points can be not used as candidate intersection points, while the intersection points on the sides and outside of each component rectangle can be used as candidate intersection points.

[0079] Then the distance between each candidate intersection point and the second connection point can be determined as the candidate distance.

[0080] Step S150: Select a candidate intersection point with the shortest candidate distance from the second connection point among all the candidate intersection points as the new current intersection point.

[0081] Specifically, there may be multiple candidate intersection points with the shortest candidate distance from the second connection point, and one of the candidate intersection points can be selected as the new current intersection point.

[0082] As can be seen from the above solution, in the present application, electrical components with various shapes can be replaced by relatively regular rectangles, and the connection paths between electrical components can be determined among the optional paths formed by horizontal and vertical line segments. Therefore, the connection paths between electrical components are very clear and the lines are definite, avoiding the formation of numerous and complex connection paths among a large number of electrical components. The connection paths are clear, easy to distinguish, and also convenient for the staff to analyze problems and formulate various strategies. Moreover, based on the candidate distances between each candidate intersection point and the second connection point, the next current intersection point to be selected can be quickly determined, realizing the rapid completion of the connection between the first and second connection points.

[0083] In some embodiments of the present application, the above-mentioned step S110, the process of determining the target rectangle that encloses all the component rectangles, where the sides of the target rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system, will be further described below.

[0084] Specifically, it may include:

[0085] S1. Determine the side with the smallest abscissa in each of the component rectangles in the plane coordinate system, and determine the left side of the rectangle at its abscissa.

[0086] S2. Determine the side with the largest abscissa in each of the component rectangles in the plane coordinate system, and determine the right side of the rectangle at its abscissa.

[0087] S3. Determine the side with the smallest ordinate in each of the component rectangles in the plane coordinate system, and determine the bottom side of the rectangle at its ordinate.

[0088] S4. Determine the side with the largest ordinate in each of the component rectangles in the plane coordinate system, and determine the top side of the rectangle at its ordinate.

[0089] S5. The left side, right side, bottom side, and bottom side are combined to form a candidate rectangle, and the candidate rectangle is expanded outward by a set distance to obtain the target rectangle.

[0090] Specifically, the coordinates of each side of each component rectangle can be determined first. Suppose there are a total of N component rectangles, and let i = 1, 2, 3... N. Each component rectangle i can be represented by a quaternion J i ={L i , T i , R i , B i}, where L (Left), T (Top), R (Right), and B (Bottom) respectively represent the X coordinate of the left side of the component rectangle, the Y coordinate of the top side, the X coordinate of the right side, and the Y coordinate of the bottom side.

[0091] Referring to Figure 3 , Figure 3 shows a specific scenario example diagram, in which there are three different component rectangles, which can be respectively represented as J1, J2, and J3. According to the above quaternion representation method, J1 can be represented as J 1 ={L 1 , T 1 , R 1 , B 1}, and the corresponding quaternions of J2 and J3 can be obtained by referring to this method. P1 and P2 can respectively represent the first and second connection points.

[0092] Then, a candidate rectangle that exactly contains J1, J2, and J3 can be determined, denoted as J m , where J m can be expressed as follows:

[0093] J m ={L m , T m , R m , B m}

[0094] Obviously, there is:

[0095]

[0096]

[0097]

[0098]

[0099] To leave external detour space for the connection path and prevent the path from deviating too far, the candidate rectangle J m can be appropriately expanded outward:

[0100] L M = L m - ΔL

[0101] T M = T m + ΔT

[0102] R M = R m + ΔR

[0103] B M = B m - ΔB

[0104] In the above formulas, ΔL, ΔT, ΔR, and ΔB can all be greater than 0, which are the widths of the candidate rectangle expanded outward in four directions respectively. Finally, the target rectangle can be obtained, denoted as J M , J M ={L M , T M , R M , B M}.

[0105] In some embodiments of the present application, the above step S130, the process of dividing a plurality of equally spaced horizontal lines parallel to the horizontal axis and a plurality of equally spaced vertical lines parallel to the vertical axis on the target rectangle based on the first and second connection points, will be further described below for the process of dividing a plurality of intersection points.

[0106] Specifically, it may include:

[0107] S1. Determine the coordinates of the first connection point and the second connection point respectively, and determine the first distance on the horizontal axis and the second distance on the vertical axis between the first connection point and the second connection point in the plane coordinate system according to the two coordinates.

[0108] Specifically, the first connection point and the second connection point are separated by a certain distance. The distance between the first connection point and the second connection point on the horizontal axis can be determined according to the coordinates of the two connection points as the first distance, and the distance between the first connection point and the second connection point on the vertical axis can be used as the second distance.

[0109] S2. Divide the first distance into a first set number of first unit distances, and divide the second distance into a second set number of second unit distances.

[0110] Specifically, the first distance and the second distance can be respectively divided into a plurality of unit distances of appropriate lengths on average. The number of unit distances into which the first distance and the second distance are divided is different.

[0111] To introduce this step more clearly, the following uses a specific example to illustrate the process of this step. For details, please refer to Figure 4 .

[0112] Suppose Figure 4 in which P1 is the first connection point with coordinates {P 1X , P 1Y}, P2 is the second connection point with coordinates {P 2X , P 2Y}. Appropriate positive integers N X and N Y are respectively taken such that the distances between the first connection point and the second connection point on the X-axis and the Y-axis are respectively divided into N X unit intervals ΔX and N Y unit distances ΔY. The calculation formulas for ΔX and ΔY are as follows respectively:

[0113]

[0114]

[0115] S3. Add a horizontal line parallel to the horizontal axis through the first connection point, and add multiple horizontal lines parallel to the horizontal axis on both sides of the first horizontal line at the second unit distance until all the component rectangles are covered by the multiple horizontal lines.

[0116] Specifically, since each horizontal line is divided according to the second unit interval, the second connection point will surely fall on one of the horizontal lines, that is, the two connection points can fall on different horizontal lines.

[0117] And that multiple horizontal lines covering all component rectangles may refer to the horizontal line with the largest ordinate, which is above the side with the largest ordinate among all component rectangles, and the horizontal line with the smallest ordinate, which is below the side with the smallest ordinate among all component rectangles.

[0118] S4. Add a vertical line parallel to the vertical axis through the first connection point, and add multiple vertical lines parallel to the vertical axis on both sides of the first vertical line at the first unit interval until the multiple vertical lines cover all the component rectangles.

[0119] Specifically, since each vertical line is divided according to the first unit interval, the second connection point will surely fall on one of the vertical lines, that is, the two connection points can fall on different vertical lines.

[0120] And that multiple vertical lines covering all component rectangles may refer to the vertical line with the largest abscissa, which is to the right of the side with the largest abscissa among all component rectangles, and the vertical line with the smallest abscissa, which is to the left of the side with the smallest abscissa among all component rectangles.

[0121] In an alternative embodiment, for the grid formed by the divided alternative paths, the coverage range of the grid may just cover all the component rectangles. For example, the rightmost vertical line of the grid coincides with the right side of the rightmost component rectangle. Although there is still some area on the rightmost side of the target rectangle that can be used for dividing the alternative paths, in order to limit the range of the alternative paths, the alternative paths may not continue to expand to the right at this time.

[0122] It can be seen from the above solution that based on the first and second connection points, a grid covering all component rectangles can be divided, and the divided grid can be used as a connection path, and the first and second connection points can determine the target connection path on the connection path.

[0123] Next, the process of determining the candidate distance between each candidate intersection point and the second connection point in step S140 above will be further described.

[0124] Specifically, it may include:

[0125] S1. For each candidate intersection point, determine its horizontal distance from the second connection point on the horizontal axis of the plane coordinate system and its vertical distance on the vertical axis of the plane coordinate system.

[0126] Specifically, the coordinates of each candidate intersection point and the second connection point in the coordinate system can be determined, and the above horizontal distance and vertical distance can be determined according to the coordinates.

[0127] The embodiment of the present application can also provide another method for determining the above horizontal distance and vertical distance. Refer to Figure 5 .Figure 5 In it, each square represents each intersection point, and each square has corresponding coordinates. For example, Figure 5 in P1 and P2 in it can represent the first connection point and the second connection point respectively, and the coordinates are (4, 6) and (8, 15) respectively. Among them, the gray squares can represent the intersection points inside the component rectangle, and the white squares can represent the intersection points on the side of the component rectangle and the intersection points outside the component rectangle.

[0128] For P1, there are 3 candidate intersection points around it, which are the intersection points above, to the left, and to the right of P1. Taking the candidate intersection point to the right of P1 as an example, its coordinates are (4, 7), denoted as P1 right. Then the vertical distance between P1 right and P2 is the difference between the row coordinate of P2 and the row coordinate of P1 right, that is, 8 - 4 = 4. Similarly, the horizontal distance between P1 right and P2 is the difference between the column coordinate of P2 and the column coordinate of P1, that is, 15 - 7 = 8.

[0129] S2. The distance obtained by adding the horizontal distance and the vertical distance is determined as the candidate distance between the candidate intersection point and the second connection point.

[0130] Specifically, the connection line between the first and second connection points can be horizontal and vertical. Therefore, calculating the candidate distance between the candidate intersection point and the second connection point can also be the sum of the horizontal distance and the vertical distance.

[0131] Taking Figure 5 the candidate distance between P1 right and P2 in it as an example, it is the sum of the horizontal distance 8 and the vertical distance 4 obtained above, resulting in a candidate distance of 12.

[0132] It can be seen from the above solution that the present application can transform the problem of connecting electrical components into the problem of finding the intersection point with the shortest distance to the second connection point, and can achieve finding a horizontal and vertical connection path. Obviously, this embodiment optimizes the situation of traversing all intersection points and is more efficient than randomly selecting an intersection point for traversal.

[0133] Next, the power simulation modeling connection optimization device provided by the embodiment of the present application will be described. The power simulation modeling connection optimization device described below can be correspondingly referred to the power simulation modeling connection optimization method described above.

[0134] First, in combination with Figure 6 the power simulation modeling connection optimization device will be introduced. As Figure 6 shown, the power simulation modeling connection optimization device can include:

[0135] A coordinate system establishment unit 100 is used to establish a plane coordinate system for each component rectangle at different positions. Each of the component rectangles corresponds to an electrical component for power system simulation, and the sides of each of the component rectangles are parallel or perpendicular to the coordinate axes of the plane coordinate system.

[0136] A target rectangle determination unit 110 is used to determine a target rectangle that encloses all of the component rectangles, and the sides of the target rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system.

[0137] A connection point selection unit 120 is used to respectively select a connection point on any side of two different component rectangles as a first connection point and a second connection point.

[0138] An intersection division unit 130 is used to, based on the first and second connection points, divide a plurality of horizontal lines with equal spacing and parallel to the horizontal axis and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle, obtaining a plurality of intersections formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, and the first and second connection points coincide with different intersections.

[0139] A candidate intersection determination unit 140 is used to use the first connection point as the current intersection, determine each candidate intersection adjacent to the current intersection and the candidate distance between each candidate intersection and the second connection point, and each candidate intersection is an intersection on the sides and outside of each of the component rectangles.

[0140] A target path determination unit 150 is used to select, from each of the candidate intersections, a candidate intersection with the shortest candidate distance to the second connection point as the new current intersection, and execute the step of determining each candidate intersection adjacent to the current intersection and the candidate distance between each candidate intersection and the second connection point until the selected current intersection is the second connection point, obtaining a target path composed of each of the current intersections.

[0141] Optionally, the target rectangle determination unit may include:

[0142] A first target rectangle determination subunit is used to determine the side with the smallest abscissa in the plane coordinate system among each of the component rectangles, and determine the left side of the rectangle at its abscissa.

[0143] A second target rectangle determination subunit is used to determine the side with the largest abscissa in the plane coordinate system among each of the component rectangles, and determine the right side of the rectangle at its abscissa.

[0144] A third target rectangle determination subunit is used to determine the side with the smallest ordinate in the plane coordinate system among each of the component rectangles, and determine the bottom side of the rectangle at its ordinate.

[0145] A fourth target rectangle determining subunit, configured to determine, among all the component rectangles, the side with the maximum ordinate in the plane coordinate system, and determine the top side of the rectangle at its ordinate;

[0146] A fifth target rectangle determining subunit, configured to combine the left side, the right side, the bottom side, and the bottom side into a candidate rectangle, and expand the candidate rectangle outward by a set distance to obtain a target rectangle.

[0147] Optionally, the path dividing unit may include:

[0148] A spacing determining unit, configured to respectively determine the coordinates of the first connection point and the second connection point, and determine a first spacing between the first connection point and the second connection point on the horizontal axis and a second spacing on the vertical axis in the plane coordinate system;

[0149] A unit spacing determining unit, configured to divide the first spacing into a first set number of first unit spacings, and divide the second spacing into a second set number of second unit spacings;

[0150] A horizontal line dividing unit, configured to add a horizontal line parallel to the horizontal axis through the first connection point, and add multiple horizontal lines parallel to the horizontal axis on both sides of the first horizontal line at the second unit spacing until the multiple horizontal lines cover all the component rectangles;

[0151] A vertical line dividing unit, configured to add a vertical line parallel to the vertical axis through the first connection point, and add multiple vertical lines parallel to the vertical axis on both sides of the first vertical line at the first unit spacing until the multiple vertical lines cover all the component rectangles.

[0152] Optionally, the target path determining unit may include:

[0153] A first target path determining subunit, configured to, for each of the candidate intersection points, determine a horizontal distance between it and the second connection point on the horizontal axis of the plane coordinate system, and a vertical distance on the vertical axis of the plane coordinate system;

[0154] A second target path determining subunit, configured to determine the sum of the horizontal distance and the vertical distance as the candidate distance between the candidate intersection point and the second connection point.

[0155] The information recommendation device provided in the embodiments of the present application can be applied to power simulation modeling connection optimization devices. Figure 7 shows a hardware structure block diagram of a power simulation modeling connection optimization device, refer to Figure 7, the hardware structure of the power simulation modeling connection optimization device may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;

[0156] In the embodiments of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 complete mutual communication through the communication bus 4;

[0157] The processor 1 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0158] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0159] Among them, the memory stores a program, and the processor can call the program stored in the memory. The program is used for:

[0160] Establish a plane coordinate system for each component rectangle at different positions. Each component rectangle corresponds to an electrical component for power system simulation, and the sides of each component rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0161] Determine a target rectangle that encloses all the component rectangles. The sides of the target rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0162] Select a connection point on any side of two different component rectangles as the first connection point and the second connection point;

[0163] Based on the first and second connection points, divide a plurality of horizontal lines with equal spacing and parallel to the horizontal axis, and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle, to obtain a plurality of intersection points formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines. The first and second connection points coincide with different intersection points;

[0164] Take the first connection point as the current intersection point, and determine each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point. Each candidate intersection point is an intersection point on the sides and outside of each component rectangle;

[0165] From each of the candidate intersection points, select a candidate intersection point with the shortest candidate distance to the second connection point as the new current intersection point, and perform the steps of determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point until the selected current intersection point is the second connection point, thereby obtaining a target path composed of each of the current intersection points.

[0166] Optionally, the refinement function and the extension function of the program can be referred to the above description.

[0167] The embodiment of the present application further provides a storage medium, which can store a program suitable for being executed by a processor, and the program is used for:

[0168] Establish a plane coordinate system for each component rectangle at different positions, each component rectangle corresponding to an electrical component for power system simulation, and the sides of each component rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0169] Determine a target rectangle that encloses all the component rectangles, the sides of the target rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system;

[0170] On any sides of two different component rectangles, respectively select a connection point as the first connection point and the second connection point;

[0171] Based on the first and second connection points, divide a plurality of horizontal lines with equal spacing and parallel to the horizontal axis and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle, obtaining a plurality of intersection points formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, and the first and second connection points coincide with different intersection points;

[0172] Take the first connection point as the current intersection point, determine each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point, and each candidate intersection point being an intersection point on the sides and outside of each component rectangle;

[0173] From each of the candidate intersection points, select a candidate intersection point with the shortest candidate distance to the second connection point as the new current intersection point, and perform the steps of determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point until the selected current intersection point is the second connection point, thereby obtaining a target path composed of each of the current intersection points.

[0174] Optionally, the refinement function and the extension function of the program can be referred to the above description.

[0175] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0176] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts among the embodiments, reference may be made to each other.

[0177] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for optimizing the connection of power simulation modeling, characterized in that, it includes: Establish a plane coordinate system for each component rectangle at different positions. Each of the component rectangles corresponds to an electrical component for power system simulation, and the sides of each of the component rectangles are parallel or perpendicular to the coordinate axes of the plane coordinate system; Determine the target rectangle that encloses all the component rectangles, and the sides of the target rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system; Select a connection point on any side of two different component rectangles respectively as the first connection point and the second connection point; Based on the first and second connection points, divide a plurality of horizontal lines with equal spacing and parallel to the horizontal axis, and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle, to obtain a plurality of intersection points formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines. The first and second connection points coincide with different intersection points; Take the first connection point as the current intersection point, determine each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point. Each candidate intersection point is an intersection point on the sides and outside of each component rectangle; Select a candidate intersection point with the shortest candidate distance from the second connection point from each of the candidate intersection points as the new current intersection point, and execute the step of determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point until the selected current intersection point is the second connection point, to obtain a target path composed of each of the current intersection points; The step of dividing a plurality of horizontal lines with equal spacing and parallel to the horizontal axis, and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle based on the first and second connection points includes: Respectively determine the coordinates of the first connection point and the second connection point, and determine the first spacing on the horizontal axis and the second spacing on the vertical axis of the first connection point and the second connection point in the plane coordinate system according to the two coordinates; Divide the first spacing into a first set number of first unit spacings, and divide the second spacing into a second set number of second unit spacings; Add a horizontal line parallel to the horizontal axis through the first connection point, and add a plurality of horizontal lines parallel to the horizontal axis on both sides of the first horizontal line at the second unit spacing until the plurality of horizontal lines cover all the component rectangles; Add a vertical line parallel to the vertical axis through the first connection point, and add a plurality of vertical lines parallel to the vertical axis on both sides of the first vertical line at the first unit spacing until the plurality of vertical lines cover all the component rectangles.

2. The method according to claim 1, characterized in that, the step of determining the target rectangle that encloses all the component rectangles includes: Determine the side with the smallest abscissa in each of the component rectangles in the plane coordinate system, and determine the left side of the rectangle at its abscissa; Determine the side with the largest abscissa in each of the component rectangles in the plane coordinate system, and determine the right side of the rectangle at its abscissa; Determine the side with the smallest ordinate in each of the component rectangles in the plane coordinate system, and determine the bottom side of the rectangle at its ordinate; Determine the side with the largest ordinate in each of the element rectangles in the plane coordinate system, and determine the top side of the rectangle at its ordinate. The left side, right side, bottom side, and the combined bottom side form a candidate rectangle, and the candidate rectangle is expanded outward by a set distance to obtain a target rectangle.

3. The method according to claim 1, characterized in that determining the candidate distance between each candidate intersection point and the second connection point includes: For each candidate intersection point, determine its horizontal distance from the second connection point on the horizontal axis of the plane coordinate system and its vertical distance on the vertical axis of the plane coordinate system; The distance obtained by adding the horizontal distance and the vertical distance is determined as the candidate distance between the candidate intersection point and the second connection point.

4. An apparatus for optimizing the connection of power simulation modeling, characterized in that it includes: A coordinate system establishment unit for establishing a plane coordinate system for each element rectangle at different positions, each element rectangle corresponding to an electrical component for power system simulation, and the sides of each element rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system; A target rectangle determination unit for determining a target rectangle that encloses all the element rectangles, the sides of the target rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system; A connection point selection unit for respectively selecting a connection point on any side of two different element rectangles as the first connection point and the second connection point; An intersection point division unit for, based on the first and second connection points, dividing a plurality of horizontal lines with equal spacing and parallel to the horizontal axis and a plurality of vertical lines with equal spacing and parallel to the vertical axis on the target rectangle to obtain a plurality of intersections formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, the first and second connection points coinciding with different intersections; A candidate intersection point determination unit for taking the first connection point as the current intersection point, determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point, each candidate intersection point being an intersection point on and outside the sides of each element rectangle; A target path determination unit for selecting, from each candidate intersection point, a candidate intersection point with the shortest candidate distance from the second connection point as the new current intersection point, and performing the step of determining each candidate intersection point adjacent to the current intersection point and the candidate distance between each candidate intersection point and the second connection point until the selected current intersection point is the second connection point, to obtain a target path composed of each current intersection point; The intersection point division unit includes: A spacing determination unit for respectively determining the coordinates of the first connection point and the second connection point, and determining a first spacing on the horizontal axis and a second spacing on the vertical axis of the plane coordinate system according to the two coordinates; A unit spacing determination unit for dividing the first spacing into a first set number of first unit spacings and dividing the second spacing into a second set number of second unit spacings; Horizontal line dividing unit, configured to add a horizontal line parallel to the horizontal axis through the first connection point, and add multiple horizontal lines parallel to the horizontal axis on both sides of the first horizontal line at the second unit interval until the multiple horizontal lines cover all the component rectangles; Vertical line dividing unit, configured to add a vertical line parallel to the vertical axis through the first connection point, and add multiple vertical lines parallel to the vertical axis on both sides of the first vertical line at the first unit interval until the multiple vertical lines cover all the component rectangles.

5. The device according to claim 4, wherein, the target rectangle determination unit includes: The first target rectangle determination subunit is configured to determine the side with the smallest abscissa in each of the component rectangles in the plane coordinate system, and determine the left side of the rectangle at its abscissa; The second target rectangle determination subunit is configured to determine the side with the largest abscissa in each of the component rectangles in the plane coordinate system, and determine the right side of the rectangle at its abscissa; The third target rectangle determination subunit is configured to determine the side with the smallest ordinate in each of the component rectangles in the plane coordinate system, and determine the bottom side of the rectangle at its ordinate; The fourth target rectangle determination subunit is configured to determine the side with the largest ordinate in each of the component rectangles in the plane coordinate system, and determine the top side of the rectangle at its ordinate; The fifth target rectangle determination subunit is configured to combine the left side, right side, bottom side, and bottom side into a candidate rectangle, and expand the candidate rectangle outward by a set distance to obtain the target rectangle.

6. The device according to claim 4, wherein, the target path determination unit includes: The first target path determination subunit is configured to, for each of the candidate intersection points, determine its horizontal distance from the second connection point on the horizontal axis of the plane coordinate system and its vertical distance on the vertical axis of the plane coordinate system; The second target path determination subunit is configured to determine the distance obtained by adding the horizontal distance and the vertical distance as the candidate distance between the candidate intersection point and the second connection point.

7. A power simulation modeling wiring optimization device, wherein, it includes a memory and a processor; the memory is used for storing programs; the processor is configured to execute the programs to implement each step of the power simulation modeling wiring optimization method according to any one of claims 1-3.

8. A readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, each step of the power simulation modeling wiring optimization method according to any one of claims 1-3 is implemented.

Citation Information

Patent Citations

  • Method and device for optimizing dynamic rendering of three-dimensional scene of power system and storage medium

    CN112001994A

  • Multi-strategy optimization-based multi-layer overall wiring method for super-large-scale integrated circuit

    CN113657067A