A vehicle routing optimization method and system based on hybrid taboo search

The vehicle route is optimized through the hybrid tabu search algorithm, combined with variable neighborhood search and artificial immunity algorithm, to solve the vehicle route problem with time window and product classification, realize the optimization of vehicle number, driving distance and time penalty, and meet the needs of multiple customers , reducing transportation costs.

CN114091722BActive Publication Date: 2024-10-15SHANDONG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111178059.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-09
Publication Date
2024-10-15
Estimated Expiration
2041-10-09

AI Technical Summary

Technical Problem

In the vehicle routing problem of simultaneous pickup and delivery with time windows and product classification, it is difficult for existing technologies to effectively reduce transportation costs and meet the needs of multiple customers at the same time, and there are problems with the number of vehicles, driving distance and time penalty.

Method used

A vehicle path optimization method based on hybrid tabu search is adopted, which combines tabu search, variable neighborhood search and artificial immunity algorithm. Through crossover and mutation operations, the vehicle path is optimized to obtain the global optimal solution, reducing the number of vehicles and driving distance, and reducing time penalties. .

Benefits of technology

It effectively reduces the number of vehicles, driving distance and time penalties, improves transportation efficiency, optimizes vehicle routes, meets the needs of multiple customers, and reduces transportation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091722B_ABST
    Figure CN114091722B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of vehicle path optimization, and provides a vehicle path optimization method and system based on hybrid taboo search. First, customer time windows and customer demands are obtained; then, a hybrid taboo search algorithm is used to solve an objective function to obtain a global optimal path, wherein the objective function is constructed based on the customer time window, customer demands, the number of vehicles and load capacity; wherein the hybrid taboo search algorithm uses taboo search and variable neighborhood search to perform individual optimization, and performs population optimization through an artificial immune algorithm, thereby improving the efficiency of vehicle transportation, and reducing the number of vehicles, the total distance traveled by vehicles, time penalties and overloaded parts.
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 path optimization, and in particular relates to a vehicle path optimization method and system based on hybrid taboo search. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] In transportation work such as disaster relief or supermarket distribution, pickup and delivery are crucial links. For example, when delivering medicines to the disaster area, it is necessary to collect the drug residues or infusion bottles left over from the last time for centralized processing. Or, when delivering new drinking water to the disaster area, bring the last used drinking water barrel back to the factory. In this case, the vehicle routing problem with simultaneous pickup and delivery with time windows (VRPSPDTW) came into being. As an NP-hard problem, VRPSPDTW is extended from the vehicle routing problem (VRP). On the basis of this problem, the product classification is further expanded to form the vehicle routing problem with simultaneous pickup and delivery with time windows and product classification (PC-VRPSPDTW).

[0004] PC-VRPSPDTW consists of two larger sub-problems, namely the vehicle routing problem with time windows (VRPTW) and the vehicle routing problem with simultaneous pickup and delivery (VRPSPD). Adding the product classification part to the VRPSPDTW problem composed of these two sub-problems constitutes the PC-VRPSPDTW problem. How to reduce transportation costs in PC-VRPSPDTW while meeting the needs of as many customers as possible becomes a problem that needs to be considered. Summary of the invention

[0005] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a vehicle path optimization method and system based on hybrid taboo search, which improves the efficiency of vehicle transportation, reduces the number of vehicles, the total distance traveled by vehicles, the time penalty and the overload part.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A first aspect of the present invention provides a vehicle path optimization method based on hybrid taboo search, comprising:

[0008] Obtain customer time windows and customer needs;

[0009] A hybrid taboo search algorithm is used to solve an objective function to obtain a global optimal path, wherein the objective function is constructed based on the customer time window, customer demand, number of vehicles and load capacity;

[0010] Among them, the hybrid taboo search algorithm uses taboo search and variable neighborhood search for individual optimization, and uses artificial immune algorithm for population optimization.

[0011] Furthermore, the variable neighborhood search includes: for each individual, exchanging customer positions within a route, exchanging customer positions between routes, relocating customer positions on the same route, relocating customer positions between different routes, eliminating minimum routes, and eliminating random routes.

[0012] Furthermore, the artificial immune algorithm performs a selection operation on the population to obtain a new population, specifically:

[0013] Divide the population into the first population, the second population and the third population according to the set ratio;

[0014] The first population is optimally selected, specifically: calculating the comprehensive index of all individuals in the first population, selecting the individual with the smallest comprehensive index value for multiple replications, and adding the replicated individuals to the new population;

[0015] The second population performs tournament selection, specifically: randomly selecting multiple samples in the second population according to the set population size, selecting the individual with the smallest comprehensive index in each sample, and adding it to the new population;

[0016] The third population performs roulette selection, specifically: calculating the proportion of each individual's comprehensive index in the overall comprehensive index, traversing all individuals, and if the individual's proportion value is less than a threshold, adding the individual to the new population, otherwise updating the threshold.

[0017] Furthermore, the artificial immune algorithm performs a crossover operation on the new population, specifically:

[0018] When traversing each individual, a random number is generated;

[0019] If the random number of an individual is between the set space, then this individual and the next individual are used as two parents, and a crossover strategy is randomly selected for crossover operation to obtain two offspring;

[0020] The offspring joins the population in place of the parent.

[0021] Furthermore, the crossover strategy is:

[0022] Construct an adjacency list that records the number of times different customer combinations appear in the new population; if there are two adjacent customers in the adjacency list in parent 1, copy these two customers to the same position in child 1; copy the customers that appear in the adjacency list of parent 2 to the same position in child 2; retrieve customers that are not in child 2 from parent 1 in reverse order and insert them into child 2; retrieve customers that are not in child 1 from parent 2 in reverse order and insert them into child 1;

