# An Algorithm of Acoustic Emission Location for Complex Composite Structure
## 2 Algorithms
### [PERSON]'s Algorithm  
The problem of the shortest path between nodes in complex networks is extensively studied in graph theory. [PERSON] proposed an algorithm [40] to solve the problem under a single source. In [PERSON]'s algorithm, the network nodes and their adjacent nodes need to be first determined, and then the shortest paths from a node to other nodes can be calculated. Here, two nodes are referred to as adjacent nodes if there is a direct path between them.  
It is convenient to use discrete 3D grid nodes to describe complex structures, which is suitable for [PERSON]'s algorithm. The travel timetable is usually calculated in advance to avoid the double calculation of travel time during AE location since the calculation of travel time is time-consuming. We used [PERSON]'s algorithm to calculate the travel time from the node where each detector stays to all nodes via the following steps:  
1. A travel time array and a ray source array are defined for each detector. The size of each array is equal to the total number of nodes. The elements in each array and the nodes are in one-to-one correspondence. Each element of the travel time array stores the travel time from the node, where the detector is located, to the corresponding node of the element. Consider that a ray emits from Node A to Node B, and the element of the ray source array corresponding to Node B is used to store the identifier number of Node A. Furthermore, a candidate queue, which is initially empty, is defined to store the identifier numbers of candidate nodes.
2. Define P as a source node where the detector locates. The element in the travel time array corresponding to Node P is set to zero. Define Q as the current secondary source node. The initial value of the element in the travel time array corresponding to Node Q is equal to TP-Q which is the travel time from Node P to Node Q.
3. Calculate the travel time from Node P to all the adjacent nodes of Node Q. Let \(A_{Qi}\) be the ith adjacent node of Node Q, \(T_{P-A_{Qi}}\) be the travel time from Node P to Node \(A_{Qi}\), and \(T_{Q-A_{Qi}}\) be the travel time from Node Q to \(A_{Qi}\), then we can obtain \(T_{P-A_{Qi}}=\) TP-Q + \(T_{Q-A_{Qi}}\). If \(T_{P-A_{Qi}}\) is less than the value that has been previously stored in the travel time array, the previously stored value is replaced by \(T_{P-A_{Qi}}\). Accordingly, the path source array is also modified, and the identifier numbers of \(A_{Qi}\) are added to the candidate queue if they are not in the queue.
4. The calculation ends when the candidate queue is empty. Otherwise, let Q to be the node with the minimum travel time in the candidate queue, then Node Q should be removed from the candidate queue since the path and travel time of Node Q has been determined. Then, go back to the step (3) and continue to calculate.  
The distribution range of the nodes is similar to the wave front, which gradually expands as the calculation process continues. After the calculation, the minimum travel time from the detector to each node has to be stored in the travel time array, and the ray path to each node from its source node can be obtained in the ray source array.  
[PERSON]'s algorithm is a classic algorithm that is discussed in the textbooks of graph theory and data structure. Please refer to [41] for further details of the algorithm.