A method and device for generating a traversal path of a power distribution network of a ship integrated power system

By generating traversal paths for the power distribution network of a ship's integrated power system using a depth-first search algorithm, the problem of existing methods being incompatible with first- and second-generation ship integrated power systems is solved, and efficient traversal and path generation are achieved under complex structures.

CN119966011BActive Publication Date: 2026-05-29CSSC SYST ENG RES INST +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CSSC SYST ENG RES INST
Filing Date
2024-12-23
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing traversal search methods cannot be applied to the power distribution networks of both first-generation and second-generation integrated power systems for ships, especially the complex ring structure in the second-generation integrated power systems for ships.

Method used

The depth-first search algorithm is adopted. By setting up a node stack and recording the discovery and completion times of nodes, a traversal path is generated. It is suitable for the ring and radial structures of ship integrated power systems.

Benefits of technology

It enables distribution network traversal applicable to both first- and second-generation ship integrated power systems, enhancing the method's compatibility and efficiency, and supporting distribution network restorative reconfiguration and power supply path analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966011B_ABST
    Figure CN119966011B_ABST
Patent Text Reader

Abstract

The application provides a method and device for generating a traversal path of a power distribution network of a ship integrated power system. The method comprises: setting a node stack for storing nodes of the power distribution network; obtaining a first node in a first state from the node stack; searching according to a preset search algorithm and the first node to determine a second node and record a discovery time and a completion time of the second node; traversing all nodes from the second node to determine parent nodes, discovery times and completion times of all nodes; and generating a traversal path according to the parent nodes, discovery times and completion times of all nodes when all nodes meet a traversal path condition. The technical scheme of the application has wide applicability and high efficiency in practical application and can be applied to first-generation and second-generation ship integrated power systems, thereby providing strong technical support for power distribution network recovery reconstruction and power supply path analysis of the ship integrated power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of integrated shipboard power systems, and specifically relates to a method and apparatus for generating traversal paths of the power distribution network of an integrated shipboard power system. Background Technology

[0002] Traversal is crucial in the restorative reconstruction and power supply path analysis of power distribution networks. In order to obtain the connection information of each node and branch of the power distribution network in the ship's integrated power system, it is necessary to traverse the power distribution network. That is, to search all nodes, branches or sub-branches from the source node to the end node or from the end node to the source node, and to establish a connection data structure of the power distribution network in the ship's integrated power system to store the connection and numbering information of the power distribution network.

[0003] In recent years, with the development of medium-voltage flexible DC technology and power electronic power systems, ship integrated power systems are gradually evolving from the first generation to the second generation along the technical trajectory of "medium-voltage AC - high-frequency AC - medium-voltage DC". The significant feature of the first generation of ship integrated power systems is the combination of medium-voltage AC and high-frequency AC. In order to limit the short-circuit current and reactive circulating current of the AC system, the power distribution network of the first generation of ship integrated power systems adopts an open-loop radial structure. The radial structure is simple and the radial power distribution network can be searched using tree traversal method.

[0004] The second-generation integrated shipboard electric power system, characterized by medium-voltage DC power supply, is suitable not only for large ships but also for all types of vessels under 3,000 tons, and has become the current development trend of integrated shipboard electric power systems. To improve power supply reliability and ensure smooth load transfer paths, the topology of the second-generation integrated shipboard electric power system is mainly a ring-shaped regional structure or a ring structure. Because fully controlled power electronic devices can effectively limit short-circuit current, the power distribution network can operate in a closed loop under medium-voltage DC power supply. The power supply path is more complex than that of the first-generation integrated shipboard electric power system, and each load can obtain power from multiple power sources through multiple paths, which makes tree traversal search methods no longer applicable.

[0005] Therefore, how to design and develop a power distribution network traversal path generation method that can be applied to both the first-generation and second-generation integrated power systems of ships is an urgent technical problem to be solved. Summary of the Invention

[0006] In a first aspect, embodiments of the present invention provide a method for generating a traversal path for a ship's integrated power system distribution network. The method includes: setting up a node stack for storing distribution network nodes; obtaining a first node in a first state from the node stack; performing a search according to a preset search algorithm and the first node to determine a second node, and recording the discovery time and completion time of the second node; traversing all nodes starting from the second node to determine the parent node, discovery time, and completion time of all nodes; and generating a traversal path based on the parent node, discovery time, and completion time of all nodes when all nodes meet the traversal path conditions.

[0007] Secondly, embodiments of the present invention provide a device for generating a traversal path for a ship's integrated power system distribution network. The device includes: a setting module for setting a node stack for storing distribution network nodes; an acquisition module for acquiring a first node in a first state from the node stack; a recording module for searching according to a preset search algorithm and the first node to determine a second node and recording the discovery time and completion time of the second node; a traversal module for traversing all nodes starting from the second node to determine the parent node, discovery time, and completion time of all nodes; and a generation module for generating a traversal path based on the parent node, discovery time, and completion time of all nodes when all nodes meet the traversal path conditions.

[0008] Thirdly, embodiments of the present invention provide an electronic device, including: a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, the steps of the method for generating a traversal path of a ship's integrated power system distribution network as described in any of the above embodiments are implemented.

[0009] Fourthly, embodiments of the present invention provide a readable storage medium storing a program or instructions thereon, wherein when the program or instructions are executed by a processor, the steps of the method for generating a traversal path of a ship's integrated power system distribution network as described in any of the above embodiments are implemented.

[0010] The beneficial effects of this invention are as follows:

[0011] As can be seen from the above scheme, the embodiments of the present invention provide a method for generating traversal paths of the power distribution network of a ship's integrated power system. This method is applicable to both the first-generation and second-generation integrated power systems of ships and has good compatibility. Because it adopts depth-first search, it is particularly suitable for the closed-loop ring structure and ring structure under the low voltage DC power supply mode of the second-generation integrated power system. At the same time, it is compatible with the radial power distribution network structure of the first-generation integrated power system with open-loop operation. This enhances the versatility and efficiency of the method in practical applications and provides strong technical support for the restorative reconfiguration of the power distribution network and power supply path analysis of the ship's integrated power system. Attached Figure Description

[0012] Figure 1 This is one of the flowcharts illustrating a method for generating a traversal path for a ship's integrated power system distribution network according to an embodiment of the present invention.

[0013] Figure 2 This is a second flowchart illustrating a method for generating a traversal path for a ship's integrated power system distribution network according to an embodiment of the present invention.

[0014] Figure 3 This is the third flowchart illustrating a method for generating a traversal path for a ship's integrated power system distribution network according to an embodiment of the present invention.

[0015] Figure 4 A schematic block diagram illustrating the structure of a device for generating a traversal path of a ship's integrated power system distribution network according to an embodiment of the present invention.

[0016] Figure 5 A schematic block diagram illustrating the structure of an electronic device according to an embodiment of the present invention;

[0017] Figure 6 This is a schematic diagram illustrating a power system distribution network structure according to an embodiment of the present invention.

[0018] Figure 7 This is the fourth flowchart illustrating a method for generating a traversal path for a ship's integrated power system distribution network according to an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0020] like Figure 1 As shown, the present invention provides a method for generating a traversal path for a ship's integrated power system distribution network. The method includes:

[0021] Step 102: Set up a node stack for storing power distribution network nodes;

[0022] Step 104: Obtain the first node in the first state from the node stack;

[0023] Step 106: Search according to the preset search algorithm and the first node to determine the second node, and record the discovery time and completion time of the second node;

[0024] Step 108: Starting from the second node, traverse all nodes to determine the parent node, discovery time, and completion time of each node;

[0025] Step 110: When all nodes meet the traversal path conditions, generate the traversal path based on the parent node, discovery time, and completion time of all nodes.

