# Vehicular Edge-Computing Framework for Making Use of Parking and Charging Electric Vehicles
## 3 System Model and Definitions  
### System Model  
Considering the full use of resources in vehicles, we propose a VEC framework based on software defined network (SDN) [22], which is shown in Figure 1. The framework includes requesting vehicles, roadside units (RSUs), VEC servers, parking vehicles, and the edge crowdsourcing platform (ECP). (1) Requesting vehicle: requesting vehicles are those vehicles that need to offload some of their computing tasks to the edge nodes. The requesting vehicles offload some computing tasks to the edge servers and the ECP via RSUs, while they should pay the service providers for the computation offloading. (2) VEC server: VEC servers are the edge servers deployed on both sides of the road and communicate with requesting vehicles via RSUs. When the requesting vehicles offload the computation task to the VEC server, the VEC server will allocate the resources to complete the task and return the computation results to the requesting vehicles. Providing computation services for requesting vehicles, the VEC servers can obtain the payment from the requesting vehicles. (3) Edge crowdsourcing platform (ECP): ECP aims to gather parking electric vehicles and use the idle resources of parking vehicles for VEC. The ECP can provide charging management services for the vehicles in the parking lots, meanwhile act as a crowdsourcing platform to assign computing tasks to parking vehicles. Since the number of parking vehicles is large at any time in a city, the ECP can integrate the efficient computing resources for VEC, which ensures that the ECP can continuously and steadily provide computing services for requesting vehicles. As the service provider, the ECP can obtain the reward from the requesting vehicles. Obviously, the computation task is finally undertaken by the parking vehicles elected by the ECP, and the ECP should pay the task undertaking vehicles the corresponding rewards. (4) Parking vehicles: in this paper, the parking vehicles are those charging electric vehicles in parking lots. In the actual situation, since the charging vehicles have idle computing resources and they will keep static for some time, those vehicles can provide cost-effective computation services for other vehicles. Parking vehicles can join the ECP voluntarily and can use their idle resources to process the tasks assigned by the ECP during the charging process, and finally receive the corresponding rewards. (5) Software-defined network (SDN): It is an implementation of network virtualization, separating the control plane of network devices from the data plane, controlling the behavior of SDN devices through the standardized interface protocol of OpenFlow, and making decision analysis according to user requirements. Based on SDN technology, the SDN controller can collect information of the requests from vehicles and the status of edge servers and the ECP, then make the optimal schedule of the global computing resources including the edge servers and the ECP. The proposed algorithm can be run in the SDN controller to find the strategies for the requesting vehicles, edge servers, and the ECP, then they can cooperate to achieve their maximized utilities. As is shown in Figure 1, some RSUs are deployed on both sides of the road, and each RSU is integrated with an edge server, and all servers, the ECP and SDN controller, are connected in a backbone network. The vehicles can access the edge servers and the ECP via RSUs or charging piles. It is supposed that there are \(n\) requesting vehicles within the communication range of RSUs, and the requesting vehicles are denoted as \(R_{i}(i\in[1,n])\). A computation task from the requesting vehicle can be denoted as \(A_{i}=\{Q_{i},q_{ix},q_{ix}\}(i\in[1,n])\), where \(Q_{i}\) denotes the total task size which may be the data volume to be processed, the \(q_{ix}\) denotes the task size offloaded to the VEC server, and \(q_{ix}\) denotes the task size offloaded to the ECP.