Task Ofﬂoading Strategy and Simulation Platform Construction in Multi-User Edge Computing Scenario

: Various types of service applications increase the amount of computing in vehicular networks. The lack of computing resources of the vehicle itself will hinder the improvement of network performance. Mobile edge computing (MEC) technology is an effective computing method that is used to solve this problem at the edge of network for multiple mobile users. In this paper, we propose the multi-user task ofﬂoading strategy based on game theory to reduce the computational complexity and improve system performance. The task ofﬂoading decision making as a multi-user task ofﬂoading game is formulated to demonstrate how to achieve the Nash equilibrium (NE). Additionally, a task ofﬂoading algorithm is designed to achieve a NE, which represents an optimal or sub-optimal system overhead. In addition, the vehicular communication simulation frameworks Veins, SUMO model and OMNeT++ are adopted to run the proposed task ofﬂoading strategy. Numerical results show that the system overhead of the proposed task ofﬂoading strategy can degrade about 24.19% and 33.76%, respectively, in different scenarios.


Introduction
With the development of Internet of Things (IoT) communication technology, vehicular networks have been the most promising application in IoT and provide vehicle users with comprehensive information services on transportation, safety, and entertainment [1,2]. However, these services are usually computationally intensive with too great a burden to the terminal equipment. The limited computing resources of the user terminal restrict the response to the user service application. Fortunately, the cloud computing technology as an emerging technology, can apply to data processing, which can break through the drawbacks of limited computing resource of end-user devices [3,4]. Hence, many IoT applications have achieved rapid growth driven by the cloud computing.
However, some typical applications are not suitable for using cloud computing to solve the problem of limited computing resources. For example, the delay-dependent messages sent by vehicles need to be transmitted with extremely low transmission delay in the vehicular networks. This demand makes the vehicular networks must to satisfy ultra-low delay [5,6]. By definition, cloud computing is a new paradigm of computing, which refers to the network management, storage and centralized computing in clouds for providing resources [7]. This mechanism may bring large delay due to long-distance transmission of the calculation result for user service. The cloud computing resource which is brought to the edge of network, that is mobile edge computing (MEC) technology, closer to the user terminal, can effectively reduce transmission delay. Edge computing is between physical entities and industrial connections, or at the top of physical entities. 1. The system overhead is calculated through time cost on task offloading in vehicular networks. The communication and computing models are considered to construct system performance characteristics. Specifically, the reliable uplink transmission rate is defined as the communication model, which is the function of offloading decision profile. Then, the computing model focuses on local computing and edge computing for a computationally intensive task; 2. The optimization problem on system overhead is established to deliver computing goal when the data transmission rate reaches the minimum threshold data transmission requirement. A novel game theory is applied to this strategy for reaching an optimal solution and reducing the computational complexity and achieving system stability. Meanwhile, the specific multi-user task offloading scheduling algorithm which includes channel interference and offloading decision update is designed in vehicular networks; 3. To obtain the vehicle trajectory data, the vehicular communication simulation frameworks Veins, road traffic simulator SUMO and OMNeT++ tools are combined together to simulate vehicle behavior in real scenario. Additionally, on this basis the proposed multi-user task offloading strategy is verified and analyzed at aspect of reducing system overhead.
In addition to providing insight into the behavior of the task offloading strategy, our simulation platform constructed can be used as an enabling component in vehicular networks validation platform such as MEC scenario simulators and emulators. In particular, simulation platform has verified actual geographic scenario based our proposed task offloading strategy in this paper. At the same time, the selection of Veins, SUMO and OMNeT++ in simulation platform constructed demonstrates strong operability.
The rest of this paper is organized as follows. After a review of related works in Section 2. We formulate in Section 3 the system model on multi-user and multi-server task offloading in vehicular networks. Section 4 derives an efficient task offloading strategy using the system model. After verifying and discussing the simulation platform building and system overhead results in Section 5, we conclude in Section 6.

