Skip to main content
. 2026 Jan 20;26(2):684. doi: 10.3390/s26020684
Algorithm 3: Hierarchical Void Repair Strategy
Input: Void Node nvoid, Data Packet P
1: // Level 1: Intra-medium Adjustment (Optical)
2: IF (Medium=Optical) AND (Cost(NewAngle)<Threshold) THEN
3:   Adjust Divergence Angle and Retransmit P; RETURN Success
4: END IF
5: // Level 2: Cross-medium Jumping (Acoustic)
6: Calculate CDUE for all acoustic neighbors using Equation (35)
7: IF max(CDUE)>0 THEN
8:   Switch to Acoustic Mode; Forward P to best neighbor; RETURN Success
9: END IF
10: // Level 3: Path Backtracking
11: Send BacktrackMsg  to PreviousHop
12: PreviousHop selects new path using Backtrack Utility Equation (39)
13: IF PathFound THEN RETURN Success
14: // Level 4: AUV-Assisted Repair
15: Request AUV assistance
16: AUV calculates Optimal Position using PSO Equations (41)–(43)
17: AUV performs Relay or Deployment based on Cost Equation (46); RETURN Success