Skip to main content
. 2021 Jul 28;21(15):5120. doi: 10.3390/s21155120
Algorithm 2: System performance evaluation
Input: Number of lanes (L), initial number of vehicles (ni) in each lane lane, emergency vehicle position, emergency vehicle transmisson power (PE), vehicle transmisson power (Pv), channel fade coefficient (hEVN, hVNV1), different interfence devices, interference transmission power (PD, PC, Pvi), interference channel fade coefficient (hDV1, hCV1, hVV1), channel noise (N), path loss exponent (α), and the initial vehicle velocity (vi)
Output: PDR, E2E, v, number of vehicles in each lane (n), poutLi, Pv
1: Establish the required poutLi
2: Establish L, ni, vi
3: for different values of PE, PD, PC, Pv, hEVN, hDVN, hCVN, hVVN, α, v, N do
4: Calculate the velocity of the vehicles in each lane after receiving the emergency message v=0.5((ln(1poutli)( SINRth(I1+N)dE2VαPv|hE2V|2 PLO+SINRth(I2+N)dVNV1αPv|hVNV1|2 PLO )) Pv|hV2V1|2 PLO DSINRth(I2+N))1α1;
5: Calculate required number of vehicles in each lane
n=D2v+(2VL)
6: Construct the Lagrange function
   L(poutli,Pv,λ,μ)=f(poutli, Pv)+λ(poutmaxpoutli)+μ(PvmaxPv)
7: Calculate the partial derivatives L(poutli,Pv,λ,μ)λ, L(poutli,Pv,λ,μ)μ,  L(poutli,Pv,λ,μ)poutli , and L(poutli,Pv,λ,μ)Pv
8: Let L(poutli,Pv,λ,μ)λ=0, L(poutli,Pv,λ,μ)μ=0, L(poutli,Pv,λ,μ)poutli=0, L(poutli,Pv,λ,μ)Pv=0
9: Determine 𝛌, μ, poutLi, Pv
10: Calculate PDR
             PDR=#received_packets#sent_packets
11: Calculate E2E
      E2E=received packetstime spent to deliver packets#received_packets
12: end for