Related Works
In recent years, due to the advent of MEC technology, the issues of data processing efficiency and delay have received increased attention again. We briefly review task offloading scheduling problems in MEC scenario which are directly related to our study.
With cloud computing and mobile cloud computing, References [14][15][16] formulate an advanced task offloading model from resource allocation, data availability, scalability, performance augmentation, energy saving, and security and privacy. How to manage the exponential data traffic increase is always a key challenge to improving network performance. For example, Reference [17] presents a series of data offloading techniques in wireless networks. The delay problem is considered to satisfy content delivery requirements. In vehicular networks, Zhou et al. in [18] focuses on data offloading framework design, the data transmission algorithm, and data offloading optimization problem. Specifically, delay and processing capabilities are important to vehicular networks for enhancing vehicular applications. Data offloading techniques through vehicular networks mainly include three different communication patterns among vehicle and infrastructures, such as vehicle to infrastructure (V2I) communication, vehicle to vehicle (V2V) communication, and vehicle to everything (V2X) communication. In addition, device to device (D2D) communication technology is another promising application in term of network control through communication session [19]. D2D function enables to overcome the delay and timing issues from V2V communication. This is similar to the concept of offloading. In [19], a comprehensive survey of D2D communication and the requirements for V2V communication are presented. More importantly, high latency and huge load problem are also discussed and solved for vehicle communication. A content delivery management system is designed in [20] for D2D data offloading. Additionally, this management system is suitable for vehicular environments, where the network topology changes in real time. However, these works ignore specific task offloading strategy and scheduling mechanism. This will degrade system performance.
Against this background, there has been many works focusing on task offloading strategies to achieve specific optimization of network performance [21][22][23][24]. In [21], the optimal resource allocation scheme is formulated as a convex optimization problem for minimizing the sum energy consumption under the constraint on computation latency. Moreover, a sub-optimal resource allocation scheme is also proposed to reduce the computation complexity as of the cloud with finite capacity. With the development of novel application, more and more tasks are computation-intensive and data-intensive. These features can be delay-sensitive [22]. In order to meet the low latency demand in ultra-dense network, MEC technology is introduced as an effective solution. However, the distributed computation resource in edge cloud makes it difficult to offload tasks for users. Hence, Chen et al. propose a task offloading policy for MEC in software-defined ultra-dense networks [23]. In [23], the task offloading problem is investigated and formulated to a mixed integer non-linear problem which is NP-hard. Additionally, the distributed task offloading algorithm is proposed to solve it based on game theory. In fact, topology and schedules of user devices are often omitted in process of task offloading. This leads to the performance of network degradation and the edge resources under utilization. The task can be divided into a series of sequential subtasks and the subtask is determined to be offloaded [24]. In real-word practices, Reference [25] improves the double auction mechanism which can assign the tasks of users to the edge servers. In the proposed efficient mechanism, the resource allocation problem is converted to a minimum cost flow problem to achieve the optimal social welfare. Considering the mobility of vehicular environments, it is crucial for the optimal task offloading decisions. A novel dynamic task offloading scheme for multiple subtasks is proposed to make the utility minimization in [26]. The computation resources of MEC server can be reasonably allocated to meet the differences computation intensity of each vehicle. Furthermore, Reference [26] combines the task offloading strategy and computation resource allocation to design a dynamic task offloading decision scheme for improving the utility of vehicular networks. In addition, Reference [27] proposes a reinforcement learning-based algorithm to solve the task offloading problem in vehicular edge computing networks. Additionally, the proposed scheme considers time-varying offloading decisions facing dynamic topology and the actual road traffic situation. Considering transmission latency and energy efficiency, a deep learning approach for energy efficient computational offloading in MEC is designed in [28] to improve low network congestion and application performance. When the mobile user has the limited energy capacity, the performance of MEC is restricted in operating task computation. In [29], the jointed optimized scheme is proposed to consider the energy transmission beamforming at the access point, the CPU frequencies, the number of offloading data bits at the user and the time allocation among the users in a multi-user wireless powered MEC system. Reference [30] formulates an optimization problem to discuss the tradeoff between energy efficiency and delay in wireless powered MEC systems by deep learning when the cost function is ignored. To achieve a joint task offloading and time allocation simultaneously, a joint time allocation and offloading strategy is proposed in [31]. Additionally, both energy consumption and the time delay of the mobile user are also considered in [31] by designing a cost function for a mobile user.
In these processes, the specific communication performance is omitted when the task offloading is focused on algorithm or scheme design for practical networks, such as vehicular networks. Relying on actual scenarios to verify the proposed scheme, more sophisticated simulation techniques are needed to simulate a network traffic and a road traffic [32][33][34]. In order to develop more efficient Inter-Vehicle Communication (IVC) protocols [32], Veins is mainly used for evaluating the performance of vehicular ad hoc networks. Veins provides comprehensive IVC models, which can be used for simulation frameworks to simulate practice application scenarios. Reference [33] develops a simulation framework OMNeT++ which is a simulation environment to model realistic communication patterns of vehicles nodes. Additionally, the microscopic road traffic simulation package SUMO can simulate traffic simulation [34]. In this paper, we use Veins, combining with OMNeT++ and SUMO, as our simulation framework where road-side units (RSUs) receive message vehicles transfer by IVC protocols to evaluate the performance of proposed task offloading scheme.

