CN112685868A - Method and device for generating single line diagram of power distribution network and storage medium - Google Patents

Method and device for generating single line diagram of power distribution network and storage medium Download PDF

Info

Publication number
CN112685868A
CN112685868A CN202110270326.6A CN202110270326A CN112685868A CN 112685868 A CN112685868 A CN 112685868A CN 202110270326 A CN202110270326 A CN 202110270326A CN 112685868 A CN112685868 A CN 112685868A
Authority
CN
China
Prior art keywords
node
branch
line
nodes
overlapped
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110270326.6A
Other languages
Chinese (zh)
Other versions
CN112685868B (en
Inventor
彭森
蒋元晨
刘士进
程伟
郑浩泉
杨昇至
杨文彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nari Information and Communication Technology Co
Original Assignee
Nari Information and Communication Technology Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nari Information and Communication Technology Co filed Critical Nari Information and Communication Technology Co
Priority to CN202110270326.6A priority Critical patent/CN112685868B/en
Publication of CN112685868A publication Critical patent/CN112685868A/en
Application granted granted Critical
Publication of CN112685868B publication Critical patent/CN112685868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

The invention discloses a method, a device and a storage medium for generating a single line diagram of a power distribution network, wherein the method comprises the following steps: generating a main line and branch lines thereof according to the tree structure of the single line diagram of the power distribution network; determining the layout directions of all branch lines according to the trunk line layout direction input by a user; determining the first node coordinates of the trunk line, and finishing the remaining node layout of the trunk line by combining the layout direction of the trunk line; determining the coordinates of the first node of the branch line according to the father branch of the branch line, and finishing the layout of the residual nodes of the branch line by combining the layout direction of the branch line; carrying out node overlapping detection on the nodes which are already laid out, and eliminating node overlapping by utilizing a local stretching mode; locally shrinking all nodes on the trunk line and the branch line according to the sequence from the end node to the first node; each terminal to be wired of the laid node is wired. The method can obviously improve the generation efficiency and accuracy of the single line diagram of the power distribution network, and ensure the compactness and the attractive appearance of the single line diagram.

Description

Method and device for generating single line diagram of power distribution network and storage medium
Technical Field
The invention relates to the technical field of power distribution networks, in particular to a method and a device for generating a single line diagram of a power distribution network and a storage medium.
Background
The electrical wiring diagram is a visual representation of the topological state of the power grid and is an indispensable graphic material for the operation management of the power system. The distribution network is a grid formed by a plurality of distribution lines, and is formed by transformers, distribution rooms, intermediate distribution lines, and the like, which are led from distribution substations to supply power to users. The single line diagram of the power distribution network is an electrical wiring diagram for visualizing the power distribution network by using specified graphic symbols and equipment connecting lines. With the rapid development of power grid services in China, higher requirements are put forward on power distribution network management, and the power distribution network single line diagram is used as a thematic diagram of power distribution network management, so that the efficiency of power distribution network management can be obviously improved. The manually drawn single line drawing still has advantages in the aspects of user self-definition, drawing attractiveness and the like, but the drawing efficiency is low, the drawing cannot be updated in time according to topological data, problems such as drawing errors are difficult to find in time and the like are not contended for. In addition, node overlapping is easy to occur in a common single line diagram automatic generation method, and the problems of complex wiring, low wiring efficiency, serious wiring overlapping and crossing phenomena and the like which are caused by the fact that whether wiring is convenient or not are not considered in node layout are solved; in order to solve the node overlapping problem, the node spacing is often uneven and asymmetric, and it is difficult to ensure the generated single line diagram to be compact and beautiful.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, provides a method, a device and a storage medium for generating a single line diagram of a power distribution network, and can obviously improve the generation efficiency and accuracy of the single line diagram of the power distribution network and ensure the compactness and the attractiveness of the single line diagram.
In order to achieve the purpose, the invention is realized by adopting the following technical scheme:
in a first aspect, the present invention provides a method for generating a single line diagram of a power distribution network, where the method includes:
generating a main line and branch lines thereof according to the tree structure of the single line diagram of the power distribution network;
determining the layout directions of all branch lines according to the trunk line layout direction input by a user;
determining the first node coordinates of the trunk line, and finishing the remaining node layout of the trunk line by combining the layout direction of the trunk line; determining the coordinates of the first node of the branch line according to the father branch of the branch line, and finishing the layout of the residual nodes of the branch line by combining the layout direction of the branch line;
carrying out node overlapping detection on the nodes which are already laid out, and eliminating node overlapping by utilizing a local stretching mode;
locally shrinking all nodes on the trunk line and the branch line according to the sequence from the end node to the first node;
each terminal to be wired of the laid node is wired.
With reference to the first aspect, further, the method for generating the trunk line and the branch line thereof includes:
tracking the longest weighted path as a main line by taking a power supply as a starting point;
taking the trunk line as a parent branch, and tracking the maximum weighted path connected with the trunk line in the rest nodes as a lower branch line of the trunk line;
and taking the lower branch line connected with the trunk line as the trunk line to generate a deeper one-level branch line until all branch lines are generated.
With reference to the first aspect, further, the layout directions of all branch lines are determined based on the principle that the branch lines are uniformly distributed on both sides of the parent branch.
With reference to the first aspect, further, the trunk line layout direction and all branch line layout directions are horizontal or vertical.
With reference to the first aspect, further, the method for performing node overlap detection on the laid-out nodes includes:
respectively calculating the minimum outsourcing rectangle of the current node and the minimum outsourcing rectangle of the previous node; the previous node is a node which can be used for determining the coordinates of the current node;
according to the combined minimum outsourcing rectangle of the current node and the minimum outsourcing rectangle of the previous node;
if the minimum outsourcing rectangle of other laid nodes is overlapped with the merged minimum outsourcing rectangle, the current node is shown to be overlapped with other laid nodes in a laying mode; otherwise, it indicates that there is no layout overlap of the current node with other laid out nodes.
With reference to the first aspect, further, the method for eliminating node overlapping by using a local stretching manner includes:
acquiring an overlapped node set overlapped with a current node according to a node overlapping detection method;
taking the layout direction of the branch line where the overlapped current node is located as a local stretching direction;
obtaining a node set to be processed according to the overlapped node set and the local stretching direction;
and stretching all the nodes in the node set to be processed according to the local stretching direction until the overlap disappears.
With reference to the first aspect, further, the method for obtaining a set of nodes to be processed according to an overlapping set of nodes and a local stretching direction includes:
if the local stretching direction is from left to right, obtaining the minimum X-direction value X of the minimum outsourcing rectangle of each node in the overlapped node setiI is the serial number of the overlapped node in the overlapped node set; obtaining XiMinimum value Xmin(ii) a The minimum value of the minimum outsourcing rectangle in the overall laid nodes in the X direction is larger than XminAdding the nodes into a node set to be processed;
if the local stretching direction is from right to left, the maximum X direction value of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedjJ is the serial number of the overlapped node in the overlapped node set; obtaining XjMedian maximum value Xmax(ii) a The maximum values of the minimum outsourcing rectangle in the overall laid nodes in the X direction are all smaller than XmaxAdding the nodes into a node set to be processed;
if the local stretching direction is from top to bottom, the minimum external wrapping moment of each node in the overlapped node set is obtainedY-direction minimum Y of shapepP is the serial number of the overlapped node in the overlapped node set; obtaining YpMinimum value of Ymin(ii) a The minimum value of the minimum outsourcing rectangle in the overall laid nodes in the Y direction is larger than YminAdding the nodes into a node set to be processed;
if the local stretching direction is from bottom to top, the maximum value Y in the Y direction of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedqQ is the serial number of the overlapped node in the overlapped node set; obtaining YqMedian maximum value Ymax(ii) a The maximum values of the minimum outsourcing rectangle in the overall laid nodes in the Y direction are all smaller than YmaxThe nodes are added into the node set to be processed.
With reference to the first aspect, further, the method of local contraction includes:
calculating the optimal coordinate of the current node;
calculating the coordinate offset of the current node from the actual coordinate to the optimal coordinate;
forming a node set by all nodes from a current node to a branch line end node where the current node is located;
the node set and all lower descendant branch nodes connected with the node set form a node set to be translated together;
performing coordinate translation on all the nodes in the node set to be translated according to the coordinate offset: if all the nodes are not overlapped after translation, local contraction is finished; otherwise, the coordinates of all the nodes in the node set to be translated are retreated by a unit length in the opposite direction, if the nodes are still overlapped, the nodes are retreated by the unit length continuously until all the nodes are not overlapped or the total retreated length exceeds the coordinate offset.
With reference to the first aspect, further, the method for calculating the optimal coordinate of the current node includes:
if the current node is the first node of the branch line, calculating the optimal coordinate of the current node through the father branch of the current node; otherwise, calculating the optimal coordinate of the current node through the previous node of the current node; the last node refers to a node which can be used for determining the coordinates of the current node.
With reference to the first aspect, further, the method for routing includes:
alternately emitting exploration rays from the wiring starting point to the target point in the transverse direction and the longitudinal direction: if the obstacle is encountered or the target point in the direction stage is reached, a middle inflection point is added;
continuing the wiring exploration by taking the intermediate inflection point as a wiring starting point of the next exploration;
and alternately carrying out wiring exploration by adopting transverse exploration and longitudinal exploration until reaching a target point.
With reference to the first aspect, further, when both the transverse exploration direction and the longitudinal exploration direction are blocked, the blocking is avoided by repeatedly backing the original way and changing the original exploration direction;
when the wiring end point is reached by only once transverse search or longitudinal search, but the only search direction is blocked by the barrier, the current search direction is changed to avoid the blocking.
With reference to the first aspect, further, the method further includes:
after finishing wiring, dividing the current wiring into a plurality of line segments, and dividing all the line segments into two types according to the layout direction of each line segment: a transverse line segment and a longitudinal line segment;
sequentially traversing each line segment, and carrying out overlapping detection on each line segment and other laid line segments of the same type:
if there is line segment overlap, the current line segment is shifted by one unit, and the operation is repeated until the line segment overlap is eliminated.
In a second aspect, the present invention provides a power distribution network single line diagram generating apparatus, including a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method of any of the first aspects.
In a third aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspect.
Compared with the prior art, the invention has the following beneficial effects:
the method for generating the single line diagram of the power distribution network can be realized by adopting a computer, replaces manual drawing in the prior art, and is beneficial to improving the generation efficiency of the single line diagram and reducing the error rate; when each branch is drawn, namely the initial layout is carried out, the technical problem of node overlapping is solved through local stretching; after the complete layout and the local stretching are finished, the layout is more compact through local contraction; the invention can obviously improve the efficiency, accuracy, compactness and aesthetic property of the layout of the single line diagram.
Drawings
Fig. 1 is a flowchart of a method for generating a single line diagram of a power distribution network according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining a branch line layout direction according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a partial stretch of a top-down arrangement of branch lines according to an embodiment of the present invention;
fig. 4 is a schematic diagram of partial stretching of branch lines from left to right according to an embodiment of the present invention;
FIG. 5 is a flowchart of a method for initial placement and local stretching according to an embodiment of the present invention;
FIG. 6 is a flow chart of a method of local contraction provided by an embodiment of the present invention;
fig. 7 is a schematic diagram of a wiring provided by an embodiment of the invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
The first embodiment is as follows:
the method for generating the single line diagram of the power distribution network is realized based on the trunk branch line model, and the single line diagram layout efficiency and the attractiveness can be improved. The trunk line branch line model is that after each node is weighted according to the complexity, the longest weighted path straight line containing a power supply in a feeder line is used as a trunk line according to a single line diagram tree structure; then drawing the lower branches connected with the trunk line on two sides of the trunk line (all the trunk lines and the branch lines are drawn horizontally or vertically); then, taking the lower branch line connected with the current trunk line as the trunk line to finish drawing of a deeper branch line; and alternating the trunk line and the branch line in the way until all branches are drawn. It should be noted that: the nodes in the embodiment of the invention are pointing equipment and station room equipment; the equipment comprises point equipment, station room equipment and line equipment.
As shown in fig. 1, a method for generating a single line diagram of a power distribution network according to an embodiment of the present invention mainly includes the following steps:
the method comprises the following steps: according to the tree structure of the single line diagram of the power distribution network, generating a main line and branch lines thereof:
(1-1) Main trunk/Branch line creation
Each node determines the weight according to the type of the equipment and the complexity of the node, the station equipment weight is determined according to the number of the intervals in the station, the weight of the distribution station and the large-scale switching station is the largest, and in addition, the more the number of the downlink branches is, the larger the weight is, the equipment weight calculation formula is as follows:Q=M+S*Q1+N*Q2the explanation for each parameter in the formula is shown in table 1:
TABLE 1
Figure 388878DEST_PATH_IMAGE001
On the basis of the weight calculation result, tracking the longest weighted path as a main trunk line by taking a power supply as a starting point according to the tree structure of the single line diagram of the power distribution network, and marking as a grade 0 branch; taking the grade 0 branch as a father branch, and continuously tracking the maximum weighting path connected with the father branch as a next grade of child branch; taking the tracked sub-branch as a parent branch to continue tracking; and alternating the parent branch and the child branch until all the devices are tracked to complete the generation of all the branches.
The trunk traced from the power supply is named as a level 0 branch, the next level branch traced with all devices of the level 0 branch as starting points is named as a level 1 branch, and so on until a (n-1) level branch, i.e., all branches, is created; wherein n is the number of branch levels.
(1-2) device object creation
The creation of the trunk (level 0 branch) is first performed:
according to the tracked 0-level branch ordered equipment information, point equipment (if the equipment is station equipment, abstract point equipment) and line equipment are established in sequence; in the process of creating, substation diagram mapping is carried out on station room equipment, and then the whole equipment is abstracted into common equipment and added into a branch equipment queue; the equipment connected with the next branch line is called a t-connection node; in the process of creating, creating a t-connected node information group object for each t-connected node; a t-connection node information group object comprises information of a main trunk line, all connected next-level branch lines, corresponding t-connection nodes and the like; and storing the t-connected node information groups into a queue to be recorded as tNodeBranchList.
After the trunk line is generated, the following operations are executed on each member tBranchInfo in the t-connection node information group queue tNoBranchList: executing the main line generation method to all branches under tBranchInfo to generate branch lines; continuously taking down a t-connection node information group node, and generating a branch line; and repeating the execution until the queue member is empty, and finishing the creation of all branch devices.
Step two: determining the layout directions of all branch lines according to the trunk line layout direction input by a user:
according to the principle that the branch layout is horizontal and vertical, the layout direction is divided into four directions of from left to right, from right to left, from top to bottom and from bottom to top. Wherein the horizontal layout is from left to right and from right to left, and the longitudinal layout is from top to bottom and from bottom to top.
The main line/branch line layout direction judging step is as follows:
(2-1-1) assigning a level 0 branch layout orientation.
(2-1-2) determining all 1-grade branch layout directions according to the 0-grade branch directions. First, it is judged whether the 0-level branch layout direction belongs to the landscape layout or the portrait layout. In the horizontal and vertical directions, all the even-numbered stage branches are the same, and all the odd-numbered stage branches are the same. If the current 0-level branch is in a transverse layout, all the 1-level branches connected with the current 0-level branch are in a longitudinal layout; and determining the layout direction of each branch in the 1-level branches according to the principle that the next-level branches are uniformly distributed on two sides of the main trunk. The same applies to the case where the level 0 branch is laid out vertically.
All level 1 branches are stored in one queue. At this time, the level 0 trunk branch and all the level 1 branches have layout directions.
(2-1-3) determining the layout orientation of the level 2 Branch
All branches in the level 1 branch queue are traversed, causing each level 1 branch to perform the following operations once.
Switching the grade 0 branch in the step (2-1-2) into the current grade 1 branch, and obtaining the layout directions of all grade 2 branches belonging to the current branch according to the step (2-2); and adding the 2-level branches with the currently determined layout direction into the 2-level branch queue.
(2-1-4) determining the layout direction of the remaining branches
According to step (2-1-3), a level 3 branch direction can be calculated from the level 2 branch queue, while a level 3 branch queue is generated. The process is repeated until no new next branch queue is generated, and all branches have completed the branch layout direction generation.
As shown in fig. 2, it is a flowchart of a method for determining a branch line layout direction according to an embodiment of the present invention, and the method includes the following steps:
(2-2-1) determining the 0-grade branch layout direction. The trunk layout direction may be defaulted to left to right without user input and special requirements.
(2-2-2) creating a queue L, and adding all t-connected node information groups of the level 0 branch into the queue L.
(2-2-3) judging whether the queue L is empty: if the branch layout direction is empty, all the branch layout directions are determined; if not, then (2-2-4) is executed.
And (2-2-4) taking the head member of the queue L and deleting the head member in the queue L, and marking the head member as TB.
(2-2-5) judging whether the branch layout direction of the TB is a transverse layout: if the layout is horizontal, the layout direction from bottom to top is regarded as mainOrient, and the layout direction from bottom to top is regarded as subOrient; if not, the layout direction is recorded as mainOrient from left to right and subOrient from right to left.
(2-2-6) counting the frequency of each layout direction of the downward connection branches of the previous t-connected node according to the information group TBold of the previous t-connected node, and recording the layout direction of the branch with the higher frequency as origin 1; if the last t-node does not exist, origin 1 is set to subOrient.
(2-2-7) it is judged whether or not origin 1 is the same as subOrein. If the current t-joint nodes are the same, all branches under the current t-joint nodes are divided into two parts randomly, and the two parts are put into two sets and respectively recorded as branchList1 and branchList 2; if the total number of branches is odd, the branchList1 is 1 more than the branchList2 member number.
(2-2-8) calculating the total node weighted values of branchList1 and branchList2, which are respectively marked as A1 and A2;
(2-2-9) judging whether A1 is larger than A2. If A1 is not greater than A2, the mainOrein and subOrient values are interchanged.
(2-2-10) setting the layout direction of all branches in the brandhsist 1 as mainOrient; all branch layout directions in branchList2 are set as subOrient.
(2-2-11) adding the complete t-node information groups of all the sub-branches connected with the TB into the queue L.
(2-2-12) judging whether the queue L is empty: if the queue L is empty, all the branch layout directions are determined to be finished; and if the queue L is not empty, jumping to the step (2-2-4) for sequential execution.
Step three: initial layout and node overlap elimination:
(3-1-1) initial layout of trunk line:
firstly, determining the coordinate of a head node of a trunk line, and if no special requirement exists, setting the coordinate of the head node to be (0, 0). Determining a second node coordinate according to the first node coordinate, the layout direction and the node spacing; the node distance between two adjacent nodes is calculated according to the size of the minimum outsourcing rectangle of the two nodes, and the calculated node distance realizes dynamic adjustment of the distance so as to achieve the purposes of compactness and attractiveness. When the node is a substation, the substation is firstly subjected to image forming and then abstracted into a common point device to participate in layout; in order to ensure the appearance, the central axis of the main trunk line is aligned with the bus of the substation diagram when the horizontal layout is carried out. Similarly, the coordinates of the third node may be determined based on the second node, and the operation may be repeated until the final node layout is completed. When the level 0 branch layout is carried out, all the t-connected node information groups are stored into a Queue, and a t-connected node information group Queue t1Queue is generated.
(3-1-2) layout of remaining all branch lines:
taking a head member of the t1Queue, recording as TB, and deleting in the Queue;
this step (3-1-2) is repeated until the t1Queue length is 0.
(3-1-2.1) assigning coordinates of the head node of the next-level branch:
all branch lines under TB have determined the branch direction, and all branch line directions are horizontal or vertical. All branch lines of the TB are divided into two types according to the layout directions, which are respectively denoted as a List origin 1List and an origin 2List, and the corresponding layout directions are respectively origin 1 and origin 2. Determining the coordinates of the first nodes of all branch lines in an origin 1List List according to the t-connected node coordinates of the TB and the layout direction origin 1 and the distance configuration; and determining the coordinates of head nodes of all branch lines in an origin 2List List according to the orientation and the spacing configuration of the origin 2.
(3-1-2.2) the space expansion required by the layout of the t-connection node information group:
and calculating the layout space width w (the width along the branch layout direction of the t-connection node) required by all the current branch layouts according to the branch first node coordinates in the origin 1List and the origin 2List and the maximum value of the minimum outsourcing rectangle width of each branch node. And expanding w/2 spaces in the branch layout direction and the reverse direction of the t-connected node by taking the t-connected node as a starting point respectively for the layout of the next-level branch of the current t-connected node. Spatial expansion is the stretching of a relative node a certain distance in a certain direction to ensure that no node exists in a specific space.
(3-1-3) branching initial layout and partial stretching:
all branches branchList under TB are obtained, and the following operations are performed on each branch B under branchList:
(3-1-3.1) initial branch line layout:
calling the trunk initial layout method in the step (3-1-1) in the step three for the branch B to carry out branch layout; the branch head node already has coordinates and no calculation is needed.
Node overlap may occur in branch layout due to the presence of laid out nodes, requiring overlap detection and elimination of node overlap. And (3) executing the step (3-1-3.2) once to detect and eliminate the node overlapping every time the node layout is carried out. And generating a t-connection node information group for each t-connection node under the branch B, and adding the t-connection node information group to the tail of the t1 Queue.
(3-1-3.2) overlap detection and elimination:
the method for detecting the node overlapping of the laid nodes comprises the following steps:
calculating a current node minimum outsourcing rectangle R1 and a last node minimum outsourcing rectangle R2; the previous node is a node which can be used for determining the coordinates of the current node;
creation of R1And R2The merged minimum envelope rectangle R of (1);
if the minimum outsourcing rectangle of other laid nodes is overlapped with the merged minimum outsourcing rectangle R, the current node is shown to be overlapped with other laid nodes in a laying mode; otherwise, it indicates that there is no layout overlap of the current node with other laid out nodes.
For nodes with layout overlap, the embodiment of the present invention eliminates the node by using local stretching, specifically, local stretching is performed by using the current node layout direction as the stretching direction.
As shown in FIG. 3, if the local stretching direction is from top to bottom, the Y-direction minimum Y of the minimum bounding rectangle of each node in the overlapped node set is obtainedpP is the serial number of the overlapped node in the overlapped node set; obtaining YpMinimum value of Ymin(ii) a The minimum value of the minimum outsourcing rectangle in the overall laid nodes in the Y direction is larger than YminThe nodes are added into the node set to be processed. In the figure, YminThe minimum value in the Y direction in the minimum bounding rectangle representing all sets of the overlapped nodes; downward arrow denotes YminAll the figures below this line are shifted downwards(ii) a The rectangle filled by the vertical line represents the combined minimum circumscribed rectangle R of the current node and the previous node; the diagonal line rectangle represents a node set to be processed; the open rectangles represent other laid out nodes.
As shown in FIG. 4, if the local stretching direction is from left to right, the minimum X-direction value X of the minimum bounding rectangle of each node in the overlapped node set is obtainediI is the serial number of the overlapped node in the overlapped node set; obtaining XiMinimum value Xmin(ii) a The minimum value of the minimum outsourcing rectangle in the overall laid nodes in the X direction is larger than XminThe nodes are added into the node set to be processed. In the figure, XminThe minimum value in the X direction in the minimum bounding rectangle representing all sets of overlapping nodes; arrow to the right indicates XminAll the graphics to the right of this line are shifted to the right.
If the local stretching direction is from bottom to top, the maximum value Y in the Y direction of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedqQ is the serial number of the overlapped node in the overlapped node set; obtaining YqMedian maximum value Ymax(ii) a The maximum values of the minimum outsourcing rectangle in the overall laid nodes in the Y direction are all smaller than YmaxThe nodes are added into the node set to be processed.
If the local stretching direction is from right to left, the maximum X direction value of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedjJ is the serial number of the overlapped node in the overlapped node set; obtaining XjMedian maximum value Xmax(ii) a The maximum values of the minimum outsourcing rectangle in the overall laid nodes in the X direction are all smaller than XmaxAdding the nodes into a node set to be processed;
as shown in fig. 5, a flowchart of a method for implementing an initial layout and a local stretching according to an embodiment of the present invention includes the following steps:
(3-2-1) creating a branch line queue branchQueue; assigning a grade 0 branch head node coordinate; 0 fractions were added in branches to branchQueue.
(3-2-2) judging whether the branchQueue is empty or not. If the layout is empty, the initial layout and the local stretching are finished, and the process is finished; if not, the sequential execution is continued.
(3-2-3) taking a branchQueue head member to record B; generating variable i, setting the initial value of i to 0, using DiRepresenting the ith node.
(3-2-4) if Di is a t-connection node, calculating coordinates of the head node of the next branch connected with Di according to the coordinates of the Di device, and sequentially adding the next branch connected with Di to the tail of the branchQueue queue.
(3-2-5) if Di +1 does not exist, executing the step (3-2-2), wherein the Di +1 represents the (i + 1) th node.
And (3-2-6) calculating the coordinate Di +1 according to the coordinate Di.
(3-2-7) if the branch in which B is located is the 0-level branch, increasing the value of i by 1, and jumping to the step (3-2-4) to be executed sequentially.
(3-2-8) calculating a combined minimum outer-wrapping rectangle R of Di and Di + 1.
And (3-2-9) carrying out intersection test on the R and other laid nodes in the drawing. And if the nodes are intersected, acquiring all nodes to be translated, namely the needMoveList according to the overlapping collision area, and translating the equipment in the needMoveList along the branch layout direction of the Di until the nodes are overlapped and disappear. If no intersection occurs, the value of i is increased by 1, and step (3-2-4) is executed.
Step four: local shrinkage:
when the branch layout is carried out, the whole is stretched for multiple times in order to solve the problem of node overlapping, so that the overall layout has uneven and unreasonable node spacing and unattractive layout. To correct this problem, a local shrink operation is performed after the complete branch layout is completed. The branch shrinkage is performed in a hierarchical manner as in the branch layout. The local contraction operation provided by the embodiment of the invention adopts a heuristic method, and is sequentially executed according to the sequence from a branch end node to a first node and from a (n-1) level branch to a 0 level branch, and the specific method is as follows:
calculating the optimal coordinate of the current node;
calculating the coordinate offset of the current node from the actual coordinate to the optimal coordinate;
forming a node set by all nodes from a current node to a branch line end node where the current node is located;
the node set and all lower descendant branch nodes connected with the node set form a node set to be translated together;
performing coordinate translation on all the nodes in the node set to be translated according to the coordinate offset: if all the nodes are not overlapped after translation, local contraction is finished; otherwise, the coordinates of all the nodes in the node set to be translated are retreated by a unit length in the opposite direction, if the nodes are still overlapped, the nodes are retreated by the unit length continuously until all the nodes are not overlapped or the total retreated length exceeds the coordinate offset.
As shown in fig. 6, a flow chart of a method for local contraction according to an embodiment of the present invention includes the following steps:
(4-1) obtaining a full branch list branchList that has completed the initial layout and the partial stretching; generating a variable s, and setting an initial value of s as (n-1); n is the total branch level number, counted from level 0.
And (4-2) if s is less than 0, completing the partial contraction of all branches, and ending.
(4-3) taking all the branches with the branch s in the branchList to form a queue branchSQue.
(4-4) if the queue brandchSQue is empty, decreasing the value of s by 1 and executing the step (4-2).
(4-5) taking the branchList queue head member and recording as a branch A; recording the number of A branch nodes (including point equipment and station room equipment) as N1(ii) a Generating a variable i, setting the initial value of i as (N)1-1)。
(4-6) if i is equal to 0, calculating the optimal coordinate of Di according to the t-connected node of the father branch, and recording the optimal coordinate as the needlecordinate; if i is larger than 0, calculating the optimal coordinate of Di according to Di-1, and recording as needlecordinate; if i is less than 0, step (4-5) is carried out, and Di-1 represents the i-1 th node.
(4-7) obtaining all device lists with sequence numbers not less than i in the branch A, and recording the device lists with needMoveFeatureList; adding all subordinate branch devices connected with nodes in the list in the drawing into the list; and according to the moveValue, performing translation operation on each device in the list.
(4-8) judging whether node overlapping occurs: if no node overlap exists, the value of i is reduced by 1, and the step (4-6) is executed.
And (4-9) all the devices of the list of the devices to be translated are translated back by one unit length.
(4-10) judging whether the total rollback length exceeds moveValue. If so, the value of i is decreased by 1, and step (4-6) is executed. If not, executing the step (4-8).
Step five: routing each terminal to be routed of the laid node:
after all the node layouts are completed, each terminal to be wired needs to be wired. The wiring terminal is an attachment point at which the point device and other point devices are connected through the line device, and wiring refers to assigning coordinates to the line device. According to whether the wiring starting point device and the wiring ending point device are in-station wire outlet points or not, the two conditions that the in-station wire outlet points exist and the in-station wire outlet points do not exist can be divided.
If the two end point devices connected with the line device do not contain the in-station line outgoing point, the line device is directly assigned according to the coordinates of the point device, and no inflection point exists.
If the station outgoing line points are contained, a wiring algorithm facing a target is called for wiring operation.
As shown in fig. 7, in the wiring diagram provided by the embodiment of the present invention, a dark filling area is an obstacle, and the specific operation steps are as follows:
(5-1) transversely searching right at the starting point A by taking the B' as a stage target point, and turning at a point A1 after touching an obstacle;
(5-2) performing upward longitudinal exploration at a point A1 by taking a point B1 as a stage target point, and turning at a point A2 after encountering an obstacle, wherein the stage target point is changed into a point B2;
(5-3) repeating the steps (5-1) and (5-2) until the stage target point and the target point B coincide and arrive;
(5-4) in the above steps, if a dead point is encountered, performing step (5-5), and if a critical point is encountered, performing step (5-6);
in the exploration process, when the horizontal and vertical exploration directions are blocked, the device enters a dead point; when the wiring end point is reached only by carrying out successful transverse or longitudinal exploration once more, but the only exploration direction is blocked at the moment, the point is called as an entry critical point;
(5-5) treatment of dead spots:
(5-5.1) reverse exploration: exploring in the opposite direction at the current inflection point, exploring in the target direction at each step of exploration, and continuing exploring if the current inflection point is not out of the way; repeating the steps;
(5-5.2) rollback: if the step (5-5.1) can not find the exit, the step (5-5.1) is repeated by returning to the last inflection point; if the exit can not be found, continuing to retreat; if a new route cannot be searched after the starting point, no effective routing route exists at the current routing terminal.
(5-6) treatment critical point:
(5-6.1) calculating obstacle detouring offset according to the current obstacle node and the exploration direction;
(5-6.2) calculating the next stage exploration target point according to the barrier bypassing offset.
(5-7) the wiring overlap detection and the shift are performed.
Each time the wiring is completed, overlap detection and offset with the already-wired wiring are required. Each wiring is composed of a plurality of small line segments, and the small line segments are divided into a transverse line segment and a longitudinal line segment. And sequentially traversing each small line segment of the current wiring, carrying out overlapping detection on the small line segment and the similar wired segment, carrying out unit offset on the current small line segment if overlapping conflict exists, and repeating the operation until no overlapping exists.
Example two:
the embodiment of the invention also provides a device for generating the single line diagram of the power distribution network, which comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method of embodiment one.
Example three:
embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method of an embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (14)

1. A method for generating a single line diagram of a power distribution network is characterized by comprising the following steps:
generating a main line and branch lines thereof according to the tree structure of the single line diagram of the power distribution network;
determining the layout directions of all branch lines according to the trunk line layout direction input by a user;
determining the first node coordinates of the trunk line, and finishing the remaining node layout of the trunk line by combining the layout direction of the trunk line; determining the coordinates of the first node of the branch line according to the father branch of the branch line, and finishing the layout of the residual nodes of the branch line by combining the layout direction of the branch line;
carrying out node overlapping detection on the nodes which are already laid out, and eliminating node overlapping by utilizing a local stretching mode;
locally shrinking all nodes on the trunk line and the branch line according to the sequence from the end node to the first node;
each terminal to be wired of the laid node is wired.
2. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the method for generating the trunk line and the branch lines thereof comprises the following steps:
tracking the longest weighted path as a main line by taking a power supply as a starting point;
taking the trunk line as a parent branch, and tracking the maximum weighted path connected with the trunk line in the rest nodes as a lower branch line of the trunk line;
and taking the lower branch line connected with the trunk line as the trunk line to generate a deeper one-level branch line until all branch lines are generated.
3. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the layout directions of all branch lines are determined based on the principle that the branch lines are uniformly distributed on two sides of a parent branch.
4. The method according to claim 1, wherein the trunk layout direction and all branch line layout directions are horizontal or vertical.
5. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the method for detecting node overlapping of the laid nodes comprises the following steps:
respectively calculating the minimum outsourcing rectangle of the current node and the minimum outsourcing rectangle of the previous node; the previous node is a node which can be used for determining the coordinates of the current node;
according to the combined minimum outsourcing rectangle of the current node and the minimum outsourcing rectangle of the previous node;
if the minimum outsourcing rectangle of other laid nodes is overlapped with the merged minimum outsourcing rectangle, the current node is shown to be overlapped with other laid nodes in a laying mode; otherwise, it indicates that there is no layout overlap of the current node with other laid out nodes.
6. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the method for eliminating node overlapping by using a local stretching mode comprises the following steps:
acquiring an overlapped node set overlapped with a current node according to a node overlapping detection method;
taking the layout direction of the branch line where the overlapped current node is located as a local stretching direction;
obtaining a node set to be processed according to the overlapped node set and the local stretching direction;
and stretching all the nodes in the node set to be processed according to the local stretching direction until the overlap disappears.
7. The method for generating the single line diagram of the power distribution network according to claim 6, wherein the method for obtaining the node sets to be processed according to the overlapped node sets and the local stretching direction comprises:
if the local stretching direction is from left to right, obtaining the minimum X-direction value X of the minimum outsourcing rectangle of each node in the overlapped node setiI is the serial number of the overlapped node in the overlapped node set; obtaining XiMinimum value Xmin(ii) a The minimum value of the minimum outsourcing rectangle in the overall laid nodes in the X direction is larger than XminAdding the nodes into a node set to be processed;
if the local stretching direction is from right to left, the maximum X direction value of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedjJ is the serial number of the overlapped node in the overlapped node set; obtaining XjMedian maximum value Xmax(ii) a The maximum values of the minimum outsourcing rectangle in the overall laid nodes in the X direction are all smaller than XmaxAdding the nodes into a node set to be processed;
if the local stretching direction is from top to bottom, the minimum Y-direction value Y of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedpP is the serial number of the overlapped node in the overlapped node set; obtaining YpMinimum value of Ymin(ii) a The minimum value of the minimum outsourcing rectangle in the overall laid nodes in the Y direction is larger than YminAdding the nodes into a node set to be processed;
if the local stretching direction is from bottom to top, the maximum value Y in the Y direction of the minimum outsourcing rectangle of each node in the overlapped node set is obtainedqQ is the serial number of the overlapped node in the overlapped node set; obtaining YqMedian maximum value Ymax(ii) a The maximum values of the minimum outsourcing rectangle in the overall laid nodes in the Y direction are all smaller than YmaxThe nodes are added into the node set to be processed.
8. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the method for locally contracting comprises:
calculating the optimal coordinate of the current node;
calculating the coordinate offset of the current node from the actual coordinate to the optimal coordinate;
forming a node set by all nodes from a current node to a branch line end node where the current node is located;
the node set and all lower descendant branch nodes connected with the node set form a node set to be translated together;
performing coordinate translation on all the nodes in the node set to be translated according to the coordinate offset: if all the nodes are not overlapped after translation, local contraction is finished; otherwise, the coordinates of all the nodes in the node set to be translated are retreated by a unit length in the opposite direction, if the nodes are still overlapped, the nodes are retreated by the unit length continuously until all the nodes are not overlapped or the total retreated length exceeds the coordinate offset.
9. The method for generating the single line diagram of the power distribution network according to claim 8, wherein the method for calculating the optimal coordinates of the current node comprises the following steps:
if the current node is the first node of the branch line, calculating the optimal coordinate of the current node through the father branch of the current node; otherwise, calculating the optimal coordinate of the current node through the previous node of the current node; the last node refers to a node which can be used for determining the coordinates of the current node.
10. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the routing method comprises the following steps:
alternately emitting exploration rays from the wiring starting point to the target point in the transverse direction and the longitudinal direction: if the obstacle is encountered or the target point in the direction stage is reached, a middle inflection point is added;
continuing the wiring exploration by taking the intermediate inflection point as a wiring starting point of the next exploration;
and alternately carrying out wiring exploration by adopting transverse exploration and longitudinal exploration until reaching a target point.
11. The method according to claim 10, wherein when both the transversal exploration and the longitudinal exploration are blocked, the blocking is avoided by repeatedly backing the original path and changing the original exploration direction;
when the wiring end point is reached by only once transverse search or longitudinal search, but the only search direction is blocked by the barrier, the current search direction is changed to avoid the blocking.
12. The method for generating the single line diagram of the power distribution network according to claim 1, wherein the method further comprises:
after finishing wiring, dividing the current wiring into a plurality of line segments, and dividing all the line segments into two types according to the layout direction of each line segment: a transverse line segment and a longitudinal line segment;
sequentially traversing each line segment, and carrying out overlapping detection on each line segment and other laid line segments of the same type:
if there is line segment overlap, the current line segment is shifted by one unit, and the operation is repeated until the line segment overlap is eliminated.
13. The device for generating the single line diagram of the power distribution network is characterized by comprising a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the steps of the method according to any one of claims 1 to 12.
14. Computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 12.
CN202110270326.6A 2021-03-12 2021-03-12 Method and device for generating single line diagram of power distribution network and storage medium Active CN112685868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110270326.6A CN112685868B (en) 2021-03-12 2021-03-12 Method and device for generating single line diagram of power distribution network and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110270326.6A CN112685868B (en) 2021-03-12 2021-03-12 Method and device for generating single line diagram of power distribution network and storage medium

Publications (2)

Publication Number Publication Date
CN112685868A true CN112685868A (en) 2021-04-20
CN112685868B CN112685868B (en) 2021-05-28

Family

ID=75455572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110270326.6A Active CN112685868B (en) 2021-03-12 2021-03-12 Method and device for generating single line diagram of power distribution network and storage medium

Country Status (1)

Country Link
CN (1) CN112685868B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343396A (en) * 2021-05-20 2021-09-03 南京南瑞信息通信科技有限公司 Incremental distribution method from single line diagram of power distribution network to geographical wiring diagram
CN113836681A (en) * 2021-11-26 2021-12-24 国电南瑞南京控制系统有限公司 Power grid single line diagram layout method and device
CN113987720A (en) * 2021-09-22 2022-01-28 南京南瑞信息通信科技有限公司 Method and system for generating single line diagram incremental diagram of power distribution network, storage medium and computing equipment
CN115688341A (en) * 2022-11-15 2023-02-03 厦门亿力吉奥信息科技有限公司 Distribution network thematic map layout method based on multi-branch tree collision detection and storage medium
CN116166366A (en) * 2023-04-24 2023-05-26 国网江西省电力有限公司信息通信分公司 Automatic one-stop power grid multi-style thematic map forming system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663180A (en) * 2012-03-28 2012-09-12 广东电网公司佛山供电局 Method for drawing network distribution single line diagram
US8405944B2 (en) * 2007-10-09 2013-03-26 Schweitzer Engineering Laboratories Inc Distributed bus differential protection using time-stamped data
CN109214052A (en) * 2018-08-03 2019-01-15 浙江万胜智能科技股份有限公司 A kind of line chart automatic drafting method of more intelligent distribution systems
CN111639412A (en) * 2020-04-17 2020-09-08 许继集团有限公司 Method for automatically generating single line diagram based on geographical edge layout
CN112528590A (en) * 2020-12-09 2021-03-19 国网江西省电力有限公司电力科学研究院 Distribution line multi-primitive text single-line diagram depth layout algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8405944B2 (en) * 2007-10-09 2013-03-26 Schweitzer Engineering Laboratories Inc Distributed bus differential protection using time-stamped data
CN102663180A (en) * 2012-03-28 2012-09-12 广东电网公司佛山供电局 Method for drawing network distribution single line diagram
CN109214052A (en) * 2018-08-03 2019-01-15 浙江万胜智能科技股份有限公司 A kind of line chart automatic drafting method of more intelligent distribution systems
CN111639412A (en) * 2020-04-17 2020-09-08 许继集团有限公司 Method for automatically generating single line diagram based on geographical edge layout
CN112528590A (en) * 2020-12-09 2021-03-19 国网江西省电力有限公司电力科学研究院 Distribution line multi-primitive text single-line diagram depth layout algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
闫红漫等: "基于CIM模型的配电网单线图自动生成研究", 《华东电力》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343396A (en) * 2021-05-20 2021-09-03 南京南瑞信息通信科技有限公司 Incremental distribution method from single line diagram of power distribution network to geographical wiring diagram
CN113987720A (en) * 2021-09-22 2022-01-28 南京南瑞信息通信科技有限公司 Method and system for generating single line diagram incremental diagram of power distribution network, storage medium and computing equipment
CN113836681A (en) * 2021-11-26 2021-12-24 国电南瑞南京控制系统有限公司 Power grid single line diagram layout method and device
CN115688341A (en) * 2022-11-15 2023-02-03 厦门亿力吉奥信息科技有限公司 Distribution network thematic map layout method based on multi-branch tree collision detection and storage medium
CN115688341B (en) * 2022-11-15 2024-04-16 厦门亿力吉奥信息科技有限公司 Distribution network thematic map layout method based on multi-tree collision detection and storage medium
CN116166366A (en) * 2023-04-24 2023-05-26 国网江西省电力有限公司信息通信分公司 Automatic one-stop power grid multi-style thematic map forming system and method

