Skip to main content
. 2019 Sep 17;21(9):905. doi: 10.3390/e21090905
Algorithm 3 DWS Algorithm (The Queue Update Module)
  • 1:

    Initialize B1,B2,⋯,Bn as m×m zero matrices

  • 2:

    if SQ is empty then

  • 3:

     Do nothing

  • 4:

    else

  • 5:

     Call Coding Module (DWS), get linear combination l and transmit it

  • 6:

    end if

  • 7:

    ACK generation at receivers

  • 8:

    forj=1 to n do

  • 9:

     if ACK is received from receiver j then

  • 10:

      Update the row of Bj corresponding to the next unseen packet of receiver j with the coefficient vector corresponding to l

  • 11:

      Perform Gauss–Jordan elimination of Bj

  • 12:

     end if

  • 13:

     Find Dj which is the set of packets corresponding to the pivot columns of Bj

  • 14:

    end for

  • 15:

    Find D=∩j=1nDj

  • 16:

    forj=1 to n do

  • 17:

     Bj← Change all elements of the pivot column and pivot row of Bj corresponding to the packet in D to zero

  • 18:

    end for

  • 19:

    Drop the packet in D from SQ