## 3 Task Planning Model and Solving Algorithm
### Optimization Solving Algorithm
#### 3.2.3 GA-SA algorithm genetic operation  
Crossover means matching individuals in a population according to certain rules, and each pair of individuals exchanges part of their chromosomes according to a certain probability. Crossover can improve the search ability of the GA. The general steps of the crossover operation are selecting a pair of individuals to be mated from the mating pool, and then, according to the gene length L of the mating pair of individuals, randomly selecting in [1, L-1] one or more integers k as the crossover position. According to the crossover probability of the crossover operation, individuals are matched in the cross location, and genes are exchanged to form a new pair of individuals. Figure 3: GA-SA algorithm coding diagram. The crossover operation selected in this paper randomly selects two individuals from the population, calculates the fitness values of these two individuals, retains the individuals with larger fitness values, and performs the same operation again to obtain two individuals with higher fitness values. Figure 4: The genetic algorithm–annealing algorithm (GA–SA) hybrid algorithm flow diagram. values; then, the crossover operation is performed on the two individuals according to the probability. Repeating this step until all individuals are selected. The probability of crossover is shown in the following formula. \[p_{c}=\left\{ \begin{array}{c}p_{c1}-\frac{(f_{b}-f_{avg})(p_{c1}-p_{c2})}{f_{ max}-f_{avg}},f_{b}\geq f_{avg}\\ p_{c1},f_{b}<f_{avg}\end{array} \right.. \tag{13}\]  
In the above formula, \(p_{c1}=0.85,p_{c2}=0.55\), \(f_{b}\) is the fitness value of two individuals, \(f_{\max}\) is the maximum fitness value in the population, and \(f_{avg}\) is the average fitness value in the population. This adaptive crossover probability can avoid early maturity and facilitate the later evolution of the algorithm [21]. When the fitness with a higher fitness value in two individuals is less than the average fitness value, the crossover probability is larger; when it is greater than the average fitness value, the crossover probability is smaller, and the range of the adaptive crossover probability is 0.55-0.85. The specific values are randomly determined within the empirical range. In this paper, we adopt a single point crossover, and the schematic diagram is shown in Figure 5.  
Mutation refers to the change of one or some gene values of each individual in a population to other allelic values, with a certain probability. The mutation can enhance the local search capability of the algorithm. According to the coding method, the mutation method has real value mutation and binary mutation. Binary mutation needs to negate only the corresponding gene value, and the real value mutation replaces the corresponding gene value with other random values within the range of values. The general mutation operation procedure is as follows: First, all individuals in the population are judged as to whether they will be mutated according to the pre-set mutation probability, and then, the mutated individuals are randomly selected to mutate. In this paper, the calculation formula for individual mutation probability is similar to the crossover probability:  
\[p_{m}=\left\{ \begin{array}{c}p_{m1}-\frac{(f_{c}-f_{avg})(p_{m1}-p_{m2})}{f_ {max}-f_{avg}},f_{c}\geq f_{avg}\\ p_{m1},f_{c}<f_{avg}\end{array} \right.. \tag{14}\]  
In the above formula, \(p_{m1}=0.1,p_{m2}=0.001\), \(f_{c}\) is the fitness of the individual to be mutated, \(f_{\max}\) is the maximum fitness value in the population, and \(f_{avg}\) is the average fitness value in the population. When the individual fitness value is small, the mutation probability is large; when the individual fitness value is large, the mutation probability is small, and the total mutation probability range is 0.001-0.1. The specific values are randomly determined within the empirical range.