Skip to main content
. 2021 Nov 19;21(22):7706. doi: 10.3390/s21227706
Algorithm 3 TMR Routing Protocol
  •  1:

    at RSU:

  •  2:

    While (RREP = true) !RREPs received from Algorithm 2

  •  3:

    procedure 1: Calculating average RTTij

  •  4:

        !RTTij received from Algorithm 2

  •  5:

        RTTia=j=1nRTTijn

  •  6:

    end procedure

  •  7:

    procedure 2 Path Selection

  •  8:

        if (RTTij>RTTia) then

  •  9:

            drop RTTij route

  • 10:

        else

  • 11:

            add RTTij into an array A[]

  • 12:

            sort array A[] in an ascending order

  • 13:

            update the routing table

  • 14:

        end if

  • 15:

        Send a message using a route with the minimum RTT in A[]

  • 16:

        if (timeout) then

  • 17:

            send a message using a route with the next minimum RTT in A[]

  • 18:

        end if

  • 19:

    end procedure