[0026] In an embodiment of the present invention, a node stack is set up to store the nodes of the power distribution network. First, a first node in a first state is retrieved from the node stack. The first node is the node at the top of the node stack. The first state indicates that the node is in a visited state. Then, a search is performed starting from the first node according to a preset search algorithm. Specifically, the search is performed to see if there are any unvisited nodes among the nodes adjacent to the first node. This node is identified as the second node, and the discovery time of the second node is recorded. At the same time, the first node is the parent node of the second node. When the first node has no accessible adjacent nodes, the completion time of the first node is recorded. The completion time of the second node is also recorded in the same way. Starting from the second node, all nodes are traversed, and the above search process is repeated until all nodes of the power distribution network are discovered. At the same time, the search order of the nodes is obtained by determining the parent node, discovery time, and completion time of all nodes (including the first and second nodes). A traversal path is generated according to the search order. Finally, a connection data structure of the power distribution network is established to store the connection and numbering information of the power distribution network.

[0027] To ensure smooth load transfer paths, second-generation integrated power systems for ships with ring or ring-region structures are increasingly being adopted. The topology of these systems is primarily ring-region and ring-structured. Because fully controlled power electronic devices can effectively limit short-circuit currents, the distribution network can operate in a closed loop under medium-voltage DC power supply. Each load can obtain power from multiple sources via multiple paths, rendering tree traversal search methods inapplicable. The method of this invention, based on depth-first search technology, is applicable to the deep structure of ship integrated power system distribution networks. It is suitable for both first-generation and second-generation ship integrated power systems, exhibiting good compatibility. Due to the use of depth-first search, it is particularly suitable for the closed-loop ring-region and ring-structured distribution networks of second-generation ship integrated power systems under medium-voltage DC power supply, while also being compatible with the open-loop radial distribution network structure of first-generation ship integrated power systems. This enhances the versatility and efficiency of the method in practical applications, providing strong technical support for the restorative reconfiguration and power supply path analysis of ship integrated power system distribution networks.

[0028] like Figure 2 As shown, in any of the above embodiments, obtaining the first node in the second state from the node stack includes:

[0029] Step 202: Initialize the node stack;

[0030] Step 204: Obtain the initial node in the initial state and record the discovery time of the initial node;

[0031] Step 206: Push the initial node onto the node stack;

[0032] Step 208: Select the first node from the node stack according to the preset filtering conditions.

[0033] In this implementation, the system is initialized to initialize the node stack, and then the initial node in the initial state is obtained. The discovery time of the initial node is recorded, that is, the initial node that has not been visited is found by searching and the discovery time of the initial node is recorded, which is convenient for determining the search order of all nodes in the future. Then the initial node is pushed onto the node stack, which is beneficial for subsequent processing. Finally, the first node is selected from the node stack based on the preset filtering conditions. The first node is in the first state, that is, the visited state.

[0034] like Figure 3 As shown, in any of the above embodiments, a search is performed based on a preset search algorithm and the first node to determine the second node, and the discovery time and completion time of the second node are recorded, including:

[0035] Step 302: Obtain the adjacency list of the first node;

[0036] Step 304: Check the first node according to the adjacency list to determine whether there is a second node in the initial state;

[0037] Step 306: If yes, then determine that the first node has entered the first state, and determine the first node as the parent node of the second node, and record the discovery time of the second node and push the second node onto the node stack;

[0038] Step 308: If not, determine that the first node has entered the second state, record the completion time of the first node, and pop the first node from the node stack.

[0039] In this embodiment, a node has an adjacency list, which consists of two data: other nodes that a node can reach and whether the node has been visited. By checking the adjacency list of the first node, the second node that has not been visited can be obtained. At this time, the first node enters the first state, that is, the first node has been visited, and subsequent searches will be performed based on the second node.

[0040] The first node is determined as the parent node of the second node. After recording the discovery time of the second node, the second node is pushed onto the node stack to facilitate subsequent searches.

[0041] When there are no other reachable nodes in the adjacency list of the first node, the first node enters the second state, indicating that the search for the first node is complete. Subsequent searches will not be performed based on this node. The completion time of the first node is recorded to facilitate the generation of subsequent paths. The first node is then popped from the node stack to avoid redundant searches and wasted time, thus reducing processing time.

