Research Article

Performance Analysis of V2V and V2I LiFi Communication Systems in Traffic Lights

Algorithm 1

Little’s theorem (average length queue and average delay queue).
Data: , , , , γ, , , S, count, transitions,
Result: ,
 =  =  = S = count 0
  List.addState (, , S);
while counttransitions do
   expTime [5] createTime (, , , , γ, S);
   [, position] tminPosition (expTime [5]);
   actualID concatenate (, , S);
   if: ID then
    List.addElement (, , S);
    List.getElement (ID).time ;
   else
    List.getElement (ID).time  + ;
   end
    =  + ;
   switch position do
    case 0 do
      + 1
    end
    case 1 do
       + 1
    end
    case 2 do
     S invertTrafficlight (S);
    end
    case 3 do
       − 1
    end
    case 4 do
       + 1
    end
    otherwise do
    end
  end
end
 probabilities (List, );
 [, ] Littletheorem (List, , );