CN103679301A - Complex terrain-based optimal path searching method - Google Patents

Complex terrain-based optimal path searching method Download PDF

Info

Publication number
CN103679301A
CN103679301A CN201310751829.0A CN201310751829A CN103679301A CN 103679301 A CN103679301 A CN 103679301A CN 201310751829 A CN201310751829 A CN 201310751829A CN 103679301 A CN103679301 A CN 103679301A
Authority
CN
China
Prior art keywords
rectangle
path
periphery
starting point
terrain
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.)
Granted
Application number
CN201310751829.0A
Other languages
Chinese (zh)
Other versions
CN103679301B (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.)
Xian University of Technology
Original Assignee
Xian University 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 Xian University of Technology filed Critical Xian University of Technology
Priority to CN201310751829.0A priority Critical patent/CN103679301B/en
Publication of CN103679301A publication Critical patent/CN103679301A/en
Application granted granted Critical
Publication of CN103679301B publication Critical patent/CN103679301B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a complex terrain-based optimal path searching method, which comprises the following steps of dividing a map into m*n rectangular nets, endowing each net with one of six terrain attributes, namely different resistance factors, setting a starting point rectangle and an end point rectangle, and determining a rectangle which a user moves towards next by comparing the sum of actual energy consumption from one rectangle to a peripheral rectangle and the planned energy consumption from the peripheral rectangle to the end point rectangle. According to the method, by calculating and judging the energy consumption by meeting barriers in various paths in a given region and selecting the optimal path, the method is simple and results are accurate. A constructor function is used for performing attribute assignment on each point, different attributes present different barrier varieties, whether a path is good or bad is judged through energy consumption, and the path in which the user takes the least time, costs least and consumes least energy can be selected.

Description

