Abstract
Keywords
Introduction
As an important part of the intelligent transportation system (ITS), many studies have been devoted to using vehicular ad hoc network (VANET) to improve traffic safety and provide convenience for passengers. The vehicles in VANET are generally equipped with on-board units (OBUs), which provide small-scale computing and storage capacity. However, some emerging applications, such as augmented reality and image processing, require complex computing and large amount of storage. 1 Nowadays, the limited computing and storage resources of vehicles are hard to support such computation-intensive applications. Some researchers have proposed to introduce mobile cloud computing technology into VANET to form vehicular cloud computing (VCC). 2 VCC allows vehicle users to offload their complex computational tasks to the cloud data center, leveraging the rich computing and storage resources of the cloud servers to process tasks. Although VCC effectively reduces the computational load of vehicles, as the quality-of-service (QoS) requirements increase, its defects are becoming more and more obvious.
The powerful cloud data centers are often deployed far away from vehicle users. To access the cloud platform, vehicle users need to traverse the core network through multiple devices such as base stations, hotspots, and routers. Therefore, there is a large delay in the transmission process of the task. However, the service control and data transmission of VANET have high real-time requirements. If the data analysis and control logic are all concentrated in the remote cloud center, it is difficult to guarantee the delay and jitter performance of the applications. In addition, with the rapid increase in the number of users and service types, the data aggregation of massive devices accessing the cloud platform will inevitably cause excessive network load. This leads to problems such as increased delay and severe congestion, which seriously degrade network performance and user experience. Therefore, the computation offloading method of VCC is not suitable for the delay-sensitive task of VANET.
Recently, as a new type of computing model, mobile edge computing (MEC) has become a research hotspot in academia and industry. By extending cloud computing to the edge of the network, MEC can provide high reliability, high bandwidth, and low-latency computing services for mobile devices. This is because the edge server is close to the mobile device, and the user usually only needs a single hop to access the edge cloud, which greatly reduces the communication delay and avoids congestion. In addition, the MEC server at the edge of the network can obtain the user’s surrounding environment information in real time. Using these auxiliary information, the server can optimize the services dynamically and rapidly.
With the popularity of applications requiring low latency and situational awareness, MEC technology has been applied in many scenarios, such as augmented reality, 3 smart grid, 4 and network security.5,6 A significant number of researches have been conducted on the application of MEC in vehicular networks. In the existing researches, MEC servers are usually deployed near infrastructure such as base stations, so their performance will be limited by the infrastructure. First, the spectrum cost of infrastructure is expensive, and vehicular users need to pay for the transmission of their task data. Second, in practice, the infrastructure cannot completely cover vehicles traveling on the road due to the limited communication range and sparse deployment. Third, services cannot be provided when the infrastructure is damaged or user requests exceed its processing capacity. Therefore, it is necessary to study the utilization of computing resources of vehicles on the road to provide a wide range of reliable services. However, the relevant research is still few and there are some difficulties in the implementation. The fast movement of vehicles causes the network topology and wireless channel vary rapidly, which poses challenges to the reliable delivery of computational tasks and the effective collaboration between MEC servers. In addition, the implementation of MEC offloading is composed of data transmission process and task computation process; how to coordinate the communication and computing resources for different vehicle requirements is an important issue affecting the performance of MEC. The main contributions of this article are summarized as follows:
We introduce MEC technology to VANET to build a vehicular edge computing (VEC) system. Efficient and fast computing services are provided by vehicles to overcome the limitations of fixed infrastructures;
A novel multi-objective VEC task scheduling algorithm is proposed, which makes the optimal decision on the allocation of communication and computing resources by observing the state of the VEC system;
Extensive simulations have been conducted, and the results show that the proposed algorithm can effectively shorten the task execution time and has high reliability.
The remainder of this article is organized as follows. Section “Related work” overviews the recent researches on the application of MEC in vehicular networks and investigates their deficiencies. Section “System overview” describes the VEC system and models the computation offloading process in this environment. Then, in section “Optimization solution,” we transform the offloading decision problem into a knapsack problem and design a multi-objective VEC task scheduling algorithm based on bat algorithm. The experiments and simulations are presented in section “Experimental evaluation.” Finally, we make the conclusion in section “Conclusion.”
Related work
Due to its close proximity to mobile users, MEC can effectively reduce the latency of network operations and service delivery. In recent years, many researchers have devoted themselves to applying MEC technology to vehicular networks with high real-time requirements. Liu et al. 7 proposed a software-defined network-enabled vehicular network assisted by MEC, which offers reliable communication services by integrating heterogeneous vehicular networks. The MEC server provides computing resources and supports delay-constrained response to clients, reducing the data transmission time and offering quickly responding service. Huang et al. 8 proposed a 5G-enabled software-defined vehicular network, which leverages MEC servers as local controllers to spread and localize the control plane, monitoring the entire network state and making optimal decision in real time. Huang et al. 9 proposed a distributed reputation management system where MEC servers are used to maintain the reputation of local vehicles. Then, the concept of reputation-assisted optimization is proposed with which service providers optimize resource allocation by referencing reputation values of served vehicles. Huang et al. 10 proposed a software-defined network inside the MEC architecture to resolve the vehicle-to-vehicle (V2V) offloading issues. The MEC server collects the contextual information of vehicles and stores them in the context database. Then, it calculates V2V paths for vehicles that are communicating with each other using the cellular network. Hui et al. 11 proposed an edge computing–based vehicular content dissemination framework. The content provider provides its requirements and uploads the content to the edge computing device (ECD). Then, the ECD evaluates the trajectory, mobility, and traffic status of vehicles and selects the optimal vehicle to relay the content. However, in these researches, MEC servers are deployed only at static infrastructures. It may be too expensive to provide ubiquitous and always-on service using such network architecture.
A few researchers have studied the computation offloading and resource allocation of vehicular networks. The core issue is to offload computation tasks from resource-poor vehicles to resource-rich edge servers. Zhang et al. 12 proposed a cloud-based MEC offloading framework for vehicular networks, which consists of multiple MEC servers and remote clouds. Then, they presented a predictive combination-mode relegation scheme. By predicting the file transmission time and the task execution time, MEC servers can reduce the service latency and network operation cost. Zhang et al. 13 proposed a hierarchical cloud-based offloading framework, where multiple MEC servers can share a backup server to make up for their insufficient computing resources. Then, the authors used a Stackelberg game approach to obtain the optimal offloading strategy, which maximizes the revenues of MEC servers under the delay constraints of computation tasks. Feng et al. 14 proposed a framework named autonomous vehicular edge (AVE) that allows offloading and scheduling without requiring centralized control. The authors also proposed a job caching scheme to better schedule jobs and an ant colony optimization–based scheduling algorithm to assign the jobs. Wu et al. 15 proposed an offloading algorithm based on support vector machine. The algorithm first segments a huge task into several sub-tasks using a weight allocation method. Then, it determines each sub-task to be offloaded or executed locally. Lin et al. 16 proposed a vehicular social edge computing architecture, which inherits the advantages of both edge computing and social network. Then, the authors modeled the system utility and used Lagrangian theory to obtain the optimal resource allocation scheme that maximizes the utility. Du et al. 17 developed a cognitive vehicular network where the IEEE 802.22 channel is reused for computational task offloading. They formulated a dual-side optimization problem to minimize the cost of vehicle terminals and the MEC server. Then, they proposed a online algorithm to tackle the optimization problem using Lyapunov’s optimization theory. However, these researches only allocate one resource when performing task offloading, without considering the joint allocation of communication and computing resources.
System overview
In this section, we first describe the key components of VEC system. Then, we present the communication and computation model, and formulate the offloading decision problem.
System architecture
As shown in Figure 1, this article considers the computation offloading service in VEC network. The high-speed movement of vehicles leads to rapid changes in network topology, resulting in unstable communication and high information exchange overhead. To optimize the data transmission between vehicles and improve the QoS of VEC system, in this research, a group of vehicles moving in the same direction are aggregated, forming a vehicle cluster. The VEC system consists of user vehicles, MEC vehicles, and a cluster head (CH) vehicle.

