## 4 Simulation and Evaluation  
Two indicators are used to evaluate the performance of algorithms: Detection Rate (\(DR\)) and False Positive Rate (\(FPD\)). Set \(F\) as a set of actual lossy links in networks, \(X\) represents a set of lossy links inferred by algorithms, so the definitions of \(DR\) and \(FPD\) are:  
\[DR=\frac{\left|F\cap X\right|}{\left|F\right|},FPR=\frac{\left|X\setminus F \right|}{\left|F\right|}\]Simulation experiment uses the NS2 network simulation version and uses it to simulate a data gathering algorithm by expanding NS2 in a wireless sensor network. During each round of gathering data, it is determined by random if nodes can successfully get sensor data which is sent from the child nodes. A packets loss rate is set on each link. Emulation and actual packets loss rate tends to presuppose packets loss rate when the round of gathering data gradually increases. The actual number of packets loss on each link is counted to calculate actual packets loss rates of each link with simulation. The accuracy and effectiveness of the algorithm are evaluated by the comparison with the results of inference.  
The simulation process constructs tree network using Transit-Stub graphics module generated by GT-ITM Topology Generator. The number of nodes, \(v\), changes in the range of 100\(\sim\)1000. Setting \(f\) as the proportion of lossy links in networks, \(f\) changes in the range of 0.05\(\sim\)0.25. The definition of packet loss model LM is that the packet loss rate of good links obeys the uniform distribution of the interval [0, 0.01] and the packet loss rate of lossy links obeys uniform distribution of the interval [0.05, 1]. Once a packet loss rate of each link is assigned, the actual process of packets being lost on the link uses the Bernoulli process. The probability of each data packets loss during transmission is determined by the packets loss rate for this link. Each experiment collects data onto 200 rounds, and infers lossy links by measurement data, and calculates _DR_ and _FPR_ of each experiment. The experiment is performed 100 times under each configuration condition, and the advantages and disadvantages of algorithm performance are evaluated by calculating the average value of _DR_ and _FPR_.  
(1) The factor of bad link ratios. The changing trend of algorithm performance is shown as Figure 2 when Network Topology is fixed, the number of nodes \(v\) is equal to 500, and the proportion of lossy links, \(f\), changes in the range of [0.05\(\sim\)0.25]. _DR_ decrease, _FPR_ increases, and the algorithm performance reduces as \(f\) increases. This trend appears and inference algorithms are built on the assumption that the numbers of lossy links are relatively rare. The assumptions are weakening which leads to a reduction in algorithm performance as the proportion of bad links increases [10,11].  
(2) The affect factors of Network Topology. The changing trend of algorithm performance is shown as Figure 3, the proportion of bad links, \(f\), is equal to 0.2, network scales are changed, the number of nodes, \(v\), changes in the range of [100\(\sim\)1000]. As network scales increase, the performance decreases, but the extent of the decrease is much smaller. This means that the algorithm has strong robustness for a change of network scales.  
Figure 2: Comparison of performance when f changes, nodes number \(v=500\).  
(3) Comparison of SCFS algorithm. The results of comparing HLLI algorithm against SCFS algorithm are shown in Table 1. The coverage of HLLI algorithm is slightly higher than SCFS, but misjudgment rate of HLLI is significantly better than SCFS algorithm. SCFS algorithm uses a greedy strategy based on link control domain bases, and selects the links closed to root nodes as loosy links in the first place. However, the HLLI algorithm can select lossy links more accurately using heuristics strategy.