[0023] or,

[0024] Randomly select crossover region 1 of parent 1 and crossover region 2 of parent 2, with the same starting and ending positions of crossover region 1 and crossover region 2; combine crossover region 2 and parent 1 to form a temporary individual; delete the repeated elements that appear later in the temporary individual to obtain offspring 1; delete the repeated elements that appear later in the temporary individual that is a combination of crossover region 1 and parent 2 to obtain offspring 2;

[0025] or,

[0026] Randomly select intersection area 1 of parent 1 and intersection area 2 of parent 2, with the same starting and ending positions of intersection area 1 and intersection area 2; for the same position of intersection area 1 and intersection area 2, determine the customer at that position in parent 2, search for that customer in parent 1, and swap positions with the customer at that position in parent 1; at the same time, determine the customer at that position in parent 1, search for that customer in parent 2, and swap positions with the customer at that position in parent 2; until all positions of intersection area 1 and intersection area 2 are traversed and two children are obtained.

[0027] Furthermore, the artificial immune algorithm performs a mutation operation on the population after the crossover operation, specifically: when traversing each individual, a random number is generated; if the random number of the individual is less than the mutation rate, a mutation method is randomly selected for the individual to perform the mutation operation;

[0028] The mutation method is:

[0029] Randomly select the individual's mutation region and then reverse the elements of the region;

[0030] or,

[0031] Randomly select two different customers among the individuals and then swap the positions of these two customers.

[0032] Furthermore, the artificial immune algorithm performs a large neighborhood search on the population after the mutation operation, specifically:

[0033] For each individual infeasible route, sort the customers according to the earliest time in the time window, and then reinsert all customers on the route in sequence; if the route is still infeasible, divide the customers into multiple routes;

[0034] For each individual, randomly select a customer to be removed, then calculate the correlation between this customer and the remaining customers, and calculate the proportion of this customer's correlation in the overall correlation. The larger the proportion, the greater the correlation, and the greater the probability of being removed; each individual removes a set number of customers;

[0035] For each removed customer, traverse all possible insertable positions of the individual, and after finding the position with the smallest target value, insert the removed customer into that position.

[0036] A second aspect of the present invention provides a vehicle path optimization system based on hybrid taboo search, comprising:

[0037] A data acquisition module is configured to: acquire customer time windows and customer needs;

[0038] A route optimization module is configured to: solve an objective function using a hybrid taboo search algorithm to obtain a global optimal route, wherein the objective function is constructed based on the customer time window, customer demand, number of vehicles and load capacity;

[0039] Among them, the hybrid taboo search algorithm uses taboo search and variable neighborhood search for individual optimization, and uses artificial immune algorithm for population optimization.

[0040] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the vehicle path optimization method based on hybrid taboo search as described above.

[0041] A fourth aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the vehicle path optimization method based on hybrid taboo search as described above are implemented.

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

[0043] The present invention provides a vehicle path optimization method based on hybrid taboo search, which develops a hybrid taboo search algorithm that combines taboo search algorithm, variable neighborhood search, artificial immune algorithm and large neighborhood search. In this way, the advantages of various algorithms can be effectively used to perform local search and global search. In addition, the operation of eliminating routes proposed in VNS can reduce the number of used vehicles and reduce the target value.

[0044] The present invention provides a vehicle path optimization method based on hybrid taboo search, which proposes a new crossover strategy. The crossover strategy fully utilizes the information of adjacent nodes in the population and is conducive to obtaining high-quality solutions.

[0045] The present invention provides a vehicle path optimization method based on hybrid taboo search, in which six neighborhood structures are proposed in the variable neighborhood search to increase the diversity of solutions; the simultaneous pickup and delivery and time window are more practical. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0047] Figure 1 is a schematic diagram of PC-VRPSPDTW according to the first embodiment of the present invention;

[0048] Figure 2 This is an example diagram of the encoding method of the first solution of the first embodiment of the present invention;

[0049] Figure 3 is an example diagram of the encoding method of the second solution of the first embodiment of the present invention;

[0050] Figure 4 is an example diagram of exchanging customer positions within a route according to the first embodiment of the present invention;

[0051] Figure 5 is an example diagram of exchanging customer positions between routes according to the first embodiment of the present invention;

[0052] Figure 6 This is an example diagram of relocating a customer's position along the same route according to the first embodiment of the present invention;

[0053] Figure 7 This is an example diagram of relocating customer positions through different routes according to the first embodiment of the present invention;

[0054] Figure 8 is an example diagram of eliminating the minimum path according to the first embodiment of the present invention;

[0055] Fig. 9 This is an example diagram of the first crossover method of the first embodiment of the present invention;

[0056] Fig.10 is an example diagram of a second crossover method according to the first embodiment of the present invention;

[0057] Fig.11 is an example diagram of the third crossover method of the first embodiment of the present invention;

[0058] Fig.12This is an example diagram of the first variation method of the first embodiment of the present invention;

[0059] Fig.13 This is an example diagram of the second variation method of the first embodiment of the present invention;

[0060] Fig.14 (a) is a comparison diagram of the crossover probability of the first embodiment of the present invention;

[0061] Fig.14 (b) is a comparison diagram of the mutation probability of the first embodiment of the present invention;

[0062] Fig.15 (a) is a result diagram obtained by the HTS algorithm of Example 1 of the present invention;

[0063] Fig.15 (b) is a vehicle trajectory diagram obtained by the HTS algorithm of the first embodiment of the present invention;