[0042] In any of the above embodiments, when all nodes meet the traversal path conditions, a traversal path is generated based on the parent node, discovery time, and completion time of all nodes, including: the traversal path conditions are that none of the nodes are located in the node stack and none of the nodes are in the initial state.

[0043] In this embodiment, the traversal path conditions include two conditions: the first is that none of the nodes are in the node stack, and the second is that none of the nodes are in their initial state. When both conditions are met, the step of generating the traversal path can proceed. That is, it indicates that all nodes have been visited, achieving traversal of all nodes. By setting traversal path conditions, the search is prevented from ending before traversal is complete, thus improving the accuracy of path generation.

[0044] In any of the above embodiments, the initial state represents the state when the node has not been visited; the first state represents the state when the node has been visited; and the second state represents the state when the node has completed the adjacency list detection.

[0045] In this embodiment, the initial state represents the state when the node has not been visited; the first state represents the state when the node has been visited; and the second state represents the state when the node has completed the adjacency list check. These states, representing the specific state of the node, facilitate tracking the entire search process.

[0046] Specifically, in practical applications, the color of a node is used to indicate its state. For example, each node is initially white, that is, the initial state is represented by white. When a node is discovered during a search, it turns gray, which is the first state. When it has completed the search of all edges, that is, when its adjacency list has been completely examined, it turns black, which is the second state.

[0047] In any of the above embodiments, the preset filtering condition is that the node is located at the top of the node stack; the preset search algorithm includes a depth-first search algorithm and / or a backtracking algorithm.

[0048] In this embodiment, the Depth First Search (DFS) algorithm is one of the most efficient graph traversal search algorithms and is also the prototype of many important graph algorithms. Its strategy is to search as deep as possible in the graph, which is consistent with the depth structure of the power distribution network of the ship's integrated power system.

[0049] This invention primarily uses a depth-first search algorithm to search for new, unvisited nodes, completing the traversal of all nodes without repeated searches.

[0050] Backtracking is used when all edges of a node have been searched, and it returns to the parent node that discovered the node. Other graph traversal search algorithms include breadth-first search and branch and bound search.

[0051] Specifically, the application of depth-first search and backtracking algorithms is as follows: For a newly discovered node, if there are still unsearched edges originating from it, search that node. Once all edges of the node have been searched, the search "backtracks" to the parent node of the discovered node. This process is repeated until all nodes in the distribution network have been discovered. In this way, the search trajectory will form a forest, not necessarily containing only a single tree.

[0052] In any of the above embodiments, the discovery time and completion time are represented by the values ​​of a continuous counter, and the value of the discovery time corresponding to each node is less than the value of the corresponding completion time.

[0053] In this implementation, to reveal more information about the distribution network through depth-first search, two times are tracked for each node during the depth-first search process: discovery time and completion time. The discovery time records the moment a node is first discovered, and the completion time records the moment the node completes its adjacency list check (turns black, entering the second state). For each node, the value of its discovery time is less than the value of its corresponding completion time.

[0054] Specifically, let's take the discovery time d[u] and completion time f[u] of node u as an example. The discovery time d[u] records the moment of initial discovery (node ​​u changes from white to gray), and the completion time f[u] records the moment node u completes its adjacency list check (turns black). For each node, there must be a discovery time d[u] that is less than the completion time f[u]. Before discovery time d[u], node u is white; between discovery time d[u] and completion time f[u], node u is gray; and after completion time f[u], node u is black. All these times are represented by integers between 1 and 2|V|, where |V| is the number of nodes in the distribution network. For each of the |V| nodes, there is only one discovery event and one completion event, i.e., only one discovery time and one completion time.

[0055] like Figure 4As shown, the present invention provides a device 400 for generating a traversal path for a ship's integrated power system distribution network. The device includes: a setting module 410 for setting a node stack for storing distribution network nodes; an acquisition module 420 for acquiring a first node in a first state from the node stack; a recording module 430 for searching according to a preset search algorithm and the first node to determine a second node and recording the discovery time and completion time of the second node; a traversal module 440 for traversing all nodes starting from the second node to determine the parent node, discovery time, and completion time of all nodes; and a generation module 450 for generating a traversal path based on the parent node, discovery time, and completion time of all nodes when all nodes meet the traversal path conditions.

