Vehicle path optimization method and system with time window, and storage medium

By adopting evolutionary algorithms of multiple group and local searches in the vehicle path optimization algorithm with time window, the existing algorithms have solved the problems of high computational complexity and local optimization, and achieved more efficient quality improvement of global search and solutions.

CN119398648APending Publication Date: 2025-02-07XIANGTAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411220167.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing vehicle path optimization algorithm with time window has high computational complexity when dealing with large-scale problems, is prone to falling into local optimal solutions, and lacks diversity maintenance, which affects the search range and quality.

Method used

Using an evolutionary algorithm based on multiple populations and local searches, by constructing mathematical models, initializing populations, performing genetic operators to generate new populations, and local searches are carried out based on individual performance, combining populations to retain the best individuals, and improving global search capabilities .

Benefits of technology

Obtaining better solutions in a short time will improve the algorithm's global search ability, avoid local optimal problems, and improve the quality of understanding through diversity maintenance strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398648A_ABST
    Figure CN119398648A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle path optimization method and system with a time window, and a storage medium. The method comprises the following steps: constructing a mathematical model according to a vehicle path problem with the time window, initializing a population Pt, randomly generating chromosomes, and providing diversified starting points; performing genetic operator generation on the population Pt to generate a new population Pt ', wherein the genetic operator comprises selection, crossover and variation; sub-populations are divided according to expressions of individuals in different dimensions, a sub-population SP1 is selected from Pt'according to vehicle number characteristics, and a sub-population SP2 is selected from Pt 'according to total driving distance characteristics; performing local search on the sub-populations SP1 and SP2 by adopting different search strategies; according to the method, the vehicle path problem with the time window is solved based on the multi-population and local search evolutionary algorithm, and the optimal solution can be obtained in a short time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of vehicle routing with time windows, and in particular relates to a vehicle routing optimization method, system and storage medium with time windows based on an evolutionary algorithm of multiple populations and local search. Background Art

[0002] The Vehicle Routing Problem with Time Windows (VRPTW) is a complex combinatorial optimization problem. The problem involves a group of identical trucks departing from a warehouse to provide services to customers in different geographical locations according to their service time windows, each of which has specific cargo requirements. While ensuring the timeliness of the service, it is necessary to ensure that the cumulative cargo load of each truck does not exceed the load capacity of the truck. The research on VRPTW aims to effectively plan and manage the routes of distribution vehicles to maximize customer satisfaction while minimizing overall costs. In actual logistics transportation, the delivery of goods must be completed within a specific time range, which is usually determined by the customer's working hours, business hours or other constraints. Considering time windows can ensure that the goods are delivered on time, improve customer satisfaction, and avoid additional costs or substandard services due to delays.

[0003] At present, the methods for solving VRPTW are mainly divided into the following categories:

[0004] (1) Exact algorithm: The exact method incorporates constraints into the solution process to ensure that the generated path plan meets the actual needs and constraints, and exhausts all possible solutions in the entire solution space to ensure that the global optimal solution is searched, which effectively solves the VRPTW problem, but also consumes a lot of computing resources. In practical applications, considering the timeliness and large-scale characteristics of the problem to be solved, heuristic algorithms and meta-heuristic algorithms are often used.

[0005] (2) Heuristic algorithm: Heuristic method is a search method based on experience and rules, but it relies too much on heuristic information. The algorithm cannot effectively search the target space on a global scale and is prone to fall into local optimality.

[0006] (3) Metaheuristic algorithm: Metaheuristic algorithm is an improvement of heuristic algorithm, which combines random algorithm with local search algorithm and is a general search framework. These algorithms can obtain better solutions in a shorter time, but often require complex tuning of algorithm parameters. Existing metaheuristic algorithms still need to be improved to obtain better solutions.

[0007] The above algorithm has the following shortcomings:

[0008] (1) High computational complexity: When dealing with large-scale VRPTW problems, the exact algorithm has a high computational complexity and is difficult to obtain the optimal solution within a reasonable time.

[0009] (2) Local optimality problem: Heuristic and meta-heuristic algorithms are prone to fall into local optimal solutions and cannot guarantee finding the global optimal solution.

[0010] (3) Lack of diversity maintenance: Evolutionary algorithms based on a single population are prone to loss of population diversity, thus affecting the scope and quality of the search. Summary of the invention

[0011] In view of the above-mentioned technical problems, the purpose of the present invention is to provide a vehicle path optimization method, system and storage medium with a time window. The method solves the vehicle path problem with a time window based on an evolutionary algorithm of multiple populations and local search, and can obtain a better solution in a shorter time.

[0012] The technical solution of the present invention is:

[0013] A vehicle path optimization method with a time window comprises the following steps:

[0014] S01: Construct a mathematical model based on the vehicle routing problem with a time window, initialize the population Pt, and randomly generate chromosomes to provide a diverse starting point for the vehicle routing problem space;

[0015] S02: Generate a new population Pt' based on genetic operators on the population Pt, where the genetic operators include selection, crossover, and mutation;

[0016] S03: Divide subpopulations according to the performance of individuals in different dimensions, select subpopulation SP1 from Pt' according to the number of vehicles, and select subpopulation SP2 from Pt' according to the total distance traveled;

[0017] S04: Use different search strategies to perform local searches on subpopulations SP1 and SP2 respectively;

[0018] S05: merge the sub-populations SP1 and SP2 that have completed the local search, the population Pt' that has completed the genetic operator, and the parent population Pt into the next generation temporary population Pt+1';

[0019] S06: Select individuals from Pt+1' and put them into the next generation population Pt+1, and iterate and optimize to obtain the optimal solution.

[0020] In the preferred technical solution, constructing a mathematical model in step S01 includes:

[0021] Objective function:

[0022] minK

[0023]

[0024] Among them, K is the total number of vehicles in use, d ij is the distance from customer i to customer j, x ij is the path from customer i to customer j, and V is the set of customers;

[0025] Constraints:

[0026]

[0027] t j =t i +w i +s i +t ij ,i,j∈{1,2,…,n},i≠j

[0028] e i ≤(t i +w i )≤l i ,i∈V

[0029] Among them, x 0jk is the path of vehicle k from the distribution center to customer j, n is the total number of customers, x i0k is the path of vehicle k from customer i to the distribution center, x ijk is the path of vehicle k from customer i to customer j, q i is the capacity demand of customer i, Q is the maximum load of the vehicle, w i is the waiting time of the vehicle at customer i, e i The earliest time to start serving customers, t i is the time to reach customer i, l i The latest time for customer i to be served, t j is the time to reach customer j, s i The service time for customer i, t ij is the time it takes for customer i to reach customer j

[0030] In the preferred technical solution, step S01 of generating the sum of chromosomes includes:

[0031] The chromosome is encoded using sorting encoding, and the length of the chromosome is set to:

[0032] length(C)=NC+NV-1

[0033] Among them, length (C) represents the chromosome length, NC represents the number of customers, and NV represents the number of vehicles;

[0034] The value of each gene on the chromosome is traversed. When the value exceeds the number of customers, the chromosome is split into multiple sub-paths, and the starting and ending points of the sub-paths are both located at the customer warehouse. After decoding, the relevant information of the corresponding chromosome is obtained, including sub-paths, the number of vehicles used, the driving distance of the vehicle, the paths that violate the time window constraints or vehicle load constraints, and the number of customers.

[0035] In the preferred technical solution, the method for generating a new population Pt' in step S02 includes:

[0036] The roulette wheel selection method based on the fitness of FDDR-FF is used for the population Pt. The fitness of FDDR-FF is:

[0037]

[0038] Among them, q(m) represents the number of individuals that dominate individual m, p(m) represents the number of individuals dominated by individual m, and N represents the size of the population;

[0039] The probability of each individual being selected is set to be inversely proportional to its FDDR-FF value, and the sum of the probabilities is guaranteed to be 1. The binary tournament selection method is used in the formation of subpopulations.

[0040] Adopt sequential crossover;

[0041] The exchange mutation method is used, and the interval of exchange mutation is 2.

[0042] In the preferred technical solution, in step S04, a large-area search strategy emphasizing distance is used to perform a local search on the subpopulation SP1. The large-area search strategy emphasizing distance includes:

[0043] Calculate the client node c i and c j Correlation between:

[0044]

[0045] Among them, ω(c i ,c j ) is 1, indicating that the client node c i and c j On the same vehicle, if it is 0, it is not on the same vehicle, d(c i ,c j ) represents the client node c i and c j The relationship in distance, d(c i ,c j )for:

[0046]

[0047] dist(c i ,c j ) represents the client node c i and c j The distance between them, dist(max(c i ,c all )) and dist(min(c i ,c all )) respectively represent c i The maximum and minimum distances to all client nodes;

[0048] Selecting a client node with the greatest correlation with the selected client node from the client list according to the correlation;

[0049] Calculate the total path distance, calculate the difference in path distance after removing the node, and regard it as the distance increment caused by the node in the path, and remove the customer with the largest distance increment;

[0050] Calculate the distance increment of each customer in the removed node set when inserted into different path positions in turn, and select the position with the smallest distance increment for insertion.

[0051] In the preferred technical solution, in step S04, a local search is performed on the subpopulation SP2 using a reserved insertion recombination strategy, and the reserved insertion recombination strategy includes:

[0052] Construct an excellent path, remove the path that passes through the least number of customer nodes, and insert the customer nodes of this path into all the insertable positions of other paths in sequence until the time window constraint and load constraint are met; if the customer node cannot be inserted into any insertable position of any path while meeting the constraints, reconstruct an empty path to place the customer node;

[0053] Keep an excellent path, place the customer nodes on the remaining paths in the customer node set, and insert the customer nodes in the customer node set into all insertable positions of the excellent path in turn until the time window constraint and load constraint are met; if the excellent path insertion constraint is not met, insert it into the reconstructed path. If the constraint is still not met, reconstruct an empty path to place the customer node.

[0054] In the preferred technical solution, step S05 further includes: arranging the paths in the individual in descending order according to the number of customer nodes, and placing the customer numbers on the paths in the information list in sequence, and when the number of customer nodes of multiple paths is the same, the path with the larger number of the first node is preferentially selected for placement;

[0055] Calculate the similarity, which is the ratio of the number of customers with the same ID in the same position in the two information lists to the number of all customer nodes;

[0056] If the similarity is greater than the set parameter S, the two individuals are considered similar and the similar individuals are removed from the population.

[0057] In the preferred technical solution, the method of selecting individuals from Pt+1' and putting them into the next generation population Pt+1 in step S06 includes:

[0058] According to the fitness value of FDDR-FF, the best individuals are selected from Pt+1' and placed in the next generation population Pt+1, and the other individuals are initialized and then placed in the next generation population Pt+1.

[0059] The present invention also discloses a vehicle path optimization system with a time window, comprising:

[0060] The model building module builds a mathematical model based on the vehicle routing problem with a time window, initializes the population Pt, and randomly generates chromosomes to provide a diverse starting point for the vehicle routing problem space;

[0061] The evolution operation module generates a new population Pt' based on genetic operators for the population Pt. The genetic operators include selection, crossover, and mutation.

[0062] The subpopulation generation module divides the subpopulations according to the performance of individuals in different dimensions, selects subpopulation SP1 from Pt' according to the number of vehicles, and selects subpopulation SP2 from Pt' according to the total distance traveled;

[0063] The local search module uses different search strategies to perform local searches on subpopulations SP1 and SP2 respectively;

[0064] The population mixing module merges the sub-populations SP1 and SP2 that have completed the local search, the population Pt' that has completed the genetic operator, and the parent population Pt into the next generation temporary population Pt+1';

[0065] The iteration module selects individuals from Pt+1' and puts them into the next generation population Pt+1, and iterates and optimizes to obtain the optimal solution.

[0066] The present invention further discloses a computer storage medium on which a computer program is stored. When the computer program is executed, the above-mentioned vehicle path optimization method with a time window is implemented.

[0067] Compared with the prior art, the present invention has the following beneficial effects:

[0068] 1. The present invention designs a multi-population evolution framework for global search. Sub-populations are divided according to the performance of individuals in different dimensions, and the poorly performing parts of the sub-populations are optimized using local search strategies, concentrating the evolutionary pressure on the target to be improved. In addition, to ensure that the current best individual will not be lost in the evolutionary process, the sub-populations that have completed the local search, the population that has completed the genetic operator, and the parent population are merged to compete together to retain the best individuals.

[0069] 2. The traditional vehicle insertion strategy can speed up the individual convergence speed, but the process of inserting each node in turn requires a lot of computing time, and each insertion is based on the current optimal choice without considering the overall path situation. Therefore, the present invention designs an insertion reorganization strategy with reservation (IRWP). IRWP can comprehensively consider the paths with the most and least traversal of customer nodes, and reserve the paths with the most traversal of customer nodes, thereby reducing complexity and accelerating the transformation of individuals from an infeasible state to a feasible state.

[0070] 3. If the individuals in the population are too simple, the target space may not be searched effectively. In order to ensure the diversity of the merged population, the present invention designs a similarity comparison strategy (SCS). SCS considers the similarity between individuals and other individuals in the population and the fitness of the individuals themselves, and reinitializes individuals that are highly similar to other individuals in the population and have poor convergence, helping the algorithm to find a balance between improving population diversity and maintaining high-quality solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0072] Figure 1 This is a flow chart of the vehicle path optimization method with a time window in this embodiment;

[0073] Figure 2 This is a principle block diagram of the vehicle path optimization system with time window in this embodiment;

[0074] Figure 3 This is a flow chart of the evolutionary algorithm based on multiple populations and local search in this embodiment;

[0075] Figure 4 This is the route map of C101 in this embodiment;

[0076] Figure 5 This is the C201 roadmap for this embodiment. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0078] Example

[0079] like Figure 1 As shown, a vehicle path optimization method with a time window includes the following steps:

[0080] S01: Construct a mathematical model based on the vehicle routing problem with a time window, initialize the population Pt, and randomly generate chromosomes to provide a diverse starting point for the vehicle routing problem space;

[0081] S02: Generate a new population Pt' based on genetic operators on the population Pt, where the genetic operators include selection, crossover, and mutation;

[0082] S03: Divide subpopulations according to the performance of individuals in different dimensions, select subpopulation SP1 from Pt' according to the number of vehicles, and select subpopulation SP2 from Pt' according to the total distance traveled;

[0083] S04: Use different search strategies to perform local searches on subpopulations SP1 and SP2 respectively;

[0084] S05: merge the sub-populations SP1 and SP2 that have completed the local search, the population Pt' that has completed the genetic operator, and the parent population Pt into the next generation temporary population Pt+1';

[0085] S06: Select individuals from Pt+1' and put them into the next generation population Pt+1, and iterate and optimize to obtain the optimal solution.

[0086] In a preferred embodiment, the step S01 of constructing a mathematical model includes:

[0087] Objective function:

[0088] minK

[0089]

[0090] Among them, K is the total number of vehicles in use, d ij is the distance from customer i to customer j, x ij is the path from customer i to customer j, and V is the set of customers;

[0091] Constraints:

[0092]

[0093] t j =t i +w i +s i +t ij ,i,j∈{1,2,…,n},i≠j

[0094] e i ≤(t i +w i )≤l i ,i∈V

[0095] Among them, x 0jk is the path of vehicle k from the distribution center to customer j, n is the total number of customers, x i0k is the path of vehicle k from customer i to the distribution center, x ijk is the path of vehicle k from customer i to customer j, q i is the capacity demand of customer i, Q is the maximum load of the vehicle, w i is the waiting time of the vehicle at customer i, e i The earliest time to start serving customers, t i is the time to reach customer i, l i The latest time for customer i to be served, t j is the time to reach customer j, s i The service time for customer i, t ij is the time it takes for customer i to reach customer j

[0096] In a preferred embodiment, step S01 of generating the sum of chromosomes includes:

[0097] The chromosome is encoded using sorting encoding, and the length of the chromosome is set to:

[0098] length(C)=NC+NV-1

[0099] Among them, length (C) represents the chromosome length, NC represents the number of customers, and NV represents the number of vehicles;

[0100] The value of each gene on the chromosome is traversed. When the value exceeds the number of customers, the chromosome is split into multiple sub-paths, and the starting and ending points of the sub-paths are both located at the customer warehouse. After decoding, the relevant information of the corresponding chromosome is obtained, including sub-paths, the number of vehicles used, the driving distance of the vehicle, the paths that violate the time window constraints or vehicle load constraints, and the number of customers.

[0101] In a preferred embodiment, the method for generating a new population Pt' in step S02 includes:

[0102] The roulette wheel selection method based on the fitness of FDDR-FF is used for the population Pt. The fitness of FDDR-FF is:

[0103]

[0104] Among them, q(m) represents the number of individuals that dominate individual m, p(m) represents the number of individuals dominated by individual m, and N represents the size of the population;

[0105] The probability of each individual being selected is set to be inversely proportional to its FDDR-FF value, and the sum of the probabilities is guaranteed to be 1. The binary tournament selection method is used in the formation of subpopulations.

[0106] Adopt sequential crossover;

[0107] The exchange mutation method is used, and the interval of exchange mutation is 2.

[0108] In a preferred embodiment, in step S04, a large-area search strategy emphasizing distance is used to perform a local search on the subpopulation SP1. The large-area search strategy emphasizing distance includes:

[0109] Calculate the client node c i and c j Correlation between:

[0110]

[0111] Among them, ω(c i ,c j ) is 1, indicating that the client node c i and c j On the same vehicle, if it is 0, it is not on the same vehicle, d(c i ,c j ) represents the client node c i and c j The relationship in distance, d(c i ,c j )for:

[0112]

[0113] dist(c i ,c j ) represents the client node c i and c j The distance between them, dist(max(c i ,c all )) and dist(min(c i ,c all )) respectively represent c i The maximum and minimum distances to all client nodes;

[0114] Selecting a client node with the greatest correlation with the selected client node from the client list according to the correlation;

[0115] Calculate the total path distance, calculate the difference in path distance after removing the node, and regard it as the distance increment caused by the node in the path, and remove the customer with the largest distance increment;

[0116] Calculate the distance increment of each customer in the removed node set when inserted into different path positions in turn, and select the position with the smallest distance increment for insertion.

[0117] In a preferred embodiment, in step S04, a local search is performed on the subpopulation SP2 using a reserved insertion recombination strategy, and the reserved insertion recombination strategy includes:

[0118] Construct an excellent path, remove the path that passes through the least number of customer nodes, and insert the customer nodes of this path into all the insertable positions of other paths in sequence until the time window constraint and load constraint are met; if the customer node cannot be inserted into any insertable position of any path while meeting the constraints, reconstruct an empty path to place the customer node;

[0119] Keep an excellent path, place the customer nodes on the remaining paths in the customer node set, and insert the customer nodes in the customer node set into all insertable positions of the excellent path in turn until the time window constraint and load constraint are met; if the excellent path insertion constraint is not met, insert it into the reconstructed path. If the constraint is still not met, reconstruct an empty path to place the customer node.

[0120] In a preferred embodiment, step S05 further includes: arranging the paths in the individual in descending order according to the number of customer nodes, and placing the customer numbers on the paths in the information list in sequence, and when the number of customer nodes of multiple paths is the same, the path with the larger number of the first node is preferentially selected for placement;

[0121] Calculate the similarity, which is the ratio of the number of customers with the same ID in the same position in the two information lists to the number of all customer nodes;

[0122] If the similarity is greater than the set parameter S, the two individuals are considered similar and the similar individuals are removed from the population.

[0123] In a preferred embodiment, the method of selecting individuals from Pt+1' and placing them into the next generation population Pt+1 in step S06 comprises:

[0124] According to the fitness value of FDDR-FF, the best individuals are selected from Pt+1' and placed in the next generation population Pt+1, and the other individuals are initialized and then placed in the next generation population Pt+1.

[0125] In another embodiment, a computer storage medium stores a computer program, and when the computer program is executed, the above-mentioned vehicle path optimization method with a time window is implemented. The specific method is consistent with the above-mentioned vehicle path optimization method with a time window, and will not be repeated here.

[0126] In another embodiment, if Figure 2 As shown, a vehicle path optimization system with a time window includes:

[0127] The model building module 10 builds a mathematical model according to the vehicle routing problem with a time window, initializes the population Pt, and randomly generates chromosomes to provide a diverse starting point for the vehicle routing problem space;

[0128] The evolution operation module 20 generates a new population Pt' based on the genetic operator on the population Pt, and the genetic operator includes selection, crossover, and mutation;

[0129] The subpopulation generation module 30 divides the subpopulations according to the performance of individuals in different dimensions, selects the subpopulation SP1 from Pt' according to the number of vehicles, and selects the subpopulation SP2 from Pt' according to the total travel distance;

[0130] A local search module 40 uses different search strategies to perform local searches on subpopulations SP1 and SP2 respectively;

[0131] The population mixing module 50 combines the sub-populations SP1 and SP2 that have completed the local search, the population Pt' that has completed the genetic operator, and the parent population Pt into the next generation temporary population Pt+1';

[0132] The iteration module 60 selects individuals from Pt+1' and puts them into the next generation population Pt+1, and iterates and optimizes to obtain the optimal solution.

[0133] The following is a detailed description of the workflow of the vehicle routing optimization system with a time window using a best example:

[0134] The vehicle routing problem with time windows is the task of delivering a group of goods from warehouses to multiple customers within a certain time window. The customer's needs are met when the customer's coordinates, the time range for the customer to receive the service, the service duration, the capacity requirements, and the vehicle load are known.

[0135] The goal is to find a set of routes that minimizes the number of vehicles used and the distance traveled.

[0136] Mathematical model

[0137] This problem can be defined as a fully weighted directed graph G = (V, E). V = {0, 1, 2, ..., n} represents the set of all nodes, 0 represents the distribution center, 1, 2, ..., n represents the customer. E represents the set of all possible paths, and each directed edge (i, j) ∈ E represents the path from customer i to customer j, where i, j ∈ V and i ≠ j.

[0138] For the vehicle routing problem, the relevant parameters and variables are defined as follows.

[0139] V = {0, 1, 2, ..., n}: the set of customers and warehouses;

[0140] Q: Maximum load capacity of the vehicle;

[0141] q i : capacity requirement of customer i;

[0142] u i =[e i ,l i ]: time window of customer i;

[0143] s i : Service time of customer i;

[0144] d ij : The distance from customer i to customer j;

[0145] x ijk : If vehicle k establishes a path between customer i and customer j, then x ijk =1, otherwise 0;

[0146] t i : time of arrival at customer i;

[0147] w i : The waiting time of the vehicle at customer i;

[0148] VRPTW mathematical model is as follows:

[0149] Objective function:

[0150] minK(1)

[0151]

[0152] Constraints:

[0153]

[0154] t j =t i +w i +s i +t ij, i,j∈{1,2,…,n},i≠j (8)

[0155] e i ≤(t i +w i )≤l i , i∈V (9)

[0156] Among them, x 0jk is the path of vehicle k from the distribution center to customer j, n is the total number of customers, x i0k is the path of vehicle k between customer i and the distribution center.

[0157] Among them, equations (1) and (2) represent the objective function, minimizing the total number of vehicles used and the distance traveled by vehicles. Equation (3) indicates that each vehicle must start from the distribution center and finally return to the distribution center. Equation (4) indicates that there is only one vehicle leaving from customer i. Equation (5) indicates that there is only one vehicle arriving at customer j. Equation (6) limits the actual load of the vehicle to not exceed the maximum load. Equation (7) represents the waiting time of the vehicle at customer i. Equation (8) represents the time when the vehicle arrives at customer j. Equation (9) represents the time window constraint of customer i, that is, the vehicle must arrive at or before the latest start time of service for customer i.

[0158] The evolutionary algorithm designed based on multi-population and local search is referred to as MPLS. The MPLS flow chart is as follows Figure 3 As shown, it can be divided into the following 5 steps.

[0159] First, the FDDR-FF-based genetic operators are executed on the population Pt to generate a new population Pt'. The genetic operators include selection, crossover, and mutation.

[0160] Second, subpopulations SP1 and SP2 are selected from Pt' according to the performance of a single target. The subpopulations are selected from Pt' using a binary selection method. Subpopulation SP1 is selected from Pt according to the number of vehicles, and subpopulation SP2 is selected from Pt' according to the total distance traveled.

[0161] Third, LNS-D and IRWP strategies are implemented on subpopulations SP1 and SP2 respectively;

[0162] Fourth, merge Pt, Pt', SP1, and SP2 into the next generation temporary population Pt+1' and implement the SCS strategy;

[0163] Fifth, based on the FDDR-FF fitness function, individuals are selected from Pt+1' and placed into the next generation population Pt+1.

[0164] Encoding

[0165] In MPLS, the chromosome is encoded using a sorting encoding method, and the length of the chromosome is set as shown below.

[0166] length(C)=NC+NV-1 (10)

[0167] Among them, length (C) represents the chromosome length, NC represents the number of customers, and NV represents the number of vehicles.

[0168] During the initial population generation phase, chromosomes are randomly generated to provide a diverse starting point for the problem space.

[0169] Decoding method

[0170] The decoding operation will traverse the value of each gene on the chromosome. When the value exceeds the number of customers, the chromosome is split into multiple sub-paths, and the starting and ending points of the sub-paths are both located in the warehouse. After decoding, relevant information about the corresponding chromosome can be obtained, including sub-paths, the number of vehicles used, the driving distance of the vehicle, the paths that violate the time window constraint or the vehicle load constraint, and the number of customers.

[0171] FDDR-FF (dynamic fitness function based on Pareto dominance and non-domination)

[0172] When solving the VRPTW problem, the number of vehicles in the final solution usually varies within a small range, thereby limiting the number of non-dominated solutions, resulting in the obtained PF being discontinuous and unbalanced. The fitness function based on FDDR-FF can quickly and effectively identify non-dominated solution individuals in the population, give priority to non-dominated individuals and individuals that are less dominated by other individuals, and is suitable for the situation where there are fewer non-dominated solutions in VRPTW. The specific calculation formula of FDDR-FF is as follows:

[0173]

[0174] Among them, q(m) represents the number of individuals that dominate individual m, p(m) represents the number of individuals dominated by individual m, and N represents the size of the population.

[0175] Genetic Operator

[0176] (1) Select

[0177] In MPLS, the population Pt uses a roulette selection method based on the fitness of FDDR-FF. Under this selection method, the FDDR-FF value of excellent individuals is small, so we set the probability of each individual being selected to be inversely proportional to its FDDR-FF value, and ensure that the total probability is 1. Secondly, in order to avoid too many overlaps in the selected individuals in subpopulations SP1 and SP2, a binary tournament selection method is used in the formation of subpopulations.

[0178] (2) Cross

[0179] Order Crossover (OX).

[0180] (3) Variation

[0181] The exchange mutation method is used, and the interval of exchange mutation is 2.

[0182] The large-scale search strategy with emphasis on distance (LNS-D) includes:

[0183] In MPLS, the vehicle travel distance is reduced by selecting the set of relevant nodes, two removal operators with the maximum distance increment, and the minimum distance increment re-insertion operator. In order to ensure the algorithm operation rate, the number of removed nodes is set to N(L R )=0.15NC.

[0184] Remove Operator

[0185] (1) Relevance node set: The relevance node set refers to removing a group of related customers. i and c j The correlation between the two is explained by r(c i ,c j ) is expressed as follows:

[0186]

[0187] Among them, ω(c i ,c j ) is 1, indicating that the client node c i and c j On the same vehicle, if it is 0, it is not on the same vehicle. i ,c j ) represents the client node c i and c j The relationship between the distances is shown as follows.

[0188]

[0189] dist(c i ,c j ) represents the client node c i and c j The distance between them, dist(max(c i ,c all )) and dist(min(c i ,c all )) respectively represent c i The maximum and minimum distances to all client nodes.

[0190] First, randomly select a customer node from the customer list and save it in the removed node set, and then delete the customer node from the customer list. Secondly, randomly select a customer node from the removed node set, and select the customer node with the greatest correlation with the selected node from the customer list according to the correlation, until the removed node set is filled.

[0191] (2) Maximum distance increment: Removing customer nodes with large distance increments can effectively reduce vehicle travel distance. First, calculate the total path distance, calculate the difference in path distance after removing the node, and regard it as the distance increment generated by the node in the path. Remove the customer with the largest distance increment until the removed node set is filled.

[0192] Reinsert Operator

[0193] Minimum distance increment: Under the constraints, calculate the distance increment of each customer in the removed node set inserted into different path positions in turn, and select the position with the smallest distance increment for insertion.

[0194] Insertion Recombination with Preservation (IRWP) includes:

[0195] Executing the IRWP strategy can optimize the target. IRWP consists of two steps: constructing an excellent path and retaining the excellent path and then inserting it.

[0196] Constructing an excellent path

[0197] The path that passes through the most customer nodes in an individual is considered an excellent path. The method to construct an excellent path is to remove the path that passes through the least customer nodes, and insert the customer nodes of this path into all the insertable positions of other paths in sequence until the time window constraint and load constraint are met. If the customer node cannot be inserted into any insertable position of any path while meeting the constraints, an empty path is reconstructed to place the customer node.

[0198] Keep the excellent path and insert it

[0199] Keep one excellent path from the above operation, and place the customer nodes on the remaining paths in the customer node set. Secondly, insert the customer nodes in the set into all the insertable positions of the excellent path in turn until the time window constraint and load constraint are met. If the excellent path insertion constraint is not met, insert it into the reconstructed path. If the constraint is still not met, reconstruct an empty path to place the customer node.

[0200] Similarity Comparison Strategy (SCS)

[0201] In VRPTW, when the number of vehicles decreases, the feasible solution space is also getting smaller. Individuals with highly similar fragments to other individuals may tend to evolve in the same direction of excellent individuals during the evolution process, which is not conducive to the diversity of the population. SCS sorts the paths in individuals in descending order according to the number of customer nodes, and places the customer numbers on the paths in the information list in sequence. When the number of customer nodes of multiple paths is the same, the path with the larger number of the first node is preferred for placement. Similarity refers to the ratio of the number of customers with the same number at the same position in two information lists to the number of all customer nodes. Two individuals with similar number sorting have a higher similarity. If the similarity between two individuals is greater than the set parameter S, the two individuals are considered similar. During the evolution process, there may be multiple similar individuals in the population. Similar individuals are removed from the population and placed in the same set. Based on the FDDR-FF value, the best individual is selected from the set and placed in the population. Other individuals are initialized and then placed in the population to avoid falling into the local optimum.

[0202] Experimental Results

[0203] In order to verify the effectiveness of MPLS, the Solomon dataset with a customer scale of 100 is selected for experiments. Each instance provides information about the warehouse and 100 customers. The dataset can be divided into six groups, including C1, C2, R1, R2, RC1 and RC2.

[0204] Performance Indicators

[0205] NVG is the vehicle usage number deviation, which refers to the difference between the vehicle usage number and the vehicle usage number of BSK, expressed as a percentage. A negative value means that the optimal solution of the algorithm has fewer vehicles than BSK.

[0206] TDG is the total distance traveled by the vehicle deviation, which refers to the difference between the total distance traveled by the vehicle and the total distance traveled by the vehicle of BSK, expressed as a percentage. A negative value means that the total distance traveled by the vehicle is shorter than that of the BSK in the optimal solution of the algorithm.

[0207] Parameter settings

[0208] Population size N 100 Subpopulation size SN 30 Crossover rate PC 0.8 Mutation rate PM 0.3 Similarity S 0.7

[0209] Tables 1 and 2 show the comparison between the optimal solution of MPLS in the Solomon instance and the existing known optimal solution. Figure 4 and 5 shown.

[0210] Table 1 Comparison results of MPEA-LS and BKS on C1, R1 and RC 1 examples

[0211]

[0212] Table 2 Comparison results between MPLS and BKS on C2, R2, and RC2 group instances

[0213]

[0214]

[0215] In general, the 17 solutions of MPLS are consistent with BKS, the number of vehicles in some instances is greatly optimized, and the total distance traveled by vehicles has a small deviation overall, which has good performance.

[0216] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

Claims

1. A vehicle path optimization method with a time window, characterized in that: The following steps are involved: S01: Construct a mathematical model based on the vehicle routing problem with a time window, initialize the population Pt, and randomly generate chromosomes to provide a diverse starting point for the vehicle routing problem space; S02: Generate a new population Pt' based on genetic operators on the population Pt, where the genetic operators include selection, crossover, and mutation; S03: Divide subpopulations according to the performance of individuals in different dimensions, select subpopulation SP1 from Pt' according to the number of vehicles, and select subpopulation SP2 from Pt' according to the total distance traveled; S04: Use different search strategies to perform local searches on subpopulations SP1 and SP2 respectively; S05: merge the sub-populations SP1 and SP2 that have completed the local search, the population Pt' that has completed the genetic operator, and the parent population Pt into the next generation temporary population Pt+1'; S06: Select individuals from Pt+1' and put them into the next generation population Pt+1, and iterate and optimize to obtain the optimal solution.

2. The vehicle path optimization method with time window according to claim 1 is characterized in that: The construction of the mathematical model in step S01 includes: Objective function: minK Where K is the total number of vehicles in use, d ij is the distance from customer i to customer j, x ij is the path from customer i to customer j, and V is the set of customers; Constraints: t j =t i +w i +s i +t ij ,i,j∈{1,2,…,n},i≠j e i ≤(t i +w i )≤l i ,i∈V Among them, x 0jk is the path of vehicle k from the distribution center to customer j, n is the total number of customers, x i0k is the path of vehicle k from customer i to the distribution center, x ijk is the path of vehicle k from customer i to customer j, q i is the capacity demand of customer i, Q is the maximum load of the vehicle, w i is the waiting time of the vehicle at customer i, e i The earliest time to start serving customers, t i is the time to reach customer i, l i The latest time for customer i to be served, t j is the time to reach customer j, s i The service time for customer i, t ij is the time it takes for customer i to reach customer j.

