Research Article

Research on the Edge Resource Allocation and Load Balancing Algorithm Based on Vehicle Trajectory

Algorithm 2

Dynamic selection for vehicles to edge servers.
Input: Distance threshold
Output: offloading decision
(1) Initialize
(2) Get connectable RSU set according to , sort by distance in ascending order , where is the number of
(3)whiledo:
(4)  select
(5)  if
(6)   , break
(7)  else
(8)  else
(9)else while
(10)if:
(11)  Offload to Cloud in cell
(12)end if