System Model
The main object of this section is to formulate the system overhead model based on multi-users and multi-servers task offloading process in vehicular networks. To achieve this goal, we first built communication model to ensure reliable data transmission rate. We then introduce computation model from two aspects local computing and edge computing.

Overview
We consider the multi-user and multi-server task offloading architecture in MEC scenario, as shown in Figure 1. The base station (BS) and RSUs are deployed in road side randomly. These V2I and V2V communication links agglomerate together to form vehicular communication networks. We assume the edge node could be other vehicles, RSUs and BS. Two problems are presented in this scenario. The first is that the tasks are to be offloaded or not. The second is that how to choose the appropriate channel to improve the efficiency of task offloading.
We consider a large number of vehicle users, denoted as N = {1, 2, . . . , i, . . . , N} in vehicular networks, where each vehicle has a computationally intensive task to be completed. In order to obtain an tractable analysis process and results, we assume a quasistatic scenario where some parameters (e.g., vehicle numbers or channel state) remain unchanged during a task offloading period (The number or channel state may change across different periods). The communication and computation models will be introduced in following, respectively. All the notations used in this section are displayed in Table 1.  The channel gain for link between i-th vehicle and j-th ES r The uplink transmission rate a The function of offloading decision m i The size of computation input data n i The total numbers of CPU cycles to accomplish task The overhead of edge computing K sys The system overhead