Vehicular edge computing system topology.
User vehicle
A user vehicle is equipped with devices such as OBU, Global Positioning System (GPS), and wireless communication module. The OBU can perform some simple tasks, and the GPS enables the user vehicle to obtain its location in real time. With the wireless communication module, the user vehicle can communicate with other vehicles. When the user vehicle moves on the road, it needs to run some new applications, such as augmented reality and image processing. However, the OBU cannot afford the complex computation required by these applications. Thus, the user vehicle generates a requirement for computation offloading.
MEC vehicle
Similar to the user vehicle, a MEC vehicle also has devices such as OBU, GPS, and wireless communication module. In addition, the MEC vehicle is equipped with high-performance MEC server. The MEC server generally has multi-core processors, which can perform multiple tasks at the same time. The MEC vehicle shares its computing resources with other vehicles, allowing user vehicles to offload tasks to the MEC server for better service. When the task computation is complete, the MEC vehicle send the output data back to user vehicles.
CH vehicle
As the manager of VEC system, the CH vehicle controls the computation offloading between user vehicles and MEC vehicles. The CH vehicle collects the task requirements and movement status of user vehicles and allocates the communication resources of the vehicle network and the computing resources of the MEC servers based on these information.
It should be noted that a vehicle in VEC system may have multiple roles at the same time. It may be both a task publisher and a computing resource provider, as well as the scheduling decision-maker. Figure 2 shows the message flow of VEC system, which has the following steps:
The CH vehicle periodically broadcasts its state information through the control channel;
When receiving the signal, other vehicles estimate the quality of the communication channel and update their channel state information (CSI);
Through the control channel, user vehicles send their CSI and task offloading requests to the CH vehicle, and MEC vehicles send their CSI and resource usage to the CH vehicle;
Based on the collected information, the CH vehicle makes the optimal task scheduling decision and broadcasts it to other vehicles through the control channel;
Through the data channel, user vehicles send their task input data to MEC vehicles, and MEC vehicles return the results after performing the tasks.

