Skip to main content
. 2021 Feb 17;21(4):1400. doi: 10.3390/s21041400
Algorithm 3: Prioritization of Safety and Non-Safety List (i.e., L2&L3).
Input:L2 and L3
Output: L4 and L5 lists i.e., prioritize the list of safety and non-safety messages are sent to vehicles
 1.   for (i=1;i<=lengthofL2;i++)
    L4=PSi=DiSi
    Q1=PSi // Q1 is the random list of L3.
 2.   for (i=1;i<=Q1.length;i++)
    Find min Q1i
    L4=minQ1i // Build list L4 from minimum to maximum
    End for
 3.   Non-Safety for (j=1; j<=length of L3; j++)
    PNSJ=FCFS
    L5=PNSJ