The Scientific World Journal / 2014 / Article / Alg 1

Research Article

Greedy Data Transportation Scheme with Hard Packet Deadlines for Wireless Ad Hoc Networks

Algorithm 1

Greedy data transportation algorithm.
Data: (1) Trajectories of all passing-by mobile nodes, (2) their arrival schedule,
     (3) routing cost from node to node for , (4) Remaining time till deadline
Result: Next-hop node to relay (as well as at which stationary node data should be dropped
  off if a mobile node is selected for relaying)
// for stationary route to dst;
estimatedRoutingCost = ;
nextHop = Dijkstra(from toward ));
dropOff = null;
foreach   passing-by mobile node    do
 timeSpent = waiting time until the next scheduled mobile node arrives;
foreach  drop-off at stationary node   that mobile node   will visit afterwards in  trajectory  do
   timeSpent += BI (trajectory length traversing from to node )
of hops to go to destination);
   if    then  break;
   tmpRoutingCost = + + ;
   if    then
     estimatedRoutingCost = tmpRoutingCost;
     nextHop = mobile node ;
     dropOff = stationary node ;