Message flow of VEC system.
Communication and computation model
Consider a vehicle cluster scenario as shown in Figure 1, in which there are
In VEC system, the CH vehicle regularly monitors the movement status of all vehicles, such as GPS location, speed, and acceleration. Based on these information, the CH vehicle can predict the link duration between vehicles. The link duration between vehicle
For each vehicle, its task can be performed locally using the OBU (local computing mode) or offloaded to the MEC server (edge computing mode). Here, we analyze these two task execution modes. Assuming that the OBU computation rate of vehicle
If the edge computing mode is adopted, the vehicle needs to send the input data of the task to the MEC server first. When long-term evolution-V (LTE-V)-Direct communication is adopted in VANET, the entire spectrum resource is divided into several resource blocks (RBs) in time and frequency domain.
20
The users in VANET share these RBs. Suppose vehicle
where
The time consumption of the edge computing mode can be divided into three parts. The first part is the time when the user vehicle transmits the task input data to the MEC vehicle, the second part is the computation time of the task on the MEC server, and the last part is the time that the MEC vehicle returns the task output data to the user vehicle. Since the size of the output data is much smaller than the input data, in this article, we ignore the time to transmit the output data. Based on the above analysis, when vehicle
where
Task scheduling analysis
According to the communication and computation model described above, the offloading decisions of different vehicles in VEC system are coupled. When there are multiple vehicles offloading tasks at the same time, they compete with each other for communication resources. Unreasonable resource allocation can result in low data transmission rate and high delay, in which case a vehicle can get the computation result more quickly if it performs the task locally. There is also competition for computing resources between tasks offloaded to the same MEC vehicle. Therefore, a task scheduling scheme that reasonably allocates communication and computing resources has an important impact on the performance of VEC system.
In this article, we consider two optimization objectives: the total execution time of all tasks and the total weight of successful tasks. Here, a successful task is a task whose execution time is less than its maximum latency. Take task
All task scheduling schemes that satisfy the above three constraints are feasible schemes. We define a binary matrix
The goal of this article is to find a matrix
where
Optimization solution
In this section, we first transform the computation offloading decision problem in VEC system into a knapsack problem. Then, we give a brief introduction of the bat algorithm. Finally, we make many improvements to the bat algorithm and design a multi-objective VEC task scheduling algorithm.
Problem transformation
We regard the wireless link as a big knapsack with a maximum volume of

