Skip to main content
. 2019 Jun 19;19(12):2745. doi: 10.3390/s19122745
Algorithm 1k-hop greedy routing.
 Function greedy-routing (s, F, k);
Input: A target slice (s), a set of flows (F), number of interference hops (k)
Output: A routing matrix of slice s, which is a zero-matrix if the routing fails
  •  1:

    ifs=1then

  •  2:

    R shortest-path (G1, F)

  •  3:

    if R does not satisfy the constraints in Equations (7) and (8) then

  •  4:

      return {0}|F|×|E1| // zero-matrix

  •  5:

    end if

  •  6:

    else

  •  7:

    R{0}|F|×|Es| // initialize

  •  8:

     Calculate csk(e) for eEs using (14)

  •  9:

    while F do

  • 10:

      f a flow with the highest rate among all flows of F

  • 11:

      Pf,s a path minimizing σsk while satisfying the constraints in Equations (7) and (8) under the given matrix R

  • 12:

      if no feasible Pf,s then

  • 13:

       return {0}|F|×|Es|

  • 14:

      end if

  • 15:

      Update R with Pf,s

  • 16:

      FF{f}

  • 17:

    end while

  • 18:

    end if

  • 19:

    RsR // update the routing matrix of slice s

  • 20:

    Route flows of slice s using the updated matrix Rs

  • 21:

    returnRs // the updated routing matrix of slice s