## 3 Proposed Method
### Parameter Determination Method of Heuristic Function Based on Improved Genetic Algorithm  
After the analysis of Section 3.3, this paper establishes the heuristic function with 13 parameters. These parameters are used to describe the characteristics of the circuit under 13 different fault cases. In this section, this paper will use the improved genetic algorithm to determine the value of these parameters. For circuits under test with network number of n, this paper randomly generates a large number of MTVs. For each MTV, this paper calculates the \(\hat{P}_{MTV_{i}}\) for each of its sub-matrices \(MTV_{i}\) (\(1\leq i\leq n\)) in turn, and averages the \(\hat{P}_{MTV_{i}}\) of all the \(MTV_{i}\), so that this paper can obtain a function \(F(i)\) which is only related to i. According to Equation (17), \(\hat{P}_{\text{MTV}}\) contains 13 undetermined parameters \(\beta\); these parameters can be determined by fitting \(F(i)\), for \(F(i)\) includes the \(P_{MTV_{i}}\) of the sub-matrix \(MTV_{i}\) itself and the estimated impact on \(P_{\text{MTV}}\). For each MTV, this paper will calculate its \(P_{MTV_{n-i}}\) of its sub-matrix \(MTV_{n-i}\), so that we can obtain the objective function \(G(i)\) that is shown as Equation (18). \[G(i)=1-\frac{1-\overline{P}_{MTV}}{(1-\overline{P}_{MTV_{i}})\cdot(1-\overline {P}_{MTV_{n-i}})} \tag{18}\]  
This paper treats the 13 parameters in \(F(i)\) as a vector \(B_{k}\), and each \(B_{k}\) is treated as an individual of the genetic algorithm. The fitness function of \(B_{k}\) is shown in Equation (19). \[H(B_{k})=\sum_{i=1}^{n}\left(F(i)-G(i)\right)^{2} \tag{19}\]  
In the iterative process of the genetic algorithm, this paper uses the roulette wheel strategy to extract the offspring and uses the elite retention strategy to avoid the loss of the optimal individuals in the iterative process. The optimization result of traditional genetic algorithm often depends on the selection of the initial population. Because of the randomness of the initial value selection, it often leads to the problem of the difference of the final optimization result and the slow convergence rate. Therefore, this paper proposed an improved scheme for the iteration termination condition. Because the elite reservation policy is used, the optimal solution of the offspring is always less than or equal to the optimal solution of the parent; if the best individual of the offspring is equal to the best individual of the parent in continuous generation c (initial value of \(c\) is 0), then the whole mutation operation is performed on the rest of the offspring. According to the characteristics of the genetic algorithm, the population will converge gradually with the progress of the algorithm, so if the iterated algebra is \(c_{a}\), then the probability of mutation of each individual (\(P_{c}\)) is shown as Equation (20):  
\[P_{c}=1-\frac{c}{c_{a}} \tag{20}\]If the optimal individual is \([\beta 0_{1}\,\beta 0_{2}\ \cdots\beta 0_{13}\ ]\) and the other is \([\beta i_{1}\,\beta i_{2}\ \cdots\beta i_{13}\ ]\), the \(13\) parameters in another individual are mutated in sequence as shown in Equation (21). \[\beta i_{j}=\beta i_{j}+\frac{\left|\beta i_{j}-\beta 0_{j}\right|}{\beta i_{j}}\ k_{ij} \tag{21}\]  
Let \(k_{ij}\) be a random parameter subject to normal distribution, if \(\beta i_{j}\leq\beta 0_{j}\), the range of \(k_{ij}\) is \([0,\ \beta 0_{j}]\). Otherwise, the range of \(k_{ij}\) is \([-\beta 0_{j},\ 0]\). Set the number of termination iterations to \(c_{end}\), when \(c_{end}\) iterations occur, the algorithm is completed. The optimal individual in the final offspring is the value of \(\beta_{k}\) in Equation (17), and the flow of the algorithm is shown in Algorithm 1. ```
Procedure  Randomly generate \(n\times(2^{m}-2)\) groups of MTVs of \(n\) rows and \(m\) columns. Then, calculate the \(f(MTV_{i})\) for the sub-matrices \(MTV_{i}\) of each MTV from i = 1 to i = n - 1. Average all of the \(f(MTV_{i})\), so that we can obtain F(i) in Equation (19).