procedure Packet forwarding ( )
if     then          : destination of packet
   Packet delivery is successful       : node ID of current node
   Return
end  if
if is a returned packet Table then
   Update Dynamic Routing Table      Case: node in path history
end  if
if Dynamic Routing Table then
(10)   if There is an available link in row of destination in Dynamic Routing Table then
(11)     Forward the packet to randomly selected available generator link in Dynamic Routing Table  
(12)     Return
(13)   else  if   then
(14)     Change a type of from Type to Type    There is no available shortest path from BCG
(15)     Go to Phase of Exhaustive routing
(16)   else
(17)     Update Path history and forward the packet to the previous node
(18)   end  if
(19)  else  if Row of destination in Static Routing Table then
(20)    Forward the packet to randomly selected available generator link, which has the smallest path length within the
same row, in Static Routing Table
(21)    Return
(22)   end  if
(23) end  procedure
Algorithm 3: Phase 1 of Exhaustive routing.