# Earthquake-Tolerant Energy-Aware Algorithm for WDM Backbone Network
## 2 Materials and Methods
### Operation of the Proposed Algorithm
For each region, the average repeat rate (arp) of earthquakes and the earthquake occurrence probability are presented in Table 1. The region's borders were set between each node and the links that connect each node pass through them. For each region, the collected past seismic activity data have helped the algorithm to calculate the probability of an occurrence of a future earthquake that could have damaged the links. Other inputs encompass the energy consumption values for a router port, a transponder, and an EDFA. In order for the optical signal to travel over long distances, EDFAs are used. A post-amplifier is provided after the transmitter, a pre-amplifier is provided before the receiver, and line-amplifiers are placed along the link every 80 km [32]. The total number of IP router ports, WDM transponders, and EDFAs that are being used varies for each case of average traffic and the lower threshold value of earthquake size. The EAFFB algorithm calculates them in order to output the total energy consumption of the network, and the calculated figures can be seen in Table 2. Initially, in lines 6 to 8, the algorithm identifies all critical regions using real seismic data and applying Richter and Gutenberg's law to calculate the likelihood of a destructive magnitude earthquake in each region. Once critical regions are identified, in lines 9 to 11, the algorithm assesses whether each link passing through a critical region can be safely removed from the network. Figure 4: A specific case when all links that connect a node are on affected areas. ```
Input:
1. \(G\) (\(N\), \(L\)): Physical Topology
2. \(N\): Set of nodes in the network
3. \(L\): Set of links to the network
4. [\(\lambda\)]: Traffic demand per node pair
5. [\(R\)]: Regions Output: bestOutput, originalOutputOfEAFFB
6. for each region \(\in[R]\) do
7. find if critical region
8. end
9. for each link \(\in\) criticalRegions do
10. filter links *
11. end
12. find all the combinations
13. for each Combination \(\in\) Combinations do
14. implement EAFFB without the links in the combination
15. end
16. finds the combination with the best energy output on the EAFFB implementation
17. Return bestOutput, originalOutputOfEAFFB
* (Filter links that can be removed without creating a hole in the grid in case of an earthquake)
```  
**Algorithm 1** Proposed Algorithm \begin{table}
\begin{tabular}{c c c} \hline
**Regions** & **Average Repeat Rate (arp)** & **Earthquake Occurrence Probability (\%)** \\ \hline  
\hline \end{tabular}
\end{table} 
Table 1: For each region, the average repeat rate (arp) of earthquakes and the earthquake occurrence probability are presented. This is achieved by implementing the EAFFB algorithm on a new network, excluding only the one link that it checks every time. If the EAFFB algorithm runs successfully without creating a disconnected network, then the examined link could safely be removed. Then, in lines 12 to 15, the proposed algorithm finds out all the combinations between all the links that can be safely removed from the network. For each combination, it applies the EAFFB algorithm on a network where the links of each combination are excluded. Then, in line 16, the algorithm selects the combination of links whose removal or deactivation from the original network meets all the limitations of the original EAFFB algorithm and achieves the lowest energy consumption. At the end of line 17, the proposed algorithm outputs the EAFFB algorithm and the EAFFB algorithm. \begin{table}
\begin{tabular}{c c c c} \hline
**Regions** & **Average Repeat Rate (arp)** & **Earthquake Occurrence Probability (\%)** \\ \hline
23 & 51.20 & 9 \\
24 & 30.44 & 15 \\
25 & 21.22 & 21 \\
26 & 28.88 & 16 \\
27 & 23.71 & 19 \\
28 & 71.80 & 7 \\
29 & 98.20 & 5 \\
30 & 28.17 & 16 \\
31 & 41.64 & 11 \\
32 & 27.07 & 17 \\
33 & 46.58 & 10 \\
34 & 5.38 & 60 \\
35 & 13.80 & 30 \\
36 & 33.34 & 14 \\ \hline \end{tabular}
\end{table} 
Table 1: _Cont._  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Earthquake Occurrence** & **Average Traffic** & **IP Router Ports** &