Skip to main content
. 2017 Sep 15;17(9):2126. doi: 10.3390/s17092126
Algorithm 1 Energy-Saving Traffic Scheduling
  • Input: 

    The set of nodes V, the set of wireless chargers C, the set of flows F

  • Output: 

    The set of nodes in working state A

  • 1:

    Initialize: AØ;

  • 2:

    Find the MTE routes for each fF;

  • 3:

    for each fF do

  • 4:

      if f is an SDN flow then

  • 5:

       AA+n, where n is the nodes on the MTE route from the source node to the first SDN node in flow f;

  • 6:

       Run optional paths search function to find the optional paths Pf for flow f;

  • 7:

      else

  • 8:

       AA+n, where n is the nodes on the MTE route in flow f;

  • 9:

       FF-f;

  • 10:

      end if

  • 11:

    end for

  • 12:

    while FØ do

  • 13:

      for each fF do

  • 14:

       if |Pf|=1 then

  • 15:

        AA+n, where n is the nodes on the unique optional route of flow f;

  • 16:

        FF-f;

  • 17:

       end if

  • 18:

      end for

  • 19:

      Run optional path selection function to find an optional path Pf for the corresponding flow f;

  • 20:

      AA+n, where n is the nodes on Pf;

  • 21:

      Update the size of flow f;

  • 22:

      if the size of flow f equals to 0 then

  • 23:

       FF-f;

  • 24:

      end if

  • 25:

    end while

  • 26:

    return A.