[0064] Fig.16 (a) is a fitness drop diagram of the HTS algorithm and the HTS1 algorithm in the dpc101 file of the first embodiment of the present invention;

[0065] Fig.16 (b) is a fitness drop graph of the HTS algorithm and the HTS1 algorithm under the dpr101 file of the first embodiment of the present invention;

[0066] Fig.16 (c) is a fitness drop graph of the HTS algorithm and the HTS2 algorithm in the dpc101 file of the first embodiment of the present invention;

[0067] Fig.16 (d) is a fitness drop graph of the HTS algorithm and the HTS2 algorithm under the dpr101 file of the first embodiment of the present invention;

[0068] Fig.16 (e) is a fitness drop graph of the HTS algorithm and the HTS3 algorithm in the dpc101 file of the first embodiment of the present invention;

[0069] Fig.16 (f) is a fitness drop graph of the HTS algorithm and the HTS3 algorithm under the dpr101 file of the first embodiment of the present invention;

[0070] Fig.17 (a) is an ANOVA comparison result diagram of the fitness of the HTS algorithm and the TS algorithm according to the first embodiment of the present invention;

[0071] Fig.17 (b) is a diagram showing the ANOVA comparison results of NV between the HTS algorithm and the TS algorithm according to the first embodiment of the present invention;

[0072] Fig.18It is a fitness ANOVA comparison diagram of HTS, IGA, IACO and VNS in Example 1 of the present invention. DETAILED DESCRIPTION

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

[0074] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0075] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0076] Embodiment 1

[0077] like Figure 1 As shown, this embodiment provides a vehicle routing optimization method based on hybrid taboo search to solve the vehicle routing problem of simultaneous pickup and delivery with time windows and product classification.

[0078] In the vehicle routing problem of simultaneous pickup and delivery with time windows and product classification, all vehicles start from the warehouse with goods, visit customers without violating the rules, unload the goods required by the customers and load the goods to be taken back onto the vehicles, and finally return to the warehouse. Each customer has a time window constraint. If the vehicle arrives at the customer earlier than the earliest time of the time window, it needs to wait. If the arrival time is later than the latest time of the time window, it needs to be punished. In the present invention, products are classified, and each customer can have demands for multiple products at the same time, and all vehicles can meet the customers' demands for different categories of products. The weight of goods that each vehicle can carry is limited, and this is also the part that needs to be optimized. The present invention studies the vehicle routing problem of simultaneous pickup and delivery, in which the influence of time windows and product classification are simultaneously considered.

[0079] S1: Obtain the route map, customer demand for various products, customer time window and maximum carrying capacity of transportation equipment.

[0080] In PC-VRPSPDTW, the logistics system network can be defined as a path graph G = (N, A), where N is the set of nodes, consisting of customers and warehouses. A represents the set of edges, which refers to the Euclidean distance between two nodes.

[0081] Customers' demands for various products include set P and set D. Each customer has both pickup and delivery demands. Set P and set D represent the pickup demand set and delivery demand set of all customers respectively. Each vehicle can transport all kinds of products at the same time to serve different customers.

[0082] Customer time window means that each customer has a pickup and delivery time window [e, l]. If the vehicle arrives earlier than the earliest time window e, the vehicle needs to wait; if the arrival time is later than the latest time l, it needs to be punished.

[0083] The load capacity is Q, that is, each vehicle has a maximum load capacity limit Q, which is also the part that needs to be optimized. Finally, all vehicles must return to the warehouse before the latest time of the warehouse. Figure 1 This is the schematic diagram of the PC-VRPSPDTW currently under study.

[0084] S2: Model the vehicle routing problem for simultaneous pickup and delivery with time windows and product classification, and determine the optimization objectives and constraints.

[0085] In the vehicle routing problem model of the present invention, the following assumptions are made:

[0086] (1) Each customer should be assigned a vehicle and can only be visited once;

[0087] (2) All vehicles start from and end at the warehouse;

[0088] (3) There is only one warehouse;

[0089] (4) Each customer either has both pickup and delivery needs or neither;

[0090] (5) Each vehicle can only travel once during a dispatch period.

[0091] The objective function is:

[0092] Min10×NV+d total +l total +p total

[0093] Among them, NV represents the number of vehicles. Since the number of vehicles is an extremely important parameter, its weight is set to 10 here. total , l total and p total They represent the total distance traveled by all vehicles, the total overload part and the total penalty part respectively.

[0094] Specifically, the objective function is constructed based on the customer time window, the number of vehicles, the load capacity and the customer demand, and is expressed as:

[0095]

[0096] The decision variables are:

[0097]

[0098]

[0099]

[0100] The constraints are:

[0101]

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108]

[0109]

[0110]

[0111]

[0112]

[0113]

[0114] Among them, N contains the set of customers and warehouses, C is the set of customers, K is the set of vehicles, G is the set of products, i is the index of the i-th customer, k is the index of the k-th vehicle, g is the index of the g-th product, Q is the maximum capacity of the vehicle, and D init is the set of products shipped from the warehouse, D i is the set of delivery requirements for the i-th customer, P i is the collection of pickup requirements of the i-th customer, dd i,g is the delivery demand of customer i for product g, pp i,gis the pickup demand of customer i for product g, d i,j is the distance between customer i and customer j, e i is the earliest service start time for customer i, l i The latest service start time for customer i, arr i is the time when the vehicle arrives at customer i, dur i Time to serve customers in vehicles, ol k is the overload part of vehicle k, ot i is the timeout portion of customer i.

