## 4 Adaptive Genetic Algorithm for Joint Optimization
### Adaptive Genetic Operations  
Roulette wheel selection (RWS) is introduced in the implementation in selection phase. Selection probability \(p(\mathrm{I}_{k})\) is assigned to each individual to implement weighted selection. The selection probability is proportional to individual's fitness value. The probability of the individual \(\mathrm{I}k\) is given by:  
\[p(\mathrm{I}_{k})=\frac{F^{\prime}(\mathrm{I}_{k})}{\sum\limits_{j=1}^{K}F^{ \prime}(\mathrm{I}_{j})} \tag{12}\]  
The proposed algorithm randomly generate a number \(P\) in the interval \([0,1]\), and the individual \(\mathrm{I}_{k}\) who meets the Equation (13) is chosen. The individuals with a higher weight probability have more opportunities to be selected. The RWS operator repeats \(K\) times to form a new population.  
\[k=\min\left\{\mathrm{s}\!\left|\sum\limits_{j=1}^{S-1}p(\mathrm{I}_{j})\leq P,s\in\{1,\ldots,K\}\right.\right\} \tag{13}\]  
Then the new population is transferred to the crossover phase. Crossover inherits the idea of natural reproduction. A crossover probability denoted as \(\rho_{c}\) is applied for the offspring generation of the selected parents. In this phase, one-point crossover is used. We first randomly generate a number \(p\) in the interval \([0,1]\). If \(p\leq\rho_{c}\), then a crossover point in the range \(\{1,\ldots,\mathrm{N}-1\}\) is selected randomly, and the pair of parents swap the genes at the crossover point to generate two new individuals. The offspring inherit parts of characteristics of their parents, and they are supposed to provide better candidate solutions for the joint energy and transmission efficiency optimization. \(K\) individuals are generated by this way.  
After crossover, all individuals go through the mutation phase. New genetic characteristics can be introduced into the population in this stage. Unlike the crossover, mutation operator can only randomly modify the genes of an individual. A mutation probability denoted as \(\rho_{m}\) is applied for gene modification. For every gene in each individual, we apply the following mutation procedure. First, we randomly generate a number \(p\) in the interval \([0,\ 1]\). If \(p\leq\rho_{m}\), then that gene is replaced with another one. In each genetic operation phase, the size of generated population maintains constant.  
To achieve a better performance of the proposed GA, an adaptive approach by dynamically updating \(\rho_{c}\) and \(\rho_{m}\) is adopted. We apply Equations (14) and (15) [58] to obtain the value of \(\rho_{c}\) and \(\rho_{m}\) in each iteration. Specifically, we have \(F\text{max}=\text{max}j\Big{(}F\left(\text{I}_{j}\right)\Big{)}\), \(Fmean=\sum\limits_{j=1}^{K}F\left(\text{I}_{j}\right)/K\), and \(Fc=\text{max}\Big{(}F\left(\text{I}_{j1}\right),F\left(\text{I}_{j2}\right) \Big{)}\). Moreover, \(\lambda_{c}\) and \(\lambda_{m}\) are the default constant value of crossover probability and mutation probability.  
\[\rho_{c}=\left\{\begin{array}{cc}\frac{F_{\text{max}}-F_{c}}{F_{\text{max}} -F_{mean}},&F_{c}\leq F_{mean}\\ \lambda c,&otherwise\end{array}\right. \tag{14}\]  
\[\rho_{m}=\left\{\begin{array}{cc}\frac{F_{\text{max}}-F^{\prime}\left( \text{I}_{j}\right)}{F_{\text{max}}-F_{mean}},&F\left(\text{I}_{j}\right) \leq F_{mean}\\ \lambda m,&otherwise\end{array}\right. \tag{15}\]  
We apply Equation (16) [58] to evaluate the convergence performance of the proposed adaptive GA approach, where \(d\Big{(}\text{I}_{j1},\text{I}_{j2}\Big{)}\) shows the differences between two individuals \(\text{I}_{j1}\) and \(\text{I}_{j2}\). Based on the proof in [59], we can state that the proposed heuristic method based adaptive GA has been converged, if GA's degree of diversity denoted as \(D_{p}\) is lower than a threshold.  
\[D_{p}=\frac{2}{K\cdot(K-1)}\sum\limits_{j1=1}^{K-1}\sum\limits_{j2=j1+1}^{K} \frac{d(j1,j2)}{N} \tag{16}\]