| Algorithm 2: Priority or an event message at a node for an instant t |
| 1: Read input: Time (t), Number or nodes (N(t)), position(x(t), y(t)). Type of traffic (e(t)), velocity (v(t)) |
| 2: Calculate // as shown in Equation (1) |
| 3: Calculate // as shown in Equation (2) |
| 4: Calculate // as shown in Equation (3) |
| 5: procedure PRIORITY(Impacti(t),ADi(t),AV(t)) |
| 6: Calculate Priorityi(t) // as shown in Equation (4) |