A power simulation modeling connection method, device, equipment and readable storage medium

By abstracting electrical components into rectangles and dividing grids, the problem of irregular electrical components connections in power system simulation is solved, and the regular connection paths between electrical components are realized, which simplifies the judgment of connection relationships.

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

Patent Information

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

AI Technical Summary

Technical Problem

In the simulation of existing power system, due to irregular connections of electrical components during graphical modeling, the connections are complicated, which affects the difficulty of judging the connection relationship of each electrical component.

Method used

By abstracting the electrical components into rectangles and determining the target rectangles surrounding all component rectangles in the plane coordinate system, dividing multiple horizontal and vertical lines with equal spacing and parallel spacing to form a grid to determine the regular connection path between the electrical components.

Benefits of technology

The connection path between electrical components is achieved clear and clear, complicated and messy line interference is avoided, and the process of judging the connection relationship between each electrical component is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100318B_ABST
    Figure CN115100318B_ABST
Patent Text Reader

Abstract

The present application discloses a power simulation modeling wiring method, device, equipment and readable storage medium. The method includes: abstracting electrical components into rectangles to obtain a plurality of component rectangles, which can standardize electrical components with various shapes; establishing a plane coordinate system according to the positions of the respective component rectangles, and then determining a target rectangle that encloses all the component rectangles; then arbitrarily selecting two component rectangles, and respectively selecting a connection point on the sides of the two selected component rectangles 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 component rectangles; and finally, dividing regular optional paths according to the grid, and determining the target connection paths of the first and second connection points on the optional paths. Obviously, after dividing the grid, the connection points can be wired 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 power simulation modeling wiring method, device, equipment and readable storage medium. Background Art

[0002] Power system simulation is an effective means to understand the characteristics of power systems, support power system research, planning, operation, production, equipment manufacturing, 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 their ports. Referring to FIG. 1, FIG. 1(a) shows a simple example where the connections of the electrical components are irregular, and FIG. 1(b) is an example of regular wiring, where the connections between the electrical components are horizontal and vertical, facilitating a clear view of the connection relationships of the electrical components. 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 the electrical components.