[0056] In an embodiment of the present invention, the device for generating a traversal path for a ship's integrated power system distribution network includes a setting module 410, an acquisition module 420, a recording module 430, a traversal module 440, and a generation module 450. This device is used for generating a traversal path for a ship's integrated power system distribution network. First, a node stack is set up to store nodes of the distribution network to be visited. Then, a first node in a first state is retrieved from the node stack. The first node is the node at the top of the node stack, and the first state indicates that the node has been visited. Then, a search is performed starting from the first node according to a preset search algorithm, specifically searching for unvisited nodes adjacent to the first node. For each node that has been visited, that node is designated as the second node, and its discovery time is recorded. The first node is the parent node of the second node. When the first node has no accessible neighboring nodes, its completion time is recorded. The second node's completion time is also recorded in the same way. Starting from the second node, all nodes are traversed, and the above search process is repeated until all nodes in the distribution network are discovered. At the same time, the parent node, discovery time, and completion time of all nodes are determined. The search order of the nodes can be obtained from the parent node, discovery time, and completion time of all nodes. A traversal path is generated based on the search order, and finally, the connection data structure of the power grid is established to store the connection and numbering information of the power grid.

[0057] To ensure smooth load transfer paths, the topology of the second-generation ship integrated power system is primarily designed as a ring-shaped regional structure and a ring structure. Because fully controlled power electronic devices can effectively limit short-circuit current under medium-voltage DC power supply, the distribution network of the second-generation ship integrated power system can operate in a closed loop. Each load can obtain power from multiple power sources through multiple paths, making tree traversal search methods inapplicable. The method of this invention, based on depth-first search technology, is applicable to the depth structure of the ship integrated power system distribution network. It is suitable for both the first-generation and second-generation ship integrated power systems, exhibiting good compatibility. Because it uses depth-first search, it is particularly suitable for the closed-loop ring-shaped regional structure and ring structure under medium-voltage DC power supply in the second-generation ship integrated power system, while also being compatible with the open-loop radial distribution network structure of the first-generation ship integrated power system. This enhances the versatility and efficiency of the method in practical applications, providing strong technical support for the restorative reconfiguration and power supply path analysis of the ship integrated power system distribution network.

[0058] like Figure 5 As shown, an electronic device 500 provided in an embodiment of the present invention includes: a processor 510 and a memory 520. The memory 520 stores programs or instructions that can run on the processor 510. When the program or instructions are executed by the processor 510, they implement the steps of the method for generating a traversal path of the ship's integrated power system distribution network as described in any of the above embodiments.

[0059] The present invention provides an electronic device 500, comprising a processor 510 and a memory 520. The memory 520 stores programs or instructions that can run on the processor 510. When the program or instructions are executed by the processor 510, they implement the steps of the method for generating a traversal path of a ship's integrated power system distribution network as described in any of the above embodiments. Therefore, this electronic device 500 possesses all the beneficial effects of the method for generating a traversal path of a ship's integrated power system distribution network as described in any of the above embodiments.

[0060] An embodiment of the present invention provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the method for generating a traversal path of a ship's integrated power system distribution network as described in any of the above embodiments.

[0061] The present invention provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the method for generating a traversal path for a ship's integrated power system distribution network as described in any of the above embodiments. Therefore, this readable storage medium possesses all the beneficial effects of the method for generating a traversal path for a ship's integrated power system distribution network as described in any of the above embodiments.

[0062] like Figure 6 The diagram shows a schematic of the power distribution network structure, specifically the IEEE (Institute of Electrical and Electronics Engineers) 33-node shipboard integrated power system distribution network structure. This system has 33 nodes (as shown in the diagram). Figure 6 The roads are numbered 1 to 33, and there are 32 branch roads (according to...). Figure 6 The Chinese number is 1 to 32 ), 5 interconnecting switches (press) Figure 6 The Chinese number is 33 to 37 During normal operation, the feeder interconnection switch is open.

