CN116029639B - Vehicle path planning method based on mixed wolf particle swarm algorithm - Google Patents

Vehicle path planning method based on mixed wolf particle swarm algorithm Download PDF

Info

Publication number
CN116029639B
CN116029639B CN202310149985.3A CN202310149985A CN116029639B CN 116029639 B CN116029639 B CN 116029639B CN 202310149985 A CN202310149985 A CN 202310149985A CN 116029639 B CN116029639 B CN 116029639B
Authority
CN
China
Prior art keywords
algorithm
wolf
vehicle
individual
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310149985.3A
Other languages
Chinese (zh)
Other versions
CN116029639A (en
Inventor
龚毅光
陈凯
牛天宇
邓志良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Information Science and Technology
Original Assignee
Nanjing University of Information Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
Priority to CN202310149985.3A priority Critical patent/CN116029639B/en
Publication of CN116029639A publication Critical patent/CN116029639A/en
Application granted granted Critical
Publication of CN116029639B publication Critical patent/CN116029639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a vehicle path planning method based on a mixed wolf particle swarm algorithm, which comprises the following steps: s1, confirming a distribution center, the number of distributed vehicles, capacity constraint of each vehicle, total distribution distance and selecting a plurality of task points; s2, solving the multi-target vehicle path planning with the time window by adopting a GWOPSO algorithm, and further obtaining a final planned path and the distribution condition of the vehicle. The invention adopts a multi-rule mode to initialize the population, thereby ensuring the diversity and the dispersibility of the population. The optimal individuals are selected by adopting multiple strategies, so that the diversity and convergence of the population can be balanced, and the algorithm can explore more areas. The invention combines the advantages of the two algorithms of the wolf algorithm and the particle swarm algorithm, the particle swarm algorithm can enable the algorithm to be converged rapidly, and the wolf algorithm can reduce the risk of the algorithm falling into local optimum.

Description

Vehicle path planning method based on mixed wolf particle swarm algorithm
Technical Field
The invention belongs to the technical field of path planning, and particularly relates to a vehicle path planning method based on a mixed wolf particle swarm algorithm.
Background
With the establishment of modern logistics distribution systems and the rapid development of electronic commerce, the conventional vehicle path planning problem (VRP) is difficult to adapt to the distribution requirements on time with high efficiency. Vehicle path planning with time window (VRPTW) is more realistic than VRP, but the solution process is more complex.
In the actual distribution process, if only the cost is considered, the adverse effect may be generated, so that the customer satisfaction degree needs to be considered, and if the transportation cost is minimum and the customer satisfaction degree is highest, win-win of enterprises and customers can be realized, and the service quality is improved.
The intelligent heuristic algorithm has some advantages for solving the VRPTW problem, and draws attention of a plurality of expert scholars, such as genetic algorithm, particle swarm algorithm, ant colony algorithm and the like. The above algorithms all explore the solution of VRPTW to a certain extent, but genetic algorithms are easy to converge in premature, ant colony algorithms are easy to sink into local optimum, and particle swarm algorithms cannot be directly applied to discrete space. At present, no algorithm has absolute advantages in solving the VRPTW problem, so that the search for an intelligent algorithm capable of effectively solving the problem has important practical significance.
The wolf optimization algorithm is a meta-heuristic algorithm proposed by Mirjallii et al, and is derived from the imitation of the wolf population system. The algorithm has the characteristics of simple principle, less parameter setting, easy realization and the like, but cannot be used for discrete space and is easy to fall into local solution. Therefore, how to apply the wolf algorithm to discrete spaces and avoid trapping in local solutions is also a problem to be considered.
Disclosure of Invention
The invention aims to overcome the defects of the existing method, provides a vehicle path planning method based on a mixed wolf particle swarm algorithm, and solves the problems of high total transportation cost and low customer satisfaction in the vehicle path planning of a double-target vehicle with a time window.
The technical scheme is as follows: the invention provides a vehicle path planning method based on a mixed wolf particle swarm algorithm, which comprises the following steps:
s1, confirming a distribution center, the number of distributed vehicles, capacity constraint of each vehicle, total distribution distance and selecting a plurality of task points;
s2, solving a multi-target vehicle path plan with a time window by adopting a GWOPSO algorithm, and further obtaining a final planned path and a vehicle distribution condition;
the GWOPSO algorithm comprises the following steps:
s21, setting algorithm parameters mainly comprising population size N, maximum iteration times Maxt and external archiving numberaDividing the grid numberb
S22, initializing a population by adopting a shortest distance rule and a maximum satisfaction rule, performing coding operation and calculating objective function values on individuals of the population, adding the individuals into an external archive, and refreshing the external archive;
s23, selecting 3 optimal individuals from the external archive in a multi-strategy mode、/>And->
S24, updating all individuals in the population by adopting a wolf algorithm or a particle swarm algorithm, merging the updated individuals into an external archive, and refreshing the external archive;
s25, selecting optimal individuals in the external archive to perform local search, merging the obtained new individuals into the external archive, and refreshing the external archive;
s26, if the iteration number of the algorithm is smaller than the maximum iteration number, turning to a step S23 to carry out loop operation; otherwise, go to step S27;
s27, randomly selecting a certain proportion of individuals from the external archive to perform global search, merging new individuals obtained by global search into the external archive, and refreshing the external archive;
s28 outputs the vehicle path planning schemes corresponding to the specific number of optimal individuals in the external archive.
Further, the method comprises the steps of:
the shortest distance rule is as follows: the current vehicle starts from the distribution center, the task points which meet the capacity constraint of the current vehicle and can be serviced within a specified time window are recorded, and the shortest distance service principle is as follows: and selecting the task point with the smallest distance as the next task point to be serviced, returning the current vehicle to the distribution center when the residual capacity of the current vehicle does not meet the requirement of the next task point, and dispatching a new vehicle by the distribution center, wherein the new vehicle continues to service the task point according to the shortest distance service principle until all the task points are serviced.
The maximum satisfaction rule is as follows: starting from the distribution center, the vehicle records the task points which meet the vehicle capacity constraint and can be serviced within a specified time window, and the maximum service principle of satisfaction is as follows: and selecting the task point with the largest satisfaction as the next task point to be serviced, returning the vehicle to the distribution center when the residual capacity of the vehicle does not meet the requirement of the next task point, and dispatching a new vehicle by the distribution center, and continuing to service the task point according to the maximum satisfaction service principle until all the task points are serviced.
Further, the method comprises the steps of:
the objective function is:
wherein CT represents the cost of the vehicle violating the time window, CU represents the vehicle enabling cost, CD represents the transportation cost of the vehicle, I represents the number of task points,is the firstiSatisfaction of individual task point users, +.>For the total cost->Is the total satisfaction of the user.
Further, the method comprises the steps of:
the refreshing external archive is to take out all the individuals in the external archive to form a solution set, then select all the non-inferior solutions from the solution set according to the objective function values corresponding to the solutions to form a non-inferior solution set, sort according to the density of the solutions in the non-inferior solution set, arrange the solutions with small density in front, and finally select the solution arranged in front of the non-inferior solution setaThe solutions are saved to an external archive.
Further, the method comprises the steps of:
the step S23 specifically includes:
s231, dividing the individual in the external archive into a plurality of grids by utilizing a grid technology, dividing a two-dimensional space formed by double targets into a plurality of grids, and calculating grid coordinates of each individual;
s232, calculating the inflection point distance and the weighted distribution distance of the individual;
the inflection point distance calculating method comprises the following steps: determining a straight line according to 2 extreme individuals in the external archive, and then calculating the distance between each individual in the external archive and the straight line;
individual bodyThe weighted distribution distance calculation formula of (2) is as follows:
wherein M is the number of objective functions,for individuals->In the first placemObjective function values in dimensions;
s233 uses a distance maximization strategy or a weighted distribution distance maximization strategy to select the optimal individual, namely: respectively selecting the largest individual from the inflection point distance values or the weighted distribution distance values in the grids from the grids of the two extreme individuals as the optimal individualAnd->And selecting the individual with the largest inflection point distance value or weighted distribution distance value in the external archive as the optimal individual +.>
Further, the method comprises the steps of:
in step S24, updating all the individuals in the population includes: the gray wolf algorithm or the particle swarm algorithm is selected according to a certain probability to update all individuals in the population.
The adopted grey wolf algorithm updating individual process is as follows:
if the current iteration number istEach individual in the population corresponds to one wolf, the number of wolves is set as the population number N, and the position of each wolf isAnd meanFix->、/>And->Wolf is 3 optimal individuals selected for step S23 +.>、/>And->Their positions are +.>
Calculate the firstiWolf head、/>And->Distance of wolf:
then calculate the firstiDirection of head wolf、/>And->Trend term of wolf movement:
in the method, in the process of the invention,,/>and->Is [0,1]The random number on the random number is used for the random number,j=1,2,3;
then the firstiThe position of the head wolf is updated as follows:
the adopted particle swarm algorithm updates the individual formula as follows:
wherein,,represent the firstiIndividual firsttSpeed at iteration +.>And->Is a learning factor;tfor the current number of iterations,Maxtfor the maximum number of iterations of the algorithm, +.>Is an inertial systemCount (n)/(l)>Select 0.4 @, @>Selecting 0.9; />And->3 optimal individuals selected for step S23 +.>、/>And->Is (are) located>Is the firstiThe location updated by the individual.
Further, the method comprises the steps of:
the step S25 specifically includes:
s251, selecting the optimal 3 individuals in the external archive, and mapping codes of the individuals to obtain corresponding vehicle paths;
s252, for the paths corresponding to the optimal individuals, carrying out local search operation in the paths, wherein the search times are the number of task points, then carrying out local search operation between the paths, and the search times are the maximum number of task points in the two paths, and if the paths obtained by local search are better than the original paths, replacing the original paths;
s252 incorporates the individual resulting from the local search into an external archive and then refreshes the external archive.
Further, the method comprises the steps of:
the path internal local search operation includes:
1) Selecting 1 path R1, and randomly exchanging the positions of 2 task points in the path;
2) 1 path R1 is selected, 2 task points are randomly selected, and paths among the 2 task points are reversed;
3) 1 path R1 is selected, one task point is randomly selected, and the task point is inserted into the front of other task points;
the inter-path local search operation includes:
4) Selecting 2 paths R1 and R2, and randomly selecting task points in R1 and R2 respectivelyAnd->Exchange->And
5) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->Task point is randomly selected in R2>Will->And->Inserted into->Front;
6) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->2 consecutive task points +.>And->Exchange->、/>And->、/>
7) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->Task point is randomly selected in R2>Exchange->、/>And->
In another aspect, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the above method when executing the program.
Finally, the invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
The beneficial effects are that: 1. the invention adopts a multi-rule mode to initialize the population, thereby ensuring the diversity and the dispersibility of the population. The optimal individuals are selected by adopting multiple strategies, so that the diversity and convergence of the population can be balanced, and the algorithm can explore more areas. 2. The invention combines the advantages of the two algorithms of the wolf algorithm and the particle swarm algorithm, the particle swarm algorithm can enable the algorithm to be converged rapidly, and the wolf algorithm can reduce the risk of the algorithm falling into local optimum. 3. The invention adopts the local search strategy, fully utilizes different local search operations, dynamically selects the proper local strategy, can effectively improve the local exploration capacity of the algorithm, ensures the exploration depth of the population, and is beneficial to obtaining the optimal solution. 4. According to the invention, the global strategy is adopted to carry out reinsertion operation on the individual, so that the individual becomes better, and the overall performance of the algorithm is improved. Through testing the examples, the result shows that the algorithm provided by the invention can efficiently solve the problem of planning the path with the time window of the double targets.
Drawings
FIG. 1 is a flow chart of a path planning method according to an embodiment of the present invention;
FIG. 2 illustrates various individual code maps according to an embodiment of the present invention;
FIG. 3 is a diagram of an example of weighted distribution distance maximization strategy selection according to an embodiment of the present invention;
FIG. 4 is a distribution diagram of task points according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the drawings and the detailed description.
The invention relates to a method for solving a double-target vehicle path planning problem with a time window based on a mixed gray wolf particle swarm algorithm, wherein a flow chart is shown in fig. 1, and specifically comprises the following steps:
step 1: setting algorithm parameters mainly comprising population size N, maximum iteration times Maxt and external archiving numberaDividing the grid numberbEtc.
Step 2: initializing a population by adopting a shortest distance rule and a maximum satisfaction rule, performing coding operation on individuals in the population and calculating objective function values, adding the individuals into an external archive, and refreshing the external archive.
The shortest distance rules mentioned in this step are: the vehicle starts from the distribution center, records the task points which meet the constraint of the vehicle capacity and can be serviced within a specified time window, selects the task point with the smallest distance as the next serviced task point, returns to the distribution center when the residual capacity of the vehicle does not meet the requirement of the next task point, sends a new vehicle to continue servicing the task points according to the method until all the task points are serviced.
The maximum satisfaction rule mentioned in this step is: the vehicle starts from the distribution center, records the task points which meet the constraint of the vehicle capacity and can be serviced within a specified time window, selects the task point with the largest satisfaction degree as the next serviced task point, returns the vehicle to the distribution center when the residual capacity of the vehicle does not meet the requirement of the next task point, sends a new vehicle to the distribution center, and continues to service the task points according to the method until all the task points are serviced.
The coding operation mentioned in this step is shown in fig. 2, and it is assumed that the sequence tn= [1,2,3,4,5,6,7,8,9] of task point numbers to be served by the distribution center is initialized according to the shortest distance rule or the maximum satisfaction rule to obtain 3 paths of the distribution vehicles respectively:
r1= [0,9,8,4,0], r2= [0,5,3,6,1,0], r3= [0,2,7,0], wherein 0 is a distribution center.
The map R-1D can map the vehicle paths into one-dimensional codes, namely, the paths of all vehicles are removed from the distribution center, and other task points of the paths are combined into one-dimensional vectors according to the sequence of the vehicle serial numbers. R1, R1 and R3 are mapped to obtain one-dimensional codes D1 as follows:
in the code, the number represents the serial number of the task point, and the subscript of the number represents the vehicle allocated to the task point.
The method comprises the following steps: the task points to be accessed are 1-9, the distribution point is 0, and all vehicles start from 0 and return to 0. And (3) arranging the task points to be accessed for 3 vehicles by adopting a shortest distance rule or a maximum satisfaction rule, and obtaining a task point set to be accessed by the vehicles, namely, the paths are R1, R1 and R3.
Mapping 1D-R may map one-dimensional codes to vehicle paths as opposed to mapping R-1D.
The mapping 1D-2D may map the one-dimensional code to a two-dimensional code, i.e., all task points are arranged in sequence of sequence numbers, and then sequentially determine the number of vehicles serving each task point and the sequence number of the vehicle executing the task point. The one-dimensional code D1 is mapped to 1D-2D to obtain a two-dimensional code D2 as follows:
in the one-dimensional code d1, task point number 1 corresponds toIt can be determined that the vehicle number serving the task point is 2 and the route of the vehicle No. 2 is +.>It can be determined that the task point has a sequence number of 4 in the path, so that column 1 of the two-dimensional code is +.>. And the two-dimensional codes corresponding to other task points can be obtained in the same way.
Mapping 2D-1D may map two-dimensional codes to one-dimensional codes as opposed to mapping 1D-2D.
The objective functions of the individual mentioned in this step include:
wherein CT represents the cost of the vehicle violating the time window, CU represents the vehicle enabling cost, CD represents the transportation cost of the vehicle, I represents the number of task points,is the firstiSatisfaction of individual task point users, +.>For the total cost->Is the total satisfaction of the user.
CT is the cost of the vehicle violating the time window if the vehicle is inTime interval reaching task pointi,There is no penalty cost and if it is earlier or later than the service time, a certain penalty cost will be incurred. First, theiThe penalty cost CT of each task point is calculated as follows:
where I represents the number of task points, K represents the number of vehicles used,cost of violation time window representing kth vehicle reaching task point i, +.>To wait for the cost early->To delay penalty cost, < ->Indicating the time of the kth vehicle to reach the task point i。
CU is the cost of vehicle enablement, the calculation formula is as follows:
where K represents the number of enabled vehicles,is the firstkThe cost of vehicle deployment.
CD is the cost of vehicle transportation and the calculation formula is as follows:
in the method, in the process of the invention,Ithe number of task points is indicated,representing the distance from task point i to task point j, c being the transportation cost factor, +.>For the judgment of the coefficient, if there is a sub-path from task point i and task point j in the vehicle path,/or->Otherwise, it is->
Reference to refreshing an external archive in this step refers to: and taking all individuals (if any) in the external archive to form a solution set, selecting all non-inferior solutions (namely Pareto optimal solutions) from the solution set according to objective function values corresponding to the solutions to form a non-inferior solution set, sorting according to the density of each solution in the non-inferior solution set (namely the number of solutions in a hypercube where the solutions are located), arranging solutions with small density in the front, and finally selecting a solution arranged in the front of the non-inferior solution set to store in the external archive.
Step 3: selecting 3 most significant from external archives using multiple policiesExcellent individual、/>And->. The method comprises the following specific steps:
step 3-1: and dividing the region of the individual in the external archive by utilizing a grid technology, dividing the two-dimensional space formed by the double targets into a plurality of grids, and calculating the grid coordinates of each individual.
First, according to the objective function value of the individual, the maximum value of the mth objective function of the individual can be obtainedAnd minimum->
Then according to the maximum valueAnd minimum->And the number of grids to be divided, the size of the grids can be determined, and the calculation formula is as follows:
where a is the number of external archives, b is the number of meshing,for individualsxObjective function value in the m-th dimension.
Finally, the grid coordinates of each individual are determined as follows:
in the method, in the process of the invention,Int() In order to be a function of the rounding-off,to the individual at the firstmGrid coordinates in dimensions.
Step 3-2: the Inflection Point Distance (IPD) and weighted distribution distance (MDD) of the individual are calculated.
The IPD mentioned in this step can be calculated as follows: first, a straight line is determined from 2 extreme individuals in the external archive, and then the distance of each individual of the external archive from the straight line is calculated. As shown in fig. 3, the horizontal and vertical dotted lines are dividing lines of the grid, the black dots represent extreme individuals, the other dots represent other individuals, a straight line is determined by taking the two extreme individuals as endpoints, and the distance from the other individuals to the straight line is the IPD value of the other individuals.
The MDD mentioned in this step can be calculated as follows: assume that the maximum individual of inflection point distances in the same grid isCalculating the remaining individuals and +.>A weighted sum of the distances between. Individuals->The MDD calculation formula of (c) is as follows:
where M is the number of objective functions,for individuals->Objective function value in the m-th dimension.
Step 3-3: selecting the inflection point distance to be the most according to a certain probabilityBig strategyOr weighted distribution distance maximum policy +.>A policy CSP is selected for the current individual.
The policy selection mode mentioned in this step is as follows:
in the method, in the process of the invention,randis [0,1 ]]The random number in the random number is used for the random number,tis the current number of iterations and,Maxtis the maximum number of iterations.
Step 3-4: if CSP isSelecting the individual with the greatest IPD value from the grids of the two extreme individuals as +.>And->And selecting the individual with the greatest IPD value in the external archive, i.e. the central individual or the individual near the center of the grid, as +.>. If CSP is +.>Selecting the individual with the maximum MDD value from the grids of the two extreme individuals as +.>And->And selecting the individual with the largest MDD value in the external archive as +.>
As shown in FIG. 3, CSP isB and c are each the individual with the greatest IPD value selected from the grid of 2 extreme individuals, i.e. the optimal individual +.>And->And a is the individual with the greatest IPD value in the external archive, i.e. the optimal individual +.>
Step 4: and updating all individuals in the population by adopting GWOPSO, merging the updated individuals into an external archive, and refreshing the external archive. The method comprises the following specific steps:
step 4-1: the gray wolf algorithm (GWO, grey Wolf Optimizer) or particle swarm algorithm (PSO, particle Swarm Optimization) is selected with a certain probability as the algorithm CSA currently used to update the individual. If CSA is GWO, go to step 4-2; otherwise, the CSA is PSO, and the process goes to step 4-3.
This step selects the CSA algorithm using the following formula:
wherein,,F i representing individualsBF represents the optimal objective function value vector obtained in algorithm iteration, rand is [0,1 ]]Is a random number of (a) in the memory.
Step 4-2: all individuals in the population were updated with GWO.
If the current iteration number istEach individual in the population corresponds to one wolf, the number of wolf groups is set as the population number N, and the position of each wolf groupIs thatAnd specify +.>、/>And->Wolf is 3 optimal individuals selected for step 3 +.>、/>And->The method comprises the steps of carrying out a first treatment on the surface of the Their positions are +.>
Calculate the firstiWolf head、/>And->Distance of wolf:
then calculate the firstiDirection of head wolf、/>And->Trend term of wolf movement:
in the method, in the process of the invention,,/>and->Is [0,1]The random number on the random number is used for the random number,j=1,2,3;
then the firstiThe position of the head wolf is updated as follows:
step 4-3: the improved PSO is used to update all individuals in the population. For each individual in the population, PSO is used for updating, and the formula is as follows:
wherein,,represent the firstiIndividual firsttSpeed at iteration +.>And->Is a learning factor;tfor the current number of iterations,Maxtfor the maximum number of iterations of the algorithm, +.>Is an inertia coefficient>Select 0.4 @, @>Selecting 0.9; />And->3 optimal individuals selected for step S23 +.>、/>And->Is (are) located>Is the firstiThe location updated by the individual.
Where the dynamic inertia coefficient is introduced in PSOTo balance the local and global search capabilities of the algorithm, which starts with +.>The search range is enlarged by adopting larger values, and the iteration times are increasedtIncreasing the value, gradually decreasing +.>To enhance the algorithm local search capability.
Step 4-4: all individuals obtained from the update are incorporated into the external archive, which is then refreshed. The refresh external archiving process refers to step 2.
Step 5: the optimal 3 individuals in the external archive are selected for local searching and the resulting new individuals are incorporated into the external archive, which is then refreshed. The refresh external archiving process refers to step 2.
Step 5-1: the optimal 3 individuals in the external archive are selected, and the codes of the individuals are mapped to obtain the corresponding vehicle paths. The mapping operation of the code refers to step 2.
Step 5-2: and for the path corresponding to the optimal individual, carrying out local search operation in the path, wherein the search times are the number of task points. And then carrying out local search operation among paths, wherein the search times are the maximum number of task points in the two paths. If the path obtained by the local search is better than the original path, the original path is replaced.
In the invention, 7 different local search operations are designed, and can be divided into two types of operations of the inside and the between paths. The method comprises the following steps:
the path internal local search operation includes:
1) Selecting 1 path R1, and randomly exchanging the positions of 2 task points in the path;
2) 1 path R1 is selected, 2 task points are randomly selected, and paths among the 2 task points are reversed;
3) 1 path R1 is selected, one task point is randomly selected, and the task point is inserted into the front of other task points;
the inter-path local search operation includes:
4) Selecting 2 paths R1 and R2, and randomly selecting task points in R1 and R2 respectivelyAnd->Exchange->And->;/>
5) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->Task point is randomly selected in R2>Will->And->Inserted into->Front;
6) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->2 consecutive task points +.>And->Exchange->、/>And->、/>
7) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->Task point is randomly selected in R2>Exchange->、/>And->
The four-point exchange is specifically: c1 and C3 exchange, C2 and C4 exchange, the three point exchange is specifically that C1 and C2 are exchanged to the C3 position of R2, C3 is exchanged to the C1 or C2 position of R1, and C1 or C2 is selected randomly.
Step 5-3: the individual resulting from the local search is incorporated into an external archive, which is then refreshed. The refresh external archiving process refers to step 2.
Step 6: if the iteration number of the algorithm is smaller than Maxt, turning to step 3 to carry out loop operation; otherwise, go to step 7.
Step 7: a proportion (20% in the example) of individuals from the external archive are randomly selected for global searching, and the new individuals from the global searching are incorporated into the external archive and then the external archive is refreshed.
Step 7-1: randomly selecting an individual as a current individual d1, randomly selecting a task point from the individual, and taking the task point as the current task pointiPut into the insert set RIS and remove the task point from the individual code.
Step 7-2: calculating the current task pointiCorrelation with other task points of the individual d 1. The relevance includes satisfaction relevanceAnd distance dependence->The calculation formula is as follows:
in the method, in the process of the invention,for the task pointiTo the task pointjDistance of->For the task pointiTo the task pointjIs used for the degree of satisfaction of (1),vto judge the coefficient, if the task pointiAnd a task pointjOn the same path, thenv=1, otherwise 0./>And->The larger indicates a greater correlation of the 2 task points.
Step 7-3: randomly selectAnd->The largest task point is placed as the current task point i into the insertion set RIS and removed from the individual d 1. If the upper limit of RIS is not reached (which can be manually set according to the individual code length), the loop goes to step 7-2.
Step 7-4: sequentially retrieving task points from RISkTraversing individual d1 attempts to insert a task pointkFind out fullInsertion points for the window of time constraint and the capacity constraint. Calculation of insertion at these insertion pointskPost-introduced distance incrementAnd satisfaction delta->jIs the insertion point sequence number. For task pointskAnd normalizing the distance increment and satisfaction increment introduced at each insertion point.
Step 7-5: find outMaximum insertion point, task pointkInserted into the insertion point, task point k is removed from the RIS.
Step 7-6: if RIS is not empty, go to step 7-4 to run in loop.
Step 7-7: if the number of the individuals selected for global searching does not reach the set proportion, the process goes to the step 7-1 for circulating operation.
Step 7-8: the new individual from the global search is incorporated into the external archive and the external archive is refreshed. The refresh external archiving process refers to step 2.
Step 8: and outputting the vehicle path planning schemes corresponding to the specific number of optimal individuals in the external archive.
To verify the performance of the proposed algorithm, the GWOPSO algorithm is used to solve multiple instances of the multi-target windowed vehicle path planning problem. Examples are classified into 2 classes, one class using 20 task point datasets and another class using 6 different types of Solomon datasets.
In the class 1 example, the task point distribution is shown in fig. 4, and the invention performs a comparison experiment on the gwopspo algorithm and the traditional wolf algorithm (GWO), particle swarm algorithm (PSO) and mixed ant colony algorithm (HACO). Each algorithm was run independently 20 times and the experimental results obtained are shown in tables 1 and 2. Experiments show that in the class 1 example, the algorithm of the invention has smaller average total vehicle cost and greater customer satisfaction.
In class 2 examples, to verify the applicability of the algorithm in different scenarios, the number of vehicles VN and the total distance TD are targeted, and the Solomon dataset is selected as a sample, 100 task points are selected. The invention carries out a comparison experiment on the GWOPSO algorithm, the Grey wolf algorithm (GWO), the hybrid ant colony algorithm (HACO) and the Hybrid Genetic Algorithm (HGA). Each algorithm was run independently 20 times and the experimental results obtained are shown in table 3. Experiments show that under the condition of setting the same parameters, the vehicle utilization rate is more average, the path is shorter, and further the algorithm provided by the invention can effectively utilize individual information to implement efficient searching in different scenes.
/>
In conclusion, the mixed wolf particle swarm algorithm provided by the invention can effectively solve the problem of planning the path of the double-target vehicle with the time window.
In another aspect, the invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when the program is executed.
Finally, the invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method described above.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (9)