Optimal path finding method based on complex-terrain
Technical field
The present invention relates to a kind of optimal path finding method, relate in particular to a kind of optimal path finding method based on complex-terrain.
Background technology
Optimal path in Modern Significance no longer only refers to the bee-line in geographic significance, and it can also refer to, and the time is minimum, expense is economized most, circuit capacity maximum etc.Existing optimal path finding method comprises traversal formula searching algorithm, A* algorithm.Traversal formula searching algorithm is suitable for less map, and needs a large amount of calculating just can obtain optimal path; When map is larger, traversal formula searching algorithm just cannot obtain optimal path.A* algorithm is suitable for the simple map of landform, only have can by and can not pass through element, in complicated map, cannot obtain optimal path.
Summary of the invention
The object of the present invention is to provide a kind of optimal path finding method based on complex-terrain, solve prior art and be only suitable for the simple map of landform, need a large amount of calculating just can obtain the problem of optimal path.
Technical scheme of the present invention is, optimal path finding method based on complex-terrain, by map partitioning, be m*n rectangular node, each grid is given a kind of in 6 kinds of landform attributes, it is different resistance coefficients, starting point and terminal rectangle are set, the sum that consumes energy to the actual energy consumption of periphery rectangle and periphery rectangle to the plan of terminal rectangle by one of them rectangle relatively, determine next step this move towards which rectangle.
Feature of the present invention is also:
When occurring that the total consumes energy of a paths is more than the total power consumption of another paths, select total power consumption paths still less; To the rectangle of determining that power consumption is maximum, get rid of, do not participate in follow-up relatively in, reduce the calculating of Invalid path.
Specifically comprise the following steps:
The first step, in an arbitrarily random map, is divided into appropriate little rectangular block by map;
Second step, carries out key words sorting to each little rectangular block according to different terrain; Different terrain is represented by different colours respectively, determines the resistance coefficient of different terrain;
The 3rd step, determines starting point rectangle and terminal rectangle, and starting point rectangle is recorded in " determining path "; By Pythagorean theorem, calculate each rectangle mid point to the air line distance L of terminal rectangle mid point; And obtain and using this straight line as in cornerwise large rectangle, all little rectangle resistance sums, divided by little rectangle number, draw the average resistance F of calculating of each little rectangle; Calculate L*F and show in map that each rectangle is to the calculating power consumption value of terminal rectangle, and be recorded in two-dimensional array;
The 4th step, from starting point rectangle, start to calculate, each rectangle perimeter has 3-8 other rectangles, these rectangles is designated as " periphery rectangle ", take out starting point rectangular centre apart from the distance L i of its periphery rectangular centre, and by the color of periphery rectangle, determined the resistance Fi of periphery rectangle; Periphery rectangle herein does not comprise the rectangle in " determining path " and " path to be determined "; If Fi=0, takes out first rectangle on the reverse extending line of this rectangular centre and starting point rectangular centre line, replace it as a new periphery rectangle; If terminal rectangle is included in the periphery rectangle of starting point rectangle, directly terminal rectangle is recorded in " determining path ", complete whole algorithm, path is determined in output; Otherwise calculate Li*Fi and show that starting point rectangle is to the actual energy consumption value of periphery rectangle.
The 5th step, is added starting point rectangle to the actual energy consumption of periphery rectangle and the calculating power consumption value of periphery rectangle, get minimum value P1, and this periphery rectangle is recorded in " path to be determined ".
The 6th step, gets and treats last rectangle in " determining path ", if its periphery rectangle comprises terminal rectangle, this rectangle is write to " determining path " afterwards, terminal rectangle is write to " determining path ", finish algorithm, all rectangles in output " determining path "; Otherwise, calculate the actual energy consumption value of its periphery rectangle, and be added with their calculating power consumption value, take out minimum value P2.
The 7th step, is separated by if take out rectangle and the starting point rectangle of minimum value, this rectangle is write in " determining path ", and to make this rectangle be new starting point rectangle, jump to the 4th step and start to carry out, otherwise calculate this rectangle to the actual energy consumption of starting point rectangle, and add that its calculating power consumption obtains P3; If P3<=P1+P2, this periphery rectangle is write to " path to be determined ", jumping to the 6th step starts to carry out, otherwise last rectangle in " path to be determined " is write to " determining path ", and it is removed to " path to be determined ", and this rectangle of P3 is write in " path to be determined ", jump to the 6th step and start to carry out.
In above-mentioned second step, 1. different terrain comprises landform usually, 2. ice-patch surface, and 3. road surface, desert, 4. meadow, 5. can not across obstacle, 6. can across obstacle; Corresponding these six kinds of different terrain represent with white, redness, yellow, green, purple and black respectively; Resistance coefficient by these six kinds of different terrain is respectively 1,0.5, and 2,1.5,999,0.
In above-mentioned the 4th step, the position according to this periphery rectangle compared to starting point rectangle, the value of i is that upper left is 1, and top is 2, and upper right is 3, and the left side is 4, and the right is 5, and lower-left is 6, is 7 below, and bottom right is 8.
The present invention has following beneficial effect:
The power consumption of encountering barrier when 1, the present invention judges through each paths by calculating in given region is how many, selects best walking path, and method is simple, and result is accurate.
2, the present invention by constructed fuction the attribute assignment to every bit, the obstacle kind of different attribute representative is different, by the quality in spent energy judgement path, the time of can selecting is minimum, expense is economized most, the minimum path of consuming energy.
Accompanying drawing explanation
Fig. 1 is the optimal path finding method embodiment map schematic diagram that the present invention is based on complex-terrain;
Fig. 2 is that the optimal path finding method embodiment that the present invention is based on complex-terrain is divided into little rectangular block schematic diagram by map;
Fig. 3 is the optimal path finding method embodiment optimal path schematic diagram that the present invention is based on complex-terrain.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is elaborated.
Optimal path finding method based on complex-terrain, by map partitioning, be m*n rectangular node, each grid is given a kind of (being different resistance coefficients) in 6 kinds of landform attributes, starting point and terminal rectangle are set, the sum that consumes energy to the actual energy consumption of periphery rectangle and periphery rectangle to the plan of terminal rectangle by certain rectangle relatively, determine next step this move towards which rectangle; In addition, when occurring walking a paths (A path) Zong consumes energy than the footpath of trying a different way (B path) total power consumption more (even when starting to judge, each step of walking A path all consumes energy minimum), final, should select away total power consumption paths still less; Finally, to the rectangle of determining that power consumption is maximum, get rid of, do not participate in follow-up relatively in, reduce the calculating of Invalid path.
Specifically comprise the following steps:
The first step: in a certain arbitrarily random map, map is divided into appropriate rectangular area, in the map of 800*600, map is divided into the little rectangular block of 100 80*60.
Second step: these 100 little rectangular blocks are carried out to key words sorting according to different terrain.If this map has 6 kinds of different terrain: 1. usual landform, 2. ice-patch surface, 3. road surface, desert, 4. meadow, 5. can not across obstacle, 6. can across obstacle.For these six kinds of different terrain, by 6 kinds of different colours, represented respectively: 1. white, 2 redness, 3. yellow, 4. green, 5. purple, 6 black.Resistance coefficient by six kinds of different terrain is respectively: 1,0.5,2,1.5,999,0.Referring to table 1.Landform in 100 little rectangular blocks is analyzed, and is certain landform if having over half area in this rectangular block, by this Write wafer; If do not have a kind of landform area in this rectangular block to surpass half, automatically by the Write wafer of maximum value in this rectangle, and the rectangle of mark carried out to Fill Color according to mark resistance.
The color that table 1 different terrain is corresponding and resistance
Numbering Landform Color Resistance
1 Usual landform White 1
2 Ice-patch surface Red 0.5
3 Road surface, desert Yellow 2
4 Meadow Green 1.5
5 Can not across obstacle Purple 999
6 Can across obstacle Black 0
The 3rd step: determine starting point rectangle and terminal rectangle, starting point rectangle is recorded in " determining path ".By Pythagorean theorem, calculate each rectangle mid point to the air line distance L of terminal rectangle mid point; And obtain and using this straight line as in cornerwise large rectangle, all little rectangle resistances (judging by its color) sum, divided by little rectangle number, draws the average resistance F of calculating of each little rectangle.Calculate L*F and show in map that each rectangle is to the calculating power consumption value of terminal rectangle, and be recorded in two-dimensional array.
The 4th step: start to calculate from starting point rectangle, each rectangle perimeter has 3-8 other rectangles, these rectangles are designated as " periphery rectangle ", take out starting point rectangular centre apart from the distance L i of its periphery rectangular centre, and by the color of periphery rectangle, determined the resistance Fi of periphery rectangle.Periphery rectangle herein does not comprise the rectangle in " determining path " and " path to be determined ".If Fi=0, takes out first rectangle on the reverse extending line of this rectangular centre and starting point rectangular centre line, replace it as a new periphery rectangle.Wherein the value of i is with reference to table 2.If terminal rectangle is included in the periphery rectangle of starting point rectangle, directly terminal rectangle is recorded in " determining path ", complete whole algorithm, path is determined in output, otherwise calculate Li*Fi, show that starting point rectangle is to the actual energy consumption value of periphery rectangle.
Table 2 periphery rectangle is compared to position and the i value thereof of starting point rectangle
This rectangle is compared to the position of starting point rectangle I value
Upper left 1
Top 2
Upper right 3
The left side 4
The right 5
Lower-left 6
Below 7
Bottom right 8
The 5th step: starting point rectangle is added to the actual energy consumption of periphery rectangle and the calculating power consumption value of periphery rectangle, gets minimum value P1, this periphery rectangle is recorded in " path to be determined ".
The 6th step: get and treat last rectangle in " determining path ", if its periphery rectangle comprises terminal rectangle, this rectangle is write to " determining path " afterwards, terminal rectangle is write to " determining path ", finish algorithm, all rectangles in output " determining path ".Otherwise, calculate the actual energy consumption value of its periphery rectangle, and be added with their calculating power consumption value, take out minimum value P2.
The 7th step: be separated by if take out rectangle and the starting point rectangle of minimum value, this rectangle write in " determining path ", and to make this rectangle be new starting point rectangle, jump to the 4th step and start execution.Otherwise calculate this rectangle to the actual energy consumption of starting point rectangle, and add that its calculating power consumption obtains P3.If P3<=P1+P2, writes " path to be determined " by this periphery rectangle, jump to the 6th step and start to carry out.Otherwise last rectangle in " path to be determined " is write to " determining path ", and it is removed to " path to be determined ", and this rectangle of P3 is write in " path to be determined ", jump to the 6th step and start to carry out.
Embodiment, the optimal path finding method based on complex-terrain, a newly-built 500*300 map, referring to Fig. 1, and is divided into 60 little rectangles by map, and each little rectangle size is 50*50, referring to Fig. 2.Map is carried out to initialization, given specific landform in each little rectangle, and first rectangle is set to starting point rectangle, last rectangle is set to terminal rectangle.Wherein, obstacle is can not leaping over obstacles, and trap is for can cross over trap.Each little rectangle of map is pressed to its resistance coefficient Fill Color, and according to algorithm, obtain optimal route, referring to Fig. 3.