[0115] Objective function (1) is a multi-objective formula, and its four terms correspond to four objectives, namely, the number of vehicles, the distance traveled by vehicles, time penalty, and overload. Considering that the number of vehicles is an extremely important objective, the weight is set to 10, and the other objectives are set to 1. Constraints (2) to (3) ensure that the total amount of products shipped from the warehouse will not be exceeded during service; constraints (4) to (5) ensure that each customer can only be visited by one vehicle; constraints (6) to (7) ensure that the service start time for the customer is within the time window; constraint (8) ensures that the vehicle arrives at and leaves the customer it serves; constraints (9) and (10) ensure that at most K vehicles are used; constraints (11) to (14) determine the range of the variables.

[0116] S3: The variable neighborhood search algorithm (VNS), artificial immune algorithm (AIA) and large neighborhood search algorithm (LNS) are embedded in the taboo search algorithm (TS) to form a hybrid taboo search algorithm (HTS). The hybrid taboo search algorithm uses taboo search and variable neighborhood search for individual optimization and uses the artificial immune algorithm for population optimization.

[0117] After obtaining the initial population solution, the present invention uses a hybrid taboo search algorithm to optimize the solution. First, a general taboo search algorithm is used to perform preliminary optimization on each individual in the population. While using taboo search optimization, a variable neighborhood search is used to increase the diversity of solutions. Finally, an artificial immune algorithm is used to optimize the obtained population. In AIA, in addition to conventional crossover and mutation operations, a large neighborhood search optimization solution is also added to try to find the global optimal solution.

[0118] The steps of the hybrid taboo search algorithm include: first, initializing the population solution P; then, within the specified number of iterations, performing a taboo search on each individual in P (each solution x), and performing a variable neighborhood search on x, updating the population P, and using an artificial immune algorithm to perform selection operations, crossover operations, mutation operations, and large neighborhood searches on P in sequence to update the population P; when the maximum number of iterations is reached, selecting the individual with the smallest target value in the population P as the global optimal solution X (global optimal path).

[0119] The hybrid taboo search algorithm uses two encoding schemes. The first scheme is mainly used for taboo search, variable neighborhood search and large neighborhood search. The second scheme is mainly used for operations between individuals in the population, such as selection, crossover, mutation, etc. The following introduces these two encoding schemes respectively: Figure 2 As shown in Figure 1, the first scheme uses a common two-layer encoding scheme. In the first layer, each solution consists of multiple routes, representing the trajectory of the vehicle; in addition, the second layer explains the structure of each route, which consists of the starting point, the customers visited, and the end point. Figure 2 It can be seen that the first-level coding consists of three routes, namely R1, R2 and R3; in the second-level coding, taking route R1 as an example, it consists of warehouse 0 and customers 4, 1, and 2; the second-level coding of routes R2 and R3 is similar. Figure 3 As shown, the second encoding scheme is mainly used for operations in the population and is set to have only one layer of encoding. Under this encoding scheme, virtual customers are used as partitions to represent different routes. Since the customer numbers range from 1 to 100, the virtual customer numbers are set to 101-130.

[0120] Among them, each solution represents a travel strategy path, that is, the route of all transportation equipment.

[0121] The specific steps of the hybrid tabu search algorithm are as follows:

[0122] S301, initialize the population solution. Specifically, use the ETRC initialization algorithm to obtain the initial population solution. The initial population is constructed by the ETRC algorithm, which is developed based on the cheapest insertion heuristic.

[0123] The operation process of the ETRC initialization algorithm is as follows: for a route without assigned customers, first randomly select a customer as a "seed", and then insert the customer with the smallest calculated standard value into the route according to the ETRC criterion. After visiting all customers, calculate the target value of the solution at this time; repeat the above process until all customers are used as "seeds" to generate solutions. The ETRC criterion considers both the earliest service time of the customer and the difference in demand between customer pickup and delivery. The calculation formula can be expressed as follows:

[0124]

[0125] Among them, e i represents the earliest start time of customer i, represents the difference between the pickup and delivery of all products for each customer. The value range of α is [0,1], and it starts from 0 and The step size increases, Ps represents the number of populations, and β is 1-α. In this way, all possible results in the weight space can be obtained and the initial population solution can be obtained.

[0126] S302, optimizing the solution using a taboo search algorithm.

[0127] As a heuristic algorithm, the taboo search algorithm has a significant impact on solving combinatorial optimization problems. Its unique taboo table rules can record the optimization process, guide the next operation, and avoid falling into the local optimal solution. Some specific details are as follows.

[0128] In the taboo search, customers are inserted into each route of the solution where the conditions of the taboo table are met, and the target value of the solution at this time is calculated by the following formula. If the target value of the solution after the customer is inserted is better than the previous solution, the solution is set as the optimal solution. In addition, the customer number c, the insertion position p, and the number k of the inserted vehicle are recorded at this time. Repeat the above process, continuously updating c, p, k and the optimal solution until all customers are traversed. Set the optimal solution as the current solution. In addition, taboo measures are taken for the optimal position (c, k) in the taboo table, that is, there is a certain probability that customer c cannot be inserted into the path formed by vehicle k in the next iteration. The calculation method of the taboo operation is as follows. Repeat the above steps until the maximum number of iterations is reached.

[0129] Tabu x,y =iter+b+v

[0130] Among them, iter represents the iteration round at this time, b is a constant, which can ensure that in the next b iterations, the taboo customers will not be inserted into the route. Here b is set to 20; v is a variable with a value range of {0,1,…,9}, which can increase the randomness of the taboo list.

[0131] S303, embedding a variable neighborhood algorithm to increase the diversity of solutions.

