# An Optimization Routing Algorithm for Green Communication in Underground Mines
## 5 GA-Based Network Clustering Model
### GA Definition  
In the conventional state, the ANs initiate the clustering process as the cluster head node, and the MNs and ONs are involved in the clustering process as the cluster member nodes. However, in some special cases (such as during underground mining accidents), the structure of the underground mine changes. Specifically, some anchor nodes may be damaged and cannot serve as cluster head nodes. Therefore, in this case, the proposed GA established the rules for multiple functions, and ordinary nodes serve as cluster head nodes. Since there is no integration, the mechanisms in traditional network clustering algorithms cannot be applied to a heterogeneous environment. Therefore, in the GCUM in this paper, the network model must be optimized before using the GA chromosome factor to optimize the network clustering structure.  
The characteristics of the nodes in the network are analyzed in the process of network structure optimization based on the GA. The chromosomes of the GA are defined as the cluster structure of the GCUM, and genes are defined as the nodes of the cluster. Genes are classified and assigned based on the GA and serve as cluster heads or member nodes according to their values. Two variable lists are introduced to record the status of each node. One list is the residual energy, and the other is the role. In the residual energy list, if the value of a node equals one, the node has sufficient residual energy, and is a cluster head node candidate. If the value equals zero, the node does not have sufficient residual energy and cannot serve as a cluster head node. In the role list, if the value of a node equals 1, the node has served as a cluster head node. If the value equals 0, the node has served as a member node. If a node has sufficient residual energy and can be a cluster head node, it will be included in subsequent calculations.  
To control the number of individuals and avoid clustering results converging to a local optimum, the GA generates new chromosomes through crossover and mutation processes.  
1. The crossover process randomly chooses two individuals to exchange certain information at a high level of probability. The purpose of the exchange process is to generate a new genetic combination to limit the loss of genetic material. The generation and evolution rate of new chromosomes can be controlled by changing the crossover probability. If the crossover process does not occur, the parent chromosome that is ready to participate in the crossover process will be directly included in the subsequent calculations without any changes.
2. The mutation process changes some of the population at a lower probability than that associated with the crossover process. A gene on a chromosome is randomly selected, and its assignment is changed with the goal of preventing premature convergence during the optimization process. Unlike the crossover process, the mutation process can be controlled by changing the mutation probability, and new individuals can be produced in this process to reach a local optimum. When a node fails, its corresponding gene assignment will change, and it will no longer be included in the subsequent mutation processes.