Claims (5)

1. the optimal path finding method based on complex-terrain, it is characterized in that, by map partitioning, be m*n rectangular node, each grid is given a kind of in 6 kinds of landform attributes, it is different resistance coefficients, starting point and terminal rectangle are set, the sum that consumes energy to the actual energy consumption of periphery rectangle and periphery rectangle to the plan of terminal rectangle by one of them rectangle relatively, determine next step this move towards which rectangle.
2. the optimal path finding method based on complex-terrain as claimed in claim 1, is characterized in that, when occurring that the total consumes energy of a paths is more than the total power consumption of another paths, selects total power consumption paths still less; To the rectangle of determining that power consumption is maximum, get rid of, do not participate in follow-up relatively in, reduce the calculating of Invalid path.
3. the optimal path finding method based on complex-terrain as claimed in claim 1 or 2, is characterized in that, specifically comprises the following steps:
The first step, in an arbitrarily random map, is divided into appropriate little rectangular block by map;
Second step, carries out key words sorting to each little rectangular block according to different terrain; Different terrain is represented by different colours respectively, determines the resistance coefficient of different terrain;
The 3rd step, determines starting point rectangle and terminal rectangle, and starting point rectangle is recorded in " determining path "; By Pythagorean theorem, calculate each rectangle mid point to the air line distance L of terminal rectangle mid point; And obtain and using this straight line as in cornerwise large rectangle, all little rectangle resistance sums, divided by little rectangle number, draw the average resistance F of calculating of each little rectangle; Calculate L*F and show in map that each rectangle is to the calculating power consumption value of terminal rectangle, and be recorded in two-dimensional array;
The 4th step, from starting point rectangle, start to calculate, each rectangle perimeter has 3-8 other rectangles, these rectangles is designated as " periphery rectangle ", take out starting point rectangular centre apart from the distance L i of its periphery rectangular centre, and by the color of periphery rectangle, determined the resistance Fi of periphery rectangle; Periphery rectangle herein does not comprise the rectangle in " determining path " and " path to be determined "; If Fi=0, takes out first rectangle on the reverse extending line of this rectangular centre and starting point rectangular centre line, replace it as a new periphery rectangle; If terminal rectangle is included in the periphery rectangle of starting point rectangle, directly terminal rectangle is recorded in " determining path ", complete whole algorithm, path is determined in output; Otherwise calculate Li*Fi and show that starting point rectangle is to the actual energy consumption value of periphery rectangle.
The 5th step, is added starting point rectangle to the actual energy consumption of periphery rectangle and the calculating power consumption value of periphery rectangle, get minimum value P1, and this periphery rectangle is recorded in " path to be determined ".
The 6th step, gets and treats last rectangle in " determining path ", if its periphery rectangle comprises terminal rectangle, this rectangle is write to " determining path " afterwards, terminal rectangle is write to " determining path ", finish algorithm, all rectangles in output " determining path "; Otherwise, calculate the actual energy consumption value of its periphery rectangle, and be added with their calculating power consumption value, take out minimum value P2.
The 7th step, is separated by if take out rectangle and the starting point rectangle of minimum value, this rectangle is write in " determining path ", and to make this rectangle be new starting point rectangle, jump to the 4th step and start to carry out, otherwise calculate this rectangle to the actual energy consumption of starting point rectangle, and add that its calculating power consumption obtains P3; If P3<=P1+P2, this periphery rectangle is write to " path to be determined ", jumping to the 6th step starts to carry out, otherwise last rectangle in " path to be determined " is write to " determining path ", and it is removed to " path to be determined ", and this rectangle of P3 is write in " path to be determined ", jump to the 6th step and start to carry out.
4. the optimal path finding method based on complex-terrain as claimed in claim 3, is characterized in that: in described second step, 1. different terrain comprises landform usually, 2. ice-patch surface, 3. road surface, desert, 4. meadow, 5. can not across obstacle, 6. can across obstacle; Corresponding these six kinds of different terrain represent with white, redness, yellow, green, purple and black respectively; Resistance coefficient by these six kinds of different terrain is respectively 1,0.5, and 2,1.5,999,0.
5. the optimal path finding method based on complex-terrain as claimed in claim 3, it is characterized in that: in described the 4th step, position according to this periphery rectangle compared to starting point rectangle, the value of i is that upper left is 1, top is 2, upper right is 3, the left side is 4, and the right is 5, and lower-left is 6, be 7 below, bottom right is 8.
CN201310751829.0A 2013-12-31 2013-12-31 Complex terrain-based optimal path searching method Expired - Fee Related CN103679301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310751829.0A CN103679301B (en) 2013-12-31 2013-12-31 Complex terrain-based optimal path searching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310751829.0A CN103679301B (en) 2013-12-31 2013-12-31 Complex terrain-based optimal path searching method