[0132] Variable neighborhood search is an improved local search algorithm. It uses a neighborhood structure composed of different actions to alternately search and achieve a good balance between concentration and evacuation. The present invention proposes six different neighborhood structures. They are exchanging customer positions within a route, exchanging customer positions between routes, relocating customers on the same route, relocating customers between different routes, eliminating the minimum route, and eliminating random routes. The following is a detailed description of the neighborhood structure.

[0133] (1) Customer location within the exchange route. Figure 4 As shown in the figure, first, select a route that visits more than two customers in the solution. Randomly select two customers in the path to exchange positions to form a new route. Calculate the target value of the current solution. If the current solution does not meet the feasible conditions or the target value is greater than the target value of the original solution, discard the solution. Otherwise, use the solution to continue the next step.

[0134] (2) Exchange customer positions between routes. Figure 5As shown, two different routes are randomly selected, two customers are randomly selected from the two routes respectively, and the positions of the two customers are exchanged.

[0135] (3) Relocate the customer on the same route. Figure 6 As shown, randomly select a route with more than two customers in the solution. Select a customer in the route and randomly insert it into any position in the route.

[0136] (4) Relocate customers between different routes. Figure 7 As shown, this part is roughly the same as the step in (3), but when relocating the customer, the customer is inserted into any other route except this route.

[0137] (5) Eliminate the minimum route. Figure 8 As shown, select the route with the least number of visited customers in the solution. For all customers in this route, randomly select a position on another randomly selected route and insert it.

[0138] (6) Eliminate random routes. This part is similar to (5), except that when selecting the route to be eliminated, instead of choosing the smallest one, a random route is selected for elimination.

[0139] S304, artificial immune algorithm can use fitness, concentration and crossover mutation operations to ensure the diversity of the population. It mainly consists of three parts: selection, crossover and mutation. These three parts will be introduced in detail below.

[0140] (1) Use artificial immune algorithm to select the population.

[0141] The selection phase of the artificial immune algorithm not only considers individual fitness, but also individual concentration. It increases species diversity by suppressing the replication of a large number of high-concentration excellent individuals. The specific calculation formula for concentration is:

[0142]

[0143] The above formula represents the concentration of individual i in the population, where aff i,j It represents the similarity between individuals i and j, which can be expressed as follows:

[0144]

[0145] fit i It is 1 / 1000 of the fitness of the ith individual. The fitness is the value obtained by the objective function, that is, the target value, in order to reach the same order of magnitude as the concentration. Finally, the fitness and concentration of each individual are added together as the basis for selecting the following strategy. The formula is as follows:

[0146] Fi =fit i +con i

[0147] The next step is to operate according to different selection strategies based on the comprehensive indicator F. A composite selection method is established, including optimal selection, tournament selection, and roulette selection. The ratio of the number of individuals in these three selection methods is set to 1:3:1, and the number of individuals selected by these three methods is set to 6, 18, and 6, respectively. The population is divided into the first population, the second population, and the third population according to the set ratio. The following is a detailed introduction to these three methods. The first population performs optimal selection, specifically: first calculate the F of all individuals in the first population, find the individual with the smallest F, and then replicate the individual multiple times (for example, replicate 6 times), and add the replicated individual to the new population as part of it. The second population performs tournament selection, specifically: tournament selection is the method with the largest proportion in the selection process; its principle is to randomly select a sample from the population, select the best individual in this sample and add it to the new population; set the sample size to be randomly generated, each sample contains random individuals, and its range is [2, Ps / 2], where Ps is the population size; in the second population, multiple samples are randomly selected according to the set population size, and the individual with the smallest comprehensive index in each sample is selected and added to the new population; a total of 18 samples are selected, and the individual with the lowest F value is found from the 18 samples and added to the new population. The third population performs roulette selection, specifically: first, the proportion of each individual's F in the overall F must be calculated, and the proportion is represented by r. The smaller the r value, the greater the probability of being selected. The specific implementation method is to randomly generate a number Rr between [0,1], traverse all individuals, and if the individual's r value is less than the threshold Rr, then the individual is added to the new population, otherwise Rr is updated. The formula for updating Rr can be expressed as:

[0148] R next =Rr-r i

[0149] Among them, Rr next and Rr are the random numbers before and after the update, r i It represents the ratio of the F value of the ith individual to the total F value of the population. Repeat the above operation until the number of individuals added to the new population reaches 6.

[0150] (2) Use artificial immune algorithm to perform crossover operations on the new population.

[0151] In the crossover part, three crossover strategies are provided. The first crossover strategy is one of the innovations of the present invention. Note that not all individuals in the population need to be crossovered, but rather selective crossover is performed on the individuals. The selection principle can be expressed as: when traversing each individual, a random number r is generated. Only when r is between the set space [Crl, Crh], this individual and the next individual will serve as two parents, and a crossover strategy is randomly selected for crossover operation to obtain two offspring, which replace the parents and join the population. The following is a detailed introduction to the last three crossover strategies.

[0152] The first crossover method can be expressed as: Fig. 9 As shown, the number of times different customer combinations appear in the new population is recorded, that is, the number of times each customer i and the next customer j appear is traversed through all individuals, and the customer k that appears the most after each customer i is found according to the records, and this information is used as the adjacency list L for the next step (the adjacency list records the number of times different customer combinations appear in the new population). Next, cross individuals when the randomly generated probability r is within the range of [Crl, Crh]. The two individuals used for crossover are named parent 1 and parent 2 respectively. If there are two adjacent customers in parent 1 in the adjacency list L, copy these two customers to the same position of child 1. As above, copy the customers that appear in L of parent 2 to the same position of child 2. Finally, retrieve customers that are not in child 2 from parent 1 in reverse order and insert them into child 2, and retrieve customers that are not in child 1 from parent 2 in reverse order and insert them into child 1. Increase the diversity of the population in the artificial immune algorithm by creating a new crossover operator.

