# Scheduling Optimization of Mobile Emergency Vehicles Considering Dual Uncertainties
## 3 Solution Algorithms
### Genetic Algorithm Solution  
The above mobile emergency vehicle scheduling problem is NP-hard, since it is a branch of the mobile facility routing problem (MFRP) [23]. It cannot obtain an accurate solution using the branch and bound algorithm. We tried to utilize three algorithms to solve the model. Compared with particle swarm optimization (PSO) [24], ant colony optimization (ACO) [25] and the genetic algorithm (GA) [26] both have the ability in optimizing various complex problems in a simpler way. Compared with PSO and ACO, the GA more easily deals with the uncertainty problem [27]. And according to the summarization by [PERSON] [28], the genetic algorithm (GA) has many significant advantages, such as strong global search, fewer parameters, and fast solving speed [29]. These characteristics are conducive to obtaining the minimum mobile emergency time and the optimal cost with a relatively simple algorithm structure. Considering the complexity of the transport path and material quantity, the search process of the GA requires the whole population to move toward the optimal area evenly. Therefore, referring to the algorithm models of [PERSON] [1] and [PERSON] [12], we designed an integer-coding hybrid genetic algorithm to retrieve all feasible solutions and prevent local optimal solutions from converging quickly. The flow chart of the genetic algorithm is shown in Figure 2.  
Step 1: The chromosomal code. Since the solutions of the model are all positive integers, we adopt natural number coding to represent chromosomes instead of decision variable. Assume that the number of mobile emergency centers in the mobile emergency vehicle scheduling system is \(a\), and the number of demand points is \(b\), then the number of optimal paths between the mobile emergency centers and demand points is \(c=ab\). Supposing that all the disaster areas need some kind of emergency materials or emergency services to different degrees, the chromosome coding length can be determined as \((\alpha+\beta)c\). Here, \(\alpha\) denotes the number of emergency materials involved, and \(\beta\) denotes the type of emergency rescue services. Correspondingly, the code level is related to the name of each demand point, and the code value is related to the number of materials or rescue services. Step 2: Algorithm initialization settings and fitness value. For the actual mobile emergency vehicle scheduling scenario, the initial population size \(N\) is set to \(|I||||K|\), and the maximum number of iterations \(T_{\max}\) is defined as \(N^{2}\). Then, the Randi function is used to randomly generate \(N\) mobile emergency vehicle scheduling schemes that meet the emergency needs. And the corresponding path transport volume of each scheme is coded according to the chromosome coding requirements. Considering that the model is described by a minimization problem, the fitness function \(F_{n}^{t}\) can be designed as the inverse of the objective function, namely the fitness value of the \(n\) chromosome in the \(t\) generation is the inverse of \(Z_{n}^{t}\) divided by the sum of all inverse of \(Z_{n}^{t}\) of each chromosome. It is worth mentioning that the penalty function may reduce the survival probability of unqualified solutions. In this case, the value of the initial population size should double. \[F_{n}^{t}=\frac{1/Z_{n}^{t}}{\sum_{n}(1/Z_{n}^{t})} \tag{16}\]  
Step 3: Genetic manipulation and termination conditions. Due to the randomness of the roulette bet and crossover, individuals with higher fitness on the parental chromosome have a certain probability of being eliminated and optimized, resulting in a decline in the population's average fitness. To solve this problem, the elite retention strategy is adopted in the chromosome selection process to preserve the top 10% of the parental population. That is, 10% of the population from the previous generation is directly copied to the next generation, and optimization individuals are retained to accelerate convergence. As shown in Figure 3, a uniform is selected as the crossover strategy.