Publications (2)

Publication Number Publication Date
CN103679301A true CN103679301A (en) 2014-03-26
CN103679301B CN103679301B (en) 2017-01-11

Family

ID=50316785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310751829.0A Expired - Fee Related CN103679301B (en) 2013-12-31 2013-12-31 Complex terrain-based optimal path searching method

Country Status (1)

Country Link
CN (1) CN103679301B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156459A (en) * 2014-08-20 2014-11-19 焦点科技股份有限公司 Efficient path-finding method and system based on the same cost grids
CN106251673A (en) * 2016-07-26 2016-12-21 合肥指南针电子科技有限责任公司 A kind of anti-congested traffic management method
CN106708043A (en) * 2016-12-13 2017-05-24 北京航空航天大学 Method of improving Visual Graph in complicated map
CN107808061A (en) * 2017-11-20 2018-03-16 北京华大九天软件有限公司 A kind of two-way across obstacle wiring method for supporting just to give oblique cabling
WO2019085567A1 (en) * 2017-10-30 2019-05-09 珠海市一微半导体有限公司 Robot path prediction and control method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102901500A (en) * 2012-09-17 2013-01-30 西安电子科技大学 Aircraft optimal path determination method based on mixed probability A star and agent

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156459A (en) * 2014-08-20 2014-11-19 焦点科技股份有限公司 Efficient path-finding method and system based on the same cost grids
CN106251673A (en) * 2016-07-26 2016-12-21 合肥指南针电子科技有限责任公司 A kind of anti-congested traffic management method
CN106708043A (en) * 2016-12-13 2017-05-24 北京航空航天大学 Method of improving Visual Graph in complicated map
CN106708043B (en) * 2016-12-13 2019-08-06 北京航空航天大学 A method of improving Visual Graph under complicated map
WO2019085567A1 (en) * 2017-10-30 2019-05-09 珠海市一微半导体有限公司 Robot path prediction and control method
US11526170B2 (en) 2017-10-30 2022-12-13 Amicro Semiconductor Co., Ltd. Method for detecting skidding of robot, mapping method and chip
CN107808061A (en) * 2017-11-20 2018-03-16 北京华大九天软件有限公司 A kind of two-way across obstacle wiring method for supporting just to give oblique cabling
CN107808061B (en) * 2017-11-20 2021-01-19 北京华大九天软件有限公司 Bidirectional obstacle-crossing wiring method supporting orthogonal and oblique wiring