[0063] The following code is used to test the program in Section 5, which traverses the IEEE 33-node ship integrated power system distribution network under normal operating conditions. The test code is as follows.

[0064]

[0065]

[0066]

[0067]

[0068]

[0069] The array defined in lines 7 to 39 represents the adjacency matrix of the IEEE 33-node system. Line 42 creates an adjacency list object g using 'a' and the number of nodes n (=33).

[0070] Line 43 calls the function dfs to perform a depth-first search on g and returns the result to the pair object. Lines 44 to 46 split the three arrays encapsulated in r into pi, d and f.

[0071] Lines 47 to 49 output the parent node of each node in the depth-first forest, as well as the discovery time and completion time in the search.

[0072] The program output is as follows.

[0073] 1:parent-1discover / finish:1 / 66

[0074] 2:parent 1discover / finish:2 / 65

[0075] 3:parent 2discover / finish:3 / 56

[0076] 4:parent 3discover / finish:4 / 49

[0077] 5:parent 4discover / finish:5 / 48

[0078] 6:parent 5discover / finish:6 / 47

[0079] 7:parent 6discover / finish:7 / 30

[0080] 8:parent 7 discover / finish:8 / 29

[0081] 9:parent 8 discover / finish:9 / 28

[0082] 10:parent 9 discover / finish:10 / 27

[0083] 11:parent 10 discover / finish:11 / 26

[0084] 12:parent 11 discover / finish:12 / 25

[0085] 13:parent 12 discover / finish:13 / 24

[0086] 14:parent 13 discover / finish:14 / 23

[0087] 15:parent 14 discover / finish:15 / 22

[0088] 16:parent 15 discover / finish:16 / 21

[0089] 17:parent 16 discover / finish:17 / 20

[0090] 18:parent 17 discover / finish:18 / 19

[0091] 19:parent 2 discover / finish:57 / 64

[0092] 20:parent 19 discover / finish:58 / 63

[0093] 21:parent 20 discover / finish:59 / 62

[0094] 22:parent 21 discover / finish:60 / 61

[0095] 23:parent 3 discover / finish:50 / 55

[0096] 24:parent 23 discover / finish:51 / 54

[0097] 25:parent 24 discover / finish:52 / 53

[0098] 26:parent 6 discover / finish:31 / 46

[0099] 27:parent 26 discover / finish:32 / 45

[0100] 28:parent 27 discover / finish:33 / 44

[0101] 29:parent 28 discover / finish:34 / 43

[0102] 30:parent 29 discover / finish:35 / 42

[0103] 31:parent 30discover / finish:36 / 41

[0104] 32:parent 31discover / finish:37 / 40

[0105] 33:parent 32discover / finish:38 / 39

[0106] In the above results, the discovery time and completion time of each node are represented by the values ​​of a continuous counter. The order in which the 33 nodes were accessed can be seen from the values ​​of these counters. It should be noted that the parent node of source node 1 outputs -1. This completes the traversal of the IEEE 33-node shipboard integrated power distribution network under normal operating conditions.

[0107] According to a specific embodiment of the present invention, such as Figure 7 As shown, a method for generating a traversal path for a ship's integrated power system distribution network, also known as an intelligent distribution network traversal method based on a depth-first search algorithm, is illustrated. This method includes the following steps:

[0108] Step 702: System initialization;

[0109] Step 704: Take a white node s and color it gray;

[0110] Specifically, the discovered node s is the initial node, which is initially white, indicating that it has not been searched. Once discovered, it is set to the first state, which is gray.

[0111] Step 706: Increment the counter by 1 to represent the discovery time of node s;

[0112] Specifically, the discovery time of node s is displayed as 1 on the counter.

[0113] Step 708: Push node s onto stack S;

[0114] Specifically, stack S is the node stack. Nodes s are stored in the node stack. Normally, the most recently pushed node is at the top of the stack for subsequent processing.

