## 6 Heuristic
In particular, the availability of processing capacity is checked by means of the following expression:  
\[\Lambda^{i}_{\{i,\tilde{u},0\},\{i_{s},1\}}+f^{h}_{0}\leq C^{i}_{\{i,\tilde{u },0\},\{i_{s},1\}} \tag{29}\]  
while if the following expression is verified, there is enough energy to accomplish service processing:  
\[\Psi^{i}_{\tilde{l}_{i}}+f^{h}_{0}\cdot\gamma^{i,1}_{\tilde{l}_{i},0}+\mu^{i}_ {\tilde{l}_{i}}\leq\varepsilon_{i_{i}} \tag{30}\]Finally, a fictitious edge from a node in the processing state to the processed one is included whenever the node in the processing state does not have an incoming processing edge (i.e., it is reachable only through a storage edge in the processing state), or, in case there is an incoming processing edge, when the node has enough energy to process the service and then transmit it in its processed form (i.e., with a reduced size), plus a margin (Lines 19-21), with this condition being checked by means of the following expression:  
\[\Psi_{i_{s}}^{\hat{t}}+f_{0}^{h}\cdot\gamma_{i_{s},0}^{i_{s},1}+f_{1}^{h}\cdot \left(\max_{i_{d}\in[0,N_{S}-1]}\gamma_{i_{s},2}^{i_{d},2}\right)+\mu_{i_{s}}^{ \hat{t}}\leq\epsilon_{i_{s}} \tag{31}\]  
Note that the introduction of the in-processing layer and fictitious links with respect to the model introduced in Sec.4 is necessary to make the algorithm consider that, if processing happens on a node in a certain time cycle, the node may run out of energy in that time cycle; thus, it cannot transmit the service after having processed it. Instead, the introduction of a margin in the calculation of energy availability is necessary because the proposed heuristic is greedy: it tries to optimize the on-ground energy consumption for the current task without taking into account that the current resource allocation has an impact on the resources available for the other tasks still to be handled, leading to a non-optimal solution or even to the impossibility to allocate resources for all the services. For this reason, while selecting a link in the subgraph, we add it only if the energy the current service requires to cross it is small enough to allow the satellite to transmit all its remaining tasks to the ground station. In particular, the margin calculation is strictly related to the buffer tracking the services still to be handled by the algorithm in a certain time period and having a specific satellite as source. This buffer can be imagined as a list, whose entry \(\beta_{i_{s}}^{\hat{t}}\in\beta\), with \(i_{s}\in[0,\ldots,N_{S}-2]\), \(\hat{t}\in[0,\ldots,T-1]\) is a set containing services \(f^{h}\in\Sigma\), with \(h\in[0,\ldots,N_{T}-1]\) generated by the \(i_{s}\)-th satellite and such that \(f_{t}^{h}\leq\hat{t}\leq f_{t}^{h}+f_{\hat{d}}^{h}\). Consequently, the energy margin to be left on the \(i_{s}\)-th satellite during the \(\hat{t}\)-th time cycle is given by the sum of the pre-processing size and post-processing size of all services \(\varphi\in\beta_{i_{s}}^{\hat{t}}\), multiplied by the maximum unit transmission energy cost, following the expression:  
\[\mu_{i_{s}}^{\hat{t}}=\sum_{\varphi\in\beta_{i_{s}}^{\hat{t}}}(\varphi_{0}+ \varphi_{1})\cdot\max_{i_{d}\in[0,N_{S}-1]}\gamma_{i_{s},2}^{i_{d},2} \tag{32}\]  
It is important to underline that the proposed margin calculation is empirical, and its optimization could open interesting research prospective which are out of the scope of this work. Finally, the complexity of Algorithm 2 can be easily computed by considering that there are three nested loops repeating at most for \(N_{S}-2\), \(T\), and \(2\), respectively, leading to a complexity given by \(\mathcal{O}\big{(}N_{S}^{2}T\big{)}\). Furthermore, we recall that the most efficient complexity of [PERSON]'s algorithm is given by \(\mathcal{O}(|\mathcal{N}|\log_{2}(|\mathcal{N}|)+|\mathcal{E}|)\).