A Chaotic Genetic Algorithm with Variable Neighborhood Search for Solving Time-Dependent Green VRPTW with Fuzzy Demand

: Aiming at the time-dependent green vehicle routing problem with fuzzy demand, this paper comprehensively considers the dispatch costs, time window penalty costs, fuel costs, and the effects of vehicle travel speed, road gradient, and vehicle load on fuel consumption, a mixed integer programming model is formulated based on pre-optimization and re-optimization strategies. The traditional vehicle routing problems are modeled based on a symmetric graph. In this paper, considering the influence of time-dependent networks on route optimization, modeling is based on an asymmetric graph, which increases the complexity of the problem. In the pre-optimization stage, a pre-optimization scheme is generated based on the credibility measure theory; in the re-optimization stage, a new re-optimization strategy was used to deal with the service failure node In order to solve this problem, we developed a chaotic genetic algorithm with variable neighborhood search, pseudo-randomness of chaos was introduced to ensure the diversity of initial solutions, and adaptive neighborhood search times strategy and inferior solution acceptance mechanism were proposed to improve the performance of the algorithm. The numerical results show that the model and algorithm we proposed are effective.


Introduction
In reality, due to the existence of objective and subjective factors, customer demand is often fuzzy and uncertain. Meanwhile, the traffic environment in a real logistics network also changes dynamically, so that vehicles cannot travel at their free speed, especially during rush hours. In recent years, environmental problems have become increasingly prominent. Controlling fuel consumption and carbon dioxide emissions is the key to protecting the environment. Therefore, the traditional mathematical model of the vehicle routing problem (VRP) is difficult to meet the requirements of fast and efficient distribution. The time-dependent green vehicle routing problem with time windows and fuzzy demand (TDGVRPTWFD) proposed in this paper is a VRP expansion problem to optimize the vehicle route in the distribution network with fuzzy demand based on the previously collected traffic data and comprehensively considering the dispatch costs of vehicles, fuel costs and penalty costs on earliness and tardiness. TDGVRPTWFD is the integration of VRP with fuzzy demand (VRPFD), VRP with time windows (VRPTW), time-dependent VRP (TDVRP), and green vehicle routing problem (GVRP), which is a more realistic road network environment and distribution requirements. Research on this problem has important theoretical and practical significance The existing literature on VRPFD mostly used fuzzy sets, credibility, and other theories to define fuzzy demand and related constraints. Cao and Lai [1] developed a hybrid intelligent algorithm to solve the fuzzy chance-constrained programming model established to minimize travel distance, which effectively optimizes the open vehicle distribution route under fuzzy demand. Kuo et al. [2] based on capacitated VRP, considering the fuzzy demand of customers, and taking the garbage collection system as the research object, established a CVRPFD model and designed an algorithm to solve it. Wang and Li [3] proposed a dynamic optimization strategy for VRPFD and developed a hybrid nondominated sorting genetic algorithm II (NSGA II) embedded fuzzy simulation for solving the model. Liu et al. [4] designed hybrid ant colony optimization to solve VRPFD and proposed a vehicle-coordinated strategy to reduce additional costs. Zhang and Fan [5] developed a variable neighborhood scatter search algorithm to solve VRPFD and proposed a novel real-time adjusted strategy. Li [6] formulated an optimization model based on the principle of pre-optimization and re-dispatch and proposed a new strategy to adjust the pre-optimization scheme in the second stage. Giallanza and Puma [7] considered the fuzziness of customer demand and carbon emissions during transportation, and a fuzzy chance-constrained programming model for 3E-FGVRP is established and solved by NSGA. Fan et al. [8] aimed at the time-dependent vehicle routing problem with fuzzy demand and time windows, established a two-stage optimization model, and developed an adaptive large neighborhood search algorithm (ALNS).
The models and algorithms for solving vehicle routing problems with time windows have been relatively mature. Hashimoto et al. [9] summarized the related research on VRP with hard and soft time windows, and emphatically introduced several penalty functions for violating time windows and related solving algorithms. Yu et al. [10] developed an improved branch-and-price (BAP) algorithm for heterogeneous fleet green VRPTW to optimize vehicle routing and minimize carbon emissions. To improve the performance of the algorithm, a multi-vehicle approximate dynamic programming (MVADP) algorithm and an integer branch method are introduced into the algorithm. Wang et al. [11] formulated a multi-objective optimization model for periodic VRPTW and service choice and developed an improved ant colony optimization algorithm to solve the proposed problem. Multi-adaptive particle swarm optimization [12] and hybrid estimation of distribution algorithm [13] are also used to solve VRPTW. With the development of intelligent transportation, we can collect more and more road network traffic data. Taniguchi and Shimamoto [14] established a mathematical model for VRP, in which the speed is time-varying. Mancini [15] used functional expressions to depict the change of vehicle speed. Haghani and Jung [16] studied the TDVRP with dynamic changes in travel time and customer demand, and designed a GA to solve it. Hashimoto et al. [17] studied the time-dependent vehicle routing problem with time windows (TDVRPTW) and adopted an iterated local search algorithm to solve it. Hu et al. [18] proposed a robust optimization model and designed a two-stage algorithm to solve the VRPTW under travel time uncertainty. Figliozzi [19] improved the Solomon database and designed the Figliozzi database to compare different algorithms for solving TDVRPTW. Mu et al. [20] developed parallel-simulated annealing (SA) to solve TDVRPTW. The algorithm used four neighborhood search structures to optimize the initial solution, which improved the performance of the sequential SA.
In recent years, many scholars are interested in GVRP. Kuo [21] designed a SA to solve TDVRP. Liu et al. [22] assumed the carbon emissions are related to vehicle speed, load and type, and designed an improved ACO to solve it. Poonthalir and Nadarajan [23] studied GVRP with minimizing the routing costs and fuel consumption. Xu et al. [24] studied GVRP and developed a heuristic algorithm to solve it. Xiao and Konak [25] proposed a hybrid algorithm to solve GVRSP considering the effects of vehicle loads on emissions. Ç imen and Soysal [26] considered the stochastic and time-dependent characters while estimating fuel consumption and emissions, and used a heuristic algorithm to solve TDGVRP.
The following points can be summarized by reviewing the existing research: (1) The research on VRPFD is mostly the innovation of algorithm and the research on return strategy after a service failure, ignoring the impact of rush hour, emergency, and other factors on the traffic environment. (2) The existing literature on VRPFD mostly formulated optimization models aiming at the minimum distance, without considering the fuel costs and the effects of vehicle speed, vehicle load, and road gradient on fuel consumption. (3) Most research on the time-dependent vehicle routing problem uses the step function to depict the vehicle speed, causing a sudden change in speed change. Furthermore, all regard the demand of customers as certain and do not consider the fuzziness of customer demand in real life. (4) There is no research on VRP that comprehensively considers vehicle speed changes in real-time, fuel consumption changes during distribution, time window penalty, and fuzzy demand. Based on the above analysis, this paper takes TDGVRPTWFD as the research object:

