Joint Communication, Computation, and Control for Computational Task Offloading in Vehicle-Assisted Multi-Access Edge Computing

Future generation of Electric Vehicles (EVs) equipped with modern technologies will impose a significant burden on computation and communication to the network due to the vast extension of onboard infotainment services. To overcome this challenge, multi-access edge computing (MEC) or Fog Computing can be employed. However, the massive adoption of novel infotainment services such as Augmented Reality, Virtual Reality-based services will make the MEC and Fog resources insufficient. To cope with this issue, we propose a system model with onboard computation offloading, where an EV can utilize its neighboring EVs resources that are not resource-constrained to enhance its computing capacity. Then, we propose to solve the problem of computational task offloading by jointly considering the communication, computation, and control in a mobile vehicular network. We formulate a mixed-integer non-linear problem (MINLP) to minimize the trade-off between latency and energy consumption subject to the network resources and the mobility of EVs. The formulated problem is solved via the block coordination descent (BCD) method. In such a way, we decompose the original MINLP problem into three subproblems which are resource block allocation (RBA), power control and interference management (PCP), and offload decision problem (ODP). We then alternatively obtain solutions of RBA and PCP via the duality theory, and the third sub-problem is solvable via the relaxation method and alternating direction Lagrangian multiplier method (ADMM). Numerical results reveal that the proposed solution BCD-based algorithm performs a fast convergence rate.


I. INTRODUCTION
Next-generation vehicles will be equipped with advanced computing, caching, communications, and control resources to meet the stringent requirements of safe driving, The associate editor coordinating the review of this manuscript and approving it for publication was Mehdi Sookhak . automation, and infotainment services. By connecting these resourceful vehicles with the wireless network to devise the Internet of Vehicles (IoV), an efficient, cost-effective, safe, autonomous, and intelligent transportation system will be created. However, such massive connectivity with wireless networks is non-trivial and may overwhelm the network. Moreover, meeting the coverage, communication, VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ and computation demands of a massive number of vehicles in a wide geographical area is challenging. Even though the deployment of road side units (RSUs) has contributed well to alleviating the network traffic load in congested locations, they lack to provide coverage to all roads in an area. To address this problem, an independent, cellular coverage-free network of vehicles is required where the vehicles can collaborate, share, trade, and exploit redundant resources efficiently. Indeed, neighboring vehicles sharing the road vicinity can collaborate, cooperate, and share their redundant computation, power, and caching resources for their mutual benefit. The collaboration among the vehicles in a road segment uncovered by the cellular networks becomes significant to offload, process, and retrieve the computationintensive tasks. However, such resource sharing pertains to its own challenges of managing the limited resources, meeting the QoS requirements, having very short points of contact among the vehicles, and guaranteeing task completion. Therefore, a sophisticated design of collaborative sharing of resources for task completion in the absence of cellular coverage is strongly desired. Task offloading among the moving vehicles is particularly challenging to meet the latency, task completion, and limited point of contact among vehicles. Moreover, the unavailability of resources in the neighborhood to perform the desired task makes efficient task management challenging. Another challenge of task offloading among the vehicles is the design of a suitable incentive mechanism for the vehicles performing the task. Moreover, executing the task according to the desired order is critical to streamlining the application flow of the requesting vehicle. Moreover, selecting suitable vehicles to perform the task and optimal offloading decisions becomes challenging under dynamic channel conditions and speed variations of vehicles. In addition, to meet the strict latency requirements of the tasks for vehicular networks, another challenge is to balance the task offloading under the limited energy resources. By allocating high computation and communication resources to a task, the latency requirements can be fulfilled at the cost of high energy consummation. Therefore, it is desired to design a balanced scheme for managing the trade-off between energy and latency constraints.
In the literature, a number of task management schemes for vehicular networks have been proposed. An intuitive solution can be the reduction of task sizes instead of offloading the unified larger tasks. In this way, the slices of tasks are executed at local, neighboring vehicles or the MEC servers. The authors in [1] proposed a destination selection framework from the neighboring vehicle or the MEC server to offload the task. However, the authors do not consider energy management in task offloading. The same problem of V2X task offloading is addressed by [2] where the authors proposed a task offloading scheme in the vehicular networks under the task latency requirements. The authors in [3] proposed a task partitioning scheme to offload the slices of tasks to different MEC servers such that the latency requirements are fulfilled. However, these works do not consider the energy management of vehicles in their framework. To address the challenge of task offloading under the limited energy resources in vehicular networks, the authors in [4] proposed the selection of a MEC server according to the availability of energy resources. To manage the energy-latency trade-off efficiently, the authors in [5] proposed an energy-aware task offloading scheme for vehicular networks. Similarly, the authors in [6] and [7] investigated the problem of mobility-aware task offloading and latency without the problem of interference management and the trade-off between energy and latency. Most of the aforementioned works lack involvement of latency-energy trade-off in the task execution at local, neighboring, and MEC servers. Moreover, they have not considered the power control problem and interference management for V2V communication.
To this end, we propose a hybrid collaboration on the road scheme to efficiently manage the computation and communication resources, and interference management of the vehicular networks while optimizing the task offloading decisions to local, neighboring vehicles and MEC servers. To do this, we develop a system model containing two sets of vehicles: (i) resource-constrained vehicles and (ii) vehicles that have available resources. In which, the resource-constrained vehicle generates a latency and computation-intensive task to be executed. This can be a computing task generated by passengers for using infotainment services [8], or an image processing task for road tracking of EVs [9]. Typically, these tasks can be executed locally or can be offloaded to a resourceful neighboring vehicle, and MEC server. To formulate the optimization problem, we design the mobility model of the vehicles using the kinematic equations. Then, the corresponding communication, computation, offloading, and latency models are designed. We formulate the optimization problem with the objective of a trade-off between the latency and energy of the vehicular network. The optimization problem is solved through the block coordinate descent technique (BCD) by decomposing the problem into three subproblems. To the best of our knowledge, this is the first paper that considers joint communication, computation, and control in terms of latencyenergy trade-off, including power control and interference management for V2V communication and computing task offloading in EVs-assisted MEC. The following is a summary of our main contributions: • We propose a system model of Electric Vehicles (EVs)assisted MEC for task offloading in which EVs are allowed to offload the computing task either to the MEC server or close vicinity EVs, which have the available resources to process the task.
• We formulate the joint optimization problem w.r.t. the trade-off between latency and energy consumption.
In which we consider the problem of communication resource allocation, interference management, and task offload decision. • RBA problem is solvable via an alternative method named dual decomposition with duality and subgradient methods. The second subproblem of PCP is a bi-convex, and thus we employ the Lagrangian multiplier method to distributively obtain a sub-optimal solution. Furthermore, we solve the third problem via the alternating direction method of multipliers (ADMM) to obtain the optimal of the relaxed problem.
• Finally, we validate our proposed model with comprehensive numerical results. We have verified the convergence rate as well as the performance of each algorithm for solving each sub-problem.
The rest of this paper is structured as follows: Section II covers related works. Section III describes the system model. The proposed problem formulation and solution approaches are presented in Sections IV and V, respectively. Simulation results are provided in Section VI. Finally, Section VII concludes the paper.

II. RELATED WORKS A. MULTI-ACCESS EDGE COMPUTING
The recent developments of high-performance applications have overwhelmed the resource-limited vehicular networks. A number of works tried to address this issue by proposing the task offloading to cloud servers [10], [11], [12], [13], [14], edge server, and neighboring vehicles. For instance, the authors in [10] proposed a cloud-based architecture for vehicular networks to efficiently manage the computation, storage, and spectrum resources. However, the proposed architecture covers the standard vehicular data, e.g., navigation and surveillance. The authors in [11] proposed a decentralized clustering of vehicles near the traffic signals to alleviate the load from the cloud server. However, they did not consider the edge server in their V2I architecture. The authors in [12] proposed a task scheduling scheme for vehicular clouds. They developed a polynomial-time approximation scheme for single-task scheduling. However, this work is limited to only a single task scheduling with the cloud server. The authors in [13] proposed a joint cloud and MEC-based task offloading scheme for the vehicular network. They adopted a game-theoretic approach for the task offloading decision and the Lagrange multiplier method for resource allocation. However, the authors did not consider the task of offloading to the neighboring vehicles. The authors in [14] proposed a task handover scheme to the cloud server for the vehicles, which are leaving the network without completing the task. The cloud-based computation schemes lack to meet the latency requirements of time-intensive tasks. To address this challenge, edge server-based task offloading for vehicular networks has been proposed [15], [16], [17], [18], [19]. For instance, the authors in [15] proposed a MEC and a backup computing server-based task offloading scheme for vehicular networks. They devised a Stackelberg game for the multilevel offloading of vehicular tasks to maximize the utilities of edge servers and mobile users. The authors in [16] exploited edge computing to design a resource-sharing scheme among the vehicles. In the proposed two-stage mechanism, the resource requirements from nearby vehicles are gathered by the edge server to compute the optimal prices, and then resource allocation according to the task requirements is performed in the second stage. The authors in [17] proposed a scheme for the efficient placement of an edge server at an optimal location in an urban environment to meet the computational and latency requirements of vehicles. The authors in [18] proposed an energy management scheme for cellular users in vehicles to offload their workload to MEC. They formulated the optimization problem to minimize power consumption under latency constraints and power budgets and solved it using ADMM. However, they did not consider the allocation of computing resources for each device in their formulation. The authors in [19] devised a contract and matching-based resource allocation scheme in vehicular fog networks. They designed a contract-based incentive mechanism to increase the BS utility.

B. V2Vs-ASSISTED MULTI-ACCESS EDGE COMPUTING
A number of works have investigated the collaboration among the vehicles for content delivery and task allocation [20], [21], [22], [23], [24], [25], [26]. For instance, the authors in [20] proposed a task allocation scheme in which a generated task by a vehicle is allocated to the neighboring stationery and mobile fog nodes. They also performed experimental analysis for different mobility settings of the network. The authors in [21] proposed a probabilistic task prioritizing scheme in which the contents in the other vehicle are estimated beforehand. However, the scope of this work is limited to content sharing only. A similar content dissemination scheme is proposed in [22] where advertising content is broadcast to all vehicles in an urban area by exploiting the V2V communication. To further reap the benefits of available resources in a vehicle, a contract-based scheme is proposed in [23] to incentivize resource-sharing vehicles. The work in [24] also proposed a contract-based task allocation scheme among the vehicles where the participating vehicles are encouraged to maintain a relative acceleration to guarantee task completion. The authors in [25] proposed a communication and computation resource management scheme for autonomous vehicles. However, the scope of this work is to handle the propulsion and control of autonomous vehicles only. The authors in [26] proposed a task offloading scheme in a vehicular fog network where tasks of different priority are handled accordingly.
The works mentioned above have not investigated the power control and interference management problem for V2V communication, which significantly affects V2V, V2I communication, and task offloading. Therefore, in this work, we combine communication which is resource block allocation, computation which is computational resource allocation, and control which is task offload decision, power control, and interference management.

III. SYSTEM MODEL
As illustrated in Fig. 1, we consider a vehicular network that consists of a MEC server and two sets of EVs; O = {1, 2, . . . , O} is a set of resource-constrained EVs (SEVs); and D = {1, 2, . . . , D} is a set of EVs which have available resources to assist the resource-constrained EVs (DEVs); and a Road Side Unit (RSU) enabled MEC (REC). In this work, we assume that EVs are traveling on the road under the coverage radius of the RSU. Each EV i ∈ O has a latency-sensitive computation task A i that can be expressed by a positive tuple A i = (S i , C i , δ i ), where S i is the task size, C i is the CPU cycles per second per bit that is requires to compute a unit data of the task, and δ i is the worst case execution of the task. For instance, EV passengers are using onboard infotainment services, and some of the requested content is missing in its cache storage. However, it has similar content which the requested one but is stored in a different format, i.e., the requested content is 720p, and the cached content is 360p. Thus, EV needs to transform cached content into the requested format by using a certain method such as transcoding, low-resolution, or supper-resolution [8]. In this case, the size of task S i is the size of cached content, C i is the CPU requirements to transform the cached content to the requested one, and δ i is the maximum latency. Due to the limited computation capacity of the EV and the latency constraint of the tasks, it is challenging for the EV to compute its tasks locally. Therefore, EVs need to offload a fraction of the task or the complete tasks to the associated RSU via wireless links to perform remote computing. However, the RSU might be overloaded due to the high number of tasks offloaded by the EVs. Therefore, we propose a hybrid offloading system model in which EVs are allowed to offload their associated tasks either to the MEC server or another close vicinity EVs that are not resource-constrained. To cope with this challenge, we propose a hybrid offloading system model in which EVs are allowed to offload their associated tasks either to the MEC server or another close vicinity EVs that are not resource-constrained.

A. EV MODEL
For simplicity we denote EV i ∈ O as source EV (SEV) and EV j ∈ D as destination EV (DEV), and the set of all EV in the system as K = O ∪ D. Inspired by our previous work [24], we extend the mobility modeling of EVs as follows. In this work, we assume that EVs are moving with a positive velocity denoted as v k , ∀k ∈ K, v k [t] denotes the instantaneous velocity at time t, and initial location l k , and φ k [t 0 ] represents the initial longitude, and latitude of EV k at time t 0 , respectively. Longitude ϕ k represents the location, and latitude φ k represents the lane shifting of an EV k. Let v i∈O [t 0 ], v j∈D [t 0 ] be the instantaneous velocity of SEV, and DEV at time t 0 , respectively. Similarly, let a i [t 0 ], and a i [t 0 ] be the acceleration of SEV, and DEV at time t 0 , respectively. Based on the kinematic equation, we can measure the location of any EV k ∈ K after some time duration t = t − t 0 as follows: Based on (1), the relative distance between a pair of SEV and DEV, e.g., i ∈ O, j ∈ D at time t is given by: Note that, the mobility of an EV affects the performance of the offloading process due to the availability of a pair in the communication range of V2V denoted as d max . Therefore, it is indispensable to consider the Relative Acceleration (RA) between SEV and DEV. In this paper, we assume that SEV and DEV are moving in the same direction, and thus, RA of SEV and DEV can be modeled as follows: Therefore, the relative distance between any pair of EVs after some time duration t can be measured at follows: For instance, let t be the offloading time period, during this time, the relative acceleration between the SEV and DEV is significantly large resulting in a larger distance between them. This will then hinder the performance of the offloading process due to violation of the maximum range of V2V The SEV and DEV will not be able to communicate with each other, thus, the offloading service will be interrupted. Next, we present the communication model for EVs.

B. COMMUNICATION MODEL
This subsection presents our communication models that include communication between SEVs and the RSU, and the communication between SEVs and DEVs. Similar to our work in [8], [24], we consider Long-Term Evolution (LTE) and the fifth generation (5G) based communication technologies in this work. The LTE or 5G has higher stability than Dedicated short-range communications (DSRC)/IEEE802.11p in terms of bandwidth features suiting the purpose of the task offloading service as opposed to the other technologies.Then, we assume that the total communication system bandwidth W is divided into β resource blocks (RBs), each of bandwidth W b∈β . To begin with, we present the communication model between the SEV and the RSU in which the SEV's task is offloaded to the RSU using the vehicle-to-infrastructure (V2I) communication followed by the resource-constrained SEV offloading its task to close vicinity DEVs via the vehicle to vehicle (V2V) communication.

1) SEV TO RSU COMMUNICATION VIA V2I
In this case, the communication takes place between a SEV and the RSU. Thus, the signal-to-interference-plus-noise ratio (SINR) of a SEV i is given by: where p i,0 and g i,0 are the transmit power, and channel power gain between SEV i and the RSU, respectively. d i,0 is the distance between SEV i and RSU, α is path-loss coefficient.
i is the interference from other SEVs that use the same RB b, b is the set of SEVs that are allocated the same RB b. I 0 is the Additive Gaussian White Noise (AGWN). Next, we describe the scenario of SEV to DEV communication.

2) SEV TO DEV VIA V2V
In this case, the communication takes place between SEV i and DEV j. Thus, the SINR of EV pair (i, j) is given by: where p b i,j and g b i,j are the transmit power, and power channel gain between SEV i and DEV j, d i,j is the distance between SEV i and DEV j. p b 0 g b 0,i is the interference from SEV that communicate with RSU using the same RB b.
Let ζ be the association decision variable with each element ζ b i representing if the RB b is either assigned to SEV i or not.
Consequently, the achievable data rate of SEV i under both scenarios can be formulated as follows: Note that, we consider the relative distance between EV at initial slot t = 0, and resulting time slot t = τ , thus, we omit the time slot subscription in (5), (6), and (8). Next, we present the computing model of our work.