1. A vehicle path planning method based on a mixed wolf particle swarm algorithm is characterized by comprising the following steps:
s1, confirming a distribution center, the number of distributed vehicles, capacity constraint of each vehicle, total distribution distance and selecting a plurality of task points;
s2, solving a multi-target vehicle path plan with a time window by adopting a GWOPSO algorithm, namely Grey Wolf Optimizer & Particle Swarm Optimization algorithm, so as to obtain a final planned path and a vehicle distribution condition;
the GWOPSO algorithm comprises the following steps:
s21, setting algorithm parameters including population size N, maximum iteration number Maxt and external archive numberaDividing the grid numberb
S22, initializing a population by adopting a shortest distance rule and a maximum satisfaction rule, performing coding operation and calculating objective function values on individuals of the population, adding the individuals into an external archive, and refreshing the external archive;
s23, selecting 3 optimal individuals from the external archive in a multi-strategy mode、/>And->
S24, selecting a gray wolf algorithm or a particle swarm algorithm as an algorithm CSA for updating the individual according to a certain probability rule, merging the updated individual into an external archive, and refreshing the external archive;
the probability rule is expressed as:
wherein,,F i representing individualsBF represents the optimal objective function value vector obtained in algorithm iteration, rand is [0,1 ]]GWO is a gray wolf algorithm, and PSO is a particle swarm algorithm;
s25, selecting optimal individuals in the external archive to perform local search, merging the obtained new individuals into the external archive, and refreshing the external archive;
s26, if the iteration number of the algorithm is smaller than the maximum iteration number, turning to a step S23 to carry out loop operation; otherwise, go to step S27;
s27, randomly selecting a certain proportion of individuals from the external archive to perform global search, merging new individuals obtained by global search into the external archive, and refreshing the external archive;
s28, outputting a vehicle path planning scheme corresponding to three optimal individuals in the external archive;
the shortest distance rule is as follows: the current vehicle starts from the distribution center, the task points which meet the capacity constraint of the current vehicle and can be serviced within a specified time window are recorded, and the shortest distance service principle is as follows: selecting the task point with the smallest distance as the next task point to be serviced, returning the current vehicle to a distribution center when the residual capacity of the current vehicle does not meet the requirement of the next task point, and dispatching a new vehicle by the distribution center, wherein the new vehicle continues to service the task point according to the shortest distance service principle until all the task points are serviced;
the maximum satisfaction rule is as follows: starting from the distribution center, the vehicle records the task points which meet the vehicle capacity constraint and can be serviced within a specified time window, and the maximum service principle of satisfaction is as follows: and selecting the task point with the largest satisfaction as the next task point to be serviced, returning the vehicle to the distribution center when the residual capacity of the vehicle does not meet the requirement of the next task point, and dispatching a new vehicle by the distribution center, and continuing to service the task point according to the maximum satisfaction service principle until all the task points are serviced.
2. The vehicle path planning method based on the mixed wolf particle swarm algorithm according to claim 1, wherein the objective function is:
wherein CT represents the cost of the vehicle violating the time window, CU represents the vehicle enabling cost, CD represents the transportation cost of the vehicle, I represents the number of task points,is the firstiSatisfaction of individual task point users, +.>For the total cost->Is the total satisfaction of the user.
3. The vehicle path planning method based on the mixed wolf particle swarm optimization according to claim 1, wherein said refreshing the external archive is to take all the individuals in the external archive out to form a solution set, then selecting all the non-inferior solutions from the solution set according to the objective function values corresponding to the solutions to form a non-inferior solution set, sorting according to the density of the solutions in the non-inferior solution set, sorting the solutions with small density in front, and finally selecting the solutions in front of the non-inferior solution setaThe solutions are saved to an external archive.
4. The vehicle path planning method based on the mixed wolf particle swarm algorithm according to claim 1, wherein said step S23 specifically comprises:
s231, dividing the individual in the external archive into a plurality of grids by utilizing a grid technology, dividing a two-dimensional space formed by double targets into a plurality of grids, and calculating grid coordinates of each individual;
s232, calculating the inflection point distance and the weighted distribution distance of the individual;
the inflection point distance calculating method comprises the following steps: determining a straight line according to 2 extreme individuals in the external archive, and then calculating the distance between each individual in the external archive and the straight line;
individual bodyThe weighted distribution distance calculation formula of (2) is as follows:
wherein M is the number of objective functions,for individuals->In the first placemObjective function value in dimension,/->The method is characterized in that the method is an individual with the largest inflection point distance in the same grid;
s233 uses a distance maximization strategy or a weighted distribution distance maximization strategy to select the optimal individual, namely: respectively selecting the largest individual from inflection point distance values or weighted distribution distance values in grids from grids where two extreme individuals are located as the optimal individualAndand selecting the individual with the largest inflection point distance value or weighted distribution distance value in the external archive as the optimal individual +.>
5. The vehicle path planning method based on the mixed wolf particle swarm algorithm according to claim 4, wherein in step S24, the wolf algorithm or the particle swarm algorithm is selected as the algorithm CSA for updating the individual according to a certain probability rule;
the adopted grey wolf algorithm updating individual process is as follows:
if the current iteration number istEach individual in the population corresponds to one wolf, the number of wolves is set as the population number N, and the position of each wolf isAnd specify +.>、/>And->Wolf is 3 optimal individuals selected for step S23 +.>、/>And->Their positions are +.>
Calculate the firstiWolf headDistance of wolf->First, theiWolf and->Distance of wolf->And (d)iWolf and->Distance of wolf->Expressed as:
then calculate the firstiDirection of head wolf、/>And->Trend items of wolves moving, respectively marked as +.>
In the method, in the process of the invention,,/>and->Is [0,1]The random number on the random number is used for the random number,j=1,2,3;
then the firstiThe position of the head wolf is updated as follows:
the adopted particle swarm algorithm updates the individual formula as follows:
wherein,,represent the firstiIndividual firsttSpeed at iteration +.>And->Is a learning factor;tfor the current number of iterations,Maxtfor the maximum number of iterations of the algorithm, +.>Is an inertia coefficient>Select 0.4 @, @>Selecting 0.9; />And->3 optimal individuals selected for step S23 +.>、/>And->Is (are) located>Is the firstiThe location updated by the individual.
6. The vehicle path planning method based on the mixed wolf particle swarm algorithm according to claim 5, wherein said step S25 specifically comprises:
s251, selecting the optimal 3 individuals in the external archive, and mapping codes of the individuals to obtain corresponding vehicle paths;
s252, for the paths corresponding to the optimal individuals, carrying out local search operation in the paths, wherein the search times are the number of task points, then carrying out local search operation between the paths, and the search times are the maximum number of task points in the two paths, and if the paths obtained by local search are better than the original paths, replacing the original paths;
s252 incorporates the individual resulting from the local search into an external archive and then refreshes the external archive.
7. The vehicle path planning method based on the hybrid wolf particle swarm algorithm according to claim 6, wherein said path internal local search operation comprises:
1) Selecting 1 path R1, and randomly exchanging the positions of 2 task points in the path;
2) 1 path R1 is selected, 2 task points are randomly selected, and paths among the 2 task points are reversed;
3) 1 path R1 is selected, one task point is randomly selected, and the task point is inserted into the front of other task points;
the inter-path local search operation includes:
4) Selecting 2 paths R1 and R2, and randomly selecting task points in R1 and R2 respectivelyAnd->Exchange->And->
5) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->Task point is randomly selected in R2>Will->And->Inserted into->Front;
6) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->2 consecutive task points +.>And->Exchange->、/>And->、/>
7) 2 paths R1 and R2 are selected, and 2 continuous task points are randomly selected in R1And->Task point is randomly selected in R2>Exchange->、/>And->
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-7 when executing the program.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of the preceding claims 1-7.
CN202310149985.3A 2023-02-22 2023-02-22 Vehicle path planning method based on mixed wolf particle swarm algorithm Active CN116029639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310149985.3A CN116029639B (en) 2023-02-22 2023-02-22 Vehicle path planning method based on mixed wolf particle swarm algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310149985.3A CN116029639B (en) 2023-02-22 2023-02-22 Vehicle path planning method based on mixed wolf particle swarm algorithm