•
Considering the time dependence of vehicle speed and the relationship between fuel consumption and vehicle type, speed, load, and road gradient, based on fuzzy credibility theory, a fuzzy chance-constrained programming model is formulated to minimize the total cost to optimize the vehicle routing with fuzzy demand.

•
Chaotic genetic algorithm with variable neighborhood search and re-dispatch strategy is developed to solve the proposed problem. In the algorithm, the Logistic chaotic map is used to generate the initial population, and an adaptive neighborhood search strategy and an inferior solution acceptance mechanism are proposed.

Problem Description
In the distribution area, , , , ET LT is the time window of customer i , penalty costs will be incurred when arriving at customers earlier than i ET or later than i LT , the penalty costs per unit time for vehicles arriving earlier is 3 c , the penalty costs per unit time for vehicles arriving later is 4 c .
ik T is the time when the vehicle k arrives at node i , h ik t is the service duration of the vehicle k at node i . The decision variable ijk x indicates whether the vehicle k travels from i to j , which is 1 and no is 0. The decision variable ik y indicates whether the customer i is served by the vehicle k , and is 1 or 0.

Time-Dependent Function of Vehicle Speed
In the real world, vehicle speed changes continuously, such as the trigonometric    are related to road conditions) [24].
In this paper, the variation of vehicle speed on all-day roads is approximately expressed by a plurality of trigonometric function relations. The trigonometric expression between speed ( v ) and time ( t ) can be expressed as follows:   are related to road conditions. The changing trend of vehicle speed on weekdays can be depicted through the research of Yang [27], as in Figure 1. The whole day is divided into multiple periods, and each period has a different functional relationship between vehicle speed ( v ) and the time ( t ).

Calculation of Fuel Consumption
This paper uses the MEET model [28] to calculate carbon emissions, we combined the research of Alinaghian and Naderipour [29] on 3.5 t~7.5 t vehicles to calculate the fuel consumption In Equation (3),  is the road gradient in terms of percentage, In Equation (4),  is the loading rate. In this paper, the fuzzy demand of the customer is considered, and the most probable value 2i d is selected as the demand of the customer i to calculate the remaining capacity of the vehicle [7].

Fuzzy Demand Measure
In this paper, the decision-maker preference value   is introduced, and the credibility measure theory [30] is used to calculate the credibility of the remaining vehicle capacity to meet the demand of the next customer. Assuming that the vehicle k departs from the depot with a full load, and after the vehicle visits the mth customer, the remaining load of the vehicle is Since the customer's demand is a triangular fuzzy number, Q is also the triangular fuzzy number.
( ) Based on the credibility theory, when the vehicle continues to visit the 1 m + th customer, the credibility that the demand of customer e is less than the remaining vehicle capacity is: , the larger Cr means the higher the credibility of the vehicle to meet the fuzzy demand of customers e. The fuzzy chance constraint is introduced and  is preset. when Cr   , the vehicle will continue to visit the next customer, otherwise, a new vehicle will be reassigned to start a new route.  is the critical value for the vehicle to visit the next customer, and it is also a reflection of the risk attitude of the decision-maker. When 1  = , it indicates that the decision-maker is extremely conservative, and the vehicle is allowed to visit the next customer only when the remaining load of the vehicle can fully meet the demand of the customer. When 0  = , it indicates that the decision-makers are extremely radical, no matter how small Cr is, vehicles are required to continue to visit. It is generally believed that

Mathematical Model
The model of this paper is as follows: Symmetry 2022, 14, 2115 Equation (7) is objective function, which minimizes the sum of the dispatch costs, fuel costs and time window penalty costs. Equation (8) is a fuzzy capacity chance constraint, which ensures that the reliability of the remaining vehicle capacity meeting customer demand is higher than the preset confidence level. Equation (9) indicates that the number of vehicles used for routing optimization does not exceed the total number of vehicles. Equation (10) indicates each customer is served only once, and it is the balance constraint. Equation (11) indicates that each vehicle has only one route, and depart from the depot and return to the depot after the distribution task is completed. Equation (12) indicates that the same customer has no route connection. Equations (13) and (14) ensure that customers must have a route to connect with when they are visited by vehicles. Equation (15) restricts the maximum duration of vehicles. Equations (16) and (17) indicate that when the vehicle k travels from node i to node j , the time when the vehicle arrives at node j is equal to the time when the vehicle arrives at node i plus the service time at node i and the travel time on the arc ( ) , ij, where M is an infinite positive number. Equations (18) and (19) are decision variables.

Re-Dispatch Strategy
In the actual distribution process, even if the vehicle load in the pre-optimization scheme meets the credibility test of all customers, there may be situations where the customer demand exceeds the remaining vehicle load. Therefore, it is necessary to re-optimize the distribution scheme for customers who have failed to visit.
In the research of vehicle routing problems with fuzzy demand, the methods of dealing with customers who have failed to visit are mostly failure node return strategy and pre-failure node return strategy [31][32][33].
(1) Failure node return strategy: As shown in Figure 2(b), when the vehicle fails to serve customer 3, the vehicle returns to the depot to be reloaded and then continues to visit customer 3 and its subsequent customers according to the pre-optimization scheme, the same is true for customer 7.
(2) Pre-failure node return strategy: As shown in Figure 2(c), Before the vehicle visits customer 3, the credibility that the remaining load of the vehicle meets the demand of customer 3 is pre-judged, and when the credibility is less than the preset value, the vehicle returns to the depot for loading and then visits according to the pre-optimized route. For the above two strategies, the failure node return strategy must be inferior to the pre-failure node return strategy, because it is known from the triangle trilateral principle: 23 30 20 l l l +. The pre-failure node return strategy has strict requirements on node selection, and it is difficult to select the appropriate return node. If the selection is not appropriate, the distribution costs will increase. Furthermore, adopting the failure node return strategy and the pre-failure node return strategy may cause more vehicles returning to the depot to reload and perform delivery services again, increasing the number of vehicles used. Since the customer demand is fuzzy, to avoid the vehicle failing to visit the customer again, the vehicle should be fully loaded or loaded according to the upper bound 3i d of the triangular fuzzy number when leaving the depot again, which may lead to excessive goods left when the vehicle returns to the depot, which will have a bad effect to the goods and fuel costs. Given the shortcomings of the above strategy, this paper adopts the redispatch strategy [34] for customers who fail in service, as shown in Figure 2(d). When the vehicle fails to meet the customer's demand (the failure reason of customer 3) or fails to serve the customer through pre-judgment (the failure reason of customer 7), the vehicle returns to the depot, counts the unserved customers (customer 3, 4, 7) in all routes, and re-optimizes the distribution route according to the principle of the nearest neighbor method. In the re-optimization stage, the credibility of the customers to be visited by the vehicle is also checked, and the preference value  is set at a higher level. At this time, there may also be customers who have failed in the service, and a failed node return strategy may be adopted for them. Due to the small scale of customers, the probability of customers who fail again in re-optimizing routes is extremely small.

Solution Methodology
Genetic algorithm (GA) originates from the computer simulation of biological systems. It is a stochastic global search and optimization method developed by imitating the biological evolution mechanism in nature. It draws on Darwin's theory of evolution and Mendel's theory of heredity. Its essence is an efficient, parallel and global search method, which can automatically acquire and accumulate knowledge about the search space in the search process, and adaptively control the search process to acquire the best solution. However, GA is easy to fall into local optimum. Variable neighborhood search algorithm (VNS) is an improved local search algorithm. It uses the neighborhood structure formed by different actions to search alternately and achieves a good balance between centrality and dispersity. The idea can be summarized as "change makes perfect progress". Combining the advantages of GA and VNS, a chaotic genetic algorithm with variable neighborhood search (CGA_VNS) is designed to solve the TDGVRPTWFD. Figure 3 is the basic flow of CGA_VNS.

Generation of the Initial Population
The initial population of the genetic algorithm is mostly completely random. According to Darwin's theory of evolution, most seemingly random species in biological systems evolve but all follow certain rules. Chaotic systems are characterized by internal randomness, boundedness, ergodicity and dependence on initial values. In this paper, the logistic chaotic map is used to generate an initial population to ensure the uniformity of initial population distribution. Equation (20) is the mathematical formula of the logistic chaotic map. is constant, and the system is in a completely chaotic state and has all the characteristics of a chaotic system. That is to say, the sequence generated by the initial condition is aperiodic and non-convergent. Most of the initial populations of traditional genetic algorithms are completely randomly generated, while according to Darwin's theory of evolution, most seemingly random species evolution in real biological systems follows certain rules-genetic theory. In order to better understand the advantages of chaos, this paper compares and analyzes chaotic phenomena and random phenomena. Although chaos and randomness appear to be unpredictable on the surface, the unpredictability of chaos is due to the lack of existing technology, which makes it difficult to overcome problems such as computing power or data collection. Long-term accurate prediction cannot be carried out, etc.; and the unpredictability of random phenomena is its essential property, which is congenital. In this paper, the internal randomness of chaos is used to ensure the diversity of initial solutions in genetic algorithm.  The steps for generating the initial population are as follows: (1) Setting parameters: population size is (4) The initial population is generated according to the positions of n values in the chaotic system within their respective groups. After the initial population is generated based on the logistic chaotic map, the nearest neighbor method is used to decode. Customers are divided into vehicles according to the initial sequence through vehicle load constraint and duration constraint tests. When the vehicle cannot meet the constraint, send a new vehicle to visit the customer and insert 0 before the customer who cannot meet the constraint, and so on until the last customer, and insert 0 at the beginning and end of the chromosome to complete decoding. As shown in Figure 5, assuming that the order of customers is 7-3-2-5-4-6-1-8, the first vehicle is dispatched to visit according to the order of customers. If the vehicle cannot meet the constraint when visiting customer 5, it will dispatch a new vehicle to visit customer 5, insert 0 in front of customer 5, and so on until customer 8 is visited, and insert 0 in front of customer 7 and after customer 8 to complete decoding. Finally, three routes are formed, i.e., vehicle1: 0-7-3-2-0; vehicle2: 0-5-4-6-1-0; vehicle3: 0-8-0.  The fitness function can be calculated as follows:

Fitness Function
where R C represents the objective function.

Select Operation
The selection operation combines the elite reservations with the roulette wheel selection. First, the roulette wheel selection is to calculate the selected probability. Secondly, individual A with the highest probability is stored in the temporary matrix. After completing the search, if there is no better solution, it calculates the similarity between individual A and the sub-generation individuals. Next, it replaces the individual with the highest similarity.

Evolutionary Operation
In accordance with Figure 6, it selects two parents from individuals randomly. Firstly, points

Local Search Strategy
Local search strategy is the core function of the algorithm, which determines the local search capability of the algorithm. In this paper, we adopt VNS algorithm applied to the local search strategy to strengthen the search capability.

Neighborhood Structure
(1) Insert: Randomly select customers i and j , and insert customer i after customer j . As shown in Figure 7(a), customer 3 is inserted after customer 6.
(2) Exchange: Randomly select customers i and j , then their positions are exchanged. As shown in Figure 7

Adaptive Mechanism and Solution Acceptance
We design an adaptive neighborhood search number strategy and a new solution acceptance rule to balance the breadth and depth required for evolution, so that the algorithm jumps out of the local optimum. The disturbance intensity required by the population is different at different stages of the algorithm iteration. The strategy of adaptive neighborhood search times in this paper is as follows:

Algorithm Test
At present, there is no benchmark instance of TDGVRPFDTW. This paper selects instances of VRPTW and VRPFD to test the algorithm. The algorithm is programmed with MATLAB2018b in the Windows10 system. The proper setting of parameters has a great influence on the performance of heuristic algorithm. We analyze the function of parameters first. Next, we analyze the influence of parameters on solutions. Finally, we set the parameters through experiments. Setting the population size  Table 1 shows the bestknown solution under hard time constraints and the operation results of the wasp colony algorithm (WCA) [35] and CGA_VNS under soft time window constraints. N is the number of vehicles, Trans_cost is the transportation cost, P_cost is the time window penalty costs, Total_cost is the total costs, Gap is the deviation between the optimal solution obtained by CGA_VNS and WCA, and Ave_gap is the average value of Gap.
The time complexity of CGA_VNS is ( ) It takes about 2.5 min to solve the R1. Table 1 shows that in the results of the 10 benchmark instances, the minimum Gap is −21.38%, the maximum Gap is 5.48%, and Ave_gap is −5.96%. Although the number of vehicles used in the results of R107, R108, and R108 optimized by CGA_VNS is more than that optimized by WCA, the time window penalty cost is greatly reduced, and the total cost is smaller. The effectiveness of CGA_VNS in solving VRPSTW can be verified by comparing the results. , the actual customer demand is d . Table 2 shows the pre-optimization results of GA, VNS, and CGA_VNS under different preference values, and t is the average time spent by the algorithm. Figure 8 shows the iterative process of solving A-n48-k7 by three algorithms and the optimal routing of CGA_VNS optimization when the decision preference value is 0.4. It can be seen from Table 2 and Figure 8(a) that the convergence speed of GA is slow, the time spent in one experiment is relatively long, and the solution quality is poor. Compared with VNS, CGA_VNS adds an order crossover operator. Although CGA_VNS takes a little longer time to run once than VNS, it increases its local search ability and has better solution quality, and obtains the best solution of all instances under different decision preference values. Therefore, CGA_VNS has better performance than GA and VNS.  In this paper, Zhang et al. [5] improved A-n32-k5 is selected to further verify the performance of the algorithm, The optimal solutions of variable neighborhood scatter search algorithm (VNSS) [5], variable neighborhood tabu search algorithm (VNTS) [6] and the CGA_VNS running 10 times are summarized in Table 3. N represents the number of vehicles used in the pre-optimization scheme, Best represents the best value of the pre-optimization scheme, Ave is the average of the results of 10 operations and Gap is the deviation between the best solution obtained by CGA_VNS and the best-known solution. t is the time spent in one experiment. It can be seen from Table 3 that the results obtained by CGA_VNS are not inferior to VNSS and VNTS except that  is 0.1, and the results obtained by CGA_VNS are relatively stable. The performance of the algorithm is further verified.

