## 3 Root Tree Optimization Algorithm
### Implementation of the RTO Algorithm for the OCR Coordination Problem  
1. Define the input parameter that includes TMS, the maximum number of iterations, population size, and the adjustable parameter (i.e., different rate values of \(R_{n}\), \(R_{r}\), and \(R_{c}\)).
2. In this step, the population is initially generated with respect to the relay bounding. These individuals must be a feasible candidate solution that satisfies the relay operating constraints.
3. Measure the fitness value of each candidate \(x_{b}\) in the population, with the help of Equation (10). Additionally, an evaluation of wetness ratio is done in this step for each candidate.
4. In this step, the comparison is done between the best fitness values of candidates \(\left(x_{b}^{best}\right)\) of the individual population.
5. Computation of new candidates can be done using Equations (10)-(12). \[X_{b}(i+1)=(X_{bi,r}+w_{di}+k_{3})\frac{randn\left(X_{bi,max}-X_{bi,min}\right) }{it}\text{ for }i=1,\ \ldots,\ R_{r}\ \times\ n\] \[X_{b}(i+1)=\left(\left(X^{best}{}_{b}(i)+w_{di}+k_{1}\right)\right) \frac{randn\left(X_{bi,max}-X_{bi,min}\right)}{n*it}\text{ for }i=(R_{r}\ *\ n)+1,\ \ldots,\ n\ \times(R_{r}\ +\ R_{n})\] \[X_{b}(i+1)=((X_{b}(i)+w_{di}+k_{2}))randn\left(X^{best}{}_{b}-X_{bi,min} \right)\text{ for }i=(R_{n}+R_{c})\times n+1,\ldots,\ n\] (14) where \(X_{bi,r}\) is the individual that is randomly selected from the current population, n is the population size, \(X_{bi,max}\), and \(X_{bi,max}\) are upper and lower parameter limits, respectively, and \(i\) is the number of iterations.
6. If the number of iterations reaches the maximum, then go to Step 7. Otherwise, go to Step 3.
7. The candidates that generate the latest \(x_{b}^{best}\) is the optimal TMS of each relay with the minimum total operating time that is the objective function.  
The implementation and pseudocode of RTO for solving the coordination problem of OCR is depicted in Figure 4 and Algorithm 1.  
```
Algorithm RTO Begin // Initialization: Set the rates \(\text{R}_{n}\), \(\text{R}_{e}\) and \(\text{R}_{c}\) parameters  Give the maximum number of iterations: MaxIte, and the population scale: the RTO size  Set iteration counter it = 1  Generate the initial population X(1) randomly within the search range of (Xmin, Xmax) // Loop Repeat  Evaluate the wdi for each root // wd: Fitness, root: Individual  Reorder the population according to the witness degree  Identify the candidate according to the wetness place  Xbest // the global best in the whole population  For i = 1 to Rr the RTO size do  Selected individual Xr it randomly from the current population  Xi (it + 1) = Xr (it) + k\({}_{1}\)* wdi *randn * \(\mid\)Xmax + Xmin \(\mid\)/it  End for  For i = Rr * the RTO size +1 to (Rr+Rn) the RTO size do  Xi(it+1) = Xbest + k\({}_{3}\)* wdi *randn * \(\mid\) Xmax + Xmin \(\mid\)/it theRTOsize)  End for  For i = (1 - \(\text{R}_{c}\)) the RTO size +1 to the RTO size do  Xi (it+1) = Xi (it) + k\({}_{1}\)* wdi *randn * (Obest - Xi (it))  End for  Update Xbest  it = it +  Until for a stop criterion is not satisfied // & it <MaxIte  End
```  
**Algorithm 1** The structure of the new rooted tree algorithm [35].