Automatic planning system and method for optimal cost of distribution automation communication line
By combining the location information of the electronic distribution station and the distribution terminal and the road network information, and using an automatic planning system for communication line planning, the problem of difficulty in achieving optimal communication line costs in the existing technology is solved, and efficient and accurate communication line planning is achieved, cost reduction and connectivity is ensured.
Patent Information
- Application Number
- CN202411954323.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-27
AI Technical Summary
In the existing distribution automation communication network planning, it is difficult to achieve the optimal cost of communication lines, and the planning process is not perfect, the historical communication lines are not fully utilized, and the location of the distribution stations and distribution terminals in the area are not clearly defined, making it difficult to ensure the connection between the distribution terminal and the distribution station.
By combining the location information of the electronic distribution station and the power distribution terminal and the road network information, an automatic planning system is used to plan the communication line. The system includes an information acquisition module, a data preprocessing module, a legacy line retention module, a connectivity check module, an initial solution generation module and an optimal solution calculation module. It uses the Kruskal algorithm and simulated annealing algorithm to optimize communication line planning to ensure optimal cost and connectivity.
It realizes automatic planning of the optimal cost of the distribution automated communication lines, reduces the investment cost of the communication lines, improves the accuracy and efficiency of the planning, and ensures the connectivity between the distribution terminal and the distribution station.
Smart Images