[0153] The operation steps of the second crossover method can be expressed as follows: Fig.10 As shown, first, randomly select the intersection area 1 and intersection area 2, l1 and l2 of parent 1 and parent 2. The starting and ending positions of l1 and l2 in parent 1 and parent 2 are the same. Combine l2 with parent 1 to form a temporary individual tp1. Then, delete the repeated elements that appear later in tp1, so that a new individual can be formed, that is, offspring 1. Delete the repeated elements that appear later in the temporary individual combined with the intersection area 1 and parent 2 to obtain offspring 2.

[0154] The third crossover method, such as Fig.11As shown, it is not a direct crossover of two individuals, but a crossover operation using the information of another individual. For the same position in crossover area 1 and crossover area 2, determine the customer at that position in parent 2, find the customer in parent 1, and swap the position of the customer at that position in parent 1; at the same time, determine the customer at that position in parent 1, find the customer in parent 2, and swap the position of the customer at that position in parent 2, until all positions in crossover area 1 and crossover area 2 are traversed to obtain two children. Specifically: First, randomly select the next crossover area 1 and crossover area 2 to be crossed from parent 1 and parent 2, l1 and l2. Take customers c1 and c2 at the same position in parent 1 and parent 2 as an example. Find the customer c3 in parent 1 that is the same as c2, and swap the positions of c1 and c3 in parent 1. Similarly, find the customer c4 in parent 2 that is the same as c1, and swap the positions of c2 and c4 in parent 2. Until all customers in areas l1 and l2 are traversed, two new individuals are obtained.

[0155] (3) Use artificial immune algorithm to perform mutation operation on the population after crossover operation.

[0156] This section proposes two mutation methods. The random function randomly selects which mutation method to use. The following describes the two mutation methods in detail. As with crossover, not all individuals will mutate. When traversing each individual, a random number r is generated; the individual will only mutate if the generated random number r is less than the mutation rate Mr. Next, the two mutation methods will be described.

[0157] The first mutation method: Fig.12 As shown, firstly, the individual's variation region l is randomly selected, and then the elements of the region are reversed to obtain a new individual.

[0158] The second mutation method: Fig.13 As shown, two different customers are randomly selected from an individual, and then the positions of the two customers are swapped to form a new individual.

[0159] S305, embedding large neighborhood search to improve solution quality

[0160] Large neighborhood search is a further optimization process after crossover and mutation operations. It is mainly divided into three parts: repairing infeasible solutions and destroying and repairing feasible solutions. Repairing infeasible solutions lays the foundation for the next two parts. Due to the crossover and mutation operations mentioned above, the probability of a solution being infeasible is very high, so it is particularly important to repair infeasible solutions first.

[0161] (1) Repair infeasible solutions

[0162] The first thing to do is to determine which route is infeasible. For each individual infeasible route, sort the customers according to the earliest time in the time window, and then reinsert all customers on the route in sequence. In the process of inserting customers, two situations may occur. One is that the route will directly become a feasible solution due to the replanning of time; the other situation is that in the process of sequentially inserting customers, the route is still infeasible due to factors such as exceeding the latest time of the warehouse or overloading, then these customers need to be divided into multiple routes.

[0163] (2) Destruction strategy

[0164] The destruction operation in the large neighborhood search algorithm is an important step to destroy the old bad solution and generate a new good solution. The process of removing customers from a feasible solution is the destruction process. The number of removed customers is represented by Rc, which is set to 15 in this embodiment. The removal of customers is not arbitrary, but the destruction operator is used to decide which customers to remove. The specific removal steps are as follows.

[0165] For each individual, randomly select the first customer c1 to be removed, and then calculate the correlation between c1 and the remaining customers. The correlation calculation formula is as follows:

[0166]

[0167] Among them, d i,j represents the Euclidean distance between customer i and customer j, V i,j Indicates whether customer i and customer j are on the same route. If they are on the same route, then V i,j is 0 otherwise 1. In short, R i,j The larger the correlation is, the greater the correlation between customers i and j. Then, the roulette strategy will be applied to the remaining customers according to the correlation. That is, the greater the correlation is, the greater the possibility that the customer will be selected as the next customer to be removed. Specifically, the correlation between the customer and the remaining customers is calculated, and the proportion of the customer's correlation in the overall correlation is calculated. The larger the proportion, the greater the correlation, and the greater the probability of being removed. Next, randomly select a customer c2 from the removed customers, calculate the correlation between the remaining customers and him, and use the roulette strategy to continue selecting customers to be removed. Repeat the above operations until the number of removed customers reaches Rc.

[0168] (3) Repair strategy

[0169] In the repair phase, for each removed customer, all available insertable positions in the existing solution are traversed. After finding the position with the minimum target value, the removed customer is inserted into that position. After all removed customers are inserted into the position with the minimum target value, the repair process is complete.

[0170] The proposed algorithm effectively verifies the research problem. Specifically: In order to test the HTS performance, the vehicle transportation process is simulated. All numerical experiments are performed on a Dell PC with a 2.6GHz processor and 8GB memory running Windows 10. The processor is Intel(R) Core(TM) i7-6500U with a frequency of 2.50GHz and a memory of 8GB. The HTS method is written in Python and experimentally verified by PyCharm 2020.1.2 software.

