Power grid topology optimization method and system based on alignment strategy and force steering algorithm
Grid processing and node adjustment are performed on the power grid topology map through alignment strategies and force-directed algorithms, which solves the problems of chaotic layout and poor readability of the power grid topology map, and significantly improves the efficiency and quality of power grid analysis.
Patent Information
- Application Number
- CN202410697083.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-17
AI Technical Summary
The existing power grid topology diagram drawing methods have problems such as chaotic layout, overlapping points and lines, and unreasonable distances, which affect the readability and safety and stability analysis of the power grid.
The power grid topology optimization method based on alignment strategy and force-directed algorithm is used to divide the power grid topology diagram through gridding, determine the coordinates of key nodes and intersections, and use the alignment strategy or force-directed algorithm to adjust node positions to generate an optimized power grid topology diagram.
It effectively optimizes the layout of the power grid topology diagram, improves the aesthetics and readability of the diagram, and thereby improves the analysis efficiency and quality of the power grid.
Smart Images

Figure CN118656940A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid topology drawing, and more specifically, to a power grid topology optimization method and system based on an alignment strategy and a force-directed algorithm. Background Art
[0002] The grid topology diagram shows the physical connection of the grid through nodes (such as busbars, generators, etc.) and the transmission lines connecting these nodes. In the field of visual analysis of the grid, drawing the grid topology diagram to understand the overall structure of the grid and the relationship between devices, and then conducting reliability analysis and optimization of the grid is a common method in this field.
[0003] In existing drawing software and platforms, the main method for creating power grid topology maps is to manually drag and draw nodes and lines in sequence as needed, and then build the local power grid architecture of the study area, and there is no measure to further optimize the generated original power grid topology map. However, the single manual drag and draw has problems such as chaotic layout, point and line overlap, and unreasonable point and line distance (too close or too far), which cannot clearly display the subsequent calculation results, greatly reducing the readability of the power grid, and thus affecting the safety and stability analysis of the power grid. Summary of the invention
[0004] In view of the above problems, the present invention proposes a power grid topology optimization method based on an alignment strategy and a force-directed algorithm, comprising:
[0005] Obtaining an original power grid topology map of the power grid, and performing grid division on the original power grid topology map to generate a gridded original power grid topology map;
[0006] Determine key nodes, grid line intersections and edge intersections in the gridded original power grid topology map, and determine coordinates of the key nodes, grid line intersections and edge intersections in the gridded original power grid topology map;
[0007] The coordinates of the key nodes are kept unchanged, and the target nodes are moved or adjusted according to the coordinates of the intersection points of the grid lines and the edge intersection points according to the alignment strategy or the force-directed algorithm to generate an optimized grid topology diagram of the grid.
[0008] Optionally, the original power grid topology diagram is divided into grids, including:
[0009] The drawing area of the original power grid topology diagram is cut in the horizontal direction and the vertical direction at the determined division interval.
[0010] Optionally, the division interval is determined according to the number of nodes in the original power grid topology map and the pixels of the drawing area canvas.
[0011] Optionally, the calculation formula for determining the partition interval is as follows:
[0012] L=k1M / N
[0013] Among them, L is the division interval, k1 is the adjustment coefficient, M is the number of nodes, and N is the pixel of the canvas.
[0014] Optionally, a key node is specifically a node that is connected to the most other nodes in the grid of the gridded original power grid topology diagram.
[0015] Optionally, the target node includes: a first target node and a second target node.
[0016] Optionally, according to the coordinates of the intersection points of the grid lines and the intersection points of the edges, the target node is moved or adjusted according to an alignment strategy or a force-directed algorithm, including:
[0017] Determine the node with the shortest Euclidean distance and non-critical node in the grid adjacent to each grid line intersection and edge intersection, and generate the node set S with the shortest Euclidean distance and non-critical node cross , for the nodes with the shortest non-Euclidean distance and non-critical nodes, generate a node set S force , S cross The node in S is taken as the first target node, and the first target node is moved according to the alignment strategy. force The middle node is used as the second target node, and the position of the second target node is adjusted according to the force-directed algorithm.
[0018] Optionally, moving the first target node according to the alignment strategy includes:
[0019] The first target node is translated horizontally or vertically to an intersection point with the shortest Euclidean distance.
[0020] Optionally, adjusting the position of the second target node according to a force-directed algorithm includes:
[0021] Calculate the mutual force between each node in the second target node and other nodes, wherein the mutual force includes: attraction and repulsion;
[0022] According to the mutual force, the resultant force between each node and other nodes is determined, and the position and direction of movement of the second target node are determined according to the magnitude and direction of the resultant force. According to the determined position and direction of movement, the positions of all second target nodes in the grid are adjusted, and the resultant force is repeatedly calculated and iterated after the position is changed until the adjustment is completed.
[0023] Optionally, the Euclidean distance is calculated as follows:
[0024]
[0025] Where d is the Euclidean distance, (x i ,y j ) are the coordinates of the intersection point, and (p, q) are the node coordinates.
[0026] Optional, S cross and S force Satisfies the following formula:
[0027] S cross ∪S force =S O , S O The set of all nodes.
[0028] Optionally, the gravity calculation formula is as follows:
[0029] F1=K1 / r 2
[0030] Among them, F1 is the gravitational force between the two nodes, K1 is the gravitational coefficient, and r is the distance between the two nodes.
[0031] Optionally, the repulsion force is calculated as follows:
[0032] F1=K1 / r 2
[0033] Among them, F1 is the repulsion between the two nodes, K2 is the repulsion coefficient, and r is the distance between the two nodes.
[0034] Optionally, the formula for calculating the resultant force is as follows:
[0035]
[0036] Among them, F 合 is the resultant force between two nodes, n is the number of nodes that interact with the current node, F i is the i-th node that interacts with the current node.
[0037] On the other hand, the present invention also proposes a power grid topology optimization system based on an alignment strategy and a force-directed algorithm, comprising:
[0038] A division unit, used for obtaining an original power grid topology map of the power grid, performing grid division on the original power grid topology map, and generating a gridded original power grid topology map;
[0039] A node determination unit, used to determine key nodes, grid line intersections and edge intersections in the gridded original power grid topology map, and determine the coordinates of the key nodes, grid line intersections and edge intersections in the gridded original power grid topology map;
[0040] The optimization unit is used to keep the coordinates of the key nodes unchanged, and according to the coordinates of the intersection points of the grid lines and the edge intersection points, according to the alignment strategy or the force-directed algorithm, move or adjust the target nodes to generate an optimized grid topology diagram of the grid.
[0041] Optionally, the original power grid topology diagram is divided into grids, including:
[0042] The drawing area of the original power grid topology diagram is cut in the horizontal direction and the vertical direction at the determined division interval.
[0043] Optionally, the division interval is determined according to the number of nodes in the original power grid topology map and the pixels of the drawing area canvas.
[0044] Optionally, the calculation formula for determining the partition interval is as follows:
[0045] L=k1M / N
[0046] Among them, L is the division interval, k1 is the adjustment coefficient, M is the number of nodes, and N is the pixel of the canvas.
[0047] Optionally, a key node is specifically a node that is connected to the most other nodes in the grid of the gridded original power grid topology diagram.
[0048] Optionally, the target node includes: a first target node and a second target node.
[0049] Optionally, according to the coordinates of the intersection points of the grid lines and the intersection points of the edges, the target node is moved or adjusted according to an alignment strategy or a force-directed algorithm, including:
[0050] Determine the node with the shortest Euclidean distance and non-critical node in the grid adjacent to each grid line intersection and edge intersection, and generate the node set S with the shortest Euclidean distance and non-critical node cross , for the nodes with the shortest non-Euclidean distance and non-critical nodes, generate a node set S force , S cross The node in S is taken as the first target node, and the first target node is moved according to the alignment strategy. force The middle node is used as the second target node, and the position of the second target node is adjusted according to the force-directed algorithm.
[0051] Optionally, moving the first target node according to the alignment strategy includes:
[0052] The first target node is translated horizontally or vertically to an intersection point with the shortest Euclidean distance.
[0053] Optionally, adjusting the position of the second target node according to a force-directed algorithm includes:
[0054] Calculate the mutual force between each node in the second target node and other nodes, wherein the mutual force includes: attraction and repulsion;
[0055] According to the mutual force, the resultant force between each node and other nodes is determined, and the position and direction of movement of the second target node are determined according to the magnitude and direction of the resultant force. According to the determined position and direction of movement, the positions of all second target nodes in the grid are adjusted, and the resultant force is repeatedly calculated and iterated after the position is changed until the adjustment is completed.
[0056] Optionally, the Euclidean distance is calculated as follows:
[0057]
[0058] Where d is the Euclidean distance, (x i ,y j ) are the coordinates of the intersection point, and (p, q) are the node coordinates.
[0059] Optional, S cross and S force Satisfies the following formula:
[0060] S cross ∪S force =S O , S O The set of all nodes.
[0061] Optionally, the gravity calculation formula is as follows:
[0062] F1=K1 / r 2
[0063] Among them, F1 is the gravitational force between the two nodes, K1 is the gravitational coefficient, and r is the distance between the two nodes.
[0064] Optionally, the repulsion force is calculated as follows:
[0065] F1=K1 / r 2
[0066] Among them, F1 is the repulsion between the two nodes, K2 is the repulsion coefficient, and r is the distance between the two nodes.
[0067] Optionally, the formula for calculating the resultant force is as follows:
[0068]
[0069] Among them, F 合 is the resultant force between two nodes, n is the number of nodes that interact with the current node, F i is the i-th node that interacts with the current node.
[0070] In yet another aspect, the present invention further provides a computing device, comprising: one or more processors;
[0071] a processor for executing one or more programs;
[0072] When the one or more programs are executed by the one or more processors, the above-described method is implemented.
[0073] In yet another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, the method described above is implemented.
[0074] Compared with the prior art, the present invention has the following beneficial effects:
[0075] The present invention provides a power grid topology optimization method based on an alignment strategy and a force-directed algorithm, comprising: obtaining an original power grid topology map of a power grid, meshing the original power grid topology map, and generating a meshed original power grid topology map; determining key nodes, grid line intersections, and edge intersections in the meshed original power grid topology map, and determining the coordinates of the key nodes, grid line intersections, and edge intersections in the meshed original power grid topology map; keeping the coordinates of the key nodes unchanged, and moving or adjusting the target nodes according to the coordinates of the grid line intersections and edge intersections according to the alignment strategy or the force-directed algorithm to generate an optimized power grid topology map of the power grid. The present invention can effectively optimize the power grid topology by adjusting the nodes through the alignment strategy or the force-directed algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 is a flow chart of the method of the present invention;
[0077] Figure 2 A schematic diagram of selecting a mobile node in an alignment strategy in an embodiment of the method of the present invention;
[0078] Figure 3 A schematic diagram showing the comparison of the topology diagram before and after optimization of the method embodiment of the present invention;
[0079] Figure 4 It is a structural diagram of the system of the present invention. DETAILED DESCRIPTION
[0080] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.
[0081] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0082] Embodiment 1:
[0083] The present invention proposes a power grid topology optimization method based on alignment strategy and force-directed algorithm, such as Figure 1 As shown, including:
[0084] Step 1: obtaining an original power grid topology map of the power grid, and performing grid division on the original power grid topology map to generate a gridded original power grid topology map;
[0085] Step 2: determining key nodes, grid line intersections and edge intersections in the gridded original power grid topology map, and determining coordinates of the key nodes, grid line intersections and edge intersections in the gridded original power grid topology map;
[0086] Step 3: Keep the coordinates of the key nodes unchanged, and move or adjust the target nodes according to the coordinates of the intersection points of the grid lines and the edge intersection points, according to the alignment strategy or the force-directed algorithm, to generate an optimized grid topology map of the grid.
[0087] Optionally, the original power grid topology diagram is divided into grids, including:
[0088] The drawing area of the original power grid topology diagram is cut in the horizontal direction and the vertical direction at the determined division interval.
[0089] Optionally, the division interval is determined according to the number of nodes in the original power grid topology map and the pixels of the drawing area canvas.
[0090] Optionally, the calculation formula for determining the partition interval is as follows:
[0091] L=k1M / N
[0092] Among them, L is the division interval, k1 is the adjustment coefficient, M is the number of nodes, and N is the pixel of the canvas.
[0093] Optionally, a key node is specifically a node that is connected to the most other nodes in the grid of the gridded original power grid topology diagram.
[0094] Optionally, the target node includes: a first target node and a second target node.
[0095] Optionally, according to the coordinates of the intersection points of the grid lines and the intersection points of the edges, the target node is moved or adjusted according to an alignment strategy or a force-directed algorithm, including:
[0096] Determine the node with the shortest Euclidean distance and non-critical node in the grid adjacent to each grid line intersection and edge intersection, and generate the node set S with the shortest Euclidean distance and non-critical node cross , for the nodes with the shortest non-Euclidean distance and non-critical nodes, generate a node set S force , S cross The node in S is taken as the first target node, and the first target node is moved according to the alignment strategy. force The middle node is used as the second target node, and the position of the second target node is adjusted according to the force-directed algorithm.
[0097] Optionally, moving the first target node according to the alignment strategy includes:
[0098] The first target node is translated horizontally or vertically to an intersection point with the shortest Euclidean distance.
[0099] Optionally, adjusting the position of the second target node according to a force-directed algorithm includes:
[0100] Calculate the mutual force between each node in the second target node and other nodes, wherein the mutual force includes: attraction and repulsion;
[0101] According to the mutual force, the resultant force between each node and other nodes is determined, and the position and direction of movement of the second target node are determined according to the magnitude and direction of the resultant force. According to the determined position and direction of movement, the positions of all second target nodes in the grid are adjusted, and the resultant force is repeatedly calculated and iterated after the position is changed until the adjustment is completed.
[0102] Optionally, the Euclidean distance is calculated as follows:
[0103]
[0104] Where d is the Euclidean distance, (x i ,y j ) are the coordinates of the intersection point, and (p, q) are the node coordinates.
[0105] Optional, S cross and S force Satisfies the following formula:
[0106] S cross ∪S force =S O , S O The set of all nodes.
[0107] Optionally, the gravity calculation formula is as follows:
[0108] F1=K1 / r 2
[0109] Among them, F1 is the gravitational force between the two nodes, K1 is the gravitational coefficient, and r is the distance between the two nodes.
[0110] Optionally, the repulsion force is calculated as follows:
[0111] F1=K1 / r 2
[0112] Among them, F1 is the repulsion between the two nodes, K2 is the repulsion coefficient, and r is the distance between the two nodes.
[0113] Optionally, the formula for calculating the resultant force is as follows:
[0114]
[0115] Among them, F 合 is the resultant force between two nodes, n is the number of nodes that interact with the current node, F i is the i-th node that interacts with the current node.
[0116] The present invention will be further described below in conjunction with embodiments:
[0117] 1. Divide the power grid topology into grids:
[0118] For the original topology map drawn, the entire drawing area is divided into grids at certain intervals, that is, the drawing area is cut in the horizontal and vertical directions. The granularity of the division is determined according to the total number of nodes and the size of the canvas. Assuming the total number of nodes is N and the pixels of the canvas are M, the interval L between each grid line is determined as: k1M / N, where k1 is the adjustment coefficient. After division, the grid is R rows and Q columns.
[0119] 2 Select local key nodes:
[0120] After dividing the grid lines horizontally and vertically, the optimization of the overall topology map is transformed into the optimization of the local grid. Let the nodes in the i-th row and j-th column of the grid be G ij, in each grid, find a node that is most connected to other nodes, defined as a key node. The degree of disorder of the topological graph is mainly determined by the relative position of these key nodes and other nodes. Let G ij The key node in is P mij , let the key node set be S im , S im ={P|P=P mij ,i∈{1...R},j∈{1...Q}},This method stipulates that the coordinates of the key nodes remain unchanged.
[0121] 3. Some edge nodes are moved and displayed according to the alignment strategy:
[0122] Find all the intersections of the grid lines and the intersections of the grid lines with the edges of the topology map, such as Figure 3 As shown, record the coordinates of each intersection point O(x i ,y j ), (i∈{1...R+1},j∈{1...Q+1}). For each intersection, traverse and find several grid areas adjacent to the intersection ( Figure 1 ), the node closest to this intersection, non-critical node and has not moved. The steps are as follows: Let the node coordinates be (p, q), calculate the Euclidean distance When the number of d that meets the conditions is the smallest, set the mobile node set to S cross , modify the node coordinates to the intersection coordinates (x i ,y j ), and add this node to S cross In , the movement of nodes is realized.
[0123] The idea of optimizing the layout by alignment strategy is to translate some edge nodes in the grid to the grid lines, so that some nodes in the topology map are aligned in the horizontal and vertical directions, achieving a better overall effect.
[0124] 4 Use the force-directed algorithm to readjust the positions of some nodes:
[0125] The force-directed algorithm calculates the resultant force of the nodes by simulating the attraction and repulsion between the nodes, and then moves the position of the nodes by the resultant force. Through iterative adjustment, points that are too close will be bounced away, and points that are too far will be pulled in, and finally the layout will reach a dynamic balance. This method uses the idea of the force-directed algorithm to optimize the power grid topology. The specific steps are as follows.
[0126] 4.1 Determine the location of nodes to be added to the calculation:
[0127] First, record the initial position of each node and calculate the distance between nodes. Since we have fixed some cross nodes in the above alignment strategy, we assume that the set of nodes participating in the force-directed calculation is Sforce , S cross ∪S force =S O ,
[0128] 4.2 Calculate the resultant force:
[0129] For each node, we need to calculate the attractive and repulsive forces between it and all other nodes, and finally calculate the resultant force between them.
[0130] According to Coulomb's law, the repulsive force F1 between nodes is calculated:
[0131]
[0132] Among them, q1q2 is the amount of electrons that simulate the repulsion between electrons, which is 1, K1 is the repulsion coefficient, and r is the distance between the two points. Simplified F1 = k1 / r 2 .
[0133] Calculate the gravitational force F2 at each end of each edge according to Hooke's law:
[0134] F2=K2r
[0135] Among them, K2 is the gravitational coefficient.
[0136] n is the number of nodes that interact with the current node. All forces here are directional, and the moving step and position are determined based on the magnitude and direction of the resultant force.
[0137] 4.3 Update location:
[0138] Since we stipulate that S im The position of the key node in cannot be changed, so if the node belongs to S im , the node position remains unchanged; if the node does not belong to S im , according to the resultant force calculated in 4.4.3, move the node, and set the step size according to the specific situation. It is generally initially set to L / 5.
[0139] 4.4 Iterative calculation:
[0140] Repeat steps 4.4.2 and 4.4.3, and determine the number of iterations based on the amount of data in the specific topology.
[0141] The present invention uses an alignment strategy to align some nodes in the topology graph in the horizontal and vertical directions to achieve a better overall effect; through the force-guided algorithm, it optimizes the problems of unreasonable spacing between nodes, point and line overlap and intersection, such as Figure 3By optimizing and re-layouting the chaotic layout problem of the power grid topology map according to the present invention, the aesthetics and readability of the topology map are significantly improved, thereby improving the efficiency and quality of further analysis of the power grid.
[0142] Embodiment 2:
[0143] The present invention also proposes a power grid topology optimization system 200 based on an alignment strategy and a force-directed algorithm, such as Figure 4 As shown, including:
[0144] The division unit 201 is used to obtain an original power grid topology map of the power grid, perform grid division on the original power grid topology map, and generate a gridded original power grid topology map;
[0145] A node determination unit 202 is used to determine key nodes, grid line intersections and edge intersections in the gridded original power grid topology map, and determine the coordinates of the key nodes, grid line intersections and edge intersections in the gridded original power grid topology map;
[0146] The optimization unit 203 is used to keep the coordinates of the key nodes unchanged, and move or adjust the target nodes according to the coordinates of the intersection points of the grid lines and the edge intersection points according to the alignment strategy or the force-directed algorithm to generate an optimized power grid topology map of the power grid.
[0147] Optionally, the original power grid topology diagram is divided into grids, including:
[0148] The drawing area of the original power grid topology diagram is cut in the horizontal direction and the vertical direction at the determined division interval.
[0149] Optionally, the division interval is determined according to the number of nodes in the original power grid topology map and the pixels of the drawing area canvas.
[0150] Optionally, the calculation formula for determining the partition interval is as follows:
[0151] L=k1M / N
[0152] Among them, L is the division interval, k1 is the adjustment coefficient, M is the number of nodes, and N is the pixel of the canvas.
[0153] Optionally, a key node is specifically a node that is connected to the most other nodes in the grid of the gridded original power grid topology diagram.
[0154] Optionally, the target node includes: a first target node and a second target node.
[0155] Optionally, according to the coordinates of the intersection points of the grid lines and the intersection points of the edges, the target node is moved or adjusted according to an alignment strategy or a force-directed algorithm, including:
[0156] Determine the node with the shortest Euclidean distance and non-critical node in the grid adjacent to each grid line intersection and edge intersection, and generate the node set S with the shortest Euclidean distance and non-critical node cross , for the nodes with the shortest non-Euclidean distance and non-critical nodes, generate a node set S force , S cross The node in S is taken as the first target node, and the first target node is moved according to the alignment strategy. force The middle node is used as the second target node, and the position of the second target node is adjusted according to the force-directed algorithm.
[0157] Optionally, moving the first target node according to the alignment strategy includes:
[0158] The first target node is translated horizontally or vertically to an intersection point with the shortest Euclidean distance.
[0159] Optionally, adjusting the position of the second target node according to a force-directed algorithm includes:
[0160] Calculate the mutual force between each node in the second target node and other nodes, wherein the mutual force includes: attraction and repulsion;
[0161] According to the mutual force, the resultant force between each node and other nodes is determined, and the position and direction of movement of the second target node are determined according to the magnitude and direction of the resultant force. According to the determined position and direction of movement, the positions of all second target nodes in the grid are adjusted, and the resultant force is repeatedly calculated and iterated after the position is changed until the adjustment is completed.
[0162] Optionally, the Euclidean distance is calculated as follows:
[0163]
[0164] Where d is the Euclidean distance, (x i ,y j ) are the coordinates of the intersection point, and (p, q) are the node coordinates.
[0165] Optional, S cross and S force Satisfies the following formula:
[0166] S cross ∪S force =S O , S O The set of all nodes.
[0167] Optionally, the gravity calculation formula is as follows:
[0168] F1=K1 / r2
[0169] Among them, F1 is the gravitational force between the two nodes, K1 is the gravitational coefficient, and r is the distance between the two nodes.
[0170] Optionally, the repulsion force is calculated as follows:
[0171] F1=K1 / r 2
[0172] Among them, F1 is the repulsion between the two nodes, K2 is the repulsion coefficient, and r is the distance between the two nodes.
[0173] Optionally, the formula for calculating the resultant force is as follows:
[0174]
[0175] Among them, F 合 is the resultant force between two nodes, n is the number of nodes that interact with the current node, F i is the i-th node that interacts with the current node.
[0176] The present invention adjusts nodes through an alignment strategy or a force-directed algorithm, and can effectively optimize the power grid topology.
[0177] Embodiment 3:
[0178] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding functions, so as to implement the steps of the method in the above embodiment.
[0179] Embodiment 4:
[0180] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both a built-in storage medium in a computer device and an extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of the method in the above embodiment.
[0181] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0182] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0183] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0185] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0186] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A power grid topology optimization method based on alignment strategy and force-directed algorithm. It is characterized in that include: Obtaining an original power grid topology map of the power grid, and performing grid division on the original power grid topology map to generate a gridded original power grid topology map; Determine key nodes, grid line intersections and edge intersections in the gridded original power grid topology map, and determine coordinates of the key nodes, grid line intersections and edge intersections in the gridded original power grid topology map; The coordinates of the key nodes are kept unchanged, and the target nodes are moved or adjusted according to the coordinates of the intersection points of the grid lines and the edge intersection points according to the alignment strategy or the force-directed algorithm to generate an optimized grid topology diagram of the grid.
2. The power grid topology optimization method according to claim 1, It is characterized in that The gridding of the original power grid topology diagram includes: The drawing area of the original power grid topology diagram is cut in the horizontal direction and the vertical direction at the determined division interval.
3. The power grid topology optimization method according to claim 2, It is characterized in that The division interval is determined according to the number of nodes in the original power grid topology diagram and the pixels of the drawing area canvas.
4. The power grid topology optimization method according to claim 3, It is characterized in that The calculation formula for determining the partition interval is as follows: L=k 1 M / N Where L is the partition interval, k 1 is the adjustment coefficient, M is the number of nodes, and N is the pixel of the canvas.
5. The power grid topology optimization method according to claim 1, It is characterized in that The key node is specifically a node that is connected to the most other nodes in the grid of the gridded original power grid topology diagram.
6. The power grid topology optimization method according to claim 1, It is characterized in that The target node includes: a first target node and a second target node.
7. The power grid topology optimization method according to claim 1, It is characterized in that The moving or adjusting the target node according to the coordinates of the intersection points of the grid lines and the intersection points of the edges and according to the alignment strategy or the force-directed algorithm includes: Determine the node with the shortest Euclidean distance and non-critical node in the grid adjacent to each grid line intersection and edge intersection, and generate the node set S with the shortest Euclidean distance and non-critical node cross , for the nodes with the shortest non-Euclidean distance and non-critical nodes, generate a node set S force , S cross The node in S is taken as the first target node, and the first target node is moved according to the alignment strategy. force The middle node is used as the second target node, and the position of the second target node is adjusted according to the force-directed algorithm.
8. The power grid topology optimization method according to claim 7, It is characterized in that The moving the first target node according to the alignment strategy includes: The first target node is translated horizontally or vertically to an intersection point with the shortest Euclidean distance.
9. The power grid topology optimization method according to claim 7, It is characterized in that The adjusting the position of the second target node according to the force-directed algorithm comprises: Calculate the mutual force between each node in the second target node and other nodes, wherein the mutual force includes: attraction and repulsion; According to the mutual force, the resultant force between each node and other nodes is determined, and the position and direction of movement of the second target node are determined according to the magnitude and direction of the resultant force. According to the determined position and direction of movement, the positions of all second target nodes in the grid are adjusted, and the resultant force is repeatedly calculated and iterated after the position is changed until the adjustment is completed.
10. The power grid topology optimization method according to claim 8, It is characterized in that The calculation formula of the Euclidean distance is as follows: Where d is the Euclidean distance, (x i ,y j ) are the coordinates of the intersection point, and (p, q) are the node coordinates.
11. The power grid topology optimization method according to claim 7, It is characterized in that The S cross and S force Satisfies the following formula: S cross ∪S force =S O , S O The set of all nodes.
12. The power grid topology optimization method according to claim 9, It is characterized in that The gravity calculation formula is as follows: 7 =K / r2 Among them, F 1 is the gravitational force between two nodes, K 1 is the gravitational coefficient, and r is the distance between the two nodes.
13. The power grid topology optimization method according to claim 9, It is characterized in that The repulsive force calculation formula is as follows: 1 =K / r2 Among them, F 1 is the repulsive force between two nodes, K 2 is the repulsion coefficient, and r is the distance between the two nodes.
14. The power grid topology optimization method according to claim 9, It is characterized in that The formula for calculating the resultant force is as follows: Among them, F 合 is the resultant force between two nodes, n is the number of nodes that interact with the current node, F i is the i-th node that interacts with the current node.
15. A power grid topology optimization system based on alignment strategy and force-directed algorithm. It is characterized in that include: A division unit, used for obtaining an original power grid topology map of the power grid, performing grid division on the original power grid topology map, and generating a gridded original power grid topology map; A node determination unit, used to determine key nodes, grid line intersections and edge intersections in the gridded original power grid topology map, and determine the coordinates of the key nodes, grid line intersections and edge intersections in the gridded original power grid topology map; The optimization unit is used to keep the coordinates of the key nodes unchanged, and according to the coordinates of the intersection points of the grid lines and the edge intersection points, according to the alignment strategy or the force-directed algorithm, move or adjust the target nodes to generate an optimized grid topology diagram of the grid.
16. The power grid topology optimization system according to claim 15, It is characterized in that The gridding of the original power grid topology diagram includes: The drawing area of the original power grid topology diagram is cut in the horizontal direction and the vertical direction at the determined division interval.
17. The power grid topology optimization system according to claim 15, It is characterized in that The division interval is determined according to the number of nodes in the original power grid topology diagram and the pixels of the drawing area canvas.
18. The power grid topology optimization system according to claim 17, It is characterized in that The calculation formula for determining the partition interval is as follows: L=kM / N Where L is the partition interval, k 1 is the adjustment coefficient, M is the number of nodes, and N is the pixel of the canvas.
19. The power grid topology optimization system according to claim 15, It is characterized in that The key node is specifically a node that is connected to the most other nodes in the grid of the gridded original power grid topology diagram.
20. The power grid topology optimization system according to claim 15, It is characterized in that The target node includes: a first target node and a second target node.
21. The power grid topology optimization system according to claim 15, It is characterized in that The moving or adjusting the target node according to the coordinates of the intersection points of the grid lines and the intersection points of the edges and according to the alignment strategy or the force-directed algorithm includes: Determine the node in the grid adjacent to each grid line intersection and edge intersection that has the shortest Euclidean distance and is not a critical node, and generate a node set Scros of the node with the shortest Euclidean distance and is not a critical node s , for the non-critical nodes with the shortest non-Euclidean distance, generate a node set Sforc e , Scros s The node in is taken as the first target node, the first target node is moved according to the alignment strategy, the node in Sforce is taken as the second target node, and the position of the second target node is adjusted according to the force-directed algorithm.
22. The power grid topology optimization system according to claim 21, It is characterized in that The moving the first target node according to the alignment strategy includes: The first target node is translated horizontally or vertically to an intersection point with the shortest Euclidean distance.
23. The power grid topology optimization system according to claim 21, It is characterized in that The adjusting the position of the second target node according to the force-directed algorithm comprises: Calculate the mutual force between each node in the second target node and other nodes, wherein the mutual force includes: attraction and repulsion; According to the mutual force, the resultant force between each node and other nodes is determined, and the position and direction of movement of the second target node are determined according to the magnitude and direction of the resultant force. According to the determined position and direction of movement, the positions of all second target nodes in the grid are adjusted, and the resultant force is repeatedly calculated and iterated after the position is changed until the adjustment is completed.
24. The power grid topology optimization method according to claim 22, It is characterized in that The calculation formula of the Euclidean distance is as follows: Where d is the Euclidean distance, (x i ,y j ) are the coordinates of the intersection point, and (p, q) are the node coordinates.
25. The power grid topology optimization system according to claim 21, It is characterized in that The S cross and S force Satisfies the following formula: S cross ∪S force =S O , S O The set of all nodes.
26. The power grid topology optimization system according to claim 23, It is characterized in that The gravity calculation formula is as follows: F 1 =K 1 / r 2 Among them, F 1 is the gravitational force between two nodes, K 1 is the gravitational coefficient, and r is the distance between the two nodes.
27. The power grid topology optimization system according to claim 23, It is characterized in that The repulsive force calculation formula is as follows: F 1 =K 1 / r 2 Among them, F 1 is the repulsive force between two nodes, K 2 is the repulsion coefficient, and r is the distance between the two nodes.
28. The power grid topology optimization system according to claim 23, It is characterized in that The formula for calculating the resultant force is as follows: Among them, F 合 is the resultant force between two nodes, n is the number of nodes that interact with the current node, F i is the i-th node that interacts with the current node.
29. A computer device, It is characterized in that include: one or more processors; a processor for executing one or more programs; When the one or more programs are executed by the one or more processors, the method according to any one of claims 1 to 14 is implemented.
30. A computer readable storage medium, It is characterized in that A computer program is stored thereon, and when the computer program is executed, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Cited By
Power distribution network topological graph generation method and device, storage medium and electronic device
CN119578004A
Power distribution network topology graph generation method and device, storage medium and electronic device
CN119578004B
Equipment topology layout method and system based on standing book of electric power local dispatching system
CN120316945A