[0115] Step 710: Assign the top node of the stack (the most recently pushed node) to node u;

[0116] Specifically, the top node of the stack (the most recently pushed node) is assigned to node u, thereby obtaining node u, which is the first node.

[0117] Step 712: Is there a white node adjacent to node u? If not, proceed to step 722; if yes, proceed to step 714.

[0118] Specifically, the adjacency list of node u is used to determine whether there are any nodes that have not yet been searched.

[0119] Step 714: Color the white node v gray;

[0120] Specifically, if node u has an unsearched neighbor node v (i.e., the second node), and node v has already been discovered, then the state of node v is set to gray.

[0121] Step 716: Make node u the parent node of node v;

[0122] Specifically, node u is the parent node of node v, that is, the first node is the parent node of the second node.

[0123] Step 718: Increment the counter by 1 to represent the discovery time of node v;

[0124] Step 720: Push node v onto stack S;

[0125] Specifically, after node v is pushed onto stack S, it awaits further searching.

[0126] Step 722: Color node u black;

[0127] Specifically, if node u has no searchable neighboring nodes, then the state of node u is set to black.

[0128] Step 724: Increment the counter by 1 to obtain the completion time of node u;

[0129] Step 726: Pop node u from stack S;

[0130] Specifically, when node u has no accessible neighboring nodes, it is popped from stack S.

[0131] Step 728: Is stack S empty? If yes, proceed to step 730; otherwise, return to step 710.

[0132] Specifically, determine whether stack S has no nodes left to process, i.e., whether all nodes have been processed and are now black. If it is not empty, jump to step 710, i.e., process the nodes that have not yet been processed.

[0133] Step 730: Are there any white nodes? If yes, return to step 704; otherwise, proceed to step 732.

[0134] Specifically, further investigate whether there are white nodes in S that can be processed. If so, set the node to gray, repeat the above steps, and continue the search.

[0135] Step 732: Output the parent node, discovery time, and completion time of each node.

[0136] When there are no more nodes to process in stack S, and no more white nodes to process, output the parent node, discovery time, and completion time of all nodes.

[0137] Finally, the access order of all nodes is obtained based on the parent node, discovery time, and completion time of each node, thereby generating a traversal path and forming the topology of the ship's integrated power system distribution network.

[0138] Traversal is crucial for power distribution path analysis and restorative reconfiguration in power distribution networks. Shipboard integrated power systems have complex distribution network structures, exhibiting characteristics of rapid load transfer under flexible closed-loop operation. Therefore, appropriate and efficient traversal algorithms are needed to search all nodes, branches, or sub-branches from the source node to the end node or from the end node to the source node to obtain connection information for each node and branch in the shipboard integrated power system's distribution network. Currently, there is no traversal algorithm specifically designed for shipboard integrated power system distribution networks.

[0139] With the development of medium-voltage flexible DC technology and power electronic power systems, ship integrated power systems are gradually evolving from the first generation to the second generation along the technical trajectory of "medium-voltage AC - high-frequency AC - medium-voltage DC". The significant feature of the first generation ship integrated power system is the combination of medium-voltage AC and high-frequency AC. In order to limit the short-circuit current and reactive circulating current of the AC system, the power distribution network of the first generation ship integrated power system adopts an open-loop radial structure. The radial structure is simple and the radial power distribution network can be traversed by tree traversal search method or graph traversal search method.

[0140] The second-generation ship integrated power system is characterized by medium-voltage DC power supply and can cover all types of unmanned and manned ships under 3,000 tons. This is the development trend of ship integrated power systems and an important foundation for my country's implementation of its maritime power strategy.

