Research Article

Delay-Constrained Routing Based on Stochastic Model for Flying Ad Hoc Networks

Algorithm 1

Delay-constrained stochastic routing algorithm.
(1)//Initialization;
(2)if node i has received the packet then
(3);
(4)for each node do
(5)  if and then
(6)   ;
(7)  end if
(8)end for
(9)for each node do
(10)  Uses (5) and (11) to compute and ;
(11)end for
(12) Uses (7) to obtain ;
(13)if more than one node satisfy then
(14)  Selects the node with as relay node;
(15)else
(16)  Selects the node with as relay node;
(17)end if
(18) Computes based on (15);
(19) Node i transmits the packet to j with ;
(20)if then
(21)  ;
(22)end if
(23)end if