CN104751250A - Method of finding optimal paths based on ant colony method - Google Patents

Method of finding optimal paths based on ant colony method Download PDF

Info

Publication number
CN104751250A
CN104751250A CN201510182588.1A CN201510182588A CN104751250A CN 104751250 A CN104751250 A CN 104751250A CN 201510182588 A CN201510182588 A CN 201510182588A CN 104751250 A CN104751250 A CN 104751250A
Authority
CN
China
Prior art keywords
node
path
ant
information
special
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.)
Pending
Application number
CN201510182588.1A
Other languages
Chinese (zh)
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.)
Nantong Institute of Technology
Original Assignee
Nantong Institute of 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 Nantong Institute of Technology filed Critical Nantong Institute of Technology
Priority to CN201510182588.1A priority Critical patent/CN104751250A/en
Publication of CN104751250A publication Critical patent/CN104751250A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method of finding optimal paths based on an ant colony method. The method includes: performing initial global calculation by the ant colony method; finding certain special communities from all nodes; with a special node as a start or end, allowing the same non-special nodes to form local subspaces; in the range of the local subrange module, selecting a dynamic planning method of accurate calculation to find a shortest path between two special nodes; finally, connecting all solved shortest paths in all local subspaces so as to obtain a global shortest path. Compared with the basic anti colony method, the method has the advantages that the optimal paths can be found in a shorter time, the method is more suitable for path-finding techniques, and time cost can be reduced for logistics, express delivery or travels.

Description

A kind of optimal path finding method based on ant group method
Technical field
The present invention relates to path search techniques, be specifically related to a kind of optimal path finding method based on ant group method.
Background technology
All can run into the search problem of optimal path in a lot of fields.As Vehicle Routing Problems (Vehicle Routing Problem often can be run in logistics distribution; VRP); under a series of requirement of client and constraint condition; as: the restriction, distance travelled restriction, time restriction etc. of goods demand, traffic volume, friendship delivery availability, vehicle capacity; the Path Method of devise optimum, makes vehicle pass through in an orderly manner.As: classical traveling salesman problem (Travelling SalesmanProblem, TSP) drummer will visit n city, he must select the path that will walk, and the restriction in path is that each city can only be visited once, and finally will get back to the city of originally setting out.The select target in the path minimum value that to be the path length that will try to achieve be among all paths.
Ant group method is a kind of probability type method being used for finding in the drawings path optimizing.When selecting paths, ant make use of the residual risk element on original path, also uses inverse distance between two nodes as heuristic greedy method.But ant group method has some deficiency following.
1. ant group method is easily limit into locally optimal solution, and from the character of ant group method solution, what ant group method was found is a reasonable locally optimal solution, and not impose be globally optimal solution.
2. ant group method speed of convergence ratio when starting is very fast, but in the process of carrying out, after iterating to certain number of times, also stagnation behavior may be there is near the neighborhood of certain or some locally optimal solutions in ant, namely search proceeds to a certain degree, the solution that all ants find is completely the same, can not continue to search for further solution space, thus is unfavorable for finding globally optimal solution.
3. the search time of ant group method is longer, and speed is slow.
4., when population size is larger, ant group method is difficult within a short period of time from complicated without finding out optimum path the path of chapter.
Therefore a kind of optimal path finding method based on ant group method that more rapidly, more accurately, more effectively can obtain global optimum path urgently proposes.
Summary of the invention
In order to solve the problems of the technologies described above, the present invention proposes a kind of optimal path finding method based on ant group method, the method is compared to existing ant group method, it can find out optimum path within the shorter time, be more suitable for the search technique in path, contribute to reducing the time cost spent in logistics, express delivery or travelling.
In order to achieve the above object, technical scheme of the present invention is as follows:
Based on an optimal path finding method for ant group method, comprise the following steps:
1) the map scene having n node is set up;
2) m ant is arranged on n node at random;
3) after every ant all covers n node, the quantity of information on n internodal path is upgraded, and records the quantity of information of introductory path on each node;
4) from n node, a special joint is chosen;
5) according to a special joint, no special node is classified;
6) take special joint as beginning or end, of a sort no special node forms Local Subspace;
7) in Local Subspace, dynamic programming method is used to carry out path planning;
8) shortest path of whole Local Subspaces is connected, obtain the shortest path of the overall situation;
9) judge whether the optimal path finding method based on ant group method meets termination condition, if meet, then export global optimum path, if do not meet, return step 2).
First a kind of optimal path finding method based on ant group method of the present invention carries out initial global calculation by ant group method to it, and obtaining is the quantity of information on every paths.In ant group method, the quantity of information that a paths stays more Big Formica fusca selects the probability of this paths larger.Secondly, the node finding some special in all nodes, the quantity of information of these special joint associateds is all larger.Then, take special joint as beginning or end, of a sort no special node forms Local Subspace, within the scope of obtained Local Subspace, selects the dynamic programming method in accurate Calculation, finds the shortest path between two special joints.Be connected after the shortest path of all Local Subspaces is all obtained, the shortest path of the overall situation can be obtained.
Theoretical foundation of the present invention is sturdy, didactic ant group method is combined with accurate Calculation, effectively improves the accuracy of method for searching path, reduces the time that route searching spends.
On the basis of technique scheme, also can do following improvement:
As preferred scheme, step 3) further comprising the steps of:
3.1) node i of initially setting out of every ant is carried out record;
3.2) according to formula (1) calculate ant k (k=1 ..., m) arrive the probability of node j
p ij k ( t ) = τ ij α ( t ) η ij β ( t ) Σ allowd k τ ij k ( t ) η ij k ( t ) j ∈ allowd k 0 otherwise - - - ( 1 )
Wherein: d ijrepresent the spacing of node i and node j, τ ijt () represents quantity of information between t node i and node j, initial time τ ij(0)=C (C is initial information amount, is constant), allowd krepresent next step node set that can walk of ant k, α represents the effect size of quantity of information to ant selecting paths, η ijrepresent that ant k transfers to the expectation of node j from node i, β represents η ijeffect size;
3.3), after every ant all covers n node, the quantity of information on internodal path is upgraded according to formula (2):
τ i ( t + 1 ) = ( 1 - ρ ) τ ij ( t ) + Σ k = 1 m Δτ ij k ( t ) - - - ( 2 )
Wherein: ρ ∈ (0,1) represents quantity of information τ ijt () passes attenuation degree in time, represent that ant k transfers to the quantity of information stayed between node j from node i.
3.4) the quantity of information τ on every paths is obtained ij', the quantity of information of introductory path on each node is calculated according to formula (3).
τ i , = 1 n Σ j = 1 n τ ij , - - - ( 3 )
Adopt above-mentioned preferred scheme, effectively can obtain the quantity of information of introductory path on each node.
As preferred scheme, in step 4) in, from n node, choose a special joint comprise the following steps:
4.1) the quantity of information τ of introductory path on each node is obtained i';
4.2) to the quantity of information τ of the introductory path on n node i' sort;
4.3) after choosing sequence, the relative τ of quantity of information i' larger a corresponding special joint.
Adopt above-mentioned preferred scheme, effectively can select the larger a of a quantity of information special joint from n node.
As preferred scheme, in step 5) in, the classification of no special node is comprised the following steps:
5.1) ant group method is used to obtain and record the shortest path R between special joint ij;
5.2) according to formula (4), no special node is classified,
Wherein: d rirepresent the vertical range in path between no special node to special joint.
Adopt above-mentioned preferred scheme, can effectively classify to no special node.
As preferred scheme, in step 9) in, termination condition is the situation reaching predetermined iterations or occur finding identical global optimum path.
Adopt above-mentioned preferred scheme, different termination conditions is used in different occasions.
Accompanying drawing explanation
The process flow diagram of a kind of optimal path finding method based on ant group method that Fig. 1 provides for the embodiment of the present invention.
Shortest path figure between the special joint that Fig. 2 provides for the embodiment of the present invention.
The distribution plan in 38 cities that Fig. 3 provides for the embodiment of the present invention.
Global optimum's path profile under the basic ant group method that Fig. 4 provides for the embodiment of the present invention.
Fig. 5 for the embodiment of the present invention provide a kind of based on the global optimum's path profile under the optimal path finding method of ant group method.
Embodiment
The preferred embodiment of the present invention is described in detail below in conjunction with accompanying drawing.
In order to reach object of the present invention, in a kind of some of them embodiment of the optimal path finding method based on ant group method,
As shown in Figure 1, a kind of optimal path finding method based on ant group method, for carrying out the search of optimal path to the map being provided with multiple node, the path searched out is shorter, and the speed of search is faster.A kind of optimal path finding method based on ant group method of the present invention comprises the following steps:
1) the map scene having n node is set up;
2) m ant is arranged on n node at random;
3) after every ant all covers n node, the quantity of information on n internodal path is upgraded, and records the quantity of information of introductory path on each node;
4) from n node, a special joint is chosen;
5) according to a special joint, no special node is classified;
6) take special joint as beginning or end, of a sort no special node forms Local Subspace;
7) in Local Subspace, dynamic programming method is used to carry out path planning;
8) shortest path of whole Local Subspaces is connected, obtain the shortest path of the overall situation;
9) judge whether the optimal path finding method based on ant group method meets termination condition, if meet, then export global optimum path, if do not meet, return step 2).
Step 3) further comprising the steps of:
3.1) node i of initially setting out of every ant is carried out record;
3.2) according to formula (1) calculate ant k (k=1 ..., m) arrive the probability of node j
p ij k ( t ) = τ ij α ( t ) η ij β ( t ) Σ allowd k τ ij k ( t ) η ij k ( t ) j ∈ allowd k 0 otherwise - - - ( 1 )
Wherein: d ijrepresent the spacing of node i and node j, τ ijt () represents quantity of information between t node i and node j, initial time τ ij(0)=C (C is initial information amount, is constant), allowd krepresent next step node set that can walk of ant k, α represents the effect size of quantity of information to ant selecting paths, η ijrepresent that ant k transfers to the expectation of node j from node i, β represents η ijeffect size;
3.3), after every ant all covers n node, the quantity of information on internodal path is upgraded according to formula (2):
τ i ( t + 1 ) = ( 1 - ρ ) τ ij ( t ) + Σ k = 1 m Δτ ij k ( t ) - - - ( 2 )
Wherein: ρ ∈ (0,1) represents quantity of information τ ijt () passes attenuation degree in time, represent that ant k transfers to the quantity of information stayed between node j from node i.
3.4) the quantity of information τ on every paths is obtained ij', the quantity of information of introductory path on each node is calculated according to formula (3).
τ i , = 1 n Σ j = 1 n τ ij , - - - ( 3 )
Adopt above-mentioned steps effectively can obtain the quantity of information of introductory path on each node,
In step 4) in, from n node, choose a special joint comprise the following steps:
4.1) the quantity of information τ of introductory path on each node is obtained i';
4.2) to the quantity of information τ of the introductory path on n node i' sort;
4.3) after choosing sequence, the relative τ of quantity of information i' larger a corresponding special joint.
Effectively can select the larger a of a quantity of information special joint from n node, wherein a can get n/10.
In step 5) in, the classification of no special node is comprised the following steps:
5.1) ant group method is used to obtain and record the shortest path R between special joint ij;
5.2) according to formula (4), no special node is classified,
Wherein: d rirepresent the vertical range in path between no special node to special joint.
Above-mentioned steps is adopted effectively to classify to no special node.
Ant group method is carried out again to these special nodes, because the number of special joint is compared to whole nodes, its number greatly reduces, therefore its calculating scale also greatly reduces, so be are improved all to a certain extent speed of convergence or computing time.As shown in Figure 2, the node in Fig. 2 be screened go out larger 20 special joints of the quantity of information degree of association, the loop delineated in Fig. 2 is the shortest path obtained after carrying out ant group method to special joint.
The classification of no special node may be summarized to be: with these special joints for beginning or end, with the line of point-to-point transmission for axle, calculating the distance between no special node and these axles, thus other no special nodes are being classified.As shown in Figure 2, if the distance of the line axle 8-10 of certain no special node A and special joint 8 and special joint 10 is all shorter than the distance of other axis relative, then no special node A is incorporated in the interval of (8,10).So analogize, just whole node can be divided into 20 little local spaces completely in fig. 2.
In step 9) in, termination condition is the situation reaching predetermined iterations or occur finding identical global optimum path.Different termination conditions is used in different occasions.
In order to better reflect the optimal path finding method of kind of the present invention based on ant group method, its experimental design is as follows:
TSPLIB (http://www.math.princeton.edu/tsp) is a famous TSP Study on Problems center in the world, be presented above a lot of typical TSP problem, and give corresponding " current optimum solution ", validity and the Feasible degree of various relevant TSP optimized algorithm can be checked.As shown in Figure 3, it is the distribution plan in 38 cities, the TSP problem with 38 cities announced for TSPLIB is below applied a kind of optimal path finding method based on ant group method that basic ant group method and the present invention propose and is tested, and table 1 is the optimum configurations of a kind of optimal path finding method based on ant group method that basic ant group method and the present invention propose.
One kind, table 1 is based on the optimum configurations of the optimal path finding method of ant group method
Parameter Parameter value
City number 38
Ant quantity 30
α 2
β 2
ρ 0.1
Maximum cycle 1000
One kind, table 2 is based on the optimum configurations of the optimal path finding method of ant group method
Algorithm Basic Ant Group of Algorithm Improve ant group algorithm TSPLIB
Optimum solution 6663 6656 6656
Consuming time 42.25s 37.14s N/A
Global optimum path is obtained under the global optimum path obtained from Fig. 4 basic ant group method, a kind of optimal path finding method based on ant group method of Fig. 5 the present invention, and the data in table 2: basic ant group method finds current optimum solution when the 443rd iteration, route total length is: 6663, and consuming time is 42.25s; Method of the present invention finds current optimum solution when the 377th iteration, and route total length is: 6656, and consuming time is 37.14s, can find, a kind of optimal path finding method based on ant group method of the present invention compares basic ant group method, and its search speed is faster, and the path obtained is better.And the experimental result that method of the present invention obtains is compared with the optimum solution under internationally recognized TSPLIB, it is error free, and the validity of a kind of optimal path finding method based on ant group method of the present invention is more described.
First a kind of optimal path finding method based on ant group method of the present invention carries out initial global calculation by ant group method to it, and obtaining is the quantity of information on every paths.In ant group method, the quantity of information that a paths stays more Big Formica fusca selects the probability of this paths larger.Secondly, the node finding some special in all nodes, the quantity of information of these special joint associateds is all larger.Then, take special joint as beginning or end, of a sort no special node forms Local Subspace, within the scope of obtained Local Subspace, selects the dynamic programming method in accurate Calculation, finds the shortest path between two special joints.Be connected after the shortest path of all Local Subspaces is all obtained, the shortest path of the overall situation can be obtained.
Theoretical foundation of the present invention is sturdy, didactic ant group method is combined with accurate Calculation, effectively improves the accuracy of method for searching path, reduces the time that route searching spends.
Novel preferred implementation, it should be pointed out that for the person of ordinary skill of the art, and without departing from the concept of the premise of the invention, can also make some distortion and improvement, these all belong to protection scope of the present invention.

Claims (5)

1., based on an optimal path finding method for ant group method, it is characterized in that, comprise the following steps:
1) the map scene having n node is set up;
2) m ant is arranged at random on n described node;
3) after every ant all covers n described node, the quantity of information on n described internodal path is upgraded, and records the quantity of information of introductory path on each described node;
4) from n described node, a special joint is chosen;
5) according to a described special joint, no special node is classified;
6) with described special joint for beginning or end, of a sort described no special node forms Local Subspace;
7) in described Local Subspace, dynamic programming method is used to carry out path planning;
8) shortest path of whole described Local Subspaces is connected, obtain the shortest path of the overall situation;
9) judge whether the described optimal path finding method based on ant group method meets termination condition, if meet, then export global optimum path, if do not meet, return step 2).
2. the optimal path finding method based on ant group method according to claim 1, is characterized in that, described step 3) further comprising the steps of:
3.1) node i of initially setting out of every ant is carried out record;
3.2) according to formula (1) calculate ant k (k=1 ..., m) arrive the probability of node j ;
p ij k ( t ) = τ ij α ( t ) η ij β ( t ) Σ allowd k τ ij k ( t ) η ij k ( t ) j ∈ allowd k 0 otherwise - - - ( 1 )
Wherein: d ijrepresent the spacing of node i and node j, τ ijt () represents quantity of information between t node i and node j, initial time τ ij(0)=C (C is initial information amount, is constant), allowd krepresent next step node set that can walk of ant k, α represents the effect size of quantity of information to ant selecting paths, η ijrepresent that ant k transfers to the expectation of node j from node i, β represents η ijeffect size;
3.3), after every ant all covers n described node, the quantity of information on described internodal path is upgraded according to formula (2):
τ i ( t + 1 ) = ( 1 - ρ ) τ ij ( t ) + Σ k = 1 m Δ τ ij k ( t ) - - - ( 2 )
Wherein: ρ ∈ (0,1) represents quantity of information τ ijf () passes attenuation degree in time, represent that ant k transfers to the quantity of information stayed between node j from node i.
3.4) the quantity of information τ on every paths is obtained ij', the quantity of information of introductory path on each described node is calculated according to formula (3).
τ i ′ = 1 2 Σ j = 1 n τ ij ′ - - - ( 3 )
3. the optimal path finding method based on ant group method according to claim 2, is characterized in that, in described step 4) in, from n described node, choose a special joint comprise the following steps:
4.1) the quantity of information τ of introductory path on each described node is obtained i';
4.2) to the quantity of information τ of the introductory path on n described node i' sort;
4.3) after choosing sequence, the relative τ of quantity of information i' larger a corresponding described special joint.
4. the optimal path finding method based on ant group method according to claim 2, is characterized in that, in described step 5) in, the classification of described no special node is comprised the following steps:
5.1) ant group method is used to obtain and record the shortest path R between described special joint ij;
5.2) according to formula (4), described no special node is classified,
Wherein: d rirepresent the vertical range in path between described no special node to described special joint.
5. the optimal path finding method based on ant group method according to claim 4, is characterized in that, in described step 9) in, described termination condition is the situation reaching predetermined iterations or occur finding identical global optimum path.
CN201510182588.1A 2015-04-16 2015-04-16 Method of finding optimal paths based on ant colony method Pending CN104751250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510182588.1A CN104751250A (en) 2015-04-16 2015-04-16 Method of finding optimal paths based on ant colony method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510182588.1A CN104751250A (en) 2015-04-16 2015-04-16 Method of finding optimal paths based on ant colony method

Publications (1)

Publication Number Publication Date
CN104751250A true CN104751250A (en) 2015-07-01

Family

ID=53590894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510182588.1A Pending CN104751250A (en) 2015-04-16 2015-04-16 Method of finding optimal paths based on ant colony method

Country Status (1)

Country Link
CN (1) CN104751250A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107045656A (en) * 2017-02-23 2017-08-15 沈阳理工大学 Based on the intelligent scenic spot tour planing method for improving ant group algorithm
CN107220731A (en) * 2017-05-23 2017-09-29 南京邮电大学 A kind of logistics distribution paths planning method
WO2019114153A1 (en) * 2017-12-12 2019-06-20 北京京东尚科信息技术有限公司 Order picking path planning method and device
CN109978213A (en) * 2017-12-28 2019-07-05 北京京东尚科信息技术有限公司 A kind of task path planning method and device
CN111024082A (en) * 2019-12-02 2020-04-17 深圳优地科技有限公司 Method and device for planning local path of robot and robot
CN111176284A (en) * 2020-01-02 2020-05-19 东南大学 Self-adaptive control method and system for vehicle path tracking in unmanned driving
CN112629537A (en) * 2020-12-11 2021-04-09 华晟(青岛)智能装备科技有限公司 Method and system for dynamically selecting conveying route

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107045656A (en) * 2017-02-23 2017-08-15 沈阳理工大学 Based on the intelligent scenic spot tour planing method for improving ant group algorithm
CN107220731A (en) * 2017-05-23 2017-09-29 南京邮电大学 A kind of logistics distribution paths planning method
WO2019114153A1 (en) * 2017-12-12 2019-06-20 北京京东尚科信息技术有限公司 Order picking path planning method and device
CN109919345A (en) * 2017-12-12 2019-06-21 北京京东尚科信息技术有限公司 Picking paths planning method and device
CN109919345B (en) * 2017-12-12 2021-06-29 北京京东振世信息技术有限公司 Method and device for planning picking path
CN109978213A (en) * 2017-12-28 2019-07-05 北京京东尚科信息技术有限公司 A kind of task path planning method and device
CN109978213B (en) * 2017-12-28 2021-11-12 北京京东振世信息技术有限公司 Task path planning method and device
CN111024082A (en) * 2019-12-02 2020-04-17 深圳优地科技有限公司 Method and device for planning local path of robot and robot
CN111024082B (en) * 2019-12-02 2021-12-17 深圳优地科技有限公司 Method and device for planning local path of robot and robot
CN111176284A (en) * 2020-01-02 2020-05-19 东南大学 Self-adaptive control method and system for vehicle path tracking in unmanned driving
CN112629537A (en) * 2020-12-11 2021-04-09 华晟(青岛)智能装备科技有限公司 Method and system for dynamically selecting conveying route

