Research Article

Cooperative Bargain for the Autonomous Separation of Traffic Flows in Smart Reversible Lanes

Algorithm 1

CoB at each node ni.
//Upon broadcasting a packet:
 Infer the qualities of wireless communication links and the lost messages in the broadcast;;
for each lost message in the broadcast do
   Recommend the node with the fewest stable communication links to piggyback the message
  if the recommendation is different from the mainstreamed one then
    Rank all the received recommendations on piggybacking this message, and choose the top-ranked one as the new recommendation;
    Broadcast a packet with the bargain proposal to inform other nodes of node ’s recommendations
//Upon receiving a packet from node :
for each piggybacked message in the received packet do
  if there is no such a message in the receiving buffer then
   Cache it in the receiving buffer .
  else
   Keep the one that has the latest time stamp.
 Cache node ’s bargain proposal for comparison;