# Joint Task Offloading and Power Allocation for Satellite Edge Computing Networks
## 4 Resource Management Algorithm
### Inner Loop Procedure  
We optimize primary variables separately by exploiting the block structure in the inner loop, thereby avoiding the challenging process of optimizing all variables simultaneously. In this paper, we optimize a single variable while other variables are fixed by using a block coordinate descent-type method. In each block, we solve the first-order optimality condition by setting the gradient of the objective equal to zero. Then, we project the obtained solution onto the variable set. If the solution falls within the range of the variable set, it becomes the variable update value. Otherwise, the variable update value should be a point in the variable set that is closest to the original solution.  
The following is the solving procedure for \(\alpha\), \(P\), \(\kappa\), \(W\), \(V\), \(\lambda\), and \(\rho\).  
1. Initial values of \(\alpha\), \(P\), \(\kappa\), \(W\), \(V\), \(\lambda\), and \(\rho\) are set to \(\alpha^{0}\), \(P^{0}\), \(\kappa^{0}\), \(W^{0}\), \(V^{0}\), \(\lambda^{0}\), and \(\rho^{0}\), respectively; then, set \(k=1\) and \(i=1\).
2. Optimize \(W_{k,i}\) by \(W\)-sub-problem (42a), which is a quadratic unconstrained optimization problem. \[P_{W}:\min_{W_{k,i}} \sum_{i=1}^{N}\sum_{k=1}^{M}(t_{k,i}-\frac{D_{i}s}{C_{0}}\alpha_{k, i}-\frac{D_{i}}{B}W_{k,i}+\rho\lambda_{k,i}^{1})^{2}+\] \[\sum_{i=1}^{N}\sum_{k=1}^{M}(W_{k,i}-\alpha_{k,i}\kappa_{k,i}+\rho \lambda_{k,i}^{3})^{2}\] (42a) \[s.t.W_{k,i}\geq 0\] (42b)
3. Optimize \(\alpha_{k,i}\) by (43a), which is also a quadratic optimization problem. \[P_{\alpha}:\min_{\alpha_{k,i}} \sum_{i=1}^{N}\sum_{k=1}^{M}(t_{k,i}-\frac{D_{i}s}{C_{0}}\alpha_{k,i}-\frac{D_{i}}{B}W_{k,i}+\rho\lambda_{k,i}^{1})^{2}+\] \[\sum_{i=1}^{N}(t_{0,i}-\frac{D_{i}s}{C_{0}}\alpha_{0,i}+\rho \lambda_{0,i}^{1})^{2}+\] \[\sum_{i=1}^{N}\sum_{k=1}^{M}(V_{k,i}-P_{k,i}\kappa_{k,i}\alpha_{k,i}+\rho\lambda_{k,i}^{2})^{2}+\] \[\sum_{i=1}^{N}\sum_{k=1}^{M}(W_{k,i}-\alpha_{k,i}\kappa_{k,i}+\rho \lambda_{k,i}^{3})^{2}\] (43a) \[s.t.\sum_{i=1}^{N}r_{m}C_{0}^{2}D_{i}\alpha_{0,i}+\sum_{i=1}^{N} \frac{P\cdot\alpha_{k,i}D}{R\cdot B}\leq\mathcal{E}_{1}\] (43b) \[\sum_{i=1}^{N}\sum_{k=1}^{M}r\alpha_{k,i}D_{i}C_{0}^{2}\leq \mathcal{E}_{2}\] (43c)
4. Optimize \(P_{k,i}\) by (44a). \[P_{P}:\min_{P_{k,i}} \sum_{i=1}^{N}\sum_{k=1}^{M}(V_{k,i}-P_{k,i}\kappa_{k,i}\alpha_{k,i}+\rho\lambda_{k,i}^{2})^{2}+\] \[\sum_{i=1}^{N}\sum_{k=1}^{M}(\kappa_{k,i}\log_{2}(1+\frac{P_{k,i} \mu_{0}}{\sigma^{2}d^{2}})-1+\rho\lambda_{k,i}^{4})^{2}\] (44a) \[s.t.P_{k,i}\leq Pm-\sum_{m\
eq k}P_{k,i}-r_{m}C_{0}^{3}\] (44b)
5. Optimize \(V_{k,i}\) by (45a). \[P_{V}:\min_{V_{k,i}} \sum_{i=1}^{N}\sum_{k=1}^{M}(V_{k,i}-P_{k,i}\kappa_{k,i}\alpha_{k,i}+\rho\lambda_{k,i}^{2})^{2}\] (45a) \[s.t.V_{k,i}\geq 0\] (45b)Optimize \(\kappa_{k,i}\) by (46a).  
\[P_{\kappa}:\min_{\kappa_{k,i}}\sum_{i=1}^{N}\sum_{k=1}^{M}(V_{k,i}-P _{k,i}\kappa_{k,i}\alpha_{k,i}+\rho\lambda_{k,i}^{2})^{2}\] \[+\sum_{i=1}^{N}\sum_{k=1}^{M}(W_{k,i}-\alpha_{k,i}\kappa_{k,i}+ \rho\lambda_{k,i}^{3})^{2}\] \[+\sum_{i=1}^{N}\sum_{k=1}^{M}(\kappa_{k,i}\log_{2}(1+\frac{P_{k,i} \mu_{0}}{\sigma^{2}d^{2}})-1+\rho\lambda_{k,i}^{4})^{2} \tag{46a}\] \[s.t.\sum_{i=1}^{N}r_{m}C_{0}^{2}D_{i}\alpha_{0,i}+\frac{1}{B} \sum_{i=1}^{N}\sum_{k=1}^{M}P_{k,i}\alpha_{k,i}\kappa_{k,i}D_{i}\leq\mathcal{E }_{1} \tag{46b}\]