Capacity Model
Herein, the capacity model is introduced to transmit vehicle offloading task to the edge server (ES) through uplink communication and the impact of downlink communication is ignored [35]. There are M = {1, 2, . . . , j, . . . , M} ESs deployed in system. The offloading decision of i-th vehicle is denoted as a i , where a i = 0 and a i = j represent the vehicle i chooses to execute task locally with its own CPU and offload task to ES j for execution, respectively.
We define the offloading strategy profile a = (a 1 , a 2 , . . . , a N ). For a certain offloading strategy profile, different vehicle users can access to the same ES at the same time and frequency (e.g., CDMA). The noise and interference will accompany the data propagation process. Therefore, we define reliable uplink transmission rate of i-th vehicle to j-th ES according to Shannon theorem as [36] r i (a) = W log 2 (1 + Due to multiple access in the channel, Equation (1) introduces interference term p i h i j . We notice that the uplink transmission rate r is the function of offloading decision a. When large number of vehicles access to the same ES, the rate r will decrease.

Computation Model
For a computationally intensive task, the task can be executed locally or offloaded to ES. The task offloading efficiency is represented by two indicators, denoted as m i and n i . In the following, we focus on the computation model of local computing and edge computing.
(1) Local Computing: For the task executed locally, let f local i denotes the computing capability (e.g., CPU revolutions per second) of i-th local computer. In heterogeneous vehicular networks, the local execution time of task for different vehicles can be defined as Additionally, the energy consumption is proportional to the CPU cycles [12], and it is can be expressed as where, the value of E local i is constant in this paper. The overhead of local computing is written by According to different applications, we can set λ flexibly. For example, when executing time sensitive application, we can set λ t i = 1, and when the vehicle energy is low, we can set λ e i = 1.
(2) Edge Computing: If the vehicle choose offload task to the ES, the delay and energy consumption can be analyzed in a similar way. The time of task executed in the ES is During the period of transmitting data, delay and energy consumption will be introduced. According to the communication model introduced in Section 3.2, transmission time of task offloading to the ES can be expressed as Certainly, we assume that all ESs are equipped with sufficient computing resource. Then, the total time of edge computing by combining with Equations (5) and (6) At aspect of energy consumption, we only consider their own energy consumption of vehicle users. The energy consumption between vehicle and ES can be formulated as and we have E Similarly, the total overhead of edge computing according to (7) and (8) can be written as K Equations (4) and (10) show the overhead of different computing scenarios. Therefore, the system overhead can be expressed as

Efficient Task Offloading Strategy
After the basic components of the model is derived, we now consider an efficient task offloading strategy for multi-user task offloading. First, we describe a general scenario of task offloading. Then, the problem that how to update decision based on game theory is discussed. Lastly, an efficient task offloading algorithm is proposed to solve multi-user task offloading problem in vehicular networks.

Problem Statement
From the system model in Section 3, the wireless channel will be idle, if tasks are all executed locally (e.g., a = (0, 0, . . . , 0)). At this time, if one vehicle chooses to offload its task to the ES, the overhead of this vehicle will be reduced, then it will choose to change its current offloading decision. In addition, when a large number of vehicles choose to offload tasks to the ESs, the transmission rate r will decrease from Equation (1). According to Equations (6) and (8), the transmission time and energy consumption will increase, and the performance of task offloading will be worse correspondingly. Therefore, the minimum data transmission rate R is introduced to eliminate communication link interruption.
Considering a task offloading scenario with N vehicles and M ESs, task offloading strategy profile a is in n-dimensional space, where each space includes M + 1 possible values. If we need to transmit all possible values, there are (M + 1) N situations. The minimum overhead in system is expressed as From the previous description, the complexity of calculation will increase exponentially with the increase in vehicle numbers. This characteristic does not apply to current vehicular network environment. Hence, traditional optimization problem solutions are difficult to achieve the desired results on the Equation (12).

Game Formulation
Game theory is a mathematical theory and method for studying conflicting or competitive phenomenon [37]. Taking into account the limited computing resources of the vehicle and the complexity of multiple tasks from Section 4.1, a distributed task offload-ing algorithm is needed to achieve lower computational complexity. For task offloading decision a i of vehicle user i, we define the task offloading strategy of other vehicles as a − i = (a 1 , . . . , a i−1 , a i+1 , . . . , a N ). The objective of vehicle user i is to minimize its overhead. The specific scheme is designed by For classical game theory application, all vehicles, Γ = {1, 2, . . . , N}, denote participants, and task offloading strategy, {A i } i={1,2,...,N} (A i = 0, 1, . . . , M), denotes strategy space and the overhead, K i (a i , a −i ), denotes payment vector of each participant. Therefore, a task offloading game can be described as G i = (Γ, {A i }, K i (a i , a −i ). The Nash equilibrium (NE) in task offloading scenario will be discussed in the following.
For any vehicle i, the task offloading strategy profile a * = (a * 1 , . . . , a * i , . . . , a * N ) requires to achieve through using game theory. When the vehicle i cannot change its own offloading decision a * i to reduce its own overhead K i (a * i , a * −i ), the task offloading strategy profile a * is a NE of multi-user task offloading game. The result can be written by Although the NE point cannot be sure that the solution will reach optimal, any vehicle will not change its current offloading decision. All vehicles will maintain current offloading strategy. Nonetheless, the NE solution can ensure system stability, which applies to practice application scenario.

The Proposed Task Offloading Algorithm
We assume the offloading strategy between different vehicles are mutually coupled. Each vehicle is a decision-maker during task offloading in the distributed multi-user edge networks. The specific task offloading process includes two stages as follows: (1) Channel Interference: For any vehicle i, we assume the offloading decision a i is known and the overall received power P j (a i (t), a −i (t)) of ES j is also known. If the vehicle i accesses to the ES j, the interference I j (a i (t), a −i (t)) numerically equals to the overall received power. Otherwise, the interference numerically equals to the overall received power minus except for the vehicle i. The wireless channel interference of vehicle i to the ES j is calculated as It is worth noting that each vehicle can obtain the wireless channel interference from Equation (15) without knowing the offloading decision of other vehicles.
(2) Offloading Decision Update: The next stage is the current offloading decision of vehicle will be updated at this moment. When the wireless channel interference {I j (a i (t), a −i (t)), j = 1, . . . , M} is known, the vehicle i can update its strategy based on the optimal offloading decision as Each vehicle can get the update set U by Equation (16) in wireless communication. When the condition is a i (t) ∈ U i , the vehicle i will remain its current decision, such as a i (t + 1) = a i (t). Otherwise, the vehicle i will send out a request message to update its current decision.
The specific operations on multi-user task offloading are elaborated in vehicular networks as follows: the ESs M send out the overall received power to the vehicles N . The vehicles N can get wireless channel interference according to Equation (15). Then, these vehicles decide whether to change current offloading decision by Equation (16) and send out a request message to the ES. The ES randomly chooses a request frame and returns a response frame to the corresponding vehicle. This demonstrates the vehicle is permitted to change its current decision and the other vehicles remain the current decision. The task offloading scheduling can be accomplished, until the ES cannot receive any request frame. A multi-user edge network task offloading scheduling algorithm is designed in vehicular networks. The corresponding pseudocode is shown in Algorithm 1. It is noted that the data processing of this algorithm can be operated in edge node, such as BS or vehicles. In addition, the MEC technology could provide computing resources for all vehicles.
Algorithm 1 Multi-user edge network task offloading scheduling algorithm.
Require: timeslot and initial offloading decision a(0) Ensure: overhead and final offloading decision a 1: Initialization; 2: for t = 1; t ≤ timeslot do 3: ES broadcasts received power P j (a i (t), a −i (t));

4:
Vehicle calculates channel interference I j (a i (t), a −i (t));

5:
Vehicle calculates optimal decision sets U i ; 6: if U = ∅ then 7: Randomly select a vehicle i; System reaches NE; 12: Task offloading scheduling accomplished; 13: end if 14: end for

Simulation Results
In this section, we evaluate the proposed task offloading strategy by simulation platform built. The simulation platform is built with reference to the actual physical scenario. Subsequently, when the simulation platform runs the proposed task offloading strategy, the system overhead is analyzed accompanying with different slot time, number of vehicles and RSUs.

Simulation Platform Building
The vehicular communication simulation framework Veins, road traffic simulator SUMO and network simulator OMNeT++ tool are combined together to realize the proposed multi-user task offloading scheduling scheme. Against this background, the SUMO is adopted to provide map and vehicle trajectory information, which can describe simulation scenario well, and the OMNeT++ is introduced to realize the communication between the vehicles and roadside infrastructure (e.g., RSUs and BS). For supporting in dynamic communication environment, Veins enables wireless access in vehicular environments (WAVE) standards, which standardizes the communication between physical (PHY) layer and media access control (MAC) layer. The Veins provides the corresponding function, which can realize the whole communication from vehicle to RSU. In addition, Table 2 shows mainly system parameters in multi-user and single-server scenario, where vehicles randomly travel in different crossroads and RSUs are located at the center of crossroads.

Results Analysis
In order to verify our model, the data from a real scenario with multi-user and multiserver is considered to display work conditions. Formally, we get the map of Sanyang Plaza in Wuxi, Jiangsu province, China from Open Street Map (OSM), as shown in Figure 2. The messages from each vehicle can be received by any number of RSU (even no RSU). In a nutshell, we make some modifications with "JOSM" software. The corresponding simulation scenario is built in Figure 3. Some parameters also need to be changed, where we set vehicle numbers to 120, and RSU numbers to 6, and channel bandwidth to 20 MHz, and size of input data to 200 KB, which benefits to task offloading. The OMNeT++ supports to export resulting data to CSV format, suitable for importing into Python's Pandas or R language. We choose Python's Pandas to process data and achieve task offloading strategy scheduling.
The local computing capability of each vehicle is defined as 0.5, 0.8, or 1. The SUMO builds a network simulation model and generates network file, traffic file and poly file. This model is imported to the OMNeT++ and the vehicles are to instantiate mobile network nodes. RSU begins to operate task offloading scheduling after receiving the messages of all vehicles. The offloading vehicle numbers of each RSU increase initially due to free channel, and then settle out during a period of jitter. Specifically, the system overhead of each time slot is verified in Figures 4 and 5 when RSU = 1 and RSU = 6, respectively. From the Figure 4, it is obvious that the system overhead reduces about 24.19% compared to the initial state when it maintains stabilize after four times of update operation. When the multiple RSUs are deployed in networks, the system overhead fluctuates quite a bit initially and reaches a steady state finally, which can reduce about 33.76% compared to the initial state from the Figure 5. It shows that network resource can be used effectively by task offloading scheme.   In addition, the system capacity of the vehicular networks is improved when the proposed offloading scheme is adopted in Figure 6. With the increase in the number of vehicles, the proposed task offloading scheme can enhance the vehicles to access channel freely and to facilitate communication through V2I and V2V pattern.

Conclusions
In this paper, we propose an efficient task offloading scheduling strategy based on game theory in multi-user and multi-server scenario for MEC. We formulate the problem as a multi-user task offloading game and develop a multi-user edge network task offloading scheduling algorithm for NE. Furthermore, the road traffic simulator SUMO and network simulator OMNeT++ are combined together to achieve task offloading scheduling. On the basis of Veins, vehicles can transmit message to RSUs, and then RSUs begin to operate the task offloading strategy. Simulation results show that the proposed algorithm can get a stable offloading decision and achieve optimal or near-optimal of task offloading performance for vehicular networks.
In addition, the more complex task offloading scenario will be discussed in future work. The proposed scheme can be embedded into Veins and handled task offloading in real-time. Additionally, when the task is divided into different subtasks, the system model is also suitable for task offloading of subtask.