C. COMPUTING MODEL
In this section, we present the computation model. In our work, the computation of a task can be performed either locally at the SEV or remotely by offloading the task. Next, we present both scenarios of computations. VOLUME 10, 2022

1) LOCAL COMPUTING MODEL
In our model, we assume that each SEV i ∈ O is also equipped with a small computing server that can provide some light computing services. Let x i be the decision variable indicating whether SEV i can execute the task locally or not.
Moreover, we assume that the computational resource of the SEV is also limited and represented by H max i (CPU cycle per second). Thus, the EV has to guarantee the efficiency of computing capacity abiding by the following constraint:

2) REMOTE COMPUTING MODEL
In the remote computation model, we consider a hybrid offloading in which SEV i ∈ O is either offloading to DEV j ∈ D or MEC server. Therefore, we have two scenarios of offloading: i) V2V offloading; ii) V2I offloading. Next, we define each scenario of offloading.

a: V2V OFFLOADING MODEL
Let y i,j be the offloading decision variable of SEV i to DEV j.
In our model, if the computational resources of SEV i is insufficient, it can offload the task to close vicinity DEVs via V2V links. On the other hand, the DEV j ∈ D also has a limit on computing and energy capacity. Thus, DE j also needs to guarantee the computational capacity H max j and energy capacity E max j in order to handle the offloading task of SEV i. Then, the following constraints need to be considered for successful task offload and execution. For the energy constraint: where h i,j is the computational resources that DEV j allocates to process the computing task of SEV i. Similarly for computational capacity constraint: In this case, SEV i is offloading computing task A i to the RSU. We assume that the RSU has to handle all of the offloading tasks of EVs. However, the latency depends on the arrival rate of the demand. The higher the demand, the more increase in latency. Moreover, the RSU is using grid electricity, therefore, we do not have the energy constraint in the case of the V2I offloading model. Then, let z i be the decision variable for the computing task of SEV i.
The RSU's computational capacity constraint can be formulated as follows: Next, we discuss the energy and latency models in the following subsections.

D. ENERGY MODEL
Firstly, we consider the case of local energy consumption of SEV i. In the case of processing its local computing, SEV i needs to consider its energy capacity constraint given by: where κ = 5.0 × 10 −27 is a constant which depends on the chip architecture of the server at SEV, h i is the computational resource that SEV i allocates to process the task A i . And, the required transmission energy when SEV i offloads its task to DEV j is given by: Similarly, the energy consumption when SEV i offloads its task to the RSU is given by: Next, we define the energy consumption of DEV j. The total energy consumption of DEV j is calculated based on the total computing task of SEVs that are being executed at its server. Thus, the energy consumption of DEV j is given by: Consequently, the energy constrain for any EV k ∈ K is given by where E base k is the base load energy of EV k.

E. LATENCY MODEL
In this work, we assume that the output of a computing task in terms of task size is always smaller compared with its input size. Therefore, it is negligible in terms of latency impact on feedback the results from DEV to SEV [24]. The latency in our model considers both transmission and computation latency. Communication latency of SEV i: Similarly, the latency for remote computing at neighbor DEV be given as: If the computational resources of SEVs and DEVs are insufficient. The task is forwarded to the RSU. Let L comp i,0 be the computing latency at RSU. L comp i,0 is represented as follows: Consequently, the total latency of a computing task of SEV i can be formulated using the following: On the other hand, we also consider the mobility of SEVs and DEVs in order to guarantee the success of offloading services while moving. Therefore, the latency is bound to either the worst-case execution of offloading task or the time that SEV and DEV are moving out of the acceptable communication range d max . Consequently, let τ i,j be the maximum latency threshold for EV pair i, j. τ i,j can be modeled as follows: Intuitively, the V2V offloading latency is bounded using the following constraints: As shown in (26), if the relative acceleration between SEV i and DEV j is too high, thus, the minimum latency is strictly low. Consequently, DEV j must allocate more computational resources to guarantee the feasibility of latency constraint in (27). As a result, total energy consumption is significantly increasing. Therefore, we consider mobility as a constraint in our optimization problem to guarantee the feasibility of our solution. It must be noted that, in practice, an EV's velocity varies over time, which might lead to the problem of interruption due to inter EV's distance exceeding the maximum acceptable range d max for V2V communication. One viable solution is that both SEV and DEV can synchronously increase or decrease their velocity. This has been done in our previous work in [24], where the RSU offers a reward to motivate SEV and DEV synchronously take the same action, such as increase or decrease velocity to keep the inner distance at an acceptable value. By doing so, we can avoid interruption during the offloading process. Next, we present our problem formulation and proposed solution approach.

