DP, part 1: executed at each route ๐‘— โˆˆ ๐‘
Initialization
 Set ๐ต 0 ๐‘— = ๐œ™ , ๐œ‚ 0 ๐‘— < 1 , ๐‘ 1 ๐‘— = ๐›ผ ( | ๐ต ๐‘— | + โ„Ž ๐‘— ) .
repeat
if   ๐œ‚ ๐‘— ๐‘ก โˆ’ 1 < 1 (i.e., unbalanced)
  Broadcast its price ๐‘ ๐‘ก ๐‘— to each source node ๐‘– โˆˆ ๐ต ๐‘— .
else
Broadcast its price ๐‘ ๐‘ก ๐‘— with a “balanced” signal to each
  source node ๐‘– โˆˆ ๐ต ๐‘— .
End  if
Wait for responses from all source nodes in ๐ต ๐‘— .
if   | ๐ถ ๐‘ก ๐‘— | > ๐‘ ๐‘ก ๐‘— / ๐›ผ โˆ’ โ„Ž ๐‘— โˆ’ | ๐ต ๐‘— ๐‘ก โˆ’ 1 | + | ๐ฟ ๐‘ก ๐‘— |
    Randomly choose a subset ๐ด ๐‘ก ๐‘— of ๐ถ ๐‘ก ๐‘— , such that
    supply-demand is balanced.
    Set ๐ต ๐‘ก ๐‘— = ๐ต ๐‘— ๐‘ก โˆ’ 1 โ‹ƒ ๐ด ๐‘ก ๐‘— โงต ๐ฟ ๐‘ก ๐‘— .
   else
    Set ๐ต ๐‘ก ๐‘— = ๐ต ๐‘— ๐‘ก โˆ’ 1 โ‹ƒ ๐ถ ๐‘ก ๐‘— โงต ๐ฟ ๐‘ก ๐‘— .
   End  if
  Broadcast its decision to each source node ๐‘– โˆˆ ๐ต ๐‘— .
   if   ๐œ‚ ๐‘ก ๐‘— < 1 and | ๐ถ ๐‘ก ๐‘— | + | ๐ฟ ๐‘ก ๐‘— | = = 0
     Set ๐‘ ๐‘— ๐‘ก + 1 = ๐‘ ๐‘ก ๐‘— โˆ’ ๐›ผ .
   else
     Set ๐‘ ๐‘— ๐‘ก + 1 = ๐‘ ๐‘ก ๐‘— .
     ๐‘ก = ๐‘ก + 1 .
   End  if
until   ๐‘ ๐‘ก = 1 or ๐œ‚ ๐‘ก ๐‘— = = 1 for each ๐‘— โˆˆ ๐‘ (i.e., balance its
Supply-demand).
๐ฟ ๐‘ก ๐‘— : set of source nodes that leave route ๐‘— during iteration ๐‘ก .
๐ถ ๐‘ก ๐‘— : set of source nodes that turn to route ๐‘— during iteration ๐‘ก .
Algorithm 1: