## 4 Resource Allocation Mechanism
### Interference Clustering + Improved Genetic Algorithm
#### 4.2.2 Joint Allocation of Bandwidth and Power
(B) Single-cell Assignment Based on Constrain Map  
If there is only one single cell in the cluster, the CCI between cells does not need to be considered, and the only constraint is the power constraint on the GEO ground station. As illustrated in Section 3.4.2, for a certain cell, each sub-band corresponds to a power limit when used alone, which forms a Constraint Map. We find out the combination of frequency bands that maximizes the capacity of the cell directly according to the constraints. In the example shown in Figure 5, the total available frequency band is divided into 10 equal bandwidth sub-bands denoted as \(\beta_{1}\) to \(\beta_{10}\) (It is worth noting that the bandwidth of each sub-band can be different, and we use equal bandwidth in this paper to simplify the model). The maximum transmitting power over each sub-band for cell \(i\) is denoted as \(p_{th}^{1}\) to \(p_{th}^{10}\). Since cell \(i\) achieves maximum communication capacity when the beam occupies \(B_{i}=\{\beta_{3},\beta_{4},\cdots,\beta_{8}\}\) and the corresponding power is \(P_{i}=p_{th}^{6}\), therefore, the optimal resource allocation scheme for cell \(i\) should be \(B_{i}=\{\beta_{3},\beta_{4},\cdots,\beta_{8}\},P_{i}=p_{th}^{6}\). The joint allocation mechanism of bandwidth and power is summarized in Algorithm 2. ```
1: Illuminated cells in current time slot: \(\{N\}\), demand of illuminated cells: \(D_{t}=\{D_{t}^{i}|i\in\text{N}\}\), onboard available resources: \(B_{tot}\), \(P_{tot}\), sub-bands: \(\{\beta_{1},\beta_{2},\ldots,\beta_{m}\}\), constraint between power and band: \(\{Ph_{i}^{\beta m}\}\)
2:\(B_{i}\) and \(P_{i}\) for each illuminated cell
3: Perform interference clustering according to Section 4.2.1 and the number of cells in each cluster is \(n\);
4:if\(n>1\)then ;
5: Population initialize
6:for\(t=1\) to iteration time do
7: Calculate fitness according to Section 4.2.2 (A)
8: Record elite with best fitness
9: Perform selection, coding, crossover, mutation and decoding with optimal control considering \(\{Ph_{i}^{\beta m}\}\) ;
10: Replace the least fit individuals with elite;
11:endfor
12: Calculate \(C_{i}\) by Equation (11);
13:else
14: Select \(B_{i}=\{\beta_{a},\ldots,\beta_{b}\}\) and \(P_{i}=min\{Ph_{i}^{\beta m},m\in(a,b)\}\) according to Section 4.2.2 (B) based on Constraint Map shown as Figure 5;
15:endif
16: Recalculate \(C_{i}\) considering the CCI of all cells according to Section 3.4.1;
17:return allocation scheme \(B_{i}\), \(P_{i}\) and capacity \(C_{i}\);
```  
**Algorithm 2** Joint allocation mechanism of bandwidth and power. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Population scale & 200 \\ Select probability & 0.5 \\ Crossover probability & 0.7 \\ Mutation probability & 0.01 \\ Iteration times & 50 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameter settings related to the genetic algorithm. After completing the resource allocation to cells in all clusters, we comprehensively consider the CCI among all the illuminated cells, and calculate the transmission capacity of all cells again. According to the traffic demand of each cell and the provided communication capacity, we update the traffic demand in the next time slot and continue to determine active beams and perform resource allocation until the end of the beam hopping period.