[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 power simulation modeling wiring method, device, equipment and readable storage medium for regularly wiring electrical components in power system simulation.

[0006] To achieve the above object, the following solutions are proposed:

[0007] A power simulation modeling wiring method includes:

[0008] Determine a plurality of different component rectangles, each of the component rectangles corresponding to an electrical component for power system simulation;

[0009] Establish a plane coordinate system such that each of the component rectangles falls within the plane coordinate system, the sides of each of the component rectangles being parallel or perpendicular to the coordinate axes of the plane coordinate system, each of the component rectangles being in a different position and having no overlapping regions;

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

[0011] Arbitrarily select two component rectangles, and select a connection point on any side of each selected component rectangle as the first connection point and the second connection point respectively;

[0012] 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 intersections and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines. The first and second connection points are at different intersections, and the line segments outside each component rectangle are used as optional connection paths;

[0013] Determine the target connection path between the first connection point and the second connection point on the optional connection path according to the plurality of intersections.

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

[0015] 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;

[0016] 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;

[0017] 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;

[0018] 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;

[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 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;

[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 interval 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 interval until the multiple vertical lines cover all the component rectangles.

[0025] Preferably, determining the target connection path between the first connection point and the second connection point on the optional connection path according to the multiple intersection points includes:

[0026] Mark the intersection points inside the component rectangle as 1, and mark the intersection points on the side and outside the component rectangle as 0;

[0027] Start connecting lines from the intersection point at the first connection point, and extend the connection line by one step to another intersection point each time. One step is the distance between two adjacent intersection points in the horizontal or vertical direction;

[0028] If the connection line encounters an intersection point marked as 0 after extension, continue to extend the connection line. If the connection line encounters an intersection point marked as 1 after extension, return to the previous intersection point and reconnect until the connection line is extended to the intersection point at the second connection point to obtain the target connection path between the first connection point and the second connection point.

[0029] A power simulation modeling connection device includes:

[0030] A component rectangle determination unit for determining a plurality of different component rectangles, each of the component rectangles corresponding to an electrical component for power system simulation;

[0031] A coordinate system establishment unit for establishing a plane coordinate system such that each of the component rectangles falls into the plane coordinate system, the sides of each of the component rectangles being parallel or perpendicular to the coordinate axes of the plane coordinate system, each of the component rectangles being in a different position and having no overlapping areas;

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

[0033] A connection point selection unit for arbitrarily selecting two component rectangles and selecting a connection point on any side of each selected component rectangle as the first connection point and the second connection point respectively;

[0034] A path division unit, configured to 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 based on the first and second connection points, so as to obtain a plurality of intersection points and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, wherein the first and second connection points are at different intersection points, and the line segments outside each component rectangle are used as optional connection paths;

[0035] A path determination unit, configured to determine a target connection path between the first connection point and the second connection point on the optional connection path according to the plurality of intersection points.

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

[0037] 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;

[0038] 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;

[0039] 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;

[0040] 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;

[0041] 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.

[0042] Preferably, the path division unit includes:

[0043] 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 according to the two coordinates;

[0044] 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;

[0045] 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;

[0046] 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.

[0047] Preferably, the path determination unit includes:

[0048] An intersection marking unit, configured to mark the intersections inside the component rectangle as 1, and mark the intersections on the sides and outside the component rectangle as 0;

[0049] A connection line determination unit, configured to start connecting lines from the intersection at the first connection point, extend the connection line by one step to another intersection each time, where one step is the distance between two adjacent intersections in the horizontal or vertical direction. If the connection line encounters an intersection marked as 0 after extension, continue to extend the connection line. If the connection line encounters an intersection marked as 1 after extension, return to the previous intersection to reconnect the line until the connection line extends to the intersection at the second connection point, obtaining the target connection line path between the first connection point and the second connection point.

[0050] A power simulation modeling connection device, including a memory and a processor;

[0051] The memory is used to store programs;

[0052] The processor is used to execute the programs to implement each step of the above power simulation modeling connection method.

[0053] A readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the above power simulation modeling connection method is implemented.

[0054] As can be seen from the above solution, the power simulation modeling connection method provided in this application first abstracts the electrical components for power system simulation into rectangles to obtain multiple component rectangles, and establishes a plane coordinate system according to the positions of the component rectangles. Then, a large rectangle surrounding 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 and vertical lines are divided on the target rectangle to form a grid covering all the component rectangles. Finally, a regular optional path is divided according to the grid, and the target connection line path between the first and second connection points is determined on the optional path.

[0055] Obviously, in the present application, by abstracting electrical components into rectangles, it is avoided that due to the different connection point positions of various electrical components with different shapes, it is difficult to connect the lines horizontally and vertically when connecting the electrical components. Moreover, after dividing the grid, the connection can be made on the optional connection paths divided by the grid between the connection points, ensuring that the connection between two connection points is horizontal and vertical and regular. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present 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 in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

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

[0058] Figure 2 is a schematic flowchart of a power simulation modeling connection method provided by the embodiment of the present application;

[0059] Figure 3 is a scenario example diagram of determining a target rectangle disclosed by the embodiment of the present application;

[0060] Figure 4 is a scenario example diagram of dividing optional paths disclosed by the embodiment of the present application;

[0061] Figure 5 is a schematic structural diagram of a power simulation modeling connection device disclosed by the embodiment of the present application;

[0062] Figure 6 is a hardware structure block diagram of a power simulation modeling connection device disclosed by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

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

[0064] Next, a detailed introduction to the power simulation modeling connection method of the present application will be given. Please refer to Figure 2 , Figure 2 is a schematic flowchart of a power simulation modeling connection method provided by the embodiment of the present application. The method includes:

[0065] Step S100: Determine a plurality of different component rectangles, each of the component rectangles corresponding to an electrical component for power system simulation.

[0066] Specifically, electrical components of different types may have different shapes and sizes, and the positions of the connection ports of electrical components of different types may also be different. To standardize the shapes of each electrical component, the electrical components can be abstracted as rectangles, serving as component rectangles, and the size of each component rectangle can just enclose its corresponding electrical component.

[0067] Step S110: Establish a plane coordinate system such that each of the component rectangles falls within the plane coordinate system.

[0068] Specifically, all component rectangles can fall within the coordinate system, and each component rectangle can be in a different position without overlapping areas.

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

[0070] In an alternative embodiment, each component rectangle can be located in the first quadrant of the coordinate system to facilitate subsequent operations.

[0071] Step S120: 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.

[0072] Specifically, since the component rectangles are scattered within the plane coordinate system, to facilitate the analysis of the positional relationships of the component rectangles, a large rectangle that encloses all of the component rectangles can be determined as the target rectangle. Among them, the sides of the target rectangle can be parallel or perpendicular to the coordinate axes of the coordinate system.

[0073] Step S130: Arbitrarily select two component rectangles, and select a connection point on any side of each of the selected component rectangles as the first connection point and the second connection point respectively.

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

[0075] Step S140: Based on the first and second connection points, divide an optional connection path on the target rectangle.

[0076] Specifically, multiple horizontal and vertical 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, so that multiple intersections and multiple line segments formed by the intersection of multiple horizontal lines and multiple vertical lines can be obtained.

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

[0078] Step S150: Determine the target connection path between the first connection point and the second connection point on the optional connection path according to the multiple intersections.

[0079] Specifically, a connection path can be determined on the optional connection path as the target connection path according to the positions of the respective intersections for connecting the first connection point and the second connection point.

[0080] 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, the lines are distinct, avoiding the formation of numerous and complex connection paths among a large number of electrical components, and the connection paths are clear, easy to distinguish, and convenient for staff to analyze problems and formulate various strategies.

[0081] In some embodiments of the present application, the process of step S120, 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, is introduced. Next, the process of determining the target rectangle will be further described.

[0082] Specifically, it may include:

[0083] 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.

[0084] 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.

[0085] 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.

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

[0087] S5. The left side, right side, bottom side, and the 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.

[0088] Specifically, the coordinates of each side of each component rectangle can be determined first. Suppose there are N component rectangles in total. Let i = 1, 2, 3... N. Each component rectangle i can be represented by a quaternion Ji = {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.

[0089] Referring to Figure 3 , Figure 3 shows a specific scenario example diagram, in which there are three different component rectangles, which can be represented as J1, J2, and J3 respectively. According to the above quaternion representation method, J1 can be represented as J1 = {L1, T1, R1, B1}, and J2 and J3 can obtain the corresponding quaternions by referring to this method. P1 and P2 can represent the first and second connection points respectively.

[0090] Then, the candidate rectangle that just contains J1, J2, and J3 can be determined, denoted as J m , where J m can be represented as follows:

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

[0092] Obviously, there is:

[0093]

[0094]

[0095]

[0096]

[0097] In order 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:

[0098] L M = L m - ΔL

[0099] T M = T m + ΔT

[0100] R M = R m + ΔR

[0101] B M = B m - ΔB

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

[0103] In some embodiments of the present application, the above step S140, the process of dividing the optional connection paths on the target rectangle based on the first and second connection points, will be further described below.

[0104] Specifically, it may include:

[0105] 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 according to the two coordinates.

[0106] Specifically, the first connection point and the second connection point are at a certain distance from each other. 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.

[0107] 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.

[0108] Specifically, the first distance and the second distance can be respectively divided into multiple unit distances of appropriate lengths. The number of unit distances divided from the first distance and the second distance is not the same.

[0109] To introduce this step more clearly, the process of this step will be illustrated with a specific example below. For details, please refer to Figure 4 .

[0110] Suppose Figure 4 where P1 is the first connection point with coordinates {P 1X , P 1Y}, and 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 intervals between the first connection point and the second connection point on the X-axis and Y-axis are respectively divided into N X unit intervals ΔX, and N Y unit intervals ΔY. The calculation formulas for ΔX and ΔY are as follows respectively:

[0111]

[0112]

[0113] 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 interval until the multiple horizontal lines cover all the component rectangles.

[0114] 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.

[0115] And that the multiple horizontal lines cover all the component rectangles can mean that the horizontal line with the largest ordinate is above the side with the largest ordinate among all the component rectangles, and the horizontal line with the smallest ordinate is below the side with the smallest ordinate among all the component rectangles.

[0116] 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.

[0117] 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.

[0118] And that the multiple vertical lines cover all the component rectangles can mean that the vertical line with the largest abscissa is to the right of the side with the largest abscissa among all the component rectangles, and the vertical line with the smallest abscissa is to the left of the side with the smallest abscissa among all the component rectangles.

[0119] In an alternative embodiment, a grid formed by the divided alternative paths, and the coverage of the grid can 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 alternative paths, in order to define the range of the alternative paths, the alternative paths may not continue to expand to the right at this time.

[0120] As can be seen from the above solution, 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.

[0121] In some embodiments of the present application, the above step S150, the process of determining the target connection path between the first connection point and the second connection point on the alternative connection path according to the plurality of intersection points is introduced. Next, the process of determining the target connection path will be further described.

[0122] Specifically, it may include:

[0123] S1. Denote the intersection points inside the component rectangle as 1, and the intersection points on the side and outside the component rectangle as 0.

[0124] Specifically, for the intersection points denoted as 1, their positions can be represented as having obstacles, and the connection path cannot pass through the positions with obstacles. For the intersection points denoted as 0, their positions can be represented as having no obstacles, and the connection path can pass through the positions with obstacles.

[0125] S2. Start connecting lines from the intersection point on the first connection point, and each time extend the connection line by one step length to another intersection point. One step length is the distance between two adjacent intersection points in the horizontal or vertical direction.

[0126] Specifically, each time the connection line can be extended in the horizontal or vertical direction by one step length, and extending from the current intersection point to the next adjacent intersection point can be recorded as extending by one step length.

[0127] S3. If the connection line encounters an intersection point denoted as 0 after extension, continue to extend the connection line. If the connection line encounters an intersection point denoted as 1 after extension, return to the previous intersection point and reconnect until the connection line is extended to the intersection point on the second connection point, and the target connection path between the first connection point and the second connection point is obtained.

[0128] Specifically, if the connection line encounters an intersection point denoted as 1 after extension, it can be explained that the selected intersection point is in an unconnectable position. Then, it can return to the previous intersection point and reselect other intersection points to extend the connection line until a connection path is formed between the first connection point and the second connection point as the target connection path.

[0129] In addition, if after traversing all the intersection points marked as 0, the second connection point is still not found, it can be considered that there is no connection path between the first connection point and the second connection point.

[0130] As can be seen from the above solution, the present application can transform the problem of connecting electrical components into the problem of finding the path of the intersection points marked as 0 among the discrete intersection points, and can achieve finding a horizontal and vertical connection path, or can determine that there is no connection path between two connection points. Obviously, this solution has universality and can be used for wiring in very large-scale circuits. Compared with the prior art methods of finding rules and enumerating, which are only applicable to a small number or a specific number of components, the logical judgment is greatly simplified.

[0131] Next, the power simulation modeling wiring device provided by the embodiments of the present application will be described. The power simulation modeling wiring device described below can be correspondingly referred to the power simulation modeling wiring method described above.

[0132] First, in combination with Figure 5 the power simulation modeling wiring device will be introduced. As Figure 5 shown, the power simulation modeling wiring device may include:

[0133] Component rectangle determination unit 100, configured to determine a plurality of different component rectangles, and each of the component rectangles corresponds to an electrical component for power system simulation;

[0134] Coordinate system establishment unit 110, configured to establish a plane coordinate system such that each of the component rectangles falls into the plane coordinate system, the sides of each of the component rectangles are parallel or perpendicular to the coordinate axes of the plane coordinate system, each of the component rectangles is in a different position, and there is no overlapping area;

[0135] Target rectangle determination unit 120, configured to 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;

[0136] Connection point selection unit 130, configured to arbitrarily select two component rectangles, and select a connection point on an arbitrary side of each selected component rectangle as the first connection point and the second connection point respectively;

[0137] Path division unit 140, configured to 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 based on the first and second connection points, to obtain a plurality of intersection points and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, the first and second connection points are at different intersection points, and the line segments outside each of the component rectangles are used as optional connection paths;

[0138] A path determination unit 150 is configured to determine a target connection path between the first connection point and the second connection point on the optional connection path according to the multiple intersection points.

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

[0140] A 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;

[0141] A 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;

[0142] A 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;

[0143] A 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;

[0144] A fifth target rectangle determination subunit is 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.

[0145] Optionally, the path division unit may include:

[0146] A spacing determination unit is configured to respectively determine the coordinates of the first connection point and the second connection point, and determine a first spacing on the horizontal axis and a second spacing on the vertical axis between the first connection point and the second connection point according to the two coordinates;

[0147] A unit spacing determination unit is 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;

[0148] A horizontal line division unit is 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;

[0149] A vertical line division unit is 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.

[0150] Optionally, the path determination unit may include:

[0151] An intersection marking unit, configured to mark the intersections inside the element rectangle as 1 and the intersections on the side and outside the element rectangle as 0;

[0152] A connection determination unit, configured to start connecting lines from the intersection at the first connection point, extend the connection line by one step to another intersection each time, where one step is the distance between two adjacent intersections in the horizontal or vertical direction. If the connection line encounters an intersection marked as 0 after extension, continue to extend the connection line. If the connection line encounters an intersection marked as 1 after extension, return to the previous intersection to reconnect the line until the connection line is extended to the intersection at the second connection point, obtaining the target connection path between the first connection point and the second connection point.

[0153] The information recommendation device provided by the embodiments of the present application can be applied to power simulation modeling connection devices. Figure 6 The hardware structure block diagram of the power simulation modeling connection device is shown. Refer to Figure 6 , the hardware structure of the power simulation modeling connection 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;

[0154] 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;

[0155] 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.;

[0156] 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;

[0157] Wherein, the memory stores a program, and the processor can call the program stored in the memory, and the program is used for:

[0158] Determine a plurality of different element rectangles, each of the element rectangles corresponding to an electrical component for power system simulation;

[0159] Establish a plane coordinate system such that each of the element rectangles falls into the plane coordinate system, the sides of each of the element rectangles are parallel or perpendicular to the coordinate axes of the plane coordinate system, each of the element rectangles is in a different position, and there is no overlapping area;

[0160] 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;

[0161] Arbitrarily select two component rectangles, and select a connection point on any side of each selected component rectangle as the first connection point and the second connection point respectively;

[0162] 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 intersections and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines. The first and second connection points are at different intersections, and the line segments outside each component rectangle are used as optional connection paths;

[0163] Determine a target connection path between the first connection point and the second connection point on the optional connection path according to the plurality of intersections.

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

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

[0166] Determine a plurality of different component rectangles, and each component rectangle corresponds to an electrical component for power system simulation;

[0167] Establish a plane coordinate system so that each component rectangle falls into the plane coordinate system, the sides of each component rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system, each component rectangle is in a different position, and there is no overlapping area;

[0168] 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;

[0169] Arbitrarily select two component rectangles, and select a connection point on any side of each selected component rectangle as the first connection point and the second connection point respectively;

[0170] 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 intersections and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines. The first and second connection points are at different intersections, and the line segments outside each component rectangle are used as optional connection paths;

[0171] Based on the multiple intersection points, determine a target connection path between the first connection point and the second connection point on the optional connection path.

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

[0173] Finally, it should also be noted that in this document, 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, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes 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.

[0174] The various embodiments in this specification are described in a progressive manner, and the key points of each embodiment are the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.

[0175] 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 these embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A power simulation modeling wiring method, characterized in that Comprising: Determine a plurality of different component rectangles, each of the component rectangles corresponding to an electrical component for power system simulation; Establish a plane coordinate system such that each of the component rectangles falls within the plane coordinate system, the sides of each of the component rectangles being parallel or perpendicular to the coordinate axes of the plane coordinate system, each of the component rectangles being in a different position and having no overlapping areas; Determine a target rectangle enclosing all of the component rectangles, the sides of the target rectangle being parallel or perpendicular to the coordinate axes of the plane coordinate system; Arbitrarily select two component rectangles, and select a connection point on an arbitrary side of each of the selected component rectangles as a first connection point and a second connection point respectively; 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 intersections and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines, the first and second connection points being at different intersections, and the line segments outside each of the component rectangles being used as optional connection paths; Determine a target connection path between the first connection point and the second connection point on the optional connection path according to the plurality of intersections; 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: Respectively determine the coordinates of the first connection point and the second connection point, and determine a first spacing on the horizontal axis and a 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 of 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 of the component rectangles; The expression of the first unit spacing is: ; The expression of the second unit spacing is: ; Among them, is the abscissa of the first connection point, is the ordinate of the first connection point, is the abscissa of the second connection point, is the ordinate of the second connection point, is the first set number, is the second set number.

2. The method according to claim 1, characterized in that, The determining a target rectangle enclosing all of 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 component rectangles in the plane coordinate system, and determine the top side of the rectangle at its ordinate; The left side, the right side, the bottom side and the top side are combined into 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, wherein Determining the target connection path between the first connection point and the second connection point on the optional connection path according to the multiple intersection points includes: Denote the intersection points inside the component rectangle as 1, and the intersection points on and outside the component rectangle as 0; Start connecting lines from the intersection point on the first connection point, and each time extend the connection line by one step to another intersection point, where one step is the distance between two adjacent intersection points in the horizontal or vertical direction; If the connection line encounters an intersection point marked as 0 after extension, continue to extend the connection line. If the connection line encounters an intersection point marked as 1 after extension, return to the previous intersection point and reconnect until the connection line extends to the intersection point on the second connection point, obtaining the target connection path between the first connection point and the second connection point.

4. A power simulation modeling wiring device, characterized in that Including: A component rectangle determination unit for determining a plurality of different component rectangles, where each component rectangle corresponds to an electrical component for power system simulation; A coordinate system establishment unit for establishing a plane coordinate system such that each of the component rectangles falls within the plane coordinate system, the sides of each component rectangle are parallel or perpendicular to the coordinate axes of the plane coordinate system, each component rectangle is in a different position, and there is no overlapping area; A target rectangle determination unit for determining 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; A connection point selection unit for arbitrarily selecting two component rectangles and selecting a connection point on any side of each selected component rectangle as the first connection point and the second connection point respectively; A path division unit for 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, obtaining a plurality of intersection points and a plurality of line segments formed by the intersection of the plurality of horizontal lines and the plurality of vertical lines. The first and second connection points are at different intersection points, and the line segments outside each component rectangle are used as optional connection paths; A path determination unit for determining the target connection path between the first connection point and the second connection point on the optional connection path according to the multiple intersection points; The path 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 between the first connection point and the second connection point in 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; A horizontal line division unit for adding a horizontal line parallel to the horizontal axis through the first connection point, and adding 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; Vertical line dividing unit, used 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; The expression of the first unit interval is: ; The expression of the second unit interval is: ; Among them, is the abscissa of the first connection point, is the ordinate of the first connection point, is the abscissa of the second connection point, is the ordinate of the second connection point, is the first set number, is the second set number.

5. The device according to claim 4, characterized in that, The target rectangle determination unit includes: The first target rectangle determination subunit is used 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 used 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 used 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 used 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 used 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, characterized in that The path determination unit includes: The intersection point marking unit is used to mark the intersection points inside the component rectangles as 1, and mark the intersection points on the sides and outside the component rectangles as 0; The connection line determination unit is used to start connecting lines from the intersection points on the first connection point, extend the connection line by one step length to another intersection point each time, where one step length is the distance between two adjacent intersection points in the horizontal or vertical direction. If the connection line encounters an intersection point marked as 0 after extension, continue to extend the connection line. If the connection line encounters an intersection point marked as 1 after extension, return to the previous intersection point and reconnect the line until the connection line extends to the intersection point on the second connection point to obtain the target connection line path between the first connection point and the second connection point.

7. A power simulation modeling connection device, characterized in that, It includes a memory and a processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the power simulation modeling connection method according to any one of claims 1 - 3.

8. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the power simulation modeling connection method according to any one of claims 1 - 3.

Citation Information

Patent Citations

  • Functional block intelligent wiring method in modeling of control system

    CN101840202A

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

    CN113657067A