Figure CN119940607A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an automatic planning system and method for the optimal cost of a distribution automation communication line, and belongs to the field of power system communication. Background Art
[0002] As the key medium for data transmission and command issuance in the distribution network, the distribution automation communication network is indispensable in the distribution automation system. Due to the high standards for real-time and reliability of communication in the distribution automation system, the optical fiber communication network has become the first choice for the distribution automation communication solution. However, in the actual planning of the distribution automation communication network, the laying of the distribution automation optical fiber communication line needs to consider the cost investment. The material cost, manual laying cost, and maintenance cost of the optical fiber line are closely related to the length of the optical fiber communication line. The safety risk of the communication line is also increasing with the increase of the line length. In modern urban distribution networks, considering factors such as safety and urban appearance, overhead optical fiber communication lines are gradually replaced by underground cable lines, which further increases the investment cost of communication lines. Therefore, it is necessary to reasonably plan the optical fiber communication lines for distribution automation, reduce the length of the communication lines while meeting the communication needs, and minimize the investment cost.
[0003] The existing distribution automation communication network planning includes communication reliability planning, splitter network topology planning, communication service scheduling planning, etc. Regarding the cost of communication lines, engineers of design organizations usually try to save as much as possible based on relevant experience. Although there are also automation planning schemes that consider the cost of communication lines, such as CN116109024A and CN115409322A, the existing planning schemes only consider the communication grid, fail to make full use of the old communication lines, do not clearly deal with the location of distribution substations and distribution terminals in the area, and fail to ensure the connectivity between distribution terminals and distribution substations. The existing communication line automation planning technology has an imperfect planning process and does not consider issues comprehensively, making it difficult to achieve cost optimization. Summary of the invention
[0004] The purpose of the present invention is to provide an automatic planning system and method for the optimal cost of distribution automation communication lines in view of the deficiencies in the prior art, so as to solve the difficulties in planning communication lines relying on manual experience and the problems in the existing automated planning schemes, such as imperfect planning processes, incomplete consideration of issues, and difficulty in achieving optimal costs.
[0005] In order to solve the above problems, the present invention provides an automatic planning system for the optimal cost of distribution automation communication lines.
[0006] Considering that in the urban power distribution automation system, the distribution substations and distribution terminals are often distributed in the buffer areas on both sides of the road, such as green belts and dividing strips, and the communication lines connecting them usually need to be laid along the road. The present invention combines the location information of the distribution substations and distribution terminals with the road network information to plan the distribution automation communication lines in the planned area, to collect the road network information of the planned area, the location information of the distribution substations and distribution terminals, and the information of the old communication lines, and to plan the communication lines between the distribution automation distribution substations and distribution terminals in the planned area to achieve the optimal cost.
[0007] The automatic planning system for the optimal cost of the distribution automation communication line described in the present invention is characterized in that it includes: a power supply module, an information acquisition module, a data storage module, a data preprocessing module, a historical line retention module, a human-computer interaction module, an initial solution generation module, a connectivity check module, an optimal solution calculation module, and a planning result output module;
[0008] The power supply module is a DC regulated power supply, which is used to provide a stable working power supply for the information acquisition module, data storage module, old line retention module, human-computer interaction module, data preprocessing module, initial solution generation module, connectivity check module, optimal solution calculation module, and stage planning result output module;
[0009] The information collection module is used to collect road network information of the area to be planned in the distribution automation system, as well as the location information of distribution substations and distribution terminals, and store and display the collected road network and the locations of distribution substations and distribution terminals.
[0010] The data preprocessing module is used to call the data collected by the information collection module in the data storage module, generate virtual nodes of the distribution substation and the distribution terminal, add road connections, and update the road network. The updated road network is stored in the data storage module and the stage planning result output module is called to display the updated road network diagram.
[0011] The old line retention module, through the human-computer interaction module, marks and stores the designated road connections in the road network updated by the data preprocessing module, indicating that the marked communication line has been laid before and it is necessary to retain the existing communication line in the automatic planning to save costs;
[0012] The user of the human-computer interaction module manually intervenes in the information collected by the information collection module, manually adds or deletes road nodes and road connections, and manually locates and obtains the location information of the distribution substation and the distribution terminal; the human-computer interaction module starts the data preprocessing module; the human-computer interaction module manually intervenes in the old line retention module to mark the road connections of the existing communication lines.
[0013] The connectivity check module performs connectivity check between virtual nodes on the road connection generated by the initial solution and the optimal solution calculated by the optimal solution calculation module to determine whether the virtual nodes are connected;
[0014] The initial solution generation module generates an initial solution for the road network generated by the data preprocessing module using a built-in algorithm, receives a check from the connectivity check module, and stores the initial solution in the data storage module;
[0015] The optimal solution calculation module further optimizes the initial solution generated by the initial solution generation module through a built-in algorithm, and retains the road connections marked in the old route retention module, and calculates and generates the optimal solution through the inspection of the connectivity inspection module;
[0016] The stage planning result output module outputs the planning results of the information collection module, data preprocessing module, old line retention module, initial solution generation module, and optimal solution calculation module according to the operation steps, and displays them in visual graphics.
[0017] Furthermore, the information collection module is used to collect road network information, distribution substation location information, and distribution terminal location information. The information collection module collects road network information of the area to be planned, including road nodes, roads, road lengths, and coordinate information of distribution substations and distribution terminals in the area to be planned, through the high-precision map carried by the system.
[0018] Furthermore, the human-computer interaction module starts the information collection module to manually intervene in the information collected by the information collection module, including manually selecting the area to be planned in the high-precision map in the information collection module; manually adding or deleting road nodes and road connections; manually collecting the coordinate information of the distribution substation and distribution terminal in the area to be planned through map positioning; and calling the stage planning result output module to display the road network diagram and the distribution substation and distribution terminal.
[0019] Furthermore, the human-computer interaction module starts the data preprocessing module, turns on data preprocessing, adds virtual nodes, and updates the road network; the human-computer interaction module starts the old route retention module, which is used to manually mark the road connections in the road network in the old route retention module; the human-computer interaction module starts the initial solution generation module and the optimal solution calculation module; the human-computer interaction module starts the stage planning result output module to draw the planning graphics for each stage.
[0020] Furthermore, the optimal solution calculation module uses a built-in algorithm to combine the road network diagram generated by the data preprocessing module and the initial solution generated by the initial solution generation module to perform iterative optimization processing, and always retains the road connections marked in the old route retention module during the iteration. After the generated optimal solution is checked by the connectivity check module, the optimal solution is stored and output.
[0021] The present invention also relates to a method for automatically planning the optimal cost of a communication line, which is characterized in that the method adopts the automatic planning system described above, and the method for automatically planning the optimal cost of a communication line comprises the following steps:
[0022] Step S1: The information collection module selects the area to be planned based on the high-precision map built into the system, obtains the road collection results of the area to be planned and the coordinate information of the distribution substation and the distribution terminal.
[0023] Step S2: manually intervening in the data collected by the information collection module in the human-computer interaction module, manually adding or deleting road nodes and road connections, and generating a road network;
[0024] Step S3: In the data preprocessing module, call the coordinate information of the distribution substation and distribution terminal collected by the information acquisition module, and the network model generated in step S2, map the distribution substation and distribution terminal to the nearest road, add the mapping point as a virtual node to the road network, update the road network, and store the virtual node set and the updated road network.
[0025] Step S4: Use the old line retention module to mark the roads that have been built as communication lines, generate and store old edge sets.
[0026] Step S5: In the connectivity check module, the road network and the virtual node set are input, connectivity check between virtual nodes is performed, and the connectivity check result is output.
[0027] Step S6: Using the initial solution generation module, based on the road network updated in step S3, using the Kruskal algorithm, a minimum spanning tree that connects all nodes is generated. The minimum spanning tree and the generated virtual node set in step S3 are input, and step S5 is called to delete all redundant edges that do not affect the connectivity of the virtual nodes, obtain the initial solution and store it in the data storage module.
[0028] Step S7: Use the optimal solution calculation module to perform iterative optimization using the simulated annealing algorithm combined with the initial solution generated in step S6, the road network diagram generated in step S3, the connectivity check in step S5, and the road connections marked in step S4, and store and output the road network with the shortest total road length.
[0029] Further, step S1: start the information collection module in the human-computer interaction module, select the area to be planned in the high-precision map built into the system, and the information collection module automatically identifies the road nodes and road connections in the area; manually locate all distribution substations and distribution terminals one by one, and the information collection module obtains the coordinates of the distribution substations and distribution terminals; the information collection module stores the locations of road nodes, road connections, distribution substations, and distribution terminals in the data storage module, and calls the stage planning result output module to display the collected road nodes, road connections, distribution substations, and distribution terminals.
[0030] Further, step S2: manually intervene in the data collected by the information collection module in the human-computer interaction module, manually add or delete road nodes and road connections: delete the road nodes and road connections that cannot be used, and manually add the road nodes and road connection information that need to be used but are not automatically collected. Generate a road network based on the road node and road connection data and the road network model. Store the generated road network in the data storage module, and call the stage planning result output module to draw it.
[0031] Specifically, the road nodes after manual intervention are represented by coordinates, numbered in sequence, and represented by a road node matrix V;
[0032]
[0033] Where N is the number of road nodes, each row of the matrix represents the coordinates of a road node, and x and y refer to the plane coordinates of the road node.
[0034] Specifically, the roads (edges) and their road lengths (edge weights) after manual intervention are represented by edge sets E (in matrix form):
[0035]
[0036] Where u and v are the numbers of the road nodes, indicating that there is a road directly connecting node u and node v, m is the number of roads, and for nodes with roads between the two nodes, w(u,v) is the length of the road:
[0037] The matrix V and the matrix E construct the mathematical model of the initial road network graph of the planned distribution area: graph G = (V, E), where V is the road node set and E is the edge set containing weights or called the road set.
[0038] Further, step S3: the data preprocessing module is started in the human-computer interaction module, and the data preprocessing module calls the location information of the road network and the distribution substation and the distribution terminal generated by the information collection module. For each distribution substation and distribution terminal, a perpendicular line is drawn to all the roads in the road network model according to its coordinate position, and the shortest side of the perpendicular line and the perpendicular point are found. The perpendicular point is the mapping point of the distribution substation or distribution terminal to the nearest road.
[0039] Specifically, let the distribution substation or distribution terminal be point p, and the coordinates be (x p ,y p ), there is a road (u,v) between road node u and road node v, and the coordinates of node u are (x u ,y u ), the coordinates of node v are (x v ,y v ), then the formula for mapping from point p to road (u,v) is:
[0040]
[0041] Where d is the distance from point p to the road (u,v), (x q ,y q ) is the coordinate of the mapping point generated by mapping point p to road (u,v). Draw a perpendicular line from point p to all roads in the road network to obtain the distance from point p to all roads, select the road with the shortest distance, and use the generated mapping point as the virtual node. Map all distribution substations and distribution terminals to the nearest road, and the generated virtual node set is V q , add the virtual node to the road where the point is located, and update and store the road network.
[0042] Specifically, when a virtual node is added to the mapped road, the road network generated in step S2 is traversed, and each pair of original road nodes is traversed to calculate the straight-line distance from each virtual node to the road. Virtual nodes whose distance is less than a threshold (a hyperparameter with an extremely small value set considering computer rounding errors) are connected. If there is only one virtual node between two original nodes, the virtual node and the two original road nodes are connected, and the connection between the two original nodes is deleted to avoid duplication of edges. If there are multiple virtual nodes, the virtual nodes are connected in order, and then the first virtual node is connected to the nearest node of the two original road nodes, and the last virtual node is connected to the nearest node of the two original nodes, and the connection between the two original road nodes is deleted to avoid duplication of edges. As shown in the following formula:
[0043]
[0044] Among them, q1,q2,...,q nis a virtual node on the road (u, v), E is the edge set containing weights generated by the information collection module in step S2, "∪" means adding a new row to the edge set E containing weights, "-" means removing the specified row from the edge set E, Threshold is a hyperparameter set to consider computer rounding errors, and w is the road length, which is obtained by calculating the Euclidean distance between connected road nodes. By adding connections to the virtual nodes on each road, the updated edge set E and the updated road network G = (V, E) can be obtained. The road network is stored in the data storage module, and the stage planning result output module is called to draw the road network.
[0045] Further, step S4: through the human-computer interaction module, start the old line retention module, call the road network updated in step S3, mark the roads with existing communication lines on the road network, record each old line, and generate the old edge set E LJ And save it to the data storage module, call the stage planning result output module to draw the road network with marked historical edge sets.
[0046] Further, step S5: in the connectivity check module, for the input road network G = (V, E) and the virtual node set V q , use the Floyd-Warshall algorithm to find the path from any virtual node to all other virtual nodes in the road network. The specific recursive formula is:
[0047]
[0048] Where, d uv (k) represents the shortest path length of the kth recursive search from node u to node v, m is the number of nodes, and the recursive search is performed by comparing the d obtained each time. uv (k) Then obtain the shortest path from node u to node v.
[0049] If the path from any virtual node to all other virtual nodes exists, it means that the virtual nodes can access other virtual nodes through other intermediate nodes, and these virtual nodes can be interconnected based on the input road network, that is, the distribution substation and the distribution terminal can communicate with each other:
[0050]
[0051] Where V q is the set of virtual nodes, v s is any virtual node, v i Refers to the set of virtual nodes, except v s Any node outside .
[0052] Connectivity check of the input road network and virtual node set Vq , output the connectivity check result and store it in the data storage module;
[0053] Further, step S6: through the human-computer interaction module, the road network generated in step S3 is called in the initial solution generation module, and the Kruskal minimum spanning tree algorithm built into the initial solution generation module is used to generate a minimum spanning tree T that connects all nodes to each other. min The Kruskal algorithm is an edge-based minimum spanning tree algorithm. The algorithm sorts the edges according to their weights and adds them to the tree in sequence, ensuring that no loop is formed. Its mathematical model is:
[0054]
[0055] In the formula, (u, v) represents the edge selected in each iteration (the edge connecting node u and node v), w(u, v) represents the weight of the edge, and E T Represents the set of selected edges. Through the Kruskal algorithm, the minimum spanning tree T is obtained. min =(V,E min ), E min is the set of edges selected in each iteration. Based on the minimum spanning tree, one of the edges is randomly tried to be deleted each time, and the minimum spanning tree after deleting the edge and the set of virtual nodes are input. Step S5 is called to perform a connectivity check between virtual nodes. If the road network after deleting the edge can pass the connectivity check of step S5, the edge is determined to be deleted. All edges that can be deleted are considered redundant edges that do not affect the connectivity of virtual nodes. The minimum spanning tree T after deleting all redundant edges is min The initial solution is stored in the data storage module and the stage planning result output module is called to draw it.
[0056] Furthermore, the specific sub-steps of step S6 are as follows:
[0057] Step S6-1: Based on the road network generated in step S3 and the Kruskal minimum spanning tree algorithm, a minimum spanning tree is generated, i.e., a road network T with all nodes interconnected and the shortest total road length. min =(V,E min );
[0058] Step S6-2: Create a random deletion library E del , the initial random deletion library is the edge set generated by the minimum spanning tree algorithm, E del =E min ;
[0059] Step S6-3: Select an edge in the random deletion pool, find the edge in the latest road network and try to delete it:
[0060]
[0061] In the formula, random_select(E del ) refers to the random deletion of library E del A randomly selected edge in E new is the edge set after deleting this edge. The initial E new For E min . G new To delete the road network after the edge, the initial G new T min .
[0062] Step S6-4: Input G new With virtual node set V d , call step S5 to perform a connectivity check, if the check passes, confirm to delete the edge, output and save the updated road network G new , and remove the edge from the random deletion library. If the check fails, keep the edge, do not update the road network, remove the edge from the random deletion library, and update the random deletion library:
[0063]
[0064] Wherein, pathexist is the output result of the connectivity check module in step S5.
[0065] Step S6-5: Repeat steps S6-3 to S6-4 until library E is randomly deleted. del is an empty set;
[0066] Step S6-6: Output the latest road network G new , as the initial solution;
[0067] Further, step S7: using the optimal solution calculation module, using the simulated annealing algorithm, the initial solution generated in the initial solution generation module in step S6 is used as the initial solution of the simulated annealing algorithm, and the optimal solution is searched based on the initial solution through probabilistic acceptance of inferior solutions, dynamic temperature adjustment, and neighborhood solution generation. Each iteration uses the old edge set E generated in the old line retention module in step S4 LJ As part of the solution, the path planning cost is saved. Each iteration result uses the connectivity check in step S5 as a constraint to ensure that the virtual nodes are interconnected and calculate the road network with the shortest total road length. The optimal result is stored in the data storage module, and the stage planning result output module is called for drawing display.
[0068] Specifically, for the simulated annealing algorithm, the objective function is the minimum value of the sum of edge weights:
[0069]
[0070] Where E is the edge set of the current road network, w(e) is the weight of edge e, and the acceptance probability of the new solution E' generated in each iteration for the current solution E is based on the Metropolis criterion:
[0071]
[0072] Where P(E′|E) is the probability of receiving. The Metropolis criterion ensures that when a better solution is found, it is always received. When an inferior solution is found, it is received with probability, and the probability of receiving the inferior solution is gradually reduced during annealing. r is the current temperature. The temperature T has a dynamic cooling strategy in the simulated annealing algorithm:
[0073] T k+1 =T k ·α·r
[0074] In the formula, α is the fixed cooling coefficient, and r is the dynamic adjustment factor. By adjusting r, the algorithm accelerates exploration in the early stage and reduces the cooling rate in the later stage to improve the convergence accuracy.
[0075] In the simulated annealing algorithm of this method, new solutions are generated by the following rules:
[0076] (1) Replace edge set: Probabilistically select n edges, use the edge set in the road network generated in step S3, and randomly select edges to replace with the edge set:
[0077] E′=(E\{e1,e2,...,e n})∪{e′1, e′2,...,e′ n}
[0078] In the formula, {e1,e2,...,e n} is the set of edges to be replaced, is the newly added edge set, E0 is the edge set of the road network generated by the data preprocessing module, and n is a hyperparameter.
[0079] (2) Keep the old edge set and some key edge sets:
[0080] E″=E′UE LJ ∪{e c |e c is the connecting edge of the virtual node}
[0081] Where E LJ It is the old edge set generated by the old line retention module in step S4.
[0082] (3) Add m random edges
[0083] E″′=E″U{e′1, e′2,...,e′ m}
[0084] In the formula, {e′1, e′2, ..., e′ m} is a randomly added edge set, E0 is the edge set of the road network generated by the data processing module, m is a hyperparameter, and the new solution finally obtained is:
[0085] E new = unique(E″′)
[0086] According to the above algorithm, the optimal solution road network G is obtained iteratively best =(V, E best ) and the minimum edge weight ∑w(e), store the optimal result in the data storage module, and call the stage planning result output module for drawing display.
[0087] In summary, the automatic planning method for the optimal cost of the communication line is to collect the road network in the area to be planned in the information collection module, and collect the coordinate position information of the distribution automation distribution substation and distribution terminal. When the collected data needs to be modified, the human-computer interaction module is used to manually intervene in the information collection module to manually add or delete road nodes, road connections, distribution substations and distribution terminals. The data preprocessing module maps the distribution substation and distribution terminal to the nearest road based on the road network and the coordinate position information of the distribution substation and distribution terminal of the information collection module after manual intervention, generates virtual nodes, adds road connections, and updates the road network; the old line retention module marks the roads in the road network updated by the data preprocessing module through the human-computer interaction module, and marks the existing and available communication lines, indicating that the communication line is retained in the automatic planning to save costs; the connectivity check module uses the built-in Floyd-Warshall algorithm to find out whether a virtual node has a path to all other virtual nodes in a given road network diagram, and judge whether the virtual nodes can be connected to each other; then The initial solution generation module uses the Kruskal algorithm to generate a minimum spanning tree that connects all road nodes based on the road network updated by the data preprocessing module, and attempts to progressively delete one of the edges in the minimum spanning tree. The connectivity check module is called to confirm whether it can be deleted. If it is confirmed that it can be deleted, the minimum spanning tree after deleting the edge is updated, and the deletion steps are repeated until every edge in the minimum spanning tree is tried to be deleted. The remaining road network where no edge can be deleted is the initial solution generated by the initial solution generation module; the optimal solution calculation module uses the simulated annealing algorithm to use the initial solution generated in the initial solution generation module as the initial solution of the simulated annealing algorithm, and searches for the optimal solution based on the initial solution through methods such as dynamic temperature adjustment, neighborhood search, and edge exchange. When calculating the optimal solution, the roads marked in the old route retention module are used as part of the solution, and the check by the connectivity module is used as a constraint. Finally, the road network with the shortest total road length is calculated, and the planning result with the optimal cost is obtained. The planning result output module is called for drawing and display.
[0088] Compared with the prior art, the present invention has the following beneficial effects:
[0089] The present invention proposes an automatic planning system and method for the optimal cost of communication lines, which can realize automatic planning of distribution automation communication lines in a given area, so as to solve the difficulties in planning communication lines relying on manual experience, as well as the problems that the existing distribution automation communication line automatic planning systems and methods do not fully consider the planning conditions and are difficult to achieve the optimal cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1It is an automatic planning system diagram of the optimal cost of the distribution automation communication line of the present invention;
[0091] Figure 2 is a map of the area to be planned according to an example of the present invention;
[0092] Figure 3 It is a map of road nodes, road connections, power distribution substations, and power distribution terminals collected in the area to be planned by the present invention;
[0093] Figure 4 It is a diagram of road nodes, road connections, distribution substations, and distribution terminals obtained after manual intervention of the present invention;
[0094] Figure 5 It is a road network diagram established by the information collection module of the present invention;
[0095] Figure 6 It is a stage planning diagram after the present invention adds the distribution substation and the distribution terminal as virtual nodes to the road;
[0096] Figure 7 It is a stage planning diagram after marking the old communication line of the present invention;
[0097] Figure 8 It is a stage planning diagram of the present invention for generating a minimum spanning tree based on road nodes;
[0098] Fig. 9 It is a stage planning diagram of the present invention for obtaining an initial solution after pruning redundant edges of the minimum spanning tree;
[0099] Fig.10 It is a planning result diagram of the optimal cost of the communication line generated by the present invention using the simulated annealing algorithm. DETAILED DESCRIPTION
[0100] In order to more clearly illustrate the technical solution of the present invention, the present invention is further described below in conjunction with the embodiments in the accompanying drawings. It is particularly emphasized that the drawings described below only relate to some embodiments of the present invention, rather than limiting the present invention.
[0101] Discussed below Figures 1 to 8And the various embodiments used to describe the principles of the present invention in this patent document are only used for illustration and should not be regarded as limiting the scope of the present invention in any way. It is understood by those skilled in the art that the system and method of the present invention can be implemented in any distribution automation communication line planning and a distribution automation communication line optimal cost path planning system and method thereof for distribution automation communication line planning. The terms used to describe the various embodiments are exemplary. It should be understood that the embodiments are provided only to help understand this specification, and the definitions of their use should not limit the scope of the present invention in any way. The terms first, second, etc. are used to distinguish objects with the same set of terms, and are not intended to indicate a time order in any way, unless otherwise expressly stated.
[0102] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in the field without creative work belong to the scope of protection of the present invention. It should be understood that the exemplary embodiments described herein should be considered only as descriptive and not for limiting purposes. The description of the features or aspects in each exemplary embodiment should generally be considered to be applicable to similar features or aspects in other exemplary embodiments.
[0103] Embodiment 1:
[0104] like Figure 1 The system structure diagram of the optimal cost path planning system for distribution automation communication lines of the present invention according to an exemplary embodiment is shown;
[0105] In this example, a distribution automation communication line optimal cost path planning system is used to plan the communication line from the distribution substation to the distribution terminal in the planning area, so as to achieve the shortest fiber laying line length and the best cost. The automatic planning system includes: power supply module, information collection module, data storage module, old line retention module, human-computer interaction module, data preprocessing module, initial solution generation module, connectivity check module, optimal solution calculation module, and stage planning result output module.
[0106] The power supply module is a DC regulated power supply, which is used to provide a stable working power supply for the information acquisition module, the data storage module, the old line retention module, the human-computer interaction module, the data preprocessing module, the initial solution generation module, the connectivity check module, the optimal solution calculation module, and the planning result output module;
[0107] The information collection module is used to collect the road network information of the area to be planned for the distribution automation system, as well as the location information of the distribution substation and the distribution terminal, and store and display the collected road network and the locations of the distribution substation and the distribution terminal.
[0108] The data preprocessing module is used to call the data collected by the information collection module in the data storage module, generate virtual nodes of the distribution substation and the distribution terminal, add road connections, and update the road network. The updated road network is stored in the data storage module and the stage planning result output module is called to display the updated road network diagram.
[0109] The old line retention module, through the human-computer interaction module, marks and stores the designated road connections in the road network updated by the data preprocessing module, indicating that the marked communication line has been laid before and it is necessary to retain the existing communication line in the automatic planning to save costs;
[0110] Among them, the user of the human-computer interaction module manually intervenes in the information collected by the information collection module, manually adds or deletes road nodes and road connections, and manually locates and obtains the location information of the distribution substation and distribution terminal; the human-computer interaction module starts the data preprocessing module; the human-computer interaction module manually intervenes in the old line retention module to mark the road connections of the existing communication lines.
[0111] The connectivity check module performs connectivity check between virtual nodes on the road connection generated by the initial solution and the optimal solution calculated by the optimal solution calculation module to determine whether the virtual nodes are connected;
[0112] The initial solution generation module generates an initial solution for the road network generated by the data preprocessing module using a built-in algorithm, receives the check of the connectivity check module, and stores the initial solution in the data storage module;
[0113] The optimal solution calculation module further optimizes the initial solution generated by the initial solution generation module through a built-in algorithm, and retains the road connections marked in the old route retention module, and calculates and generates the optimal solution through the inspection of the connectivity inspection module;
[0114] Among them, the stage planning result output module outputs the planning results of the information collection module, data preprocessing module, old line retention module, initial solution generation module, and optimal solution calculation module according to the operation steps, and displays them in visual graphics.
[0115] In order to plan the communication line from the distribution substation to the distribution terminal, specifically, the data preprocessing module adds virtual nodes, the old line reservation module reserves the existing communication lines, the connectivity check module performs initial solution and optimal solution connectivity check of virtual nodes, the initial solution generation module generates initial solutions, and the optimal solution calculation module calculates the optimal solution. The present invention adopts the optimal cost path planning method for distribution automation communication lines.
[0116] The method is characterized in that it includes: a power supply module, an information collection module, a data storage module, a data preprocessing module, a module for retaining old lines, a human-computer interaction module, an initial solution generation module, a connectivity check module, an optimal solution calculation module, and a planning result output module. The automatic planning method for the optimal cost of a communication line includes the following steps:
[0117] Step S1: Start the information collection module in the human-computer interaction module, select the area to be planned in the high-precision map built into the system, and the information collection module obtains road nodes and road connections based on the vector information of the high-precision map, locates distribution substations and distribution terminals, and obtains the coordinates of distribution substations and distribution terminals; stores information in the data storage module, and calls the stage planning result output module to display the collected road nodes, road connections, distribution substations, and distribution terminals.
[0118] Step S2: In the human-computer interaction module, manually intervene in the data collected by the information collection module, manually add or delete road nodes and road connections, delete unlayable or useless road nodes and road connections, and manually add road nodes and road connection information not included in the high-precision map.
[0119] Specifically, the road nodes after manual intervention are represented by coordinates, numbered in sequence, and represented by a road node matrix; the roads (edges) and their road lengths (edge weights) after manual intervention are represented by edge sets (in matrix form);
[0120] Furthermore, after the human-computer interaction module manually adds or deletes road nodes, it updates the road node matrix V0 and the road connection matrix E0, which contains the edge set E and edge weights. The matrices V0 and E0 construct the mathematical model of the initial road network graph for the planned distribution area: graph G0 = (V0, E0), where V0 is the road node set and E0 is the edge set containing weights or road set. The planning result output module of the calling stage draws the visualization graph of the road network and distribution substations and distribution terminals.
[0121] Step S3: Start the data preprocessing module in the human-computer interaction module. The data preprocessing module calls the initial road network generated by the information collection module after manual intervention. For each distribution substation and distribution terminal, draw a perpendicular line to all the roads in the initial road network diagram according to its coordinate position, find the shortest side of the perpendicular line and the perpendicular point, which is the mapping point of the distribution substation or distribution terminal to the nearest road.
[0122] Specifically, when a virtual node is added to the mapped road, the initial road network generated by the information collection module after manual intervention in step S2 is traversed, and each pair of original nodes is calculated to calculate the straight-line distance from each virtual node to the road. For virtual nodes whose distance is less than the threshold (a hyperparameter with a very small value set considering the computer rounding error), they are connected. If there is only one virtual node between the two original nodes, the virtual node and the two original nodes are connected, and the connection between the two original nodes is deleted to avoid duplication of edges. If there are multiple virtual nodes, the virtual nodes are connected in sequence, and then the first virtual node is connected to the nearest original node of the two original nodes, and the last virtual node is connected to the nearest original node of the two original nodes, and the connection between the two original nodes is deleted to avoid duplication of edges. The road network G1 = (V1, E1) is updated and stored, and the stage planning result output module is called to draw a visualization graph of the road network.
[0123] Step S4: Through the human-computer interaction module, the roads with existing communication lines are marked on the road network diagram updated by the data preprocessing module, and the old line retention module identifies the marked roads, records each old line, and generates the old edge set E LJ , save E LJ Go to the data storage module and call the stage planning result output module to draw the road network with marked historical edge sets.
[0124] Step S5: Connectivity check, for the input road network graph G = (V, E) and virtual node V q , use the Floyd-Warshall algorithm to find the path from the first virtual node to all other virtual nodes in the road network graph. If the path from the first virtual node to all other virtual nodes exists, it means that the virtual nodes can access other virtual nodes through other intermediate nodes, and these virtual nodes can be interconnected based on the given road network graph, that is, the distribution substation and the distribution terminal can communicate with each other. Connectivity check the input road network graph and the specified virtual node number, output the connectivity check result and store it in the data storage module;
[0125] Step S6: Through the human-computer interaction module, in the initial solution generation module, based on the road network updated by the data preprocessing module and the Kruskal minimum spanning tree algorithm, a minimum spanning tree T is generated that allows all nodes to be interconnected.min The Kruskal algorithm is an edge-based minimum spanning tree algorithm. The algorithm sorts the edges according to their weights and adds them to the tree in sequence, ensuring that no loop is formed. Using the Kruskal algorithm, we get the minimum spanning tree T min =(V,E min ), E min is the set of edges selected in each iteration. Based on the minimum spanning tree, one of the edges is randomly tried to be deleted each time, and step S5 is called to perform a connectivity check between virtual nodes. If the road network after deleting the edge can pass the connectivity check of step S5, the edge is deleted. All edges that can be deleted are considered redundant edges E that do not affect the connectivity of virtual nodes. del_edge After deleting all redundant edges, the final road network obtained is the initial solution G initial =(V,E min \E del_edge ), store the initial solution to the data storage module, and call the stage planning result output module to draw the road network of the initial solution.
[0126] Step S7: Use the optimal solution calculation module, use the simulated annealing algorithm, take the minimum value of the sum of edge weights ∑w(e) as the objective function, and convert the initial solution G generated in the initial solution generation module in step S6 initial =(V,E min \E del_edge ) is used as the initial solution of the simulated annealing algorithm. The optimal solution is searched based on the initial solution by methods such as probabilistic acceptance of inferior solutions, dynamic temperature adjustment, edge set replacement, retention of key edge sets, and random addition of edge sets. Each iteration uses the generated historical edge set E generated in the historical line retention module in step S4. LJ As part of the solution, the path planning cost is saved. Each iteration result uses the connectivity check in step S5 as a constraint to ensure that the virtual nodes are interconnected and calculate the road network with the shortest total road length. The optimal result is stored in the data storage module, and the stage planning result output module is called for drawing display.
[0127] Example 2, verification experiment:
[0128] In order to better illustrate the effectiveness and accuracy of the system and method of the present invention, the system method used in the patent is used to verify the example area to be planned;
[0129] Given an area to be planned, refer to Figure 2 . Perform the example operation as follows:
[0130] Step S1: The human-computer interaction module starts the information collection module, selects the area to be planned in the high-precision map built into the system, and the information collection module obtains the coordinates of the road nodes, roads, and road lengths based on the vector information of the high-precision map.
[0131] In step S1, for a given area to be planned, collect road information in the area, identify the road nodes and road connections in the area; manually locate all distribution substations and distribution terminals one by one, and the information collection module obtains the coordinates of the distribution substations and distribution terminals, and calls the stage planning result output module to draw road nodes, road connections, distribution substations, and distribution terminals. The road nodes, road connections, distribution substations, and distribution terminals collected by the information collection module refer to Figure 3 .
[0132] Step S2: In the human-computer interaction module, manually intervene in the data collected by the information collection module, manually add or delete road nodes and road connections, delete unlayable or useless road nodes and road connections, and manually add road nodes and road connection information not included in the high-precision map.
[0133] Furthermore, after the human-computer interaction module manually adds or deletes road nodes, the road nodes are numbered and a road node matrix V and a road connection matrix E are established. The road connection matrix contains information about edge sets E and edge weights. The matrices V and E together construct the mathematical model of the initial road network graph for the planned distribution area: Graph G = (V, E), where V is the road node set and E is the edge set containing weights or called a road set.
[0134] In step S2, road nodes and road connections are manually added or deleted, and the road nodes and road connections obtained are used as follows: Figure 4 exhibit, Figure 4 It is a map of road nodes, road connections, distribution substations and distribution terminals obtained after manual intervention.
[0135] In step S2, the mathematical model of the road network diagram G = (V, E), the road network diagram is displayed in the calling stage planning result output module as shown in FIG. Figure 5 shown.
[0136] Step S3: Start the data preprocessing module in the human-computer interaction module. The data preprocessing module calls the initial road network generated by the information collection module after manual intervention. For each distribution substation and distribution terminal, draw a vertical line to all roads in the initial road network diagram according to its coordinate position, find the shortest side of the vertical line and the vertical point, which is the mapping point of the distribution substation or distribution terminal to the nearest road. Add the virtual node to the road connection where it is located, and update the road network.
[0137] Specifically, when a virtual node is added to the mapped road, the initial road network generated by the information collection module after manual intervention in step S2 is traversed, and each pair of original nodes is calculated to calculate the straight-line distance from each virtual node to the road. Virtual nodes whose distance is less than a threshold (a hyperparameter with a very small value set considering computer rounding error) are connected. If there is only one virtual node between two original nodes, the virtual node and the two original nodes are connected, and the connection between the two original nodes is deleted to avoid duplication of edges. If there are multiple virtual nodes, the virtual nodes are connected in order, and then the first virtual node is connected to the nearest original node of the two original nodes, and the last virtual node is connected to the nearest original node of the two original nodes, and the connection between the two original nodes is deleted to avoid duplication of edges.
[0138] In step S3, the mapping points of the distribution substation and the distribution terminal to the nearest edge are located one by one, and the mapping points are used as virtual nodes to join the road connection. The coordinates of the distribution substation and the distribution terminal, the mapping points (virtual nodes), and the updated road network are displayed in the calling stage planning result output module. The road network diagram and the total length of the road are as follows: Figure 6 shown.
[0139] Figure 6 Phase planning diagram after adding distribution substations and distribution terminals as virtual nodes to the road network
[0140] Step S4: Through the human-computer interaction module, the roads with existing communication lines are marked on the road network diagram updated by the data preprocessing module, and the old line retention module identifies the marked roads, records each old line, and generates the old edge set E. LJ , generate reuse and save it to the data storage module;
[0141] After marking the roads with existing communication lines, call the stage planning result output module to display the road network diagram and output the total length of the marked old lines (red lines) as shown below: Figure 7 shown.
[0142] Step S6: Through the human-computer interaction module, in the initial solution generation module, based on the road network updated by the data preprocessing module and the Kruskal minimum spanning tree algorithm, a minimum spanning tree T is generated that allows all nodes to be interconnected. min The Kruskal algorithm is an edge-based minimum spanning tree algorithm. The algorithm sorts the edges according to their weights and adds them to the tree in sequence, ensuring that no loop is formed. Using the Kruskal algorithm, we get the minimum spanning tree T min =(V,E min ), E minis the set of edges selected in each iteration. Based on the minimum spanning tree, one of the edges is randomly tried to be deleted each time, and step S5 is called to perform a connectivity check between virtual nodes. If the road network after deleting the edge can pass the connectivity check of step S5, the edge is deleted. All edges that can be deleted are considered redundant edges that do not affect the connectivity of virtual nodes. After deleting all redundant edges, the road network finally obtained is the initial solution, which is stored in the data storage module.
[0143] In step S6, the generated minimum spanning tree is called in the planning result output module, and the road network diagram and the total length of the planned route are displayed. The minimum spanning tree road network is drawn, and the reference Figure 8 .
[0144] In step S6, the minimum spanning tree is generated and the redundant edges are pruned. The road network diagram and the total length of the planned route are displayed in the stage planning result output module, which is 39.19 km. Since the minimum spanning tree algorithm and the algorithm for cutting redundant edges do not contain a strategy for retaining old routes, the old routes marked in step S4 are not completely retained in the generated minimum spanning tree and the road network with pruned redundant edges. Fig. 9 .
[0145] Step S7: Use the optimal solution calculation module and the simulated annealing algorithm to take the initial solution generated in the initial solution generation module in step S6 as the initial solution of the simulated annealing algorithm, and search for the optimal solution based on the initial solution by means of probability acceptance of inferior solutions, dynamic temperature adjustment, and neighborhood solution generation strategy. Each iteration uses the generated historical edge set E generated in the historical line retention module in step S4 as the initial solution of the simulated annealing algorithm. LJ As part of the solution, in order to save path planning costs. The result of each iteration uses the connectivity check of step S5 as a constraint to ensure that the virtual nodes are interconnected, and the road network with the shortest total road length is calculated. The road network diagram is displayed in the calling stage planning result output module. In the planning result generated by the optimal solution calculation module, the old lines marked in step S4 are retained to save costs. Finally, through the automatic planning system and method for the optimal cost of distribution automation communication lines described in the present invention, the total length of the communication line with the optimal cost is 36.175km. Refer to Fig.10 .
[0146] Embodiment 3, a method for automatically planning the optimal cost of a communication line,
[0147] Step S1: Start the information collection module in the human-computer interaction module, select the area to be planned in the high-precision map built into the system, and the information collection module automatically identifies the road nodes and road connections in the area; manually locate all distribution substations and distribution terminals one by one, and the information collection module obtains the coordinates of the distribution substations and distribution terminals; the information collection module stores the locations of road nodes, road connections, distribution substations, and distribution terminals in the data storage module, and calls the stage planning result output module to display the collected road nodes, road connections, distribution substations, and distribution terminals;
[0148] Step S2: In the human-computer interaction module, manually intervene in the data collected by the information collection module, manually add or delete road nodes and road connections: delete the road nodes and road connections that cannot be used, and manually add the road nodes and road connection information that need to be used but are not automatically collected. Generate a road network based on the road node and road connection data and the road network model; store the generated road network in the data storage module, and call the stage planning result output module to draw it;
[0149] Specifically, the road nodes after manual intervention are represented by coordinates, numbered in sequence, and represented by a road node matrix V;
[0150]
[0151] Where N is the number of road nodes, each row of the matrix represents the coordinates of a road node; x, y refer to the coordinates of the road node; x, y refer to the plane coordinates of the road node.
[0152] Specifically, the roads / edges and their road lengths / edge weights after manual intervention are represented by edge sets E: Matrix form:
[0153]
[0154] Where u and v are the numbers of the road nodes, indicating that there is a road directly connecting node u and node v, m is the number of roads, and for nodes with roads between the two nodes, w(u,v) is the length of the road:
[0155] The matrix V and the matrix E construct the mathematical model of the initial road network graph of the planned distribution area: Graph G = (V, E), where V is the road node set, and E is the edge set containing weights or called the road set;
[0156] Step S3: Start the data preprocessing module in the human-computer interaction module, and the data preprocessing module calls the location information of the road network and the distribution substation and the distribution terminal generated by the information acquisition module; for each distribution substation and distribution terminal, draw a perpendicular line to all the roads in the road network model according to its coordinate position, find the shortest side of the perpendicular line and the perpendicular point, and the perpendicular point is the mapping point of the distribution substation or distribution terminal to the nearest road;
[0157] Assume that the distribution substation or distribution terminal is point p, and its coordinates are (x p ,y p ), there is a road (u,v) between road node u and road node v, and the coordinates of node u are (x u ,y u ), the coordinates of node v are (x v ,y v ), then the formula for mapping from point p to road (u,v) is:
[0158]
[0159] Where d is the distance from point p to the road (u,v), (x q ,y q ) is the coordinate of the mapping point generated by mapping point p to road (u, v); draw a perpendicular line from point p to all roads in the road network to obtain the distance from point p to all roads, select the road with the shortest distance, and use the generated mapping point as the virtual node; map all distribution substations and distribution terminals to the nearest road, and generate a set of virtual nodes V q , add the virtual node to the road where the point is located, update and store the road network;
[0160] When a virtual node is added to the mapped road, the road network generated in step S2 is traversed for each pair of original road nodes, and the straight-line distance from each virtual node to the road is calculated; virtual nodes whose distance is less than the threshold are connected, and if there is only one virtual node between two original nodes, the virtual node and the two original road nodes are connected, and the connection between the two original nodes is deleted to avoid edge duplication; if there are multiple virtual nodes, the virtual nodes are connected in sequence, and then the first virtual node is connected to the nearest node of the two original road nodes, and the last virtual node is connected to the nearest node of the two original nodes, and the connection between the two original road nodes is deleted to avoid edge duplication; as shown in the following formula:
[0161]
[0162] Among them, q1,q2,...,q nis a virtual node on the road (u, v), E is the edge set containing weights generated by the information collection module in step S2, "∪" means adding a new row to the edge set E containing weights, "-" means removing the specified row from the edge set E, Threshold is a hyperparameter set considering computer rounding errors, w is the road length, which is obtained by calculating the Euclidean distance between connected road nodes; adding connections to the virtual nodes on each road can obtain the updated edge set E and the updated road network G = (V, E); storing the road network in the data storage module, and calling the stage planning result output module to draw the road network;
[0163] Step S4: Start the old line retention module through the human-computer interaction module, call the road network updated in step S3, mark the roads with existing communication lines on the road network, record each old line, and generate the old edge set E LJ And save it to the data storage module, call the stage planning result output module to draw the road network with marked historical edge sets.
[0164] Step S5: In the connectivity check module, for the input road network G = (V, E) and the virtual node set V q , use the Floyd-Warshall algorithm to find the path from any virtual node to all other virtual nodes in the road network. The specific recursive formula is:
[0165]
[0166] Where, d uv (k) represents the shortest path length of the kth recursive search from node u to node v, m is the number of nodes, and the recursive search is performed by comparing the d obtained each time. uv (k) Then obtain the shortest path from node u to node v;
[0167] If the path from any virtual node to all other virtual nodes exists, it means that the virtual nodes can access other virtual nodes through other intermediate nodes, and these virtual nodes can be interconnected based on the input road network, that is, the distribution substation and the distribution terminal can communicate with each other:
[0168]
[0169] Where V q is the set of virtual nodes, v s is any virtual node, v i Refers to the set of virtual nodes, except v s Any node other than
[0170] Connectivity check of the input road network and virtual node set V q, output the connectivity check result and store it in the data storage module;
[0171] Step S6: Through the human-computer interaction module, the road network generated in step S3 is called in the initial solution generation module, and the Kruskal minimum spanning tree algorithm built into the initial solution generation module is used to generate a minimum spanning tree T that connects all nodes to each other. min ; The Kruskal algorithm is an edge-based minimum spanning tree algorithm. The algorithm sorts the edges according to their weights and adds them to the tree in sequence, ensuring that no loop is formed. Its mathematical model is:
[0172]
[0173] In the formula, (u, v) represents the edge selected in each iteration (the edge connecting node u and node v), w(u, v) represents the weight of the edge, and E T Represents the set of selected edges. Through the Kruskal algorithm, the minimum spanning tree T is obtained. min =(V,E min ), E min is the set of edges selected in each iteration; based on the minimum spanning tree, one of the edges is randomly tried to be deleted each time, the minimum spanning tree after deleting the edge and the set of virtual nodes are input, and step S5 is called to perform a connectivity check between virtual nodes. If the road network after deleting the edge can pass the connectivity check of step S5, it is determined to delete the edge; all edges that can be deleted are regarded as redundant edges that do not affect the connectivity of virtual nodes, and the minimum spanning tree T after deleting all redundant edges is min The initial solution is stored in the data storage module and the stage planning result output module is called to draw it.
[0174] The specific sub-steps of step S6 are as follows:
[0175] Step S6-1: Based on the road network generated in step S3 and the Kruskal minimum spanning tree algorithm, a minimum spanning tree is generated, i.e., a road network T with all nodes interconnected and the shortest total road length. min =(V,E min );
[0176] Step S6-2: Create a random deletion library E del , the initial random deletion library is the edge set generated by the minimum spanning tree algorithm, E del =E min ;
[0177] Step S6-3: Select an edge in the random deletion pool, find the edge in the latest road network and try to delete it:
[0178]
[0179] In the formula, random_select(E del ) refers to the random deletion of library E del A randomly selected edge in E new is the edge set after deleting this edge. The initial E new For E min . G new To delete the road network after the edge, the initial G new T min ;
[0180] Step S6-4: Input G new With virtual node set V d , call step S5 to perform a connectivity check, if the check passes, confirm to delete the edge, output and save the updated road network G new , and remove the edge from the random deletion library; if the check fails, keep the edge, do not update the road network, remove the edge from the random deletion library, and update the random deletion library:
[0181]
[0182] Wherein, pathexist is the output result of the connectivity check module in step S5;
[0183] Step S6-5: Repeat steps S6-3 to S6-4 until library E is randomly deleted. del is an empty set;
[0184] Step S6-6: Output the latest road network G new , as the initial solution.
[0185] Step S7: Use the optimal solution calculation module and the simulated annealing algorithm to take the initial solution generated in the initial solution generation module in step S6 as the initial solution of the simulated annealing algorithm, and perform the search for the optimal solution based on the initial solution by probabilistically receiving inferior solutions, dynamic temperature adjustment, and generating neighborhood solutions; in each iteration, the old edge set E generated in the old line retention module in step S4 is retained. LJ As part of the solution, the path planning cost is saved; each iteration result is constrained by the connectivity check in step S5 to ensure that the virtual nodes are interconnected, and the road network with the shortest total road length is calculated; the optimal result is stored in the data storage module, and the stage planning result output module is called for drawing display;
[0186] Simulated annealing algorithm, the objective function is the minimum value of the sum of edge weights:
[0187]
[0188] Where E is the edge set of the current road network, w(e) is the weight of edge e, and the acceptance probability of the new solution E' generated in each iteration for the current solution E is based on the Metropolis criterion:
[0189]
[0190] Where P(E'|E) is the reception probability. The Metropolis criterion ensures that when a better solution is found, it is always received. When an inferior solution is found, it is received with probability, and the reception probability of the inferior solution is gradually reduced during annealing. T is the current temperature. The temperature T has a dynamic cooling strategy in the simulated annealing algorithm:
[0191] T k+1 =T k ·α·r
[0192] In the formula, α is the fixed cooling coefficient, and r is the dynamic adjustment factor. By adjusting r, the algorithm accelerates exploration in the early stage and reduces the cooling rate in the later stage to improve the convergence accuracy.
[0193] In the simulated annealing algorithm, new solutions are generated by the following rules:
[0194] (1) Replace edge set: Probabilistically select n edges, use the edge set in the road network generated in step S3, and randomly select edges to replace with the edge set:
[0195] E′=(E\{e1,e2,...,e n})∪{e′1, e′2,...,e′ n}
[0196] In the formula, {e1,e2,...,e n} is the set of edges to be replaced, is the newly added edge set, E0 is the edge set of the road network generated by the data preprocessing module, and n is a hyperparameter;
[0197] (2) Keep the old edge set and some key edge sets:
[0198] E″=E′UE LJ ∪{e c |e c is the connecting edge of the virtual node}
[0199] Where E LJ The old edge set generated by the old line retention module in step S4;
[0200] (3) Add m random edges
[0201] E″′=E″∪{e′1, e′2,...,e′ m}
[0202] In the formula, {e′1,e′2,..,e′ m} is a randomly added edge set, E0 is the edge set of the road network generated by the data processing module, m is a hyperparameter, and the new solution finally obtained is:
[0203] E new = unique(E″′)
[0204] According to the above algorithm, the optimal solution road network G is obtained iteratively best =(V, E best ) and the minimum edge weight ∑w(e), store the optimal result in the data storage module, and call the stage planning result output module for drawing display.
Claims
1. An automatic planning system for optimal cost of distribution automation communication lines, characterized in that: The automatic planning system includes: a power supply module, an information collection module, a data storage module, a data preprocessing module, a historical line retention module, a human-computer interaction module, an initial solution generation module, a connectivity check module, an optimal solution calculation module, and a stage planning result output module. The power supply module is a DC regulated power supply, which is used to provide a stable working power supply for each component module of the automatic planning system; The information collection module is used to collect the road network information, the location information of the distribution substation and the distribution terminal in the area to be planned by the automatic planning system, store the collected information in the data storage module, and call the stage planning result output module to display the road network diagram and the distribution substation / distribution terminal; The data preprocessing module is used to call the data collected by the information collection module in the data storage module, generate virtual nodes of the power distribution substation and the power distribution terminal and add them to the road network generated by the information collection module to update the road network; the updated road network is stored in the data storage module and the stage planning result output module is called to display the updated road network diagram; The old line retention module marks and stores the designated road connections in the road network updated by the data preprocessing module through the human-computer interaction module, indicating that the marked communication line has been laid before, and the existing communication line is retained in the automatic planning; the marked road connection is stored in the data storage module and the stage planning result output module is called to display it in the road network; The user of the human-computer interaction module manually intervenes in the information collected by the information collection module, manually adds or deletes road nodes and road connections, and locates and obtains the location information of the distribution substation and the distribution terminal; the human-computer interaction module starts the data preprocessing module; the human-computer interaction module manually intervenes in the old line retention module to mark the road connection of the existing communication line; The initial solution generation module uses a built-in algorithm to calculate the road network updated by the data preprocessing module, generates an initial solution through the check of the connectivity check module, stores the initial solution in the data storage module and calls the calling phase planning module for display; The optimal solution calculation module further optimizes the initial solution generated by the initial solution generation module through a built-in algorithm, and retains the road connections marked in the old route retention module, calculates and generates the optimal solution through the inspection of the connectivity inspection module, and stores the optimal solution in the data storage module; The connectivity check module performs connectivity check between virtual nodes on the road connection generated by the initial solution and the optimal solution calculated by the optimal solution calculation module to determine whether the distribution substation and the distribution terminal can communicate with each other; The data storage module is responsible for storing the information of each module, including the information collected by the information collection module, the road node connection information established by the old route retention module, the human-computer interaction information, the virtual node and complete road node information generated by the data preprocessing module, the initial solution information of the initial solution generation module, the inspection results of the connectivity inspection module, and the optimal solution information calculated by the optimal solution calculation module; The stage planning result output module sequentially draws the planning results of the information collection module, the data preprocessing module, the old line retention module, the initial solution generation module, and the optimal solution calculation module in each stage for visual display.
2. The automatic planning system according to claim 1, characterized in that: The information collection module collects road network information of the area to be planned through the high-precision map carried by the system, including road nodes, road connections, road lengths, and coordinate information of distribution substations and distribution terminals in the area to be planned.
3. The automatic planning system according to claim 1, characterized in that: The human-computer interaction module starts the information collection module, and is used to manually intervene in the information collected by the information collection module, including: manually selecting the area to be planned in the high-precision map in the information collection module; manually adding or deleting road nodes and road connections; and manually collecting coordinate information of distribution substations and distribution terminals in the area to be planned through map positioning; The human-computer interaction module starts the data preprocessing module, turns on data preprocessing, adds virtual nodes, and updates the road network; the human-computer interaction module starts the old route retention module, which is used to manually mark road connections in the road network in the old route retention module; the human-computer interaction module starts the initial solution generation module and the optimal solution calculation module; the human-computer interaction module starts the stage planning result output module, and draws graphics of the planning results of each stage, such as the information collection module, the data preprocessing module, the old route retention module, the initial solution generation module, and the optimal solution calculation module.
4. The automatic planning system according to claim 1, characterized in that: The optimal solution calculation module uses a built-in algorithm, combined with the road network diagram generated by the data preprocessing module and the initial solution generated by the initial solution generation module to perform iterative optimization processing, and always retains the road connections marked in the old route retention module during the iteration; after the generated optimal solution is checked by the connectivity check module, the optimal solution is output.
5. A method for automatically planning the optimal cost of a communication line, characterized in that: The method adopts the automatic planning system described in any one of claims 1 to 4, and the automatic planning method for the optimal cost of the communication line comprises the following steps: Step S1: Start the information collection module in the human-computer interaction module, and obtain the location information of road nodes, road connections, and distribution substations and distribution terminals based on the high-precision map built into the system; Step S2: manually intervene in the data collected by the information collection module in the human-computer interaction module, manually add or delete road nodes, road connections, distribution substations and distribution terminals; generate an initial road network diagram, and display the distribution substations and distribution terminals in the diagram; Step S3: The data preprocessing module calls the road network generated in step S2, maps the distribution substation and distribution terminal to the nearest road, adds the mapped point as a virtual node to the road network graph, and stores and displays the virtual node and the updated road network; Step S4: using the old line retention module to mark the roads of the built communication lines, storing the marked road connections, and displaying them in the road network diagram; Step S5: Connectivity check: performing a connectivity check on the input road network diagram and the specified virtual node number, storing and outputting the connectivity check result; Step S6: using the initial solution generation module, generating a road network according to step S3, generating a minimum spanning tree that connects all nodes based on a built-in algorithm, calling the connectivity check model of step S5, deleting all redundant edges that do not affect the connectivity of virtual nodes, obtaining an initial solution, storing and displaying the initial solution in a graph; Step S7: Use the optimal solution calculation module to perform iterative optimization using the simulated annealing algorithm combined with the initial solution generated in step S6, the road network diagram generated in step S3, the connectivity check in step S5, and the road connections marked in step S4, and store and graphically display the road network with the shortest total road length.
6. A method for automatically planning the optimal cost of a communication line according to claim 5, characterized in that: Step S1: Start the information collection module in the human-computer interaction module, select the area to be planned in the high-precision map built into the system, and the information collection module automatically identifies the road nodes and road connections in the area; manually locate all distribution substations and distribution terminals one by one, and the information collection module obtains the coordinates of the distribution substations and distribution terminals; the information collection module stores the locations of road nodes, road connections, distribution substations, and distribution terminals in the data storage module, and calls the stage planning result output module to display the collected road nodes, road connections, distribution substations, and distribution terminals; Step S2: In the human-computer interaction module, manually intervene in the data collected by the information collection module, manually add or delete road nodes and road connections: delete the road nodes and road connections that cannot be used, and manually add the road nodes and road connection information that need to be used but are not automatically collected. Generate a road network based on the road node and road connection data, as well as the road network mathematical model; store the generated road network in the data storage module, and call the stage planning result output module to draw it; Specifically, the road nodes after manual intervention are represented by coordinates, numbered in sequence, and represented by a road node matrix V; Where N is the number of road nodes, each row of the matrix represents the coordinates of a road node; x, y refer to the plane coordinates of the road node; Specifically, the roads / edges and their road lengths / edge weights after manual intervention are represented by edge sets E: Matrix form: Where u and v are the numbers of the road nodes, indicating that there is a road directly connecting node u and node v, m is the number of roads, and for nodes with roads between the two nodes, w(u,v) is the length of the road: The matrix V and the matrix E construct the mathematical model of the initial road network graph of the planned distribution area: Graph G = (V, E), where V is the road node set, and E is the edge set containing weights or called the road set; Step S3: Start the data preprocessing module in the human-computer interaction module, and the data preprocessing module calls the location information of the road network and the distribution substation and the distribution terminal generated by the information acquisition module; for each distribution substation and distribution terminal, draw a perpendicular line to all the roads in the road network model according to its coordinate position, find the shortest side of the perpendicular line and the perpendicular point, and the perpendicular point is the mapping point of the distribution substation or distribution terminal to the nearest road; Assume that the distribution substation or distribution terminal is point p, and its coordinates are (x p ,y p ), there is a road (u,v) between road node u and road node v, and the coordinates of node u are (x u ,y u ), the coordinates of node v are (x v ,y v ), then the formula for mapping from point p to road (u,v) is: Where d is the distance from point p to the road (u,v), (x q ,y q ) is the coordinate of the mapping point generated by mapping point p to road (u, v); draw a perpendicular line from point p to all roads in the road network to obtain the distance from point p to all roads, select the road with the shortest distance, and use the generated mapping point as the virtual node; map all distribution substations and distribution terminals to the nearest road, and generate a set of virtual nodes V q , add the virtual node to the road where the point is located, update and store the road network; When a virtual node is added to the mapped road, the road network generated in step S2 is traversed for each pair of original road nodes, and the straight-line distance from each virtual node to the road is calculated; virtual nodes whose distance is less than the threshold are connected, and if there is only one virtual node between two original nodes, the virtual node and the two original road nodes are connected, and the connection between the two original nodes is deleted to avoid edge duplication; if there are multiple virtual nodes, the virtual nodes are connected in sequence, and then the first virtual node is connected to the nearest node of the two original road nodes, and the last virtual node is connected to the nearest node of the two original nodes, and the connection between the two original road nodes is deleted to avoid edge duplication; as shown in the following formula: Among them, q1,q2,...,q n is a virtual node on the road (u,v), E is the edge set containing weights generated by the information collection module in step S2, "∪" means adding a new row to the edge set E containing weights, "-" means removing the specified row from the edge set E, Threshold is a hyperparameter set to consider computer rounding errors, and w is the road length, which is obtained by calculating the Euclidean distance between connected road nodes. By adding connections to the virtual nodes on each road, the updated edge set E and the updated road network G = (V,E) can be obtained; the road network is stored in the data storage module, and the stage planning result output module is called to draw the road network; Step S4: Start the old line retention module through the human-computer interaction module, call the road network updated in step S3, mark the roads with existing communication lines on the road network, record each old line, and generate the old edge set E LJ And save it to the data storage module, call the stage planning result output module to draw the road network with marked historical edge sets. Step S5: In the connectivity check module, for the input road network G = (V, E) and the virtual node set V q , use the Floyd-Warshall algorithm to find the path from any virtual node to all other virtual nodes in the road network. The specific recursive formula is: Where, d uv (k) represents the shortest path length of the kth recursive search from node u to node v, m is the number of nodes, and the recursive search is performed by comparing the d obtained each time. uv (k) Then obtain the shortest path from node u to node v; If the path from any virtual node to all other virtual nodes exists, it means that the virtual nodes can access other virtual nodes through other intermediate nodes, and these virtual nodes can be interconnected based on the input road network, that is, the distribution substation and the distribution terminal can communicate with each other: Where V q is the set of virtual nodes, v s is any virtual node, v i Refers to the set of virtual nodes, except v s Any node other than Connectivity check of the input road network and virtual node set V q , output the connectivity check result and store it in the data storage module; Step S6: Through the human-computer interaction module, the road network generated in step S3 is called in the initial solution generation module, and the Kruskal minimum spanning tree algorithm built into the initial solution generation module is used to generate a minimum spanning tree T that connects all nodes to each other. min ; The Kruskal algorithm is an edge-based minimum spanning tree algorithm. The algorithm sorts the edges according to their weights and adds them to the tree in sequence, ensuring that no loop is formed. Its mathematical model is: In the formula, (u, v) represents the edge selected in each iteration (the edge connecting node u and node v), w(u, v) represents the weight of the edge, and E T Represents the set of selected edges. Through the Kruskal algorithm, the minimum spanning tree T is obtained. min =(V,E min ), E min is the set of edges selected in each iteration; based on the minimum spanning tree, one of the edges is randomly tried to be deleted each time, the minimum spanning tree after deleting the edge and the set of virtual nodes are input, and step S5 is called to perform a connectivity check between virtual nodes. If the road network after deleting the edge can pass the connectivity check of step S5, it is determined to delete the edge; all edges that can be deleted are regarded as redundant edges that do not affect the connectivity of virtual nodes, and the minimum spanning tree T after deleting all redundant edges is min The initial solution is stored in the data storage module and the stage planning result output module is called to draw it.
7. A method for automatically planning the optimal cost of a communication line according to claim 6, characterized in that: The specific sub-steps of step S6 are as follows: Step S6-1: Based on the road network generated in step S3 and the Kruskal minimum spanning tree algorithm, a minimum spanning tree is generated, i.e., a road network T with all nodes interconnected and the shortest total road length. min =(V,E min ); Step S6-2: Create a random deletion library E del , the initial random deletion library is the edge set generated by the minimum spanning tree algorithm, E del =E min ; Step S6-3: Select an edge in the random deletion pool, find the edge in the latest road network and try to delete it: In the formula, random_select(E del ) refers to the random deletion of library E del A randomly selected edge in E new is the edge set after deleting this edge. The initial E new For E min . G new To delete the road network after the edge, the initial G new T min ; Step S6-4: Input G new With virtual node set V d , call step S5 to perform a connectivity check, if the check passes, confirm to delete the edge, output and save the updated road network G new , and remove the edge from the random deletion library; if the check fails, keep the edge, do not update the road network, remove the edge from the random deletion library, and update the random deletion library: Wherein, pathexist is the output result of the connectivity check module in step S5; Step S6-5: Repeat steps S6-3 to S6-4 until library E is randomly deleted. del is an empty set; Step S6-6: Output the latest road network G new , as the initial solution.
8. A method for automatically planning the optimal cost of a communication line according to claim 5 or 6, characterized in that: Step S7: Use the optimal solution calculation module and the simulated annealing algorithm to take the initial solution generated in the initial solution generation module in step S6 as the initial solution of the simulated annealing algorithm, and perform the search for the optimal solution based on the initial solution by probabilistically receiving inferior solutions, dynamic temperature adjustment, and generating neighborhood solutions; in each iteration, the old edge set E generated in the old line retention module in step S4 is retained. LJ As part of the solution, the path planning cost is saved; each iteration result is constrained by the connectivity check in step S5 to ensure that the virtual nodes are interconnected, and the road network with the shortest total road length is calculated; the optimal result is stored in the data storage module, and the stage planning result output module is called for drawing display; Simulated annealing algorithm, the objective function is the minimum value of the sum of edge weights: Where E is the edge set of the current road network, w(e) is the weight of edge e, and the acceptance probability of the new solution E' generated in each iteration for the current solution E is based on the Metropolis criterion: Where P(E'|E) is the reception probability. The Metropolis criterion ensures that when a better solution is found, it is always received. When an inferior solution is found, it is received with probability, and the reception probability of the inferior solution is gradually reduced during annealing. T is the current temperature. The temperature T has a dynamic cooling strategy in the simulated annealing algorithm: T k+1 =T k ·α·r In the formula, α is the fixed cooling coefficient, and r is the dynamic adjustment factor. By adjusting r, the algorithm accelerates exploration in the early stage and reduces the cooling rate in the later stage to improve the convergence accuracy.
9. A method for automatically planning the optimal cost of a communication line according to claim 8, characterized in that: In the simulated annealing algorithm, new solutions are generated by the following rules: (1) Replace edge set: Probabilistically select n edges, use the edge set in the road network generated in step S3, and randomly select edges to replace with the edge set: E'=(E\{e1,e2,...,e n })∪{e′1,e′2,...,e′ n } In the formula, {e1,e2,...,e n } is the set of edges to be replaced, {e′1, e′2, ..., e′ n } is the newly added edge set, E0 is the edge set of the road network generated by the data preprocessing module, and n is a hyperparameter; (2) Keep the old edge set and some key edge sets: E″=E′∪E LJ ∪{e c |e c is the connecting edge of the virtual node} Where E LJ The old edge set generated by the old line retention module in step S4; (3) Add m random edges E″′=E″∪{e′1,e′2,...,e′ m } In the formula, {e′1,e′2,...,e′ m } is a randomly added edge set, E0 is the edge set of the road network generated by the data processing module, m is a hyperparameter, and the new solution finally obtained is: AND new =unique(E″′) According to the above algorithm, the optimal solution road network G is obtained iteratively best =(V, E best ) and the minimum edge weight ∑w(e), store the optimal result in the data storage module, and call the stage planning result output module for drawing display.
Citation Information
Patent Citations
Urban power distribution network frame planning method based on improved prim-genetic algorithm
CN115409322A
Power distribution network line automatic planning method, device, equipment and storage medium
CN116109024A
Multicast routing method for distributed network application layer based on network coding
CN101267450A
Energy management and electrical power distribution automatization system
CN101369740A
Power distribution line planning method and device
CN107730062A