# Inverse Coupled Simulated Annealing for Enhanced OSPF Convergence in IoT Networks
## 2 Main Contribution
### Reverse Coupled Annealing Algorithm Design  
To address the dynamic characteristic of link relationships and the frequent link failures in IoT networks, it is essential to dynamically adjust the sending frequency of Hello messages and the fault detection time based on the characteristics of link and node states in real time. The annealing algorithm can explore and approximate the optimal Hello interval and fault detection time through multiple iterations based on the network environment, allowing for a broader search space in the initial stages to prevent the algorithm from getting trapped in local optima [31; 32; 33; 34]. As the algorithm's temperature gradually decreases, the search range converges, accelerating convergence while maintaining solution diversity. The algorithm begins by randomly generating an initial solution \(x_{0}\) and searches for solutions within its neighborhood. In each iteration, based on the Metropolis criterion, the algorithm decides whether to accept a worse solution according to the acceptance probability formula:  
\[P(\Delta E)=\left\{ \begin{aligned} & 1&\text{if }\Delta E<0\\ & e^{-\frac{\Delta E}{T_{k}}}&\text{if }\Delta E\geq 0 \end{aligned} \right. \tag{8}\]  
where \(\Delta E=f(x_{\text{new}})-f(x_{\text{current}})\) is the difference in objective function values between the current and new solutions. As the internal \"temperature\" of the algorithm gradually decreases, the temperature change can be expressed by the formula:  
\[T_{k}=T_{0}\cdot\alpha^{k} \tag{9}\]  
where \(T_{0}\) is the initial temperature and \(\alpha\) is a decay factor less than 1. As the temperature decreases, the probability of accepting inferior solutions also diminishes. After each iteration, the algorithm updates the current solution:  
Figure 4: OSPF interval synchronization mechanism operating process diagram. \[x_{k+1}=\left\{ \begin{array}{ll}x_{\text{new}}&\text{if new solution accepted}\\ x_{k}&\text{if new solution rejected}\end{array} \right. \tag{10}\]  
The optimization process gradually stabilizes, ultimately converging to the global optimum \(x^{*}\), thereby minimizing \(f(x^{*})\). However, traditional annealing algorithms primarily focus on unidirectional optimization, gradually reducing the temperature to minimize perturbation and slowly approaching the optimal solution. Once the temperature reaches its lowest point, the algorithm loses its effectiveness. This unidirectional cooling strategy gradually diminishes the algorithm's perception of the network environment during execution, leading to a decrease in adaptability to dynamic changes. Particularly when faced with failures, the algorithm may not respond promptly, thereby affecting the overall fault detection and recovery speed. Therefore, this paper proposes the reverse coupled annealing algorithm, which consists of two coupled annealing algorithms: Algorithms 1 and 2. These algorithms collaborate to optimize link and node states based on \(\varphi(u)\) and implement dynamic fault detection through the OSPF interval synchronization mechanism. When a node assesses the overall state of node \(v\), neighboring node \(u\), and the link between them through the comprehensive evaluation function \(\varphi(u)\), it triggers DOSA if \(\varphi(u)\) falls below the preset threshold \(\epsilon\), executing downward optimization to reduce the values of \(T_{h}\) and \(T_{d}\); otherwise, it triggers UOSA. Through this alternating operation of heating and cooling, the two annealing algorithms dynamically couple and interact, thereby adjusting the parameters \(T_{h}\) and \(T_{d}\) based on the network environment. The details are as follows.