[0141] Shipboard integrated power systems are characterized by intelligent power distribution networks. Compared to manned ships, the automation level of the distribution network is significantly higher, enabling full informatization. Extensive real-time data can be obtained through monitoring devices such as wireless sensors, and remotely controllable intelligent switching equipment greatly reduces the time required for load transfer operations that adapt to changing operating conditions, thus achieving rapid load transfer capabilities. In this context, the topology of the shipboard integrated power system's distribution network must ensure unobstructed load transfer paths. A second-generation shipboard integrated power system with ring-shaped or ring-region structures is recommended. Combined with fully controlled power electronic equipment capable of limiting short-circuit currents, closed-loop operation can be achieved, allowing the distribution network to exhibit the characteristics of rapid load transfer under flexible closed-loop operation. To address this characteristic, a traversal algorithm for the shipboard integrated power system's distribution network is developed based on depth-first search technology. Ultimately, a connection data structure for the distribution network is established to store connection and numbering information.

[0142] Therefore, the method for generating traversal paths for the integrated power distribution network of a ship provided by this invention is applicable to both the first-generation and second-generation integrated power systems of ships, exhibiting good compatibility. Due to the use of depth-first search, it is particularly suitable for the closed-loop ring structure and ring structure of the second-generation integrated power system under the medium-voltage DC power supply mode, while also being compatible with the open-loop radial power distribution network structure of the first-generation integrated power system. This enhances the versatility and efficiency of the method in practical applications, providing strong technical support for the integrated power system of ships.

[0143] The above are preferred embodiments of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for generating traversal paths of a ship's integrated power distribution network, characterized in that, The generation method includes: Set up a node stack to store the nodes of the power distribution network; Obtain the first node in the first state from the node stack; The search is performed based on a preset search algorithm and the first node to determine the second node, and the discovery time and completion time of the second node are recorded. Starting from the second node, traverse all the nodes to determine the parent node of each node, the discovery time, and the completion time. When all nodes meet the traversal path conditions, a traversal path is generated based on the parent node, discovery time, and completion time of all the nodes. Retrieving the first node in the first state from the node stack includes: Initialize the node stack; Obtain the initial node in its initial state and record the discovery time of the initial node; Push the initial node onto the node stack; The first node is selected from the node stack according to preset filtering conditions; The step of searching according to a preset search algorithm and the first node to determine the second node, and recording the discovery time and completion time of the second node, includes: Obtain the adjacency list of the first node; The first node is checked according to the adjacency list to determine whether the second node exists in the initial state; If so, then determine that the first node has entered the first state, and determine the first node as the parent node of the second node, and record the discovery time of the second node and push the second node into the node stack; If not, then determine that the first node has entered the second state, record the completion time of the first node, and pop the first node from the node stack; When all nodes satisfy the traversal path conditions, a traversal path is generated based on the parent node, discovery time, and completion time of all nodes, including: The traversal path condition is that none of the nodes are located in the node stack, and none of the nodes are in the initial state; The initial state represents the state when the node has not been visited; the first state represents the state when the node has been visited; the second state represents the state when the node has completed the adjacency list detection. The preset filtering condition is that the node is located at the top of the node stack; the preset search algorithm includes depth-first search algorithm and / or backtracking algorithm; The discovery time and the completion time are represented by the values ​​of a continuous counter, and the value of the discovery time corresponding to each node is less than the value of the corresponding completion time.

2. A device for generating traversal paths for a ship's integrated power system distribution network, the device employing the method described in claim 1, characterized in that... The generating apparatus includes: The configuration module is used to configure a node stack for storing power distribution network nodes; The acquisition module is used to acquire the first node in the first state from the node stack; The recording module is used to perform a search based on a preset search algorithm and the first node to determine the second node, and to record the discovery time and completion time of the second node; The traversal module is used to traverse all the nodes starting from the second node to determine the parent node of all the nodes, the discovery time, and the completion time; The generation module is used to generate a traversal path based on the parent node, the discovery time, and the completion time of all nodes when all nodes meet the traversal path conditions.

3. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a program or instructions executable on the processor, and the processor executes the program or instructions to implement the steps of the method for generating a power distribution network traversal path for a ship's integrated power system as described in claim 1.

4. A storage medium having a program or instructions stored thereon, characterized in that, When the program or the instructions are executed by the processor, the steps of the method for generating a traversal path of the ship's integrated power system distribution network as described in claim 1 are implemented.