# Swarm-Intelligence-Centric Routing Algorithm for Wireless Sensor Networks
## 3 Proposed SICROA
### Link-Quality Prediction and Maintenance  
In SICROA, the route establishment and maintenance technology was applied by considering the residual energy of a node based on the AODV protocol. When setting the path by considering the residual energy of the node, it is possible to reduce the frequency of resetting the path that occurs  
Figure 3: CATI: < Mobility Check> interrupt message.  
owing to energy depletion. Furthermore, by setting the residual energy threshold of the node and notifying the source node before the path is disconnected, it is possible to reduce the data loss and transmission delay that occur owing to path resetting.  
Reverse routing caused by the RREQ packet is similar to the flooding of existing AODV [38]. The source node broadcasts the RREQ packet to neighboring nodes. After the RREQ packet is received, the intermediate nodes store the route in their routing table and broadcast the RREQ packet to the neighboring nodes if they are not the destination nodes. If the intermediate node receives another RREQ packet through another path, the link dependency of the concerned path is verified. If the concerned path is link-independent, it is considered a potential alternative, and the received RREQ packet is discarded to ensure the link-independent path. Finally, when the destination node receives the RREQ packet, it also stores the path in its routing table prior to proceeding to the step wherein the forward path is established using the route reply (RREP) packet.  
As illustrated in Figure 4, the _Warning_Energy_ field, \(W\), with a size of 1 byte was added to the RREP packet used in the existing AODV protocol. The destination node adds its minimum energy to the _Warning_Energy_ field, and it subsequently sends the RREP packet to the unicast along the reverse path configured to receive the RREQ packet.  
\[\textit{Warning\_Energy}_{t}=\textit{Min}\ (E_{t},\textit{Warning\_Energy}_{t-1}) \tag{3}\]  
The intermediate node that receives the RREP packet stores the route in its routing table. As described in Equation (3), \(E_{t}\), which denotes the current residual energy, is compared with the value stored in the _Warning_Energy(\({}_{t-1}\))_ field received from the previous node. Subsequently, the smaller value is stored in the current _Warning_Energy(\({}_{t}\))_ field, and the RREP packet is sent along the route stored in its routing table.  
When the source node receives the RREP packet, it saves the route and _Warning_Energy_ value in its routing table, and initiates communication through the route. If the source node receives multiple RREP packets, it compares the value of the _Route_Initial_Energy_ field of the current route stored in the routing node's routing table with the value of the _Warning_Energy_ field of the RREP packet. Subsequently, the communication continues by changing the path to that with a higher field value. If the _Warning_Energy_ value remains unchanged or reduces, the existing path is used as it is. If the _Warning_Energy_ value becomes larger, the path could be maintained for a longer duration, and thus, the resulting data transmission becomes stable. Figure 5 depicts the SICROA routing table, wherein the _Route_Initial_Energy_ field is added to the existing AODV routing table.  
Figure 4: Route request (RREQ) message format of the swarm intelligence-centric routing algorithm (SICROA).