Similar Documents

Publication Publication Date Title
CN104751250A (en) Method of finding optimal paths based on ant colony method
Chen et al. Reliable shortest path finding in stochastic networks with spatial correlated link travel times
Chen et al. Reliable shortest path problems in stochastic time-dependent networks
Chen et al. B-Planner: Planning bidirectional night bus routes using large-scale taxi GPS traces
CN104050817B (en) Speed limiting information base generation and speed limiting information detection method and system
CN104731963B (en) Recommend method and system in a kind of gridding path based on car networking
CN104574967B (en) A kind of city based on Big Dipper large area road grid traffic cognitive method
Sun et al. Urban travel behavior analyses and route prediction based on floating car data
Gong et al. Data selection in machine learning for identifying trip purposes and travel modes from longitudinal GPS data collection lasting for seasons
CN104462190A (en) On-line position prediction method based on mass of space trajectory excavation
CN105551239B (en) travel time prediction method and device
CN107742169A (en) A kind of Urban Transit Network system constituting method and performance estimating method based on complex network
CN110782178B (en) Traffic network planning aid decision-making method and device
CN105758410A (en) Method for quickly planning and mixing paths on basis of A-star algorithms
CN103309917A (en) Path searching method and path search device
Lenka et al. PSPS: An IoT based predictive smart parking system
CN111337044B (en) Urban road path planning method based on traffic weight
Jiang et al. Identifying K Primary Corridors from urban bicycle GPS trajectories on a road network
CN106845703B (en) Urban road network time-varying K shortest path searching method considering steering delay
CN105547308A (en) Digital road network map and depth-first traversal-based navigation method and apparatus thereof
CN106289287A (en) A kind of vehicle-mounted end Multiobjective Shortest Path computational methods based on route selection experience
Li et al. Physics-guided energy-efficient path selection: a summary of results
CN111008730B (en) Crowd concentration prediction model construction method and device based on urban space structure
Xu et al. Empowering a* algorithm with neuralized variational heuristics for fastest route recommendation
Olczyk et al. Finding routes in a public transport network. A case study

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20150701

RJ01 Rejection of invention patent application after publication