IV. PROBLEM FORMULATION
The goal of task offloading is typically to minimize the total latency and energy consumption. However, there is a conflict between latency and energy consumption. For instance, to minimize latency, we need to reduce transmission latency by increasing transmit power to achieve a higher data rate; and thus, it is increasing the total energy consumption. Similarly, reducing computation latency by allocating more computational resources to process the offloading tasks increases energy for computing. To overcome this challenge, we propose an objective function that is a trade-off between energy consumption and latency. The detail of the objective function is presented in (28), as shown at the bottom of the page, where ψ is a trade-off coefficient, and is the normalization parameter due to the different scale of latency in milliseconds (ms) and energy in milliwatt (mW).
To the best of our knowledge, this is the first study to take into account the trade-off of latency and energy consumption minimization problem in the collaborative EVs-assisted RSU-enabled MEC server, by jointly optimizing offloading decisions, communication resource allocation, power control, and computational resources allocation.
Our optimization problem is formulated as follows:  p, h, x, y, z where ζ ∈ {0, 1} |β|×|O| is the RBs allocation variable, p ∈ R |O| is the transmit power variable, h ∈ R |O| is the computational resource allocation variable, x ∈ {0, 1} |O| is the decision variable local EVs, e.g., SEVs, y ∈ {0, 1} |O| is decision variable of neighboring EVs, e.g., DEVs, and z ∈ {0, 1} |O| is the decision variable of MEC. Constraint (29b) guarantees that an EV is allocated in at most one RB b. Constraint (29c) represents that the transmitting power level of EVs does not exceed the maximum transmit power level. Constraint (29d) guarantees the QoS for a SEV with a minimum achievable data rate threshold R min . Constraint (29e) represents the protection of the RSU's user that is allocated in RB b with maximum interference threshold I max b . Constraints (29f), (29g), and (29h) are computational capacity constraints of SEVs, DEVs, and RSU, respectively. Similarly, constraints (29i) and (29j) are the energy constraint of SEVs and DEVs, respectively. Constraint (29k) represents the upper bound of latency with L max i while the constraint (29l) is representing latency constraint concerning mobility between SEV i, and DEV j. Constraint (29m) guarantees the success of offloading tasks. The resource allocation variable is linear in (29n) while offload decision and RB allocation variables are binaries in (29o), and (29p).
The problem in (29) is a Mixed-Integer Non-Linear Programming (MINLP) problem due to binary decision variable, e.g, x, y, z, and ζ . Thus, it falls into the NP-hard category. Obtaining a solution for such kind of problem requires a huge amount of computing resources and results in huge time complexity. Moreover, due to the huge dimension of the feasible space in problem (29), it is unsolvable via theoretical analysis, and thus, there is no optimality condition guarantee for the optimal solution. Therefore, to cope with this issue, we employ the Block Coordinate Descent (BCD) technique [27], [28] to obtain an approximate solution for the problem (29). BCD is also known as the Gauss-Seidel method, an iterative algorithm for non-convex, block multi-convex, and smooth objective functions under constraints optimization problem [27]. In such a way, the original problem is decomposed into multiple sub-problems and solved sequentially, then composed solutions to the original problem.
Intuitively, we decompose our original problem (29) into three subproblems: Resource Block Allocation problem (RBA), Power Control problem (PCP) for Vehicle-to-Vehicle (V2V) communication and EVs offload decision problem (ODP).
Then, these decomposed subproblems provide us the flexibility through which they can be either bi-convex, e.g., PCP problem, or transformed into convex problems, e.g. ODP, and solved alternatively. In which, solutions of RBA and PCP are exchanged with each other to obtain a stationary solution. Then, the final results of RBA and PCP are input for the ODP problem.
Next, we present our proposed solution approaches.

V. PROPOSED SOLUTION APPROACHES
This section presents our solution approach in which we decompose and solve the aforementioned problems. To begin with, we derive the solution approaches for RBA and PCP that couple with each other. Then, we design the solution approach for ODP problem based on the output of RBA and PCP. Our proposed approach is sequentially updating the solution at each EV and exchanging it with the others until each reaches a stationary solution. This can be done by fixing two blocks and solving the remaining block. This proposed algorithm is alternatively processed until reached a stationary solution. Furthermore, we have concrete our proposed model with the convergence condition in [27] and [28]. Therefore, it always exists at least a stationary solution. The detail of these processes is described in Fig. 2. Moreover, our approach aims to obtain solutions in a distributed manner. In such a way, each EV makes a decision locally and exchanges it with others. Therefore, in order to aggregate the solution of EVs, the RSU is assumed to be the global controller, where decisions of EVs are exchanged and balanced via some auxiliary variables [29], [30]. Furthermore, to successfully exchange this information, we assume that EVs are able to communicate with the RSU via wireless links. Moreover, the resources allocation variable h is binding as constraint in (29f), (29g), and (29h), and is considered as a projection function for the feasible solution [8].
Next, we present our solution approach for the first block RBA.

A. RESOURCE BLOCK ALLOCATION PROBLEM (RBA)
In this subsection, we present a solution approach for the RBA block, while fixing the other two blocks, e.g., PCP and ODP. For a given transmit power levels vector p, EVs offload decision x, z, and DEVs decision y, the RSU have to allocate RB for EVs that maximize the total achievable data rate of RSU users (RUEs) and V2V users (VUEs). In which, RUE and VUE are the set of SEVs that preferred to offload to the MEC or offload to nearby DEVs, respectively. The RB allocation for RUE has been proposed in many existing works [31], [32], [33], [34], [35]. Moreover, the task transmission scheduling has been considered in [36], [37], and [38]. Therefore, in this work, we focus more on the VUEs resource allocation problem. Let S be the set of SEVs that preferred to use V2V offloading. The optimization problem for V2V resource allocation can be formulated as follows: The problem in (30) falls out as a combinatorial problem due to the binary variable ζ . Therefore, it needs to use an alternative algorithm to solve this optimization on the RSU side. Based on the proof of convergence using a sub-gradient based technique in [39] and [29]. We propose an algorithm based on duality theory to solve RBA in (30). The detail of the algorithm is stated in Alg. 1.

