## 3 Preliminaries and Definitions
### Definition of JRors  
The JRors problem is integrated as a system welfare maximization problem, and the goodness of solutions to the resource offloading and computational resource scheduling problems is summarized as the system welfare (W). In order to optimize the system efficiency, W takes into account the request response time, edge system utility, edge system cost, and extra cost. Moreover, to improve QoS, we add application completion and cloud server pricing to the considerations. We formulate the PA problem as in Equations (1) and (2). Request \(q\) is obtained from all request queues \(Q\), and the base station \(n\) belongs to all BSs. Where \(x_{qn}\) denotes an indication whether request \(q\) is assigned to the base station or not, where 0 denotes assignment to a macro base station and 1 denotes assignment to a micro base station. \(R_{n}\) represents the computing power of base station \(n\), and \(R_{qn}\) represents the computing resources allocated by base station \(n\) to request \(q\), \(k_{q}\) denotes the edge system utility, \(c_{q}\) denotes the edge system cost of processing request \(q\), and \(e_{q}\) denotes the additional cost of offloading request \(q\) to the macro base station. In Equation (3), \(c\_r\) denotes the computation of the application completion rate, and in Equation (4), \(cost\) denotes the server pricing, which consists of the edge server pricing \(cost_{Mi}\) and the cloud  
Figure 1: A three-layer edge cloud computing model.  
They update their positions according to different principles, and the position \(x_{j}^{i}\) of the leader is updated using Equation (7).  
\[x_{j}^{i}=\begin{cases}F_{j}+c_{1}\big{(}(ub_{j}-lb_{j})\cdot c_{2}+lb_{j}\big{)}& c_{3}\geq 0\\ F_{j}-c_{1}\big{(}(ub_{j}-lb_{j})\cdot c_{2}+lb_{j}\big{)}&c_{3}<0\end{cases}, \tag{7}\]  
where \(F_{j}\) is the position of the food source in the \(j\)th dimension; \(ub_{j}\) is the upper bound of the \(j\)th dimension; \(lb_{j}\) is the lower bound of the \(j\)th dimension; and \(c_{1}\), \(c_{2}\), and \(c_{3}\) are random numbers.  
The updating of the follower's position is borrowed from the idea of Newtonian motion and is represented by Equation (8).  
\[\begin{array}{l}x_{j}^{i}=\frac{1}{2}at^{2}+v_{0}t,\\ a=\frac{v_{\text{final}}}{v_{0}},\\ v=\frac{x-v_{0}}{t}.\end{array} \tag{8}\]  
where \(i\geq 2\) denotes the position of the \(i\)th follower bottle sea squirt in the \(j\)th dimension, and \(t\) is the time. \(v\) stands for velocity, where \(v_{0}\) is the initial velocity, \(v_{\text{final}}\) is the final velocity, \(x\) and \(x_{0}\) represent the current and initial locations, respectively. The pseudo-code for SSA is shown in Algorithm 1.  
```
1:ub, lb
2:Output: fitness
3:xi \(\leftarrow\)initial salp population considering ub and lb
4:functionSSA()
5:while end condition is not satisfied do
6: Calculate the fitness of each search agent (salp)
7: Set F as the food source
8:for each salp (\(x_{i}\)) do
9:if The salp population is in the top half then
10: Update the position of the leading salp using Equation (7)
11:else
12: Update the position of the follower salp using Equation (8)
13:endif
14:endfor
15:endwhile
16: return F
17:endfunction
```  
**Algorithm 1**Salp Swarm Algorithm (SSA)  
The movement and interaction of virtual sheaths in the search space give SSA a strong global search capability; meanwhile, the diversity characteristics of SSA make it perform well in dealing with multi-peak optimization problems, which is suitable for searching for the optimal workload allocation scheme.