Skip to main content
. 2017 Sep 15;17(9):2126. doi: 10.3390/s17092126
Algorithm 2 Optional Paths Search Function
  • Input: 

    A flow f, the first SDN node s on the MTE route of f, the set of neighbours of sVs

  • Output: 

    The set of optional paths Pf

  • 1:

    for each vVs do

  • 2:

      Find the MTE route pv from node v to the destination of flow f with the actual energy consumption calculated by formula (20);

  • 3:

      pv=pv+s;

  • 4:

      Delete the loop in pv;

  • 5:

      PfPf+pv;

  • 6:

    end for

  • 7:

    return Pf.