B. POWER CONTROL PROBLEM FOR V2V OFFLOADING (PCP)
For a given RB b allocated to EV i, EV i has to carefully choose a transmit power level by considering the interference effect on RSU's users and other V2V users that use the same RB b. The optimization problem can be formulated The RSU updates ζ i,b for SEV i and dual variable γ i,b as follows: 5: Finding the optimal RB index for each SEV: RB allocation decision: The RSU updates the dual variable according to stepsize θ 8: until |θ (t+1) − θ (t−1) | ≤ S ; 9: Then, set ζ as the desired solution.
as follows: The PCP problem is non-convex nor concave due to the properties of the objective function (5), and (6). Therefore, we approximate the objective function of problem PCP into an equivalent function as follows: where α is a trade-off coefficient between transmit power and achievable rate in an RB. Then, the problem PCP can be rewritten as follows:

Lemma 1: The problem PCPE is a bi-convex problem.
Since PCPE is a bi-convex problem. It always exists at least a stationary solution. Therefore, we have derived the general form of solution for (36) in the following proposition.
Proposition 2: According to the Karush-Kuhn-Tucketer (KKT) conditions [29], the optimal solution of transmit power level for EV i for PCPE is as follows: Proof: Please refer to appendix. Based on aforementioned lemma, and proposition, we now apply dual decomposition method to alternatively get a approximate solution [29] for PCPE stated in (36). The detail of the proposed algorithm is described in Alg. 2.

4:
After receiving the transmit power level of all SEVs, the RSU updates the dual variable as followings: 5: After updating all of the variables, the RSU then informs all SEVs by broadcasting the value of dual variables. 6: until |p (t+1) − p (t) | ≤ p ; 7: Then, set p as the desired solution.

C. SEV OFFLOAD DECISION PROBLEM (ODP)
For a given RB allocation ζ , and transmit power level p the ODP can be formulated as follows: The problem in (39) falls into the combinatorial category due to the binary variables x, y and z. Therefore, it is an NP-hard problem. In such a case, obtaining solution for ODP is time consuming and intractable. Thus, in order to solve ODP, we firstly relax the binary variables into continuous variables. Note that this yields an interesting scenario in which the task now can be offloaded distributively between DEVs and RSU, thus, forming partial offloading between the remote servers.
In other words, a part of the task can be processed at DEVs and the remaining parts are processed at the RSU. Intuitively, we reformulate the problem ODP to an equivalent problem ODPE as follows: The problem in (40) turns out to be convex due to linear objective, and either linear or close convex set constraints [29]. However, due to the coupling constraint (39i), it is required an alternative method to obtain the solution for ODPE. Therefore, we apply ADMM [30], to obtain the solution for ODPE. Firstly, we define a feasible set of solutions at each SEV, DEV, and RSU, respectively, which aims to reduce the number of information exchanges between EVs, and RSU. By taking the constraint that respects each EV such as computational capacity, and energy capacity. Let i be the feasible set of SEV i. i is defined as follows: Similarly, let j be the feasible set of DEV j. j is defined as follows: Finally, the feasible set of the RSU 0 is defined as follows: Consequently, the problem in (40) can be rewritten as follows: where 1 is a -vector with all elements equal to one. Following the ADMM method, we can drive the augmented Lagrangian function of the problem in (44) as follows: where || · || 2 2 is the norm-2 squared, λ is a Lagrangian multiplier of the constrain (44b), and ρ is any positive number considered as a penalty term for the Lagrangian function. By taking the partial derivative w.r.t. each variables x, y and z, based on the result of [29]. The solution of ODPE can be obtain by sequentially updating each primal and dual variable. The problem ODPE is always guaranteed an optimal solution due to the convexity of F(x, y, z), and either linear or closed convex set constraints [29]. In this work, we assume that SEV i will be the first one who makes the decision for offloading and informing its neighbors. Next, after receiving the decision of SEVs, DEVs are going to make decisions w.r.t to its feasible set and feedback on the result to SEVs, and RSU. The RSU will now have the information about SEVs and DEVs decisions. Then, it might make a decision to accept and process the task or not. Then, it will update the dual variable λ. The detail of updating scheme is stated as follows. Each SEV i ∈ O in parallel update the primal variable x as follows: Each neighbors EV j ∈ O update its decision y j∈D paralelly according to (47) 5: The RSU update the value of its decision z (t+1) according to (48), and Lagrangian multiplier λ according to (49) ; 6: The RSU and Neighbor EVs feedback the information about its decision to EV i; 7: After receiving the information about the neighbors and RSU, the EV i then update the dual Lagrangian variable according to (49); 8: || ≤ dual ; 10: Then, set x * , y * , z * as the desired solution.
After receiving the information of SEVs, neighboring DEVs j ∈ D will update the variable y j as follows: Finally, the RSU will make decision and update dual variable and then broadcast it to all EVs in the system. The update primal variable of RSU is given as: and the update of dual variable λ is given by: The detail of proposed algorithm is stated in Alg. 3. Based on the aforementioned solution approach, we then integrated them together in order to compose the solution equivalent problem of the problem stated in (29). The detail of the proposed algorithm is presented in Alg. 4. Algorithm 4 BCD-Based Algorithm for Joint Communication, Computation, Interference Management for Vehicle-Assisted MEC 1: ← 0, and ρ = 1.0, bcd = 1e − 4; 2: repeat 3: t ← t + 1; 4: Observe x (t+1) , y (t+1) , z (t+1) by solving ODP 5: Observe ζ t+1 by solving RBA 6: Observe p t+1 by solving PCP 7: until , ζ (t) )| ≤ bcd ; 8: Then, set x * , y * , z * as the desired solution.