3. The vehicle path optimization method with time window according to claim 2 is characterized in that: Step S01 generates the sum of chromosomes including: The chromosome is encoded using sorting encoding, and the length of the chromosome is set to: length(C)=NC+NV-1 Among them, length (C) represents the chromosome length, NC represents the number of customers, and NV represents the number of vehicles; The value of each gene on the chromosome is traversed. When the value exceeds the number of customers, the chromosome is split into multiple sub-paths, and the starting and ending points of the sub-paths are both located at the customer warehouse. After decoding, the relevant information of the corresponding chromosome is obtained, including sub-paths, the number of vehicles used, the driving distance of the vehicle, the paths that violate the time window constraints or vehicle load constraints, and the number of customers.

4. The vehicle path optimization method with time window according to claim 1, characterized in that: The method for generating a new population Pt' in step S02 includes: The roulette wheel selection method based on the fitness of FDDR-FF is used for the population Pt. The fitness of FDDR-FF is: Among them, q(m) represents the number of individuals that dominate individual m, p(m) represents the number of individuals dominated by individual m, and N represents the size of the population; The probability of each individual being selected is set to be inversely proportional to its FDDR-FF value, and the sum of the probabilities is guaranteed to be 1. The binary tournament selection method is used in the formation of subpopulations. Adopt sequential crossover; The exchange mutation method is used, and the interval of exchange mutation is 2.

5. The vehicle path optimization method with time window according to claim 1, characterized in that: In step S04, a large-area search strategy emphasizing distance is used to perform a local search on the subpopulation SP1. The large-area search strategy emphasizing distance includes: Calculate the client node c i and c j Correlation between: Among them, ω(c i ,c j ) is 1, indicating that the client node c i and c j On the same vehicle, if it is 0, it is not on the same vehicle, d(c i ,c j ) represents the client node c i and c j The relationship in distance, d(c i ,c j )for: dist(c i ,c j ) represents the client node c i and c j The distance between them, dist(max(c i ,c all )) and dist(min(c i ,c all )) respectively represent c i The maximum and minimum distances to all client nodes; Selecting a client node with the greatest correlation with the selected client node from the client list according to the correlation; Calculate the total path distance, calculate the difference in path distance after removing the node, and regard it as the distance increment caused by the node in the path, and remove the customer with the largest distance increment; Calculate the distance increment of each customer in the removed node set when inserted into different path positions in turn, and select the position with the smallest distance increment for insertion.

6. The vehicle path optimization method with time window according to claim 1, characterized in that: In step S04, a local search is performed on the subpopulation SP2 using a reserved insertion and recombination strategy, and the reserved insertion and recombination strategy includes: Construct an excellent path, remove the path that passes through the least number of customer nodes, and insert the customer nodes of this path into all the insertable positions of other paths in sequence until the time window constraint and load constraint are met; if the customer node cannot be inserted into any insertable position of any path while meeting the constraints, reconstruct an empty path to place the customer node; Keep an excellent path, place the customer nodes on the remaining paths in the customer node set, and insert the customer nodes in the customer node set into all insertable positions of the excellent path in turn until the time window constraint and load constraint are met; if the excellent path insertion constraint is not met, insert it into the reconstructed path. If the constraint is still not met, reconstruct an empty path to place the customer node.

7. The vehicle path optimization method with time window according to claim 1, characterized in that: Step S05 also includes: arranging the paths in the individual in descending order according to the number of customer nodes, and placing the customer numbers on the paths in the information list in sequence, and when the number of customer nodes of multiple paths is the same, the path with the larger number of the first node is preferentially selected for placement; Calculate the similarity, which is the ratio of the number of customers with the same ID in the same position in the two information lists to the number of all customer nodes; If the similarity is greater than the set parameter S, the two individuals are considered similar and the similar individuals are removed from the population.

8. The vehicle path optimization method with time window according to claim 1, characterized in that: The method of selecting individuals from Pt+1' and putting them into the next generation population Pt+1 in step S06 includes: According to the fitness value of FDDR-FF, the best individuals are selected from Pt+1' and placed in the next generation population Pt+1, and the other individuals are initialized and then placed in the next generation population Pt+1.

9. A vehicle path optimization system with a time window, characterized in that: include: The model building module builds a mathematical model based on the vehicle routing problem with a time window, initializes the population Pt, and randomly generates chromosomes to provide a diverse starting point for the vehicle routing problem space; The evolution operation module generates a new population Pt' based on genetic operators for the population Pt. The genetic operators include selection, crossover, and mutation. The subpopulation generation module divides the subpopulations according to the performance of individuals in different dimensions, selects subpopulation SP1 from Pt' according to the number of vehicles, and selects subpopulation SP2 from Pt' according to the total distance traveled; The local search module uses different search strategies to perform local searches on subpopulations SP1 and SP2 respectively; The population mixing module merges the sub-populations SP1 and SP2 that have completed the local search, the population Pt' that has completed the genetic operator, and the parent population Pt into the next generation temporary population Pt+1'; The iteration module selects individuals from Pt+1' and puts them into the next generation population Pt+1, and iterates and optimizes to obtain the optimal solution.

10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the vehicle path optimization method with a time window according to any one of claims 1 to 8 is implemented.