Numerical Experiment
At present, there are no benchmark instances of the TDGVRPTWFD. This paper improves the data of the top 50 customers of R101 in the Solomon database as the instance in this paper. The parameters are set as follows: We consider three types of roads, urban main roads, secondary roads, and branch roads. In Figure 9, red and black represent main roads and secondary roads respectively. Undrawn routes are branch roads. Figure 10 is vehicle speeds.

Pre-Optimization Stage
To verify the performance of CGA_VNS to solve the problems in this paper, GA, VNS, and CGA_VNS were used to solve the instance in the pre-optimization stage and the results were compared. Table 4 shows the pre-optimization results of the algorithm under different preference values, Best N represents the optimal value of the solution and the number of vehicles used, Worst N represents the worst value of the solution and the number of vehicles used, Ave represents the average value of the solution results, and SD is the standard deviation of the solution results. Figure 11 shows the convergence process of the algorithm when =0. 4  . Figure 12 is a pre-optimized delivery route solved by CGA_VNS when =0.8  . It can be seen from Table 4: (1) CGA_VNS obtains the pre-optimized optimal solution under all preference values and the standard deviation of the result is the smallest, which shows that CGA_VNS has higher solution quality and better solution stability than the other two algorithms. It can be seen from Figure 11 that CGA_VNS has a faster convergence speed.

Re-Optimization Stage
Assuming that the actual demand of the served customers is 1 Table 5 shows the re-optimization results corresponding to the best pre-optimization results under different preference values. Strategy 1 is the failure node return strategy, strategy 2 is the pre-failure node return strategy, and strategy 3 is the optimization strategy in this paper. Pre best − is the best pre-optimization result, cos Et − is the extra costs of the preoptimization scheme due to route failure, cos Tt − is the total distribution costs after reoptimization, Re best − is the lowest total costs of the three strategies. Table 5 shows that when   the pre-optimization scheme needs to be re-optimized, the extra costs of the distribution scheme solved by the strategy in this paper are lower than the other two strategies. Table 6 gives detailed adjustment results when 0.4  = .   Based on the above analysis, the essence of the three strategies is to maintain a certain degree of balance between risk and costs. The strategy in this paper is better than strategy 1 and strategy 2 on the whole.

Conclusions
In reality, due to the existence of objective and subjective factors, customer demand is often fuzzy and uncertain. Meanwhile, the dynamic change of traffic information will also affect the formulation of the distribution scheme. For TDGVRPTWFD, this paper comprehensively considers the influence of the dispatch costs, fuel costs, and time window penalty costs on the total costs, and establishes a fuzzy chance-constrained optimization model with time-varying vehicle speed and time window. In the pre-optimization stage, a pre-optimization scheme is generated based on the credibility measure theory. in the re-optimization stage, route adjustments will be made for customers who have failed in service. The chaotic genetic algorithm with variable neighborhood search is developed to solve the problem. Numerical results show that the model and algorithm are effective. The following conclusions are obtained: (1) The fuzzy chance-constrained optimization model of TDGVRPTWFD has fully considered the fuzziness of customer demand in the actual distribution process, further expanding and deepening the VRP research.
(2) The model considers the time-dependent vehicle speed and the influence of vehicle speed, load, and road gradient on fuel consumption. After considering the above factors, the model becomes more complex and closer to the actual situation. (3) The proposed algorithm uses logistic chaotic mapping to generate initial solutions, which ensures the diversity of initial solutions. Adaptive neighborhood search times strategy and inferior solution acceptance mechanism improve the performance of algorithm. (4) In the pre-optimization stage, the distribution costs of the pre-optimization scheme increase with the increase of the preference value of decision-makers, and the number of vehicles dispatched also increases. In the re-optimization stage, the more conservative the decision-makers tend to be, the lower the extra costs they pay and the smaller the number of vehicles they dispatch.