Publications (2)

Publication Number Publication Date
CN116029639A CN116029639A (en) 2023-04-28
CN116029639B true CN116029639B (en) 2023-07-21

Family

ID=86091499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310149985.3A Active CN116029639B (en) 2023-02-22 2023-02-22 Vehicle path planning method based on mixed wolf particle swarm algorithm

Country Status (1)

Country Link
CN (1) CN116029639B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115248591B (en) * 2021-12-28 2023-06-09 齐齐哈尔大学 UUV path planning method based on mixed initialization wolf particle swarm algorithm
CN114819249A (en) * 2022-02-15 2022-07-29 南京邮电大学 Community material vehicle path optimization method based on improved lion group algorithm under epidemic situation
CN115454115A (en) * 2022-09-29 2022-12-09 山东科技大学 Rotor unmanned aerial vehicle path planning method based on hybrid wolf-particle swarm algorithm

Also Published As

Publication number Publication date
CN116029639A (en) 2023-04-28

Similar Documents

Publication Publication Date Title
Bräysy et al. Evolutionary algorithms for the vehicle routing problem with time windows
Shim et al. A hybrid estimation of distribution algorithm with decomposition for solving the multiobjective multiple traveling salesman problem
US20150032723A1 (en) Database system for executing parameter-sensitive query
JP5954750B2 (en) Information processing apparatus, information processing method, and program
CN109872330A (en) A kind of two-dimentional Otsu Fast image segmentation method for improving lion group&#39;s optimization
US20170083873A1 (en) Infeasible schedules in a quantum annealing optimization process
CN103077125B (en) A kind of tower caching method of self-adaptation self-organization of efficiency utilization storage space
Efentakis et al. Optimizing landmark-based routing and preprocessing
CN104732091A (en) Cellular automaton river bed evolution prediction method based on natural selection ant colony algorithm
CN108364331A (en) A kind of isopleth generation method, system and storage medium
CN114399161A (en) Multi-unmanned aerial vehicle cooperative task allocation method based on discrete mapping differential evolution algorithm
CN116112563A (en) Dual-strategy self-adaptive cache replacement method based on popularity prediction
CN116029639B (en) Vehicle path planning method based on mixed wolf particle swarm algorithm
CN103838680A (en) Data caching method and device
CN104391947B (en) Magnanimity GIS data real-time processing method and system
CN113344320A (en) Dynamic automatic planning method and system for logistics robot distribution path under multiple targets
US9841990B2 (en) Encoding of a schedule into a binary structure
Liu et al. An improved path planning algorithm based on fuel consumption
CN116307330A (en) Multi-mode intermodal organization mode dynamic optimization method based on big data processing
CN116321189A (en) Server deployment method based on deep reinforcement learning in edge-oriented computing
Yu et al. Comparison of advantages and disadvantages among various algorithms in logistics path design—Taking H-group as an example
Yi et al. An adaptive constraint-handling approach for optimization problems with expensive objective and constraints
CN110263906A (en) Asymmetric negative correlation searching method
Varol et al. Neural network estimators for optimal tour lengths of traveling salesperson problem instances with arbitrary node distributions
CN105550765B (en) Method for selecting representative elements in road network distance calculation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant