A kind of mains supply path exhibiting method based on the multiway tree autoplacement
Technical field
The present invention relates to the supply path exhibiting method in a kind of power network schedule automation field, be specifically related to a kind of mains supply path exhibiting method based on the multiway tree autoplacement.
Background technology
Along with the fast development of electric system, management and running at different levels system to intelligent dispatch require increasingly high.Dispatch automated system and distribution automation system are developed to intelligent aid decision making type by simple monitoring type gradually.The mains supply path represents and helps the dispatcher to hold power system operating mode fast, loads to change to supply and fault recovery.
Summary of the invention
Deficiency to prior art; The present invention provides a kind of mains supply path exhibiting method based on the multiway tree autoplacement; This exhibiting method utilizes multiway tree dynamically to represent the mains supply path; Both be convenient to the dispatcher and held the real-time power network method of operation fast, also alleviated the maintenance work of automation personnel.
The objective of the invention is to adopt following technical proposals to realize:
A kind of mains supply path exhibiting method based on the multiway tree autoplacement, its improvements are that said method comprises the steps:
(1) adopt recursive algorithm to carry out the supply path search;
(2) confirm x, the y coordinate of each node of multiway tree;
(3) draw each node of said multiway tree;
(4) represent supply path with multiway tree.
Preferably, in the said step (1), said employing recursive algorithm carries out the supply path search and comprises the steps:
A, user select a power equipment, and said power equipment is pushed formation;
B, from formation, take out a power equipment, obtain and this power equipment belongs to the Transformer Winding of same logic bus;
C, judge whether said Transformer Winding is the high-pressure side winding;
D, if not the high-pressure side winding, then obtain the high-pressure side winding of this transformer;
The circuit of E, continuation search and the same logic bus of this high-pressure side winding;
F, write down the factory station at this circuit and these circuit two ends;
G, obtain the interchange line segment end points of circuit opposite end,, it is pushed formation if the electric pressure of this end points is not the electrical network highest voltage level;
H, returning step B, is empty up to formation.
Preferably, in the said step (2), with the node in the corresponding multiway tree of the transformer station on the supply path that searches, the limit of the corresponding multiway tree of circuit on the search supply path.
Preferably, in the said step (2), the supply path that step (1) is searched represents with multiway tree; Confirm x, the y coordinate of each node of multiway tree, adopt multiway tree automatic layout algorithm.
More preferably, said multiway tree automatic layout algorithm comprises:
1. confirm the y coordinate of each node of multiway tree;
2. confirm the x coordinate of each node of multiway tree.
More preferably, the y coordinate of said definite each node of multiway tree comprises: the y coordinate of the y coordinate=father node of root node+multiway tree layer distance; The y coordinate of root node is got default value; The multiway tree layer is apart from getting default value; Said default value is 0-100 Pixel.
More preferably, adopt recursive algorithm to confirm the x coordinate of each node of multiway tree, comprise the steps:
1) root node a is pushed formation;
2) from formation, take out a node b;
3) the high order end leaf node c of search node b;
4) the father node d of the said leaf node c of search if said father node d does not have left side brother, continues the father node of the said father node d of search, till father node has left fraternal e or searches root node a;
If node e is not root node a, the x coordinate of record node e low order end child node;
If node e is root node a, then get default value; Said default value is 0-100 Pixel;
5) the x coordinate of node c is set; This coordinate is that the coordinate that step 4) obtains adds nodal pitch;
6) circulation is provided with the x coordinate of the right brotgher of node of node c;
The x coordinate of the said right brotgher of node=this node x coordinate+spacing;
7) the x coordinate of the father node d of node c is set;
The x coordinate of father node d=(the child node x coordinate on a left side+the x coordinate of right child node)/2
8) if there is not father node d in the formation, d pushes formation with father node;
9) return step 2) continue to carry out.
Preferably, in the said step (3), adopt recursive algorithm to carry out the drafting of multiway tree, promptly draw each node of said multiway tree, comprise the steps:
I, root node a is pushed formation;
II, from formation, take out a node b;
III, according to the x of node b, the y coordinate is drawn;
The child node c of node b is drawn in IV, circulation;
The line of V, drafting node b and its child node c;
If the child node c of VI node b also has child node, c pushes formation with child node;
VII, return Step II again.
Preferably, the interstitial content of said multiway tree and the number of plies are not less than 1.
Preferably, can not intersect between the node of said multiway tree or overlapping.
With the prior art ratio, the beneficial effect that the present invention reaches is:
1, the mains supply path exhibiting method based on the multiway tree autoplacement provided by the invention; Realize that the real-time, dynamic, visual of supply path represents; Be convenient to the dispatching of power netwoks personnel and hold power system operating mode fast, rationally arrange network load, in time carry out fault recovery.
2, the present invention is based on the mains supply path exhibiting method of multiway tree autoplacement, alleviate yardman and automated maintenance personnel's workload and working strength, the despatching work intelligent level is provided, have excellent popularization and be worth.
Description of drawings
Fig. 1 is the process flow diagram of the mains supply path exhibiting method based on the multiway tree autoplacement provided by the invention.
Embodiment
Do further to specify below in conjunction with the accompanying drawing specific embodiments of the invention.
Mains supply path exhibiting method based on the multiway tree autoplacement provided by the invention, realize by following each functional module:
Supply path search module:, step by step to more voltage levels search, till searching the highest voltage level bus, note the circuit and the transformer station of search process through circuit, transformer from the equipment that the user selects.The node of the corresponding multiway tree of transformer station, the limit of the corresponding multiway tree of circuit.
Multiway tree autoplacement module: realize x, the y coordinate Calculation of multiway tree root node and child nodes at different levels.
The automatic drafting module of multiway tree: according to the x of each node, the y coordinate is drawn each node on man-machine interface.
Mains supply path exhibiting method based on the multiway tree autoplacement provided by the invention may further comprise the steps:
(1) adopt recursive algorithm to carry out the supply path search;
A, user select a power equipment, and said power equipment is pushed formation;
B, from formation, take out a power equipment, obtain and this power equipment belongs to the Transformer Winding of same logic bus;
C, judge whether said Transformer Winding is the high-pressure side winding;
D, if not the high-pressure side winding, then obtain the high-pressure side winding of this transformer;
The circuit of E, continuation search and the same logic bus of this high-pressure side winding;
F, write down the factory station at this circuit and these circuit two ends;
G, obtain the interchange line segment end points of circuit opposite end,, it is pushed formation if the electric pressure of this end points is not the electrical network highest voltage level;
H, returning step B, is empty up to formation.
(2) confirm x, the y coordinate of each node of multiway tree;
The supply path that step (1) is searched represents with multiway tree; X, the y coordinate of confirming each node of multiway tree adopt multiway tree automatic layout algorithm, and multiway tree automatic layout algorithm comprises:
1. confirm the y coordinate of each node of multiway tree:
The y coordinate of the y coordinate=father node of root node+multiway tree layer distance; The y coordinate of root node is got default value; The multiway tree layer is apart from getting default value; Said default value is 0-100 Pixel (pixel).
2. confirm the x coordinate of each node of multiway tree, adopt recursive algorithm to confirm the x coordinate of each node of multiway tree, comprise the steps:
1) root node a is pushed formation;
2) from formation, take out a node b;
3) the high order end leaf node c of search node b;
4) the father node d of the said leaf node c of search if said father node d does not have left side brother, continues the father node of the said father node d of search, till father node has left fraternal e or searches root node a;
If node e is not root node a, the x coordinate of record node e low order end child node;
If node e is root node a, then get default value; Said default value is 0-100 Pixel;
5) the x coordinate of node c is set; This coordinate is that the coordinate that step 4) obtains adds nodal pitch;
6) circulation is provided with the x coordinate of the right brotgher of node of node c;
The x coordinate of the said right brotgher of node=this node x coordinate+spacing;
7) the x coordinate of the father node d of node c is set;
The x coordinate of father node d=(the child node x coordinate on a left side+the x coordinate of right child node)/2
8) if there is not father node d in the formation, d pushes formation with father node;
9) return step 2) continue to carry out.
(3) draw each node of said multiway tree:
Adopt recursive algorithm to carry out the drafting of multiway tree, promptly draw each node of said multiway tree, comprise the steps:
I, root node a is pushed formation;
II, from formation, take out a node b;
III, according to the x of node b, the y coordinate is drawn;
The child node c of node b is drawn in IV, circulation;
The line of V, drafting node b and its child node c;
If the child node c of VI node b also has child node, c pushes formation with child node;
VII, return Step II again.
The interstitial content and the number of plies of multiway tree are not less than 1, can not intersect between the node of multiway tree or overlapping.
(4) represent supply path with multiway tree.
Mains supply path exhibiting method mode of operation based on the multiway tree autoplacement provided by the invention is client/server (C/S) mode.
1, the service end of supply path search is set at server end; Be responsible for reading electric network model; Carry out the network topology analysis, receive the request of client, utilize the supply path information of the power equipment of recursive algorithm search subscriber request; And sending to client, power equipment comprises circuit, bus, load and transformer.
2, client is provided with yardman's workstation; Be responsible for providing human-computer interaction interface; Obtain the power equipment information that the user chooses, and, adopt multiway tree autoplacement and automatic rendering algorithm that supply path figure is represented to the yardman through obtaining supply path information alternately with service end.
Mains supply path exhibiting method based on the multiway tree autoplacement provided by the invention utilizes multiway tree dynamically to represent the mains supply path, both has been convenient to the dispatcher and has held the real-time power network method of operation fast, also alleviates the maintenance work of automation personnel.Multiway tree adopts automatic layout algorithm, no level restriction, and node does not intersect or is overlapping, and the layout effect is attractive in appearance.
Should be noted that at last: above embodiment is only in order to technical scheme of the present invention to be described but not to its restriction; Although the present invention has been carried out detailed explanation with reference to the foregoing description; Under the those of ordinary skill in field be to be understood that: still can specific embodiments of the invention make amendment or be equal to replacement; And do not break away from any modification of spirit and scope of the invention or be equal to replacement, it all should be encompassed in the middle of the claim scope of the present invention.