**3. G-NSGA-II Algorithm**

#### *3.1. Description of the G-NSGA-II Algorithm*

CV-GVRP is a multiobjective model with a comprehensive consideration of enterprise cost and customer value. The nondominated ranking genetic algorithm-II with the elite genetic strategy is widely used in multiobjective optimization and solves the problem exactly [20,39]. The Pareto solution can intuitively reflect the relationship between the two objectives. Using the greedy algorithm to obtain an initial solution can expand the local search and improve the solution quality [32]. To further improve the global search ability and convergence speed of the algorithm, this paper designed an improved NSGA-II (G-NSGA-II) with the characteristics of the local optimization of the greedy algorithm to solve the model.

1. Coding Mechanism

Natural number coding was used to visually describe possible solutions to the problem. A chromosome denotes a feasible distribution solution using client sites as genes of the chromosome, and 0 denotes a distribution center. The chromosome can be expressed as (0, I1, I2..., Ir, 0), which means a vehicle departs from the distribution center (point 0) and services customers I1, I2..., Ir in order. The vehicle then returns to point 0. A schematic of chromosome coding is shown in Figure 3.

2. Population Initialization

Since the greedy algorithm could give an initial solution in a shorter time, this paper combined the greedy algorithm to solve the model through the following steps:

Step 1: First, set the initial path to empty.

Step 2: From the initial node (warehouse), randomly select customer point *i* and calculate the distance between customer point *i* and neighboring points. Then, add the customer point *j* with the shortest delivery distance to the path.

Step 3: Determine whether there are still unserved customer nodes; if so, proceed to the next step, otherwise, terminate the algorithm.

Step 4: Calculate the distance between customer point *i* − *new* and the remaining customer points, choose the shortest one and then return to Step3.

**Figure 3.** Chromosome coding.

#### 3. Improve the Sorting Fitness Strategy

Figure 4 reflects the density information of individuals. The Pareto ranking of individuals 1, 2, 3, 4, 5 and 6 was one, and the ranking of individuals a, b and c was two. However, the density around individual a was significantly larger than that of b and c. Therefore, to avoid them having the same probability of entering the next generation, the ranking values were combined with the density information around the individuals to distinguish individuals in the same layer. This could improve the diversity of the population distribution without increasing the complexity of the algorithm.

**Figure 4.** Density information around the individuals.

#### 4. Crowding Calculation

After several iterations to obtain a hierarchy of noninferior solutions, the crowding distance between neighboring individuals was calculated using objective values. The individuals with a more considerable crowding distance in the same layer were retained to ensure the diversity of solutions. *<sup>D</sup>*(*<sup>i</sup>* <sup>+</sup> <sup>1</sup>)*f m* and *<sup>D</sup>*(*<sup>i</sup>* <sup>−</sup> <sup>1</sup>)*f m* represent the *<sup>m</sup>*-th objective function value of individuals (*i* + 1) and (*i* − 1), respectively, and *f m* represents the *m*-th function in the model. *f m*max and *f m*min are the maximum and minimum values of the *m*-th objective function values, respectively. The following formula could calculate the crowding degree of individuals:

**y**

$$D(i) = D(i) + \frac{D(i+1)^{fm} - D(i-1)^{fm}}{fm^{\max} - fm^{\min}} \tag{21}$$

5. Crossover and Variation

In this paper, we adopted the natural number encoding method and chose the partialmapped crossover (PMX) for the crossover operation in order to improve the convergence speed of the algorithm. The basic procedure was as follows: 1. Two individuals were randomly identified as crossing nodes in the parent population. 2. The genes of the two crossover nodes were exchanged between the parents. 3. Relationships were mapped based on genes between two crossover nodes, replacing duplicated genes on the same parent to obtain two offspring. The diagram of the PMX is shown in Figure 5.

**Figure 5.** Cross process.

This paper adopted the exchange variation to increase the diversity of individuals in the population and improve the local search ability of the algorithm, in which any two gene points were selected to be swapped. The result of the mutation is shown in Figure 6.

**Figure 6.** Mutation process.
