## 4 Cooperative Resource Management Algorithm
### Optimization Algorithm Using Genetic algorithm  
To determine the feasible domain of the problem, we transform all the independent variables into one-dimensional column vectors and combine them into a whole one-dimensional column vector. Thus, \(\alpha_{i,j}\) is converted to a vector \(\boldsymbol{\alpha}_{i}\)\((i\in\{1,2,\ldots,\mathbf{M}*\mathbf{R}\})\). Similarly, \(\beta_{i,j,k}\), \(=\boldsymbol{\beta}_{i}(i\in\{1,2,\ldots,\mathbf{M}*\mathbf{R}*\mathbf{K}\})\), \(\sigma_{j}=\boldsymbol{\sigma}_{i}(i\in\{1,2,\ldots,\mathbf{R}\})\), \(\tau_{j,k}=\boldsymbol{\pi}_{i}(i\in\{1,2,\ldots,\mathbf{R}*\mathbf{K}\})\). So, we can combine them into \(\mathbf{H}_{1}\)\((\mathbf{i}\in\{\mathbf{1},\mathbf{2},\ldots,\mathbf{M}*\mathbf{R}+\mathbf{ M}*\mathbf{R}*\mathbf{K}+\mathbf{R}+\mathbf{R}*\mathbf{K}\})\) in order of \(\boldsymbol{\alpha},\boldsymbol{\beta},\boldsymbol{\sigma},\boldsymbol{\pi}\), where \(\mathbf{H}\) is the feasible region of the problem.  
In combination with (16) and constraints above, we derive the convexity and concavity of (16). By splitting (16) and judging the positive definiteness of each part of Hessian matrix, we obtain that (16) is a non-convex and non-concave function due to the existence of several saddle points. Therefore, if we use the traditional numerical optimization algorithm (such as interior point method) to get the optimal solution of (16), it is easy to fall into local minimum. The \"dead cycle\" phenomenon occurs because of the minimal part trap, which makes the iteration impossible, and only the local optimal solution is obtained instead of global optimal solution.  
Genetic algorithm overcomes this shortcoming very well, which is a global optimization algorithm. Due to the evolutionary characteristics of genetic algorithm, the intrinsic properties of the optimization problem in the process of searching element have little effect on the final optimization result. Moreover, the ergodicity of the evolutionary operator of genetic algorithm makes it very effective to search element with probabilistic global significance, which matches the optimization object and optimization goal of our paper very well.  
In addition, compared with the accurate algorithm, the approximate algorithm has less time consumption and space consumption, so that it can guarantee the overall system performance. In this paper, we choose the genetic algorithm to solve the optimization problem.  
We use \(\mathbf{H}=0\) as the initial generation, and \(\mathbf{H}\) should strictly adhere to the above constraints.  
Now, we can give the optimization algorithm using Genetic algorithm, which is shown in Algorithm 1.  
```
Parameters - Population Size = 150 - GA Generations = 100 - Crossover ratio = 1.2 Selection Function: Chooses parents by simulating a roulette wheel, in which the area of the section of the wheel corresponding to an individual is proportional to the individual's expectation. The algorithm uses a random number to select one of the sections with a probability equal to its area. Crossover Function: Returns a child that lies on the line containing the two parents, a small distance away from the parent with the better fitness value in the direction away from the parent with the worse fitness value. You can specify how far the child is from the better parent by the parameter Ratio, which appears when you select Heuristic. The default value of Ratio is 1.2. Mutate Function: Randomly generate directions that are adaptive with respect to the last successful or unsuccessful generation. The mutation chooses a direction and step length that satisfies bounds and linear. Begin T = 0; Initialize H(t) ; Evaluate H(t); While not finished do Begin T = t 1; Select H(t) from H(t 1); Crossover in H(t); Mutate in H(t); Evaluate H(t); End End
```  
**Algorithm 1** Algorithm Solving Optimization Problem