# Vehicular Edge-Computing Framework for Making Use of Parking and Charging Electric Vehicles
## 3 System Model and Definitions
### Delay and Energy Consumption Model  
The total delay of task offloading can be divided into two parts, which are task data transmission time and task data processing time. The time of task data transfer from the requesting vehicles (\(R_{i}\)) to the edge server is denoted as \(T_{i\
u}^{t}=\frac{q_{i\
u}}{r_{\
u}}\), and the time of task data transmission to the ECP is denoted as \(T_{i\epsilon}^{t}=\frac{q_{i\
u}}{r_{\epsilon}}\), where \(r_{\
u}\) and \(r_{\epsilon}\) denotes the data transmission rate from the requesting vehicle to the edge server and the ECP, respectively. The time of the ECP to assign the computation subtasks to the parking vehicles (\(P_{j}\)) is denoted as \(T_{ij}^{t}=\frac{q_{i\
u}}{d}\), where \(d\) is the data transmission rate between the ECP and the parking vehicle.  
For any computation task, the processing time is related to the volume of task data. Then, the task processing time of the edge server can be expressed as \(T_{i\
u}^{c}=\frac{q_{i\
u}}{c_{\
u}}\), where \(\alpha\) is the number of CPU cycles for unit data processing, and \(C_{\
u}\) is the data volume processed by the edge server in every unit time. Correspondingly, the task processing time of the parking vehicles in the ECP can be expressed as \(T_{ij}^{c}=\frac{q_{i\
u}}{c_{\
u}}\), where \(C_{\
u}\) denotes the computing capacity of the \(j\) parking vehicle. Since the data volume of the result is small, the return time of the computation result is ignored in this paper. Therefore, the delay for the requesting vehicle offloading task to the edge server and the ECP can be expressed as \(T_{i\
u}\) and \(T_{ij}\):  
\[T_{i\
u}=T_{i\
u}^{t}+T_{i\
u}^{c}=\frac{q_{i\
u}}{r_{\
u}}+\frac{\alpha q_{i \
u}}{c_{\
u}}, \tag{1}\]  
\[T_{ij}=T_{i\epsilon}^{t}+T_{ij}^{c}+T_{ij}^{t}=\frac{q_{i\epsilon}}{r_{ \epsilon}}+\frac{qq_{i\epsilon}}{c_{\
u}}+\frac{q_{i\epsilon}}{d}. \tag{2}\]  
As far as the energy consumption is concerned, the energy consumption of ECP is mainly for assigning the computation subtasks to the parking vehicles, which can be defined as:  
Figure 2: Task offloading steps in parking vehicles assisted edge computing.  
\[E_{ie}^{d}=\sigma\frac{q_{ie}}{d}, \tag{3}\]  
where \(\sigma\) denotes the task assignment energy factor of the ECP.  
The energy consumption for data transmission includes the transmission consumption from the requesting vehicle to the edge server and the ECP, respectively, which are defined as \(E_{iv}^{t}\) and \(E_{ie}^{t}\):  
\[E_{iv}^{t}=\rho T_{iv}^{t}=\rho\frac{q_{iv}}{r_{o}}, \tag{4}\]  
\[E_{ie}^{t}=\rho T_{ie}^{t}=\rho\frac{q_{ie}}{r_{e}}, \tag{5}\]  
where \(\rho\) is the energy consumption coefficient of data transmission for the requesting vehicles.  
After receiving the task data, the edge server and the ECP perform task execution and return the results to the requesting vehicles. Since the energy consumption of data reception is much smaller than the energy consumption of data transmission, the data volume of the result is small. Therefore, in this paper, we do not consider the energy consumption of data reception and the energy consumption of returning the results. Consequently, the energy consumption of the edge servers and the parking vehicles can be expressed as  
\[E_{iv}^{c}=\phi T_{iv}^{c}=\phi\frac{\alpha q_{iv}}{c_{o}}, \tag{6}\]  
\[E_{ij}^{c}=\phi T_{ij}^{c}=\phi\frac{\alpha q_{ij}}{C_{je}}, \tag{7}\]  
where \(\phi\) denotes the energy consumption factor for task processing.