Also Published As

Publication number Publication date
CN112685868B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN112685868B (en) Method and device for generating single line diagram of power distribution network and storage medium
CN102346795B (en) Automatic quick wiring method for electric and electronic virtual experiments
CN108121863B (en) Method, device and equipment for creating pipeline label and computer readable storage medium
CN106354976A (en) Automatic power distribution network single line diagram drawing method based on improved gravitation repulsion model
CN106447271A (en) Method and system for recognizing path in storage area
CN105787811A (en) Method and system for automatic layout of power grid system graph to overcome crossing defect
CN103942345B (en) Method for automatically generating IED network graph
CN112332306A (en) Automatic cable laying method and storage medium
CN104125582B (en) A kind of method for planning communication network
CN105354870A (en) Restoration method and apparatus for drawn track
CN103164864B (en) Polygonal Triangulation Algorithm and system thereof in Computer Image Processing
CN106021632A (en) Method for generating whole network diagram based on primary connection diagram of transformer station in topological relation
Klauske et al. Improved layout for data flow diagrams with port constraints
CN112380803A (en) Distribution network single line diagram artificial intelligence layout method, system and medium
CN115563927A (en) Chip wiring method for accelerating construction of minimum right-angle Steiner tree by GPU
CN115454062A (en) Robot dynamic path planning method and system based on Betz curve
CN107944106A (en) A kind of pipeline layout optimization method based on PDMS softwares
CN116976057B (en) Automatic arrangement method for device layout
CN105138711A (en) Primitive indexing method, primitive detecting method, primitive indexing device and a primitive detecting device
CN110544284B (en) Method for automatically planning optimal layout flow chart
CN111639412A (en) Method for automatically generating single line diagram based on geographical edge layout
CN103970715A (en) Mesh generation computing method and device
CN109739859A (en) A kind of relation map method for drafting, system and relevant apparatus
CN111241779A (en) Method for designing irregular parallel lines based on Cadence design software
CN111274660A (en) Circuit layout method based on multi-disturbance alternative simulated annealing algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant