## 4 Edge Computing Offloading Method in Internet of Vehicles
### Uninstallation Ratio and Resource Allocation  
The analysis of optimization objective function P1 shows that constraint (8) is an integer variable, and other constraints are non-convex, so problem P1 is an NP problem that is difficult to solve directly [24]. Firstly, the problem is simplified. The integer constraint in the optimization objective is the key to the complexity of the problem. Here, it is relaxed into a continuous variable [25], that is, the discrete variable \(\eta=\{0,1\}\) is transformed into a continuous variable \(0\leq\eta\leq 1\). The restriction on task queue backlog can be disregarded here since it was considered in the prior service node selection [25]. Constraint (1) can be equivalent to \(\left\{ \begin{array}{l}T_{vi}^{local}\leq T_{vi}^{max}\\ T_{vi,j}^{un}+T_{vi,j}^{unit}(\tau)+T_{vi,j}^{cal}\leq T_{vi}^{max}\end{array} \right..\) Combining the above expressions, Equations (19) and (20) can be obtained as follows:  
\[ \begin{array}{l}T_{vi}^{local}\quad=\frac{(1-\eta)S_{vi}^{local}}{\zeta S_{vi }^{local}}\\ \quad=\frac{(1-\eta)(1-a_{vi}^{\tau})S_{vi}}{\sqrt{\frac{\tau^{local}}{\zeta(1- \eta)(1-a_{vi}^{\tau})S_{vi}}}}\\ \quad=(1-a_{vi}^{\tau})^{\frac{3}{2}}\sqrt{\frac{\Phi_{Si}}{\Gamma_{vi}^{ local}}}\leq T_{vi}^{max}\end{array}  \tag{26}\]  
\[ \begin{array}{l}T_{vi,j}^{un}+T_{vi,j}^{unit}(\tau)+T_{vi,j}^{cal}\\ \quad=\frac{\eta S_{vi}^{un}}{\pi_{vi,j}^{un}(\tau)}+\frac{Q_{j}(\tau)-Q_{j}( \tau-1)}{1\,\text{\emph{m}vc}}+\frac{S_{vi}^{un}}{\pi_{vi}^{local}}\\ \quad=\frac{\frac{a_{vi}^{\tau}S_{vi}}{\pi_{vi}^{local}\log_{1}(1+\frac{\mu_{ vi}^{unit}}{\
u^{2}})}+\frac{Q_{j}(\tau)-Q_{j}(\tau-1)}{\Gamma_{m}vc}+ \frac{a_{vi}^{\tau}S_{vi}}{\Gamma_{m}vc}\leq T_{vi}^{max}\\ \quad=\frac{1}{B_{vi}\log_{1}(1+\frac{\mu_{vi}^{unit}}{\
u^{2}})\log ^{2}}\leq\frac{T_{vi}^{max}}{\sigma_{vi}^{2}S_{vi}}-\frac{Q_{j}(\tau)-Q_{j}( \tau-1)+1}{\Gamma_{m}vc}\end{array}  \tag{27}\]  
By relaxing Equation (19) and substituting it into Equation (28), we obtain:  
\[\frac{1}{B_{vi}}\leq\left(\frac{(1-a_{vi}^{\tau})^{\frac{3}{2}}\sqrt{\frac{ \Phi_{Si}}{\Gamma_{vi}^{local}}}}{a_{vi}^{\tau}S_{vi}}-\frac{Q_{j}(\tau)-Q_{j}( \tau-1)+1}{\Gamma_{m}vc}\right)\log_{2}(1+\frac{p_{vi,j}^{un}\text{H}_{vi,j}} {\text{O}^{2}}) \tag{28}\]  
It can be seen from (18) that bandwidth resource is a variable related to unloading proportion, so the constraint on time of constraint (1) in problem P1 can be integrated into the bandwidth resource constraint, and the expression \(\overline{B}_{vi}=\eta B_{vi},\overline{P}_{vi}^{mc}=\eta P_{vi}^{mcc}\) ofbandwidth and power resource is restated at the same time. The final problem P1 is restated as P2. \[ \begin{array}{ll}\text{P2}&\underset{\{\sigma_{ii}^{2},P_{ii},B_{vi}\}}{min}&e\\ s.t&\\ &\sum\limits_{v=1}^{N}\overline{B}_{vi}\leq B_{max}\\ &\sum\limits_{vi=1}^{N}\overline{P}_{vi}\leq P_{max}\\ &0<a_{vi}^{\tau}<1\end{array}  \tag{29}\]  
The two variables are first decoupled in the revised problem P2 because the objective function and constraint conditions cause the bandwidth resources and unloading ratio to be mutually coupled. LC-IRA is proposed. For example, Algorithm 2 decomposed problem P2 into two sub-problems to reach an alternate optimization solution: (1) Given \(a_{vi}^{\tau}\), solved resource allocation strategy (bandwidth and power) based on alternating direction multiplier method (ADMM); (2) Given \(P_{vi}\), \(B_{vi}\), solve the unloading ratio \(a_{vi}^{\tau}\). Problem P2.1 can be defined as:  
\[ \begin{array}{ll}\text{P2.1}&\underset{\{P_{ii},B_{vi}\}}{min}&e\\ s.t&\\ \end{array}  \tag{30}\]  
The \(s.t\) constraint is equivalent to P2. Considering the independence between bandwidth resource allocation and power resource allocation, the following assumptions are proposed:  
Assumption 1: Under the given unloading ratio, there exists an optimal solution \(B_{vi}^{\ast}\), \(P_{vi}^{\ast}\) in problem P2.1, which meets Equation (31).