## 3 A Beam-Hopping-Based Global Beam Scheduling and User Resource Allocation Algorithm
### Algorithm B: Globally Optimized Beam-Slot Assignment Algorithm  
In this section, we propose Algorithm B, a globally optimized beam-slot assignment, which allocates the beam footprints obtained from Algorithm A to specific time slots within a BH cycle. The objective is to allocate \(MN\) beams across \(M\) time slots, where each slot is constrained to activate no more than \(N\) beams. To mitigate intra-slot interference and ensure reliable system performance, a minimum spatial separation \(d_{\min}=4R\) must be maintained between any two simultaneously active beams.  
The globally optimized beam-slot assignment algorithm combines a greedy initialization with a simulated annealing strategy to maximize the total number of scheduled beams, while satisfying the minimum inter-beam distance constraint and the per-slot capacity limit. The optimization problem is formulated as follows:  
\[\max\sum_{t=1}^{M}|S_{t}|\] (10a) s.t. \[|S_{t}|\leq N,\forall t \tag{10b}\] \[\sqrt{(x_{i}-x_{j})^{2}+(y_{i}-y_{j})^{2}}\geq d_{\min},\] \[\forall t,\;\forall p_{i},p_{j}\in S_{t},\;i\
eq j. \tag{10c}\]  
where \(S_{t}\) denotes the set of beams assigned to the \(t\)-th time slot, and \(N\) represents the maximum number of beams that can be activated per time slot. Each beam is associated with a center coordinate \(p_{i}=(x_{i},y_{i}),i\in\{1,2,\ldots,MN\}\). Constraint (10b) ensures that the number of beams assigned to any time slot does not exceed \(N\), constraint (10c) enforces that the distance between any two active beams within the same time slot must be greater than a predefined minimum separation \(d_{\text{min}}\). We define a state variable \(state(b)=t\), \(b=\{1,2,\ldots,MN\}\), \(t=\{1,2,\ldots,M\}\) to represent that the \(b\)-th beam is assigned to the \(t\)-th time slot, where \(state(b)=-1\) indicates that the \(b\)-th beam is not scheduled. The principal parameter settings of the simulated annealing procedure are summarized in Table 1.  
The pseudocode of Algorithm 1 is as follows:  
```
1:Phase 1: Initial Solution Construction Based on Greedy Algorithm Principles
2: Initialize: \(S_{t}=\emptyset\), \(state(b)=-1\), \(b=\{1,2,\ldots,MN\}\), \(t=\{1,2,\ldots,M\}\);
3:for each time slot \(t\)do
4:for each beam \(b\)do
5:if\(state(b)=-1\) and \(\forall j\in S_{t}\sqrt{\left(x_{i}-x_{j}\right)^{2}+\left(y_{i}-y_{j}\right)^ {2}}\geq d_{\text{min}}\)then
6: Update the beam allocation set \(S_{t}\gets b\);
7: Update the state variables, \(state(b)=t\);
8:endif
9:if\(|S_{t}|=N\)then
10:break
11:endif
12:endfor
13:endfor
14:endfor
15:Phase 2: Refinement Based on Simulated Annealing Optimization
16: Initialize temperature \(T\), minimum temperature \(T_{\text{min}}\), cooling rate \(\alpha\), max iterations \(N_{\text{max}}\);
17: Set the greedy algorithm result as the initial solution \(S_{\text{current}}\);
18:while\(T>T_{\text{min}}\)do
19:for\(1\) to \(N_{\text{max}}\)do
20: Randomly select the \(b\)-th beam and remove it from the current allocation \(S_{t}\);
21: Update beam allocation \(S_{t}\) and state variables \(state(b)=-1\);
22:for each time slot \(t\)do
23:if\(|S_{t}|<N_{\text{s}}\) and \(\forall j\in S_{t},\sqrt{\left(x_{i}-x_{j}\right)^{2}+\left(y_{i}-y_{j}\right) ^{2}}\geq d_{\text{min}}\)then
24: Update the beam set \(S^{\prime}_{t}\gets b\);
25: Update the state variables, \(state(b)=t\);
26:break
27:endif
28:endfor
29:if\(\sum\limits_{t=1}^{M}|S^{\prime}_{t}|>\sum\limits_{t=1}^{M}|S_{t}|\)then
30: Accept the new solution immediately;
31:else
32: Accept the new solution with certain probability;
33:endif
34:endif
35: Update temperature \(T\leftarrow\alpha T\).
36:endwhile
```  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Initialize temperature \(T\) & 500 \\ Minimum temperature \(T_{\text{min}}\) & \(10^{-3}\) \\ Cooling rate \(\alpha\) & 0.95 \\ Max iterations \(N_{\text{max}}\) & 500 \\ Acceptance rule & Metropolis criterion \(P=\text{e}^{-\Delta E/T}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulated annealing optimization simulation parameter settings.