## 4 Design of Fuzzy Adaptive Genetic Algorithm
### Algorithm Step  
First of all, the three goals of the pre-population are averaged, and the three target values of cost, time, and carbon emissions, \(\overline{x}_{i}\), \(\overline{y}_{i}\), and \(\overline{z}_{i}\), are calculated as shown in Formula (14). \[\bar{x}=\frac{\sum\limits_{i=1}^{n}x_{i}}{n},\bar{y}=\frac{\sum\limits_{i=1}^{ n}y_{i}}{n},\bar{z}=\frac{\sum\limits_{i=1}^{n}z_{i}}{n} \tag{14}\]  
where \(\overline{x}_{i}\), \(\overline{y}_{i}\), and \(\overline{z}_{i}\) are the cost, time, and carbon emissions of each individual, and n is the number of the population. The distance difference between each individual and the intermediate individual is then calculated, as shown in Formula (15). \[d_{i}=\sqrt{\left(x_{i}-\bar{x}\right)^{2}+\left(y_{i}-\bar{y}\right)^{2}+ \left(z_{i}-\bar{z}\right)^{2}} \tag{15}\]  
where \(d_{i}\) is the distance between each individual and the intermediate value. The mean square deviation \(V_{d}\) of the distance difference between all individuals and intermediate individuals is shown in Formula (16). \[V_{d}=\sqrt{\frac{\sum\limits_{i=1}^{n}d_{i}^{2}}{n}} \tag{16}\]  
Finally, the input is normalized as follows, as shown in Formula (17). \[F=\frac{V_{d}-V_{d\min}}{V_{d\max}-V_{d\min}} \tag{17}\]  
where \(V_{d\max}\) is the mean square deviation of the distance of the largest individual in the population, and \(V_{d\min}\) is the mean square deviation of the distance of the smallest individual in the population. For simplicity, the membership function of a fuzzy system is trapezoidal:  
\[f(x)=\left\{ \begin{array}{ll}0&\text{if}\quad x\leq a\\ \frac{y-a}{b-a}&\text{if}\quad a<x\leq b\\ 1&\text{if}\quad b<x\leq c\\ \frac{d-x}{d-c}&\text{if}\quad c\leq x\leq d\\ 0&\text{if}\quad x>d\end{array} \right. \tag{18}\]  
where parameters \(a\) and \(d\) determine the bottom edge of the trapezoid, while parameters \(b\) and \(c\) determine the upper edge of the trapezoid. The membership functions of mean square deviation \(F\), crossover probability \(P_{c}\), and mutation probability \(P_{m}\) are shown in Figure 4 below. When the density of the initial population fitness value is small, that is, the variance is small, and the variance does not change with the increase of the number of iterations, it is necessary to increase \(P_{m}\) to reduce \(P_{c}\). When the variance of population fitness value is large, then we must increase \(P_{c}\) to reduce \(P_{m}\) so that the population is rapidly concentrated to ensure that the genetic algorithm has a strong optimization ability. We take the mean square deviation F of the fitness value as an input variable of the fuzzy system, and the fuzzy rules are as follows. Rule \(i\): if \(F\) is \(Q_{i1}\), then \(P_{c}\) is \(W_{i1}\), and \(P_{m}\) is \(W_{i2}\), where \(i=1,2,\cdots,n\) represents the fuzzy rule \(i\), \(Q_{i1}\) describes the fuzzy language variable of state \(F\), and \(W_{i1}\) describes the fuzzy language variable of the size of \(P_{c}\) and \(P_{m}\). For the sake of simplicity, each fuzzy language variable takes three fuzzy concepts: large, medium, and small. From the above discussion of the sum value selection law, the following fuzzy rules can be obtained:  
(1) If \(F\) is small, then \(P_{c}\) is small and \(P_{m}\) is large;  
(2) If \(F\) is medium, then \(P_{c}\) is medium and \(P_{m}\) is medium;  
(3) If \(F\) is large, then \(P_{c}\) is large and \(P_{m}\) is small. The specific flow of the fuzzy adaptive genetic algorithm is as follows:  
Step 1: The decision variables \(x_{ij}^{k}\) and \(y_{ij}^{k}\) of the model are binary coded within the interval [0, 1]. Determine the binary encoding length by the encoding formula, divide the optimal path into different individuals, which usually generates a collection of several individuals using a random method, randomly generate an initial population of size \(N\), and set the evolutionary generation.