Diagram of the knapsack problem.
Obviously,
Bat algorithm
Bat algorithm was proposed by Yang
22
in 2010. It simulates the behavior of micro-bats in nature, which use echolocation to hunt prey and avoid obstacles. According to the bat’s echolocation behavior and its correlation with objective optimization, the parameters and updating equations of
Let the domain be a D-dimensional search space. Bat
where
When hunting prey, a bat emits pulses with high loudness and low emission rate for a wide range of searches. When the prey is found, it reduces the loudness and increases the emission rate to locate the prey more accurately. Equations (7) and (8) describe the update of loudness
where
In order to improve the search performance, when a position is determined as the best position of the current population, the new position of each bat is generated in its vicinity
where
Multi-objective VEC task scheduling algorithm
The bat algorithm can only solve single-objective problems, and it has the disadvantage of being trapped in a local optimum easily. In order to solve the VEC offloading decision problem, we have made the following improvements to the bat algorithm.
Design position update rule
The multi-objective optimization problem does not have a unique global optimal solution, but multiple solutions that are incomparable in terms of global objectives, called Pareto solutions. Thus, there is no population historical best position in the multi-objective bat algorithm. In addition, it is possible that both new and old positions are Pareto solutions in the evolution of bat individuals. For this feature, we adopt the following update rules of bat individuals and population. For a bat individual, when the new position can dominate the old position, it adopts the new position with a certain probability; when neither of them can dominate the other, it randomly selects one of them as the individual’s best position. In both cases, the loudness and emission rate of the bat are updated when the new position is selected. For the bat population, the global best position
where
Improve the quality of initial population
The initial distribution of the population has a great influence on the optimization accuracy of the algorithm. In the bat algorithm, the initial bats are generated randomly. Thus, it may happen that the initial bats are clustered together, causing the algorithm to lose its global search ability at the beginning. In this article, the
Maintain population diversity
According to the update method of bat algorithm, the bat individuals fly randomly for global search at the beginning of the iteration. When a better position is found, all bats move closer to the better position. As the number of iterations increases, the bat individuals get closer and closer, and their distribution is uneven, resulting in a significant decrease in population diversity. As a result, the bat population over-searches around several better positions, and the algorithm falls into a local optimum. In this article, with reference to non-dominated sorting genetic algorithm II (NSGA-II), 23 an elitist strategy using fast non-dominated sorting and crowding-distance estimation is introduced in the bat algorithm to improve the population diversity.
Fast non-dominated sorting
Fast non-dominated sorting stratifies the population according to the dominance relationship between individuals. For each bat
Crowding-distance estimation
The crowding-distance is a measure of how close an individual is to its neighbors. The larger the crowding-distance, the more dispersed the individual distribution, and the better the diversity of the population. Let
where
Elitist strategy
The elite strategy combines the parent population with its offspring population, and the two compete to produce the next generation population. In this way, the predominant individuals in the parent population will not be lost during the evolution process, accelerating the convergence of the algorithm.
After fast non-dominated sorting and crowding-distance estimation, each bat
According to the above improvements, we design a novel task scheduling algorithm for VEC system based on the bat algorithm. The description of the proposed algorithm is shown in Algorithm 1. The integer coding is used, whereby the position of bat
Experimental evaluation
In this section, we conduct a series of experiments and simulations to evaluate the performance of the proposed multi-objective VEC task scheduling algorithm.
Simulation scenario
We simulate the task offloading in VANET using Simulation of Urban Mobility (SUMO) and NS3. SUMO is used to simulate the movement of vehicles, and NS3 is used to simulate the communication and task offloading between vehicles.
We consider a three-lane highway with a width of 3.5 m per lane, as shown in Figure 4. There is a vehicle cluster on the road, consisting of

Simulation scenario.
In the communication simulation, each vehicle has a transmission power of 23 dBm, an antenna gain of 3 dB, and a maximum transmission distance of 320 m. The LTE-V-Direct communication is used, in which a RB occupies 180 kHz of frequency. A bandwidth of 10 MHz at 5.9 GHz is used for our system, so a total of
The simulation parameters for task offloading are presented in Table 1. For comparing the performances, we also consider other three algorithms as follows:
Simulation parameters for task offloading.
OBU: on-board unit; MEC: mobile edge computing.
Performance evaluation
Solution precision
We first evaluate the solution precision of the proposed VEC scheduling algorithm. We set the number of vehicles to 30 and the radius of the vehicle cluster to 100 m. Then, the proposed algorithm is run with different population sizes while the maximum number of iterations is 100. Here, we choose the average value of the solutions in the Pareto-optimal set as the result of the proposed algorithm. In addition, we use CPLEX 12.8 to solve the problem model
Figure 5 shows the solution precision of the proposed algorithm with different population sizes. It can be seen that when the population size is small, the proposed algorithm can only reach about 92% of the optimal value. As the population size increases, the solution precision increases, that is, the proposed algorithm can get better solutions. When the population size is 50, the solution precision in terms of execution time and weight is about 94% and 96%, respectively. However, the increase in population size will lead to the increase in solution time. Therefore, we set the population size to 40 in the later experiments.

