## 4 Resource Allocation Mechanism
### Interference Clustering + Improved Genetic Algorithm
#### 4.2.2 Joint Allocation of Bandwidth and Power  
(A) Multi-cell Assignment Based on IGA  
When there are multiple cells in the cluster, considering the CCI between cells, we propose an improved genetic algorithm to search for the frequency and power allocation scheme with the goal of maximizing the total throughput of each cell. More specifically, we regard each resource allocation scheme as a chromosome, and the genes contained in the chromosome include all beam-related resource elements (i.e., bandwidth and power in this paper) of the system. By performing selection, crossover, mutation and elite retention operations on chromosomes, a high-quality resource allocation scheme is obtained. It is worth noting that, in order to reduce the length of chromosomes, we only encode the frequency band assigned to each beam, and the corresponding power constraints and adjustments are reflected in the calculation of the fitness function. In this paper, the total available band is divided into 10 equal bandwidth sub-bands numbered 1-10. The frequency band scheme allocated by each active beam is represented by the number of the starting and ending sub-band, and each number needs to be represented by a 4-bit binary number. For example, if beam \(i\) occupies the frequency band numbered 4-9, its corresponding code is 01001001. The allocation scheme for each beam requires an 8-bit code representation, thus the chromosome length corresponding to each resource allocation scheme is \(8*n\) if there are \(n\) cells in the cluster. When calculating the fitness function, we firstly obtain the maximum transmitting power of each beam according to the frequency band of each beam and the power constraint relation of the frequency calculated in Section 3.4.2. We consider the CCI among all cells in the cluster, calculate the capacity of each beam, and then obtain the throughput of each beam according to the demand of each cell. Take the sum of the throughputs of all cells in the cluster as the fitness of the scheme. According to the value of fitness, half of the individuals in the population are selected by the roulette method to be retained to the next generation. When performing crossover and mutation operations, the power is updated according to the constraints, and the other half of the offspring individuals are obtained. The convergence criteria of the algorithm is as follows: denote the best solution in the set of resource allocation solutions generated by the \(g_{th}\) iteration as \(best\), and the sum of all beam throughputs obtained by this solution is \(thro_{best}\), and compare it with the average value of the previous \(l\) results, if it is less than a certain threshold, the resource allocation algorithm is considered to have converged, and the iterative loop is exited. Iteration should also stop when the set maximum number of iterations is reached. The parameter settings related to the genetic algorithm are shown in Table 2.  
In order to guide the algorithm to search for a high-quality feasible solution region, speed up the algorithm convergence, and reduce the number of iterations, we embed an optimization control strategy in the algorithm design. On the one hand, we reduce the randomness of the crossover and mutation operators. If the beam capacity decreases after  
Figure 6: An example of interference clustering result. crossover and mutation, we continue to perform operations, and the solution with an optimized capacity is reserved. On the other hand, we adopt an elite retention strategy, that is, pick out the best-performing individual in the previous generation population and replicate it in the next generation population. Compared with the traditional genetic algorithm, the improved algorithm with the added control strategy is less likely to fall into the local optimal solution, and the convergence speed is significantly faster.