Also Published As

Publication number Publication date
CN103679301B (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN103679301A (en) Complex terrain-based optimal path searching method
CN112034836B (en) Mobile robot path planning method with improved A-algorithm
Zhang et al. Enhancing landscape connectivity through multifunctional green infrastructure corridor modeling and design
CN105551082B (en) A kind of pavement identification method and device based on laser point cloud
CN104933661B (en) A kind of non-crowd&#39;s equilibrium evacuation method for claiming escape way of public building
CN110772791B (en) Route generation method, device and storage medium of three-dimensional game scene
CN102565810B (en) Method for extracting land utilization landmark boundary outline on remote sensing image
CN106123898B (en) Indoor paths planning method based on picture parsing
CN102901500A (en) Aircraft optimal path determination method based on mixed probability A star and agent
CN107050860B (en) Map generation method, map generation device, storage medium and processor
CN104809572A (en) Method for inversing population density based on night lamplight data
CN105118014A (en) Method for evaluating grids of bus network
CN104732591A (en) Automatic generating method for three-dimensional virtual city
CN105631143A (en) Generation method and system for laying scheme of tile
CN112651548A (en) Evaluation and identification method for plateau lakeside ecological landscape restoration planning
Dimitrios Urban growth prediction modelling using fractals and theory of chaos
CN110909961A (en) BIM-based indoor path query method and device
CN102902837B (en) Graphic space superposition analysis drafting method of complex vector polygon
Ducke et al. From points to areas: constructing territories from archaeological site patterns using an enhanced Xtent model
CN113536492B (en) Green channel network construction method, device and storage medium
CN115759669A (en) Urban blue-green ecological network construction method based on composite function
CN105138711A (en) Primitive indexing method, primitive detecting method, primitive indexing device and a primitive detecting device
CN104240232B (en) A kind of road damage inspection optimization method based on image procossing
Keeffe et al. Mapping the flow of forest migration through the city under climate change
CN104866583B (en) The auto arranging method of ship electronic label in a kind of electronic chart

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170111

Termination date: 20181231