Skip to main content
. 2019 May 29;19(11):2456. doi: 10.3390/s19112456
Algorithm 3 Allocation priority sequence construction
Require:
  the task set T, the final task set F,
  the refresh task sequence R;
Ensure:
  the allocation priority sequence {fj}tjT;
  • 1:

    fork=1 to max{Lj}tjT do

  • 2:

    for each task in T do

  • 3:

      if Lj=k then

  • 4:

       Set cjt is the task with the maximum expected finishing time among all the tasks in Cj.

  • 5:

       Compute the expected finishing time hje;

  • 6:

    Set l=1;

  • 7:

    whileTϕdo

  • 8:

     Find the final task tqF with maximum expected finishing time;

  • 9:

     Construct the critical task sequence of task tq;

  • 10:

     Set fp=l;

  • 11:

     Find the task tp with the lowest level in the critical task sequence of task tq;

  • 12:

     Delete tp from T;

  • 13:

    if tpF then

  • 14:

      Delete tp from F;

  • 15:

     Gather all the rest tasks that have priority relationship with tp in the sequence R;

  • 16:

    for each task tj in R do

  • 17:

      Set cjt is the task with the maximum expected finishing time among all the tasks in Cj.

  • 18:

      Compute the expected finishing time hje;

  • 19:

      Add all the rest tasks that have priority relationship with tj to the back of sequence R;

  • 20:

     Set l=l+1;