[0171] Eighteen txt files starting with "dpc", "dpr", and "dprc" were used to compare with the tabu search algorithm without any optimization strategy, and the analysis of variance (ANOVA) diagram of the comparison between the two was drawn. Three variants of HTS were constructed, named HTS1, HTS2, and HTS3. HTS1 removed the artificial immune algorithm on the basis of the hybrid tabu search algorithm, HTS2 removed the large neighborhood search algorithm on the basis of the hybrid tabu search algorithm, and HTS3 removed the variable neighborhood search algorithm on the basis of the hybrid tabu search algorithm. The target value decline trend diagram was drawn using dpc101 and dpr101 files as examples. Finally, it was compared with some effective algorithms, including the improved genetic algorithm (IGA), the improved ant colony algorithm (IACO), and the variable neighborhood search algorithm (VNS), to verify the effectiveness of the proposed algorithm.

[0172] First, the experimental parameters are set. In the experiment, the crossover rate and mutation rate are set. The crossover rate is an interval [Crl, Crh], and its operation steps can be expressed as follows: in the process of traversing individuals, when the randomly generated probability r is greater than Crl and less than Crh, a crossover operation is performed on this individual and the next individual. The present invention provides six crossover ranges for comparison, namely [0.2, 0.55], [0.3, 0.65], [0.4, 0.75], [0.5, 0.85], [0.6, 0.95] and [0.7, 0.95]. Taking the data of the dpc101 file as an example, find the optimal parameters. From Fig.14 As can be seen from (a), the fitness obtained when the crossover rate is [0.3, 0.65] is the smallest, so [0.3, 0.65] is selected as the crossover rate. The probability of mutation is represented by Mr. Only when the probability r of random generation is less than Mr, the individual will mutate. Six comparison probabilities are provided, namely 0.2, 0.3, 0.4, 0.5, 0.6 and 0.7. The comparison results are shown in Fig.14 (b) As shown in the figure, the best result is obtained when the mutation rate is 0.3, so Mr is set to 0.3. In the experiment, the parameters of HTS are set as shown in Table 1:

[0173] Table 1. HTS parameter settings

[0174]

[0175] The HTS algorithm was simulated. After optimization using the HTS algorithm, it can be seen that the fitness is significantly reduced. The fitness reduction graph of the dpc101 file is as follows: Fig.15 (a) Finally, the individual with the smallest fitness is selected as the best solution. Fig.15 (b) is the experimental vehicle trajectory diagram.

[0176] Three variants of HTS were constructed, HTS1 algorithm, HTS2 algorithm and HTS3 algorithm, which differ from HTS algorithm in whether AIA, LNS and VNS strategies are used. By using dpc101 file and dpr101 file as data files, the algorithm without auxiliary algorithm is compared with HTS algorithm. In the same experiment, the fitness reduction graphs of the two algorithms from the 100th generation to the 200th generation are plotted. Fig.16 In the figure, the three figures on the left (i.e., Figures (a), (c), and (e)) are the fitness reduction graphs of the dpc101 file, and the three figures on the right (i.e., Figures (b), (d), and (f)) are the dpr101 file. From the figure, it can be concluded that the fitness obtained by the HTS algorithm is better than that without the auxiliary algorithm, which proves the effectiveness of the auxiliary algorithm.

[0177] The comparison with the TS algorithm is used to prove that the hybrid tabu search algorithm is superior to the tabu search algorithm. Fig.17 The comparison results of HTS and TS are shown. Since the number of vehicles NV is a very important evaluation indicator, it is listed separately for comparison. According to the results of the deviation column, it can be seen that in terms of fitness, the HTS algorithm has obtained all the optimal solutions. At the same time, HTS is also significantly better than TS in terms of the number of vehicles. In summary, the proposed HTS algorithm can indeed improve the optimization effect of the algorithm.

[0178] Table 2. Comparison results between HTS and TS

[0179]

[0180] In order to further evaluate the performance of the proposed algorithm and to further verify the effectiveness of the algorithm, it is compared with three other algorithms, namely, the improved genetic algorithm (IGA), the improved ant colony algorithm (IACO), and the variable neighborhood search (VNS) algorithm. In order to obtain more objective results, HTS, IGA, and IACO are set to 200 iterations respectively. Since VNS is very prone to errors, VNS is set to 3000 iterations. Table 3 compares the four algorithms according to their fitness. According to the analysis, the HTS algorithm obtains all the optimal values, while the other algorithms obtain slightly worse results, and VNS has the worst effect. Fig.18 ANOVA results for the four algorithms are provided.

[0181] Table 3. Comparison of various algorithms

[0182]

[0183]

[0184] In scenarios such as disaster relief or supermarket delivery, it is common to pick up and deliver different kinds of items at the same time. However, minimizing the cost in this case is very challenging, and there is relatively little research work on such problems. This paper models it as a vehicle routing optimization problem for simultaneous pickup and delivery with product classification and time window (PC-VRPSPDTW). This paper considers a composite objective, including the number of vehicles, the distance traveled by vehicles, the overload part, and the time penalty. To solve this problem, a hybrid taboo search (HTS) algorithm is proposed. An HTS algorithm combining multiple algorithms is developed. These algorithms mainly include taboo search, variable neighborhood search, artificial immune algorithm, and large neighborhood search. In addition, the operation of eliminating routes proposed in the variable neighborhood search can reduce the number of vehicles used, thereby reducing the target value. Finally, a new crossover method is designed to increase the diversity of the population. In order to test the performance of the HTS algorithm, several comparative experiments were carried out on the extended instance of Solomon. The experimental results show that the algorithm of the present invention performs better in fitness, indicating that the algorithm can solve the PC-VRPSPDTW problem more effectively.

[0185] Embodiment 2

