## 5 Methodology
### Max-Min Fairness Oriented Offloading Approach  
The core of the offloading decision is to determine how much proportion of the task can be offloaded to a vehicle given the vehicle's physical conditions. In other words, it is important to find out the maximum volume of computation tasks that a vehicle can handle, so as to guarantee that the final offloading decision is feasible. After that, the decision can be adjusted based on the above-proposed pricing model, under the constraint of the maximum acceptable offloading proportion of each vehicle. As mentioned above, the task offloading between the UV and an SV is completed only when the UV has received the calculation result from the SV. As a result, the UV and the SV must keep the connection between them alive the whole time. Thus, the problem of solving the maximum acceptable offloading proportion of a vehicle is transformed into the problem of determining the achievable communication time between these two vehicles. Denote the achievable communication time between \(u_{0}\) and \(sv_{j}\) as \(T_{uj}^{ser}\), given the deadline constraint on the task as \(T_{0}^{max}\), \(T_{uj}^{serv}=min\Big{\{}T_{uj}^{link},T_{0}^{max}\Big{\}}\), where \(T_{uj}^{link}\) is the time duration of the communication link established between \(u_{0}\) and \(sv_{j}\). Assume that \(u_{0}\) sends out the task offloading requests to its neighboring vehicles at time \(t_{0}\), the communication radius of a vehicle is \(r\), and the time slot when the connection between \(u_{0}\) and \(sv_{j}\) is disconnected is denoted as \(t_{uj}^{break}\), thus, \(T_{uj}^{link}=t_{uj}^{break}-t_{0}\). Assume that vehicles drive in straight lines during the offloading, and overtaking is not allowed. Given the mobility model, the horizontal location update of a vehicle \(sv_{j}\) in each time slot can be calculated as follows:  
\[ \begin{split} x_{j}(t+1\cdot\Delta t)&=x_{j}(t)+v_ {j}(t)\cdot\Delta t,\\ x_{j}(t+2\cdot\Delta t)&=x_{j}(t+1\cdot\Delta t)+v_ {j}(t+1\cdot\Delta t)\cdot\Delta t,\\ &\ldots\\ x_{j}(t+n\cdot\Delta t)&=x_{j}[t+(n-1)\cdot\Delta t]\\ &\quad+v_{j}[t+(n-1)\cdot\Delta t]\cdot\Delta t.\end{split}  \tag{17}\]  
Therefore, the driving distance of \(sv_{j}\) in \(n\) time slots can be expressed as follows:  
\[x_{j}(t+n\cdot\Delta t)=x_{j}(t)+\sum_{q=0}^{n-1}v_{j}(t+q\cdot\Delta t)\cdot \Delta t. \tag{18}\]  
Thus, starting from time slot \(t_{0}\), the distance between \(u_{0}\) and \(sv_{j}\) after \(n\) time slots can be expressed as in Equation (19). \[ \begin{split} d_{uj}(t)&=\sqrt{\big{[}x_{j}(t)-x_{u }(t)\big{]}^{2}+\big{[}y_{j}(t)-y_{u}(t)\big{]}^{2}}\\ &=\sqrt{\left\{\left[x_{j}(t_{0})+\sum_{q=0}^{n-1}v_{j}(t_{0}+q \cdot\Delta t)\cdot\Delta t\right]-\left[x_{u}(t_{0})+\sum_{q=0}^{n-1}v_{u}(t_ {0}+q\cdot\Delta t)\cdot\Delta t\right]\right\}^{2}+\big{[}y_{j}(t_{0})-y_{u} (t_{0})\big{]}^{2}};\\ \sqrt{\left\{\left[x_{j}(t_{0})+\sum_{q=0}^{N-1}v_{j}(t_{0}+q \cdot\Delta t)\cdot\Delta t\right]-\left[x_{u}(t_{0})+\sum_{q=0}^{N-1}v_{u}(t _{0}+q\cdot\Delta t)\cdot\Delta t\right]\right\}^{2}+\big{[}y_{j}(t_{0})-y_{u} (t_{0})\big{]}^{2}}>r.\end{split}  \tag{19}\]  
Assume that the connection between \(u_{0}\) and \(sv_{j}\) is disconnected at the \((N-1)^{th}\) time slot, then we have the inequality in (20). According to the car-following mobility model, the speed change of a vehicle in each time slot is uncertain, and it is impossible to accurately calculate \(N\) in Formula (20). To make the solution feasible and applicable, we calculate the lower bound of \(N\) in the worst-case scenario and define \(t_{uj}^{break}=\lfloor N\cdot\Delta t\rfloor\). Applying Equations (4)-(6) together, the maximum acceptable offloading proportion of vehicle \(sv_{j}\) can be calculated as follows:  
\[O_{j}^{max}=\frac{T_{uj}^{serv}}{D_{0}\cdot\left(\frac{1}{R}+\frac{G_{0}}{J_{j} }\right)}. \tag{21}\]  
Now that we have the maximum acceptable offloading proportion of each neighboring vehicle of \(u_{0}\), we can find the optimized offloading decision as follows.