Solution precision of VEC scheduling algorithm.
Performance comparison
In this section, we evaluate the performance of four task scheduling algorithms in given scenarios. Since the load and weight of the tasks vary in different scenarios, we use the average execution time of all tasks and the weight ratio of successful tasks as the evaluation metrics. In addition, we compare the task offloading ratio of different algorithms.
In scenario 1, we fix the radius of the vehicle cluster to 100 m and vary the number of vehicles from 10 to 50. Then, the average execution time, weight ratio, and offloading ratio are shown in Figures 6–8, respectively. It can be observed that the offloading algorithm has obvious advantages over the local computing algorithm. When using LC algorithm, each vehicle has only a small amount of computing resources to perform its task. Thus, it is difficult for vehicles to accomplish tasks with large computational loads within a specified time. As a result, LC has the longest average execution time (about 4.20 s) and the smallest weight ratio (about 8.97%). While using the offloading algorithm, user vehicles can offload the complex computational tasks to MEC vehicles, leveraging the rich computing resources to process tasks. Therefore, the number of successful tasks increases, resulting in shorter average execution time and larger weight ratio.

Average execution time for scenarios with different number of vehicles.

Weight ratio for scenarios with different number of vehicles.

Offloading ratio for scenarios with different number of vehicles.
From Figures 6 and 7, it can be observed that as the number of vehicles increases, the average execution time of the offloading algorithm increases while the weight ratio decreases. The more users compete for resources, the less resources each user can obtain, and the longer it takes to accomplish the tasks. PDA has a longer average execution time than FDA, but it can achieve a larger weight ratio. This is because PDA tends to allocate resources to users with large weights, making it easier for them to accomplish tasks within delay constraints. The proposed algorithm considers both task execution time and weight and optimizes the allocation of communication and computing resources. Compared with other algorithms, it can obtain the shortest average execution time and the largest weight ratio at the same time.
In Figure 8, as the number of vehicles increases, the offloading ratio of the offloading algorithm decreases gradually. This is because more and more users cannot obtain shorter task execution time through the edge computing mode and instead choose to perform their tasks locally. When the number of vehicles is small, FDA and the proposed algorithm have similar offloading ratios, which are greater than that of PDA. However, the offloading ratio of the proposed algorithm decreases slowly when the number of vehicles is larger than 35. This shows that the proposed algorithm can make the most of the edge computing resources by optimizing resource allocation.
In scenario 2, the number of vehicles is kept at 30, while the cluster radius varies from 50 to 250 m. Then, the average execution time, weight ratio, and offloading ratio are shown in Figures 9–11, respectively. Similarly, LC algorithm has the worst performance. With the increase in cluster radius, the average execution time of the offloading algorithm increases and the weight ratio decreases, while the metrics of LC remain unchanged. This is because the task execution time of the offloading algorithm includes the data transmission time and the computation time on MEC servers. The increase in cluster radius reduces the signal-to-noise ratio between vehicles, resulting in decreased transmission bandwidth and increased transmission time. LC does not involve the data transmission process, and its task execution time is only the local computation time.

Average execution time for scenarios with different cluster radius.

Weight ratio for scenarios with different cluster radius.

Offloading ratio for scenarios with different cluster radius.
In Figures 8 and 9, FDA has a better average execution time, while PDA has a better weight ratio. The proposed algorithm takes into account the link duration, wireless bandwidth, and computing resource status, providing high-rate wireless channels for users to transmit tasks. Thus, it has the best performance.
In Figure 11, with the increase in cluster radius, the offloading ratio of the offloading algorithm decreases. A similar conclusion is obtained that the FDA and the proposed algorithm perform better than PDA. When the cluster radius is larger than 125 m, the benefit of the proposed algorithm is highlighted.
In scenario 1, the increase in the number of vehicles leads to significant changes in the evaluation metrics of the offloading algorithm. While in scenario 2, these evaluation metrics change slowly as the cluster radius increases. This shows that the task load has a greater impact on the performance of the offloading algorithm than the communication environment.
Conclusion
In order to meet the low latency and situational awareness requirements of emerging applications, MEC technology has been applied in vehicular networks. This article introduces MEC technology to VANET to build a VEC system, which provides a wide range of reliable services by utilizing the computing resources of vehicles on the road. Then, the computation offloading decision problem in this system is studied, and a novel multi-objective VEC task scheduling algorithm is proposed, by jointly optimizing the allocation of communication and computing resources. Extensive simulations have been conducted, and the results demonstrate that the proposed algorithm can effectively shorten the task execution time and has high reliability.