[0186] This embodiment provides a vehicle path optimization system based on hybrid taboo search, which specifically includes the following modules:

[0187] A data acquisition module is configured to: acquire customer time windows and customer needs;

[0188] A route optimization module is configured to: solve an objective function using a hybrid taboo search algorithm to obtain a global optimal route, wherein the objective function is constructed based on the customer time window, customer demand, number of vehicles and load capacity;

[0189] Among them, the hybrid taboo search algorithm uses taboo search and variable neighborhood search for individual optimization, and uses artificial immune algorithm for population optimization.

[0190] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.

[0191] Embodiment 3

[0192] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the vehicle path optimization method based on hybrid taboo search as described in the first embodiment above are implemented.

[0193] Embodiment 4

[0194] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the vehicle path optimization method based on hybrid taboo search as described in the first embodiment are implemented.

[0195] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0196] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0197] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0198] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0199] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0200] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A vehicle path optimization method based on hybrid taboo search, characterized in that: include: Obtain customer time windows and customer needs; A hybrid taboo search algorithm is used to solve an objective function to obtain a global optimal path, wherein the objective function is constructed based on the customer time window, customer demand, number of vehicles and load capacity; Among them, the hybrid taboo search algorithm uses taboo search and variable neighborhood search for individual optimization and artificial immune algorithm for population optimization; The variable neighborhood search includes: for each individual, exchanging customer locations within a route, exchanging customer locations between routes, relocating customer locations on the same route, relocating customer locations between different routes, eliminating minimum routes, and eliminating random routes; The artificial immune algorithm performs a selection operation on the population to obtain a new population, specifically: Divide the population into the first population, the second population and the third population according to the set ratio; The first population is optimally selected, specifically: calculating the comprehensive index of all individuals in the first population, selecting the individual with the smallest comprehensive index value for multiple replications, and adding the replicated individuals to the new population; The second population performs tournament selection, specifically: randomly selecting multiple samples in the second population according to the set population size, selecting the individual with the smallest comprehensive index in each sample, and adding it to the new population; The third population is subjected to roulette selection, specifically: calculating the proportion of each individual's comprehensive index in the overall comprehensive index, traversing all individuals, and if the individual's proportion value is less than a threshold, adding the individual to the new population, otherwise updating the threshold; The artificial immune algorithm performs a crossover operation on the new population, specifically: When traversing each individual, a random number is generated; If the random number of an individual is between the set space, then this individual and the next individual are used as two parents, and a crossover strategy is randomly selected for crossover operation to obtain two offspring; The offspring joins the population in place of the parent; The crossover strategy is: Construct an adjacency list that records the number of times different customer combinations appear in the new population; if there are two adjacent customers in the adjacency list in parent 1, copy these two customers to the same position in child 1; copy the customers that appear in the adjacency list of parent 2 to the same position in child 2; retrieve customers that are not in child 2 from parent 1 in reverse order and insert them into child 2; retrieve customers that are not in child 1 from parent 2 in reverse order and insert them into child 1; or, Randomly select crossover region 1 of parent 1 and crossover region 2 of parent 2, with the same starting and ending positions of crossover region 1 and crossover region 2; combine crossover region 2 and parent 1 to form a temporary individual; delete the repeated elements that appear later in the temporary individual to obtain offspring 1; delete the repeated elements that appear later in the temporary individual that is a combination of crossover region 1 and parent 2 to obtain offspring 2; or, Randomly select intersection area 1 of parent 1 and intersection area 2 of parent 2, with the same starting and ending positions of intersection area 1 and intersection area 2; for the same position of intersection area 1 and intersection area 2, determine the customer at that position in parent 2, search for that customer in parent 1, and swap positions with the customer at that position in parent 1; at the same time, determine the customer at that position in parent 1, search for that customer in parent 2, and swap positions with the customer at that position in parent 2; until all positions of intersection area 1 and intersection area 2 are traversed, and two children are obtained; The artificial immune algorithm performs a mutation operation on the population after the crossover operation, specifically: when traversing each individual, a random number is generated; if the random number of the individual is less than the mutation rate, a mutation method is randomly selected for the individual to perform the mutation operation; The mutation method is: Randomly select the individual's mutation region and then reverse the elements of the region; or, Randomly select two different customers among the individuals and then swap the positions of these two customers; The artificial immune algorithm performs a large neighborhood search on the population after the mutation operation, specifically: For each individual infeasible route, sort the customers according to the earliest time in the time window, and then reinsert all customers on the route in sequence; if the route is still infeasible, divide the customers into multiple routes; For each individual, randomly select a customer to be removed, then calculate the correlation between this customer and the remaining customers, and calculate the proportion of this customer's correlation in the overall correlation. The larger the proportion, the greater the correlation, and the greater the probability of being removed; each individual removes a set number of customers; For each removed customer, traverse all possible insertable positions of the individual, and after finding the position with the smallest target value, insert the removed customer into that position.

2. A vehicle path optimization system based on hybrid taboo search, characterized in that: The vehicle path optimization method based on hybrid taboo search as claimed in claim 1 comprises: A data acquisition module is configured to: acquire customer time windows and customer needs; A route optimization module is configured to: solve an objective function using a hybrid taboo search algorithm to obtain a global optimal route, wherein the objective function is constructed based on the customer time window, customer demand, number of vehicles and load capacity; Among them, the hybrid taboo search algorithm uses taboo search and variable neighborhood search for individual optimization, and uses artificial immune algorithm for population optimization.

3. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the vehicle path optimization method based on hybrid taboo search as claimed in claim 1 are implemented.

4. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the vehicle path optimization method based on hybrid taboo search as claimed in claim 1 are implemented.