# Task-Driven Virtual Machine Optimization Placement Model and Algorithm
## 4 VM Placement Optimization Method
### Chaos-Elite NSGA-III
#### 4.1.3 Adaptive Crossover and Mutation Operations  
Exploration is a process of accessing a new region in the search space, which facilitates the algorithm to search the region containing dominant solutions in the global scope. Exploitation involves digging deeper into the neighborhood of the previously visited points, which is conducive to the improvement of the algorithm search results [36]. Higher crossover and mutation probabilities can enhance exploration by generating more diverse solutions and covering a broader search space. Lower crossover and mutation probabilities improve exploitation by fine-tuning solutions in promising areas [37]. Leveraging a balance between exploration and exploitation, with properly tuned crossover and mutation probabilities, enables the algorithm to avoid falling into local optima and ensures both global search capability and local refinement. Inspired by [38], the mutation probability, \(F\), and crossover probability, \(CR\), in the DE [35] are adaptively adjusted, and these adjustments are incorporated into NSGA-III for improvement. The processes for adjusting the mutation and crossover probabilities are expressed as Equation (17) and Equation (18), respectively.  
\[F=\left\{\begin{array}{c}\frac{k_{1}(f_{\max}-f_{\text{ crossover}})}{f_{\max}-f_{\text{avg}}},f_{\text{ crossover}}\geq f_{\text{avg}}\\ k_{2},f_{\text{crossover}}<f_{\text{avg}}\end{array}\right. \tag{17}\]  
\[CR=\left\{\begin{array}{c}\frac{k_{3}(f_{\max}-f_{\text{mutation}})}{f_{ \max}-f_{\text{avg}}},f_{\text{mutation}}\geq f_{\text{avg}}\\ k_{4},f_{\text{mutation}}<f_{\text{avg}}\end{array}\right. \tag{18}\]  
where \(f_{\text{max}}\) denotes the current maximum fitness value of the population, \(f_{\text{avg}}\) indicates the current average fitness value of the population, \(f_{\text{crossover}}\) denotes the larger fitness value between the two crossover individuals, and \(f_{\text{mutation}}\) expresses the fitness value of the mutant individual. Based on multiple experimental observations, the constants in Equations (17) and (18) are empirically set as follows: \(k_{1}=1.0,k_{2}=1.0,k_{3}=0.5,k_{4}=0.5\).  
In traditional NSGA-III, polynomial mutation and simulated binary crossover are typically used during mutation and crossover operations. This approach easily lets the algorithm fall into local optimization. To quickly propagate beneficial traits and accelerate convergence while maintaining diversity in the solutions, the adaptive adjustments to mutation and crossover operations shown in Equations (17) and (18) are integrated with NSGA-III, and the polynomial mutation and simulated binary crossover are replaced with the improved operations. The mutation operation is calculated as shown in Equation (19).  
\[v_{i}=x_{r_{1}}+F(x_{r_{2}}-x_{r_{3}}) \tag{19}\]  
where \(v_{i}\) represents the mutant individual, \(x_{r_{1}},x_{r_{2}},x_{r_{3}}\), are three different individuals randomly selected from the current population, \(F\) is the probability of variation shown in Equation (17). After the mutation operation, the crossover operation is performed to mix the mutant individual \(v_{i}\) and the original individual \(x_{i}\) to generate the test individual \(u_{i}\), as shown in Equation (20).  
\[u_{i}=\left\{\begin{array}{c}v_{i}^{j},\text{if }rand_{j}\leq CR\text{ or } \text{j}=\text{j}_{\text{rand}}\\ x_{i}^{j},\text{otherwise}\end{array}\right. \tag{20}\]where \(v_{i}^{j}\) denotes the jth component of \(v_{i}\), \(x_{i}^{j}\) represents the jth component of \(x_{i}\). \(rand_{j}\) is a random number uniformly distributed within \([0,1]\) and \(CR\) is the crossover probability shown in Equation (18). \(j_{rand}\) is an integer randomly chosen within \([1,D]\), where \(D\) is the dimensionality of the problem, and it is guaranteed that at least one component comes from the variational vector.