VI. NUMERICAL RESULTS
In this section, we evaluate the performance of our proposed algorithm in the considered collaborative EV-assisted MEC system. The proposed system model aims to use parallel processing. However, due to the limitation on physical devices, we evaluate our proposed framework on a single computer with specifications: Intel Core i5-4690, 16 (GB), GPU GTX 1060 -3(GB). We use Python3.8 as our simulation tool combined with CVXPY.

A. SIMULATION SETUP
In order to demonstrate the numerical results for our proposed approach, we choose a network consisting RSU-enabled MEC server with a computational capacity of 3.9 (GHz). We let the number of SEVs be in the range [10 ∼ 40], and the number of DEVs is in the range [5 ∼ 20]. Each SEV has a task to offload which represents a tuple containing the task's size is random in the range [100.0 ∼ 500.0] (MB) with the median at 265.5 (MB) and mode at 271.5 (MB). Similarly, the CPU requirement of the task is random in range [1.0 ∼ 4.0] (kHz) with median at 2.2 (kHz) and mode at 2.5 (kHz). The location of EVs is assumed to follow the Homogeneous Poison Point Process (HPPP) in this work. The main parameter is presented in Table. 2.
Furthermore, in our simulation, we set the convergence criteria of each algorithm at 10 −4 , and the acceptable convergence rate of a primal variable at 10 −3 [8]. Moreover, there is no existing real dataset to demonstrate the practicality of our approach and limitation on physical devices to deploy a test-based performance evaluation, we can only provide comprehensive numerical results by taking multiple runs such as at least 50 runs per result in our works, where input data are totally random for each run, and the final results are taking the average value.

B. PERFORMANCE BENCHMARKS
In this paper, we compare our proposed Alg. 3 which deployed in distributed manner with below mentioned baseline schemes named as Greedy Approach, Exhaustive Search, and Centralized. The summarization of these schemes is as follows: Greedy Approach(GA): This approach required the information of all EVs to be available at the RSU server which can solve (39) in a centralized manner. In such a way, the RSU is using the best first search strategy to make decisions for each EV. Furthermore, the solution is mostly achieved as a locally optimal solution but has a huge gap compared to the global optimal. In some trivial cases, the greedy approach might achieve an optimal solution. This approach has an O(N 2 ) complexity.
Exhaustive Search(ES): Similar to the GA approach, ES requires the information of all EVs at the RSU side to solve the problem in a centralized manner. The RSU might try to search all of the possible solutions that satisfy all of the constraints and conditions posed in (39). It always guarantees the globally optimal solution for MINLP but is time-consuming and computationally intensive. Moreover, the original problem in (29) is NP-hard, thus, the ES scheme could not obtain the optimal solution on a large-scale setting in polynomial time. Therefore, to quantify the gap between the optimal and proposed solution, we have taken a small-scale network to compare our proposed approach with the optimal solution, where the number of DEVs in the range of [10 ∼ 20], and the number of SEV in the range [10 ∼ 40].
This approach has an O(2 N ) complexity. Centralized Algorithm: This algorithm requires the RSU with complete information as inputs for solving the problem (40) in a centralized manner and has a complexity of at least O(N log(N )) [29].
It must be noted that ES and GA schemes are designed to solve the problem of MINLP state in (29), where the goal of ES is to obtain an optimal solution of our formulated problem in a strictly small scale-setting such as number of EVs is very small. Moreover, GA is a scheme that can be used to obtain a solution of a lower complexity compared to ES, where the solution is obtained via the best first search strategy. On the other hand, the Centralized, and our proposed approach are designed to solve the relaxed problem that is the convex problem state in (29) and (40). This approach requires complete information on EVs in our model such as task profiles, transmit power, EVs' velocity, location, etc.
Furthermore, our proposed approach is performed in a distributed manner which does not require complete information in any agent such as EVs or the RSU. In which, each EV makes decisions simultaneously and sent them to the RSU. After gathering all decisions of EVs, the RSU balances the decision of all EVs via auxiliary variables such as γ , and λ to avoid the violation of feasible constraints. This will incur an overhead communication of message exchange among EVs and the RSU. However, this information is typically very small in the scale of just a few bits and can be ignored, e.g., 8 + 4|O| bytes when EV send feedback to the RSU, and 12 bytes when the RSU share information to EVs.
It must be noted that our proposed approach sequentially optimizes each block in turn, where RBA will be optimized first, then optimized PCP, and ODP is optimized afterward. Moreover, the iteration complexity of BCD-based algorithm is O( −1 bcd (log( −1 bcd )) 2 ) [28]. Furthermore, each block have complexity of O(N ) in RBA, O(1) in PCP, and O(N ) in ODP. In the worst scenario, with the coherence time is one second, and the criteria condition bcd = 10 −4 , our proposed approach can handle up to N = 100 which is equivalent to |O| = 100 EVs to achieve the final solution.

C. NUMERICAL RESULTS
This subsection mainly focuses on the performance improvement of our proposed algorithm.

1) CONVERGENCE PERFORMANCE OF BCD-BASED ALGORITHM
The convergence of the proposed algorithm based on the BCD technique is presented in Fig. 3(a). As shown in the figure, we can see that the proposed approach achieved a stationary solution within 40 iterations. Moreover, we also observed that our proposed approach is stable after reached to the stationary without any fluctuation. On the other hand, we verify the convergence rate of the BCD-based algorithm by capturing the residual of the objective function (28) between each iteration in Fig. 3(b). It means that with up to 40 iterations, our solution is stable without any change even if we increase the number of iterations.
Furthermore, based on theoretical analysis in [28], our proposed approach remains in the strong convexity or bi-convex category; and thus, the convergence rate is always better than the non-convex category. Therefore, our proposed approach can be deployed in large-scale settings with a significant improvement in convergence performance and reasonable for particle settings. However, to successfully deploy in a realistic environment, we need to improve our mechanism further for uncertain conditions, such as accidents, traffic jams, or natural uncertainty.

2) CONVERGENCE PERFORMANCE OF OPD
The convergence of the ODP algorithm is presented in Fig. 3(c). From the figure, we observe that the proposed algorithm has converged to the optimal solution within less than 10 iterations. In the initial state, the objective function is smaller than the centralized solution due to the violation of the constraint (39i). Moreover, the solution in earlier iterations does not satisfy the stopping conditions pri and dual , thus, the algorithm keeps repeating. Therefore, when the number of iterations is increasing up to 10, our proposed approach achieved the same performance with the Centralized scheme due to the convexity of problem (40). This convergence always guarantees a stationary point which is known as the globally optimum point for problem ODP.

3) CONVERGENCE PERFORMANCE OF PCP AND RBA ALGORITHM
The convergence of the PCP and RBA algorithm is presented in Fig. 4(a), and Fig. 4(b), respectively. For a better visualization in a small figure, we set the number of V2V pairs equal to 6. Indeed, the proposed approach can operate on a  large scale since our proposed method is based on gradient theory and the convergence rate is dependent on the property of the objective function and constraints. We can see that our proposed approach achieves a stationary solution at most after 10 iteration for both algorithms while they couple each other. This algorithm is stable since the solution does not fluctuate after getting to the stationary point. On the other hand, we have to also capture the effect of our proposal in dense settings, therefore, we only choose to have 15 RBs [31], [40]. By setting the maximum interference experienced by RUE, I max b = {−80.0, −100.0, −200.0} (dBm), explicitly. We can see that the system still achieves the highest achievable data rate at I max b = −80.0 (dBm) due to the tight protection for RUE. In such a case, every V2V user must carefully control its power level to keep the interference of RUE as low as possible. On the other hand, the RUEs are transmitting with fixed power levels such that the average achievable rate is higher than the case of I max b = {−100.0, −120.0} (dBm) as shown in Fig. 4(c).

4) PERFORMANCE OF PROPOSED SCHEME
As show in Fig. 5, we can see that our proposed approach has achieved the same performance with Centralized approach, while outperforms the Greedy Approach, and close to the Exhausted Search which is considered as an optimal solution. Moreover, the proposed approach is higher than the optimal solution 3.5% at the number of SEVs O = 10 and 3.9% at O = 40. Meanwhile, it is lower than the Greedy Approach    Fig. 6 in which our proposed approach always achieves a performance with the lowest 2.5% and highest 6.0% compare to the performance of the Exhausted Search.

5) THE IMPACT OF TRADE-OFF VALUE ψ
The results of the aforementioned sections are conducted at ψ = 0.5. To show the impact of trade-off value on the objective value, we have varied the value of ψ = {0.0, 0.1, . . . , 1.0}. We can see that when ψ = 1.0, the objective function in (28) is focused on minimizing the total energy consumption such that the power is minimized at 49, 000 (mW) while the latency has the highest value 4, 000 (ms). Similarly, when we set ψ = 0.0 that means that the optimization is focused on minimizing the latency only. In such a case, the energy consumption is achieved at the highest 54, 000 (mW) while the latency is minimized at 3115 (ms). Thus, we choose ψ = 0.5 to balance between latency and energy consumption for our numerical results.

VII. CONCLUSION
In this paper, we propose a novel solution that minimizes and balances between latency and energy consumption. Since the formulated problem was the MINLP category, we have decomposed the original problem into three subproblems by using the BCD technique. We then proposed an algorithm based on duality theory to get the sub-optimal solution for the first sub-problem RBA. And, the sub-optimal for the second sub-problem PCP by using distributed power control based on the Lagrangian multiplier method. Especially, we have achieved a global optimum for the third sub-problem ODP. Through a comprehensive numerical analysis, the results show that the final solution of the original problem converges to the sub-optimal solution with an average gap of 5%. In addition, our proposal reduces the complexity into a polynomial complexity compared to the exponential complexity of Exhaustive Search and quadratic complexity of Greedy Approach. We have considered the mobility of EVs as a time constraint for the formulated problem as well as wireless channel aspects such as shadowing, fast fading, and interference management for offering more adequate offloading service in the vehicular network.

APPENDIX PROOF PCPE
Proof: The objective function in (36) can be rewrite as follows: Lagrangian function is given by: The derivative w.r.t. p b i is given by: By setting the first order condition equal to zero, e.g., ∂L It is equivalent to Base on (54), the optimal transmit power for EV i must satisfy the following conditions(complementary slackness): Therefore, based on the KKT conditions, the Lagrangian multiplier must be non-negative λ * 1 , λ * 2 , λ * 3 , λ * 4 0 , we can have a general form for transmit power of EV i at RB b given by: Prior to this, he worked as an Assistant Professor with the Institute of Information Security and Cyber-Physical System, Innopolis University, Russia, for three years. His research interests include applying analytical techniques of optimization, machine learning, and game theory to radio resource management for future networks. He received the Best KHU Thesis Award in Engineering, in 2017, and several best paper awards from prestigious conferences.