Background technology
For with regulation information correctly, tissue becomes the data that can be used by navigational system efficiently, various navigation data forms have adopted different processing modes.Navigation data generally is to use on embedded hardware equipment, and data volume requires few as far as possible.Path planning algorithm needs the crossing that compact polymerism must be arranged.The principle that requires regulation to handle, store is to make things convenient for navigational system to use, and improves the efficient of navigational system as far as possible.
But in practical application, the tissue of regulation data generally is loose, is unfavorable for the efficient of navigational system track search, even influences the rationality of path planning, thereby influences product quality.
Based on above reason this paper a kind of method that can efficiently handle and organize the regulation data is proposed.And in the real data compiling, obtained verifying and using.Say from the model angle, when the needs compactness is organized the cum rights digraph and need be explored in the drawings, also can adopt this method.
Relevant explanation of nouns:
1.Link
Link carries out abstract and curve that form to real-life road, and the attribute information of road self is stored on the Link simultaneously.
2.Node
When the attribute between road and the road changes or road when bifurcated is arranged, road will be abstracted into many Link, and the tie point between the Link is conceptualized as node, and these attribute change information are stored on the node simultaneously.
3. compound crossing
Compound crossing is the complicated key element that is made up of a plurality of tie points (node) in the complex crossing.When abstract, owing to the expression of segment path two-wire forms a plurality of tie points (node), these related tie points (node) are comprehensively become the compound crossing of a complicacy, be used for expressing easily the information at crossing.Compound crossing is the virtual element that defines in order to make up topological relation.Compound crossing comprises and connects (interior Link) in tie point (node), the crossing.The inner road in compound crossing all is Link in the crossing; But the interior Link that mentions among this paper says from logical perspective; As long as in the regulation processing procedure, needs are arranged, but the people is for being set to interior Link, even this Link is not the inner Link in compound crossing in general sense in actual road conditions.The related road in compound crossing all is called outside road (outer Link) the Link in the crossing.
4. traffic regulation
Traffic restriction, current regulation, passing rules etc. are claimed in the traffic regulation again, as one of core content in the navigation data, are by abstract the obtaining of various actual traffic restrictions in the real road.。
5. complete regulation
So-called complete regulation is for compound crossing, and the entering of regulation, to withdraw from Link all be Link compound crossing outside, is the regulation of Link in the compound crossing via Link, or the generally simple regulation on the crossing.
6. non-complete regulation
So-called non-complete regulation is exactly that fingering is gone into, withdrawed from Link one or both regulations for Link in the compound crossing are arranged.
7. regulation table
The set of many regulations, every regulation storage gets into Link, withdraws from Link and regulation type.
8. road reference table
The set in many paths of can passing through, the storage of every paths get into Link, withdraw from Link, via Link.
Summary of the invention
Problem to be solved by this invention is: a kind of traffic regulation disposal route based on compound crossing is provided; Use this method can not only correctly store the traffic regulation aspect the regulation data processing; More can improve the efficient that regulation is handled and stored, thereby improve the efficient of navigational system track search.In addition, because this method does not rely on concrete data entity, only depend on regulation itself; Even to can abstractly being the entity of regulation among this paper; All can adopt the method for this paper to handle, can think that this paper provides a kind of model method, thereby this method may be used on other field.
In order to realize technique effect of the present invention, the disposal route to traffic regulation in the navigation data provided by the invention is abstracted into curve with road; Be defined as Link; Tie point between road and the road is defined as node, and the compound crossing in the traffic regulation is made up of a plurality of tie points (node), is positioned at the inner Link in compound crossing and is defined as the crossing connection; Abbreviate interior Link as; The outside Link in compound crossing is defined as outside the crossing and connects, and is called for short outer Link, and this method makes up compound crossing based on traffic regulation itself via Link; Based on road topology relation and the compound crossing of own characteristic completion, compound crossing, again the form of regulation with compound crossing regulation table and road reference table is organized on the major node at compound crossing afterwards.
Preferably, said method specifically may further comprise the steps:
Step 1, according to traffic rules the inner Link in compound crossing is provided with in the Link sign;
Step 2, the compound basically crossing of structure promptly make up compound basically crossing according to interior Link sign and road topology relation;
Step 3, completeization of compound crossing are promptly executed completeization processing to incomplete composite road cause for gossip;
The processing of step 4, complete regulation, promptly to the entering of regulation, to withdraw from Link all be Link outside the compound crossing, is that the regulation of Link in the compound crossing is handled via Link;
The processing of step 5, non-complete regulation promptly has one or both to handle for the regulation of Link in the compound crossing to getting into, withdraw from Link.
Preferably, if above-mentioned steps one Link for current regulation via Link, then this Link is designated interior Link.
Preferably, the compound basically crossing of above-mentioned steps two structures comprises:
1) appoint get in the Node of Link as compound crossing principal point P1;
2) every of P1 is handled in abutting connection with Link, judge whether to be interior Link,, then deposit outer Link tabulation in if not interior Link; If interior Link, Link tabulation in then depositing in;
3) glean adjacency Node promptly when when Link is interior Link, collects the Node of current point through interior Link adjacency, promptly in abutting connection with Node;
4) after all of its neighbor Link finishes dealing with, needing inspection in abutting connection with the Node tabulation, will be that current Node carries out the recurrence processing with these Node respectively when being collected in abutting connection with Node, and the recurrence exit criteria is to have run into the Node that had handled;
5) after all of its neighbor Node of each recurrence layer finished dealing with, compound crossing Primary Construction was accomplished.
Preferably, completeization of compound crossing of above-mentioned steps three comprises:
1) interior Link completion, head and the tail points all are that to need completion be interior Link to the Link of compound crossing Node; The first point of the first Link of one row Link and the tail point of tail Link are compound crossing Node, and middle Link from beginning to end degree of putting all be that all to need completion be interior Link for 2 Link;
2) compound crossing Node completion, based on the interior Link of completion, it is put to needing the Node of completion from beginning to end.
Preferably, the processing of above-mentioned steps four complete regulations specifically comprises:
1) complete regulation is judged, if the entering Link of i.e. regulation is Link outside the compound crossing with withdrawing from Link, all are Link in the compound crossing via Link, then are judged as complete regulation;
2) complete regulation directly is stored to the regulation table;
3) all the other paths of can passing through are used dijkstra's algorithm to explore optimal path and are deposited the road reference table on the compound crossing.
Preferably, the processing of above-mentioned steps five non-complete regulations specifically comprises:
1) gets into, withdraws from Link and directly use dijkstra's algorithm to explore all paths to compound crossing;
2) on the path of exploring, carry out Screening Treatment according to regulation information; The path that not influenced by regulation;
3) in the path that filters out, choose optimal path,, then think, deposit the regulation table in when advancing into, withdraw from Link combination impassability if do not exist; If exist, then deposit the road reference table in.
Advantage of the present invention is: the regulation data through using this method to handle can solve the storage and the use problem of compound regulation efficiently.Hypothesis prerequisite of the present invention be current regulation data respectively want vegetarian refreshments, comprise get into Link, via Link with to withdraw from Link correct.
Embodiment
Understand and embodiment of the present invention for the ease of those of ordinary skills, the present invention is made further detailed description below in conjunction with accompanying drawing and embodiment.
As shown in Figure 1, for compound crossing of the present invention abstract schematic, on scheming, can find out; Compound crossing from real crossing situation carry out abstract and extract, wherein N1, N2, N3 and N4 are respectively four points of connection, the Link between the tie point is respectively L2, L3, L4 and L5; Be in the crossing and connect; Be called interior Link, Link are positioned at the inner road part in compound crossing in these, and the outside road L6 in compound crossing, L7, L8......L12 etc. are outer Link.
As shown in Figure 2, implementation of the present invention may further comprise the steps after beginning:
Step 1), 2), 3) explanation will be that example is carried out with Fig. 3, there are two regulations in this crossing, please refer to table 1.
The content that has two compound regulations on compound crossing of table 1
1) the interior Link sign of Link is set
Corresponding diagram 3 all is set to Link in the compound crossing with L2, L3, L4.
2) make up compound basically crossing
The process flow diagram of compound crossing Primary Construction is as shown in Figure 5:
On the step 1) processing basis, internally Link handles, and with any interior Link to start with, carries out compound crossing and makes up.
1, appoints and get an interior Link, for example desirable L2 among Fig. 3.
2, judge whether this interior Link was processed, whether this process can be processed completion through judging its head and the tail node.Each node can be provided with a value of statistical indicant and represent whether it belongs to certain compound crossing, and when a node is not processed out-of-dately, its compound crossing is masked as 0; When it was processed, its compound crossing is masked as non-0 value.If interior Link belongs to certain compound crossing, therefore inevitable this compound crossing that all belong to of its head and the tail node then only needs it one of is put from beginning to end here and judges and get final product.Handle Link in next bar if interior Link had been processed, Link was processed in all, and compound crossing Primary Construction finishes; Otherwise get into next step processing.
3, appoint a node who gets interior Link, for example get the starting point N3 of L2.
4, N3 is labeled as compound crossing node; And the node that deposits compound crossing in tabulates; Can establish first node that deposits tabulation in is compound crossing principal point; Preceding text have explained that compound crossing principal point can choose arbitrarily, and choosing first is only later on compound crossing relevant information to be stored in principal point on this aspect in order to confirm earlier as principal point.
5, obtain current node in abutting connection with Link, promptly obtain N3 in abutting connection with Link, can know from Fig. 3 to have 4, be L1, L2, L5, L10.
6, respectively every is handled in abutting connection with Link, judge whether to be interior Link,, then deposit outer Link tabulation in if not interior Link; If interior Link, Link tabulation in then depositing in.For N3, it is L2 that 1 interior Link is arranged, and other 3 are outer Link.
If 7 is interior Link in abutting connection with Link, then need collect the node of current point through interior Link adjacency, promptly in abutting connection with node, will be collected in interim tabulating in abutting connection with node in abutting connection with node.What N3 need collect has only N2 in abutting connection with node.Though N3's has 4 in abutting connection with node, having only N2 is the node through interior Link adjacency, thus have only N2 to need to collect, in order to subsequent treatment.
8, after all of its neighbor Link finishes dealing with, need inspection in abutting connection with the node tabulation, as when node is collected, will be respectively be that current node carries out recurrence and handles with these node, promptly repeat the operation of the 4th to the 7th step.For the situation in this example, should be that current Node carries out handling in abutting connection with Link on the N2 this moment with N2.In certain recurrence process result, be sky in abutting connection with the node tabulation, then this recurrence is returned.In conjunction with Fig. 3 mistake! Do not find Reference source.Can find out, after N2 handles in this example, need handle N1, be the processing to N4 afterwards, can any node not collected tabulating in abutting connection with node of it for the processing of N4, thereby recurrence returned.
9, after all of its neighbor node of each recurrence layer finished dealing with, compound crossing Primary Construction was accomplished, and obtains three tabulations, Link tabulation outside Link tabulation in compound crossing node tabulation, the compound crossing, the compound crossing.For this composite road, will obtain in this example like the compound crossing of table 2 content.
Compound crossing node |
N3、N2、N1、N4 |
Link in the compound crossing |
L2、L3、L4 |
Link outside the compound crossing |
L1、L10、L9、L12、L11、L8、L7、L6、L5 |
The compound crossing of table 2 Primary Construction result
3) completeization of compound crossing
The completion at compound crossing is to three kinds of situation as shown in Figure 6.To explain the processing procedure of these three kinds of situation respectively below.
Situation A, L5 ought to be interior Link.The characteristics of this situation are to treat that the head and the tail point of the Link of completion all is Link in the compound crossing, and this moment, directly this Link was set to Link in the compound crossing, deposit Link tabulation in the compound crossing then in, and deletion from outer Link tabulation.
Situation B, L5 and L13 ought to be interior Link, and N5 also should be compound crossing node.The characteristics of this situation are after being 2 node from a compound crossing node through one or more degree; Can arrive another compound crossing node; This moment the Link of process all should be the interior Link at compound crossing, the node of process all should be the node at compound crossing.No matter be all can arrive another compound crossing node through behind the N5 among the figure from N4 or from N3; Therefore L5, L13 can be Link in the compound crossing by completion; Link tabulation in soon L5, L13 will deposit in; And deletion from outer Link tabulation, N5 can be compound crossing node by completion, promptly in compound crossing node tabulation, adds N5.
Also having degree among the situation B is 2 node N6, from N3 through excessively be 2 node N6 to node be N7, N7 is 3 node for degree, so L10 should be not interior Link by completion, N6 should completion be not compound crossing node also.
The characteristics of situation C are that N7 is mesh border node (mesh is the data organization zone), and the borderline node degree of mesh perseverance is 2.Need this moment to combine the data in another mesh to handle.Then need adopt record in advance like the mesh border at the N5 place, the mode of back write-back is carried out Unified Treatment by situation B again after two mesh finish dealing with; At the N7 place, can think general frontier point like the border, not do completion and handle.
4) processing of complete regulation
Shown in the left figure of Fig. 7, regulation L1-L2 is the regulation on the general crossing, because compound crossing is set up according to compound regulation, so only have simple regulation on the general crossing, does not have compound regulation.Therefore for the processing at simple crossing only need be with the entering of simple regulation, withdraw from the regulation table that Link deposits crossing node in and get final product.
Shown in the right figure of Fig. 7, regulation L1-L8 is the regulation on the compound crossing, and this regulation is compound regulation, and this type regulation only is present on the compound crossing.But not only storage of complex regulation on the compound crossing also comprises simple regulation, for example, is exactly simple regulation if there is regulation in L1 to L10.For the complete regulation on the compound crossing can adopt with general crossing on simple regulation handle identical way, with getting into, withdraw from the regulation table that Link directly charges to compound crossing principal point.Different with simple crossing is, compound crossing principal point also need be stored the routing table that can pass through except the regulation table, is used to write down the inner current path, compound crossing except that regulation, and this routing table that can pass through is also referred to as the road reference table.
5) non-complete regulation is handled
The present invention adopts screening method to handle non-complete regulation.The principle of work of screening method be utilize the heuristic approach in the path of can passing through for a certain group of entering, withdraw from Link and explore, do not consider earlier the influence of regulation, as the path consideration of can passing through; Explore the path that might pass through, be made as set Regs={Ri|i=1,2; 3......}, and then consider whether imperfect regulation exists influence to these paths, if having imperfect regulation on certain paths Rn; Give up this paths so; When all paths are all given up, when promptly gathering Regs and being empty set, think that just this group gets into, withdraws from Link is impassability.Non-complete regulation synoptic diagram please refer to Fig. 8.Processing procedure is divided following two steps:
1, because final regulation data need be that unit stores with node, is that unit stores in other words with the crossing, can knows,, after the abstract, can use a node to represent with single crossing by preceding text; For compound crossing, can use compound crossing master node to represent after making up compound crossing.So it is necessary that regulation is articulated in node.Article one, the regulation node that need articulate be generally get into Link with withdraw from Link or entering Link and article one via the principal point of the node between the Link.
There is not complete regulation if 2 ought advance into, withdraw from the Link combination, then carries out track search.The track search is here said from the model angle, is exactly the process of asking all paths between two nodes of an oriented connected graph in the graph theory, because this problem has had the algorithm support of a lot of maturations, just repeats no more here, please refer to related data.After track search finishes, can not pass through the path then this entering is described, is withdrawed from the Link combination and need write a regulation, directly deposit this regulation in compound crossing regulation table if do not exist; If there is the path of can passing through, be made as set Regs={Ri|i=1,2,3......} then need check on each path of can passing through whether have non-fullpath.If there is non-fullpath, need to use screening method that non-complete regulation is handled.There is not the path of to pass through if handle the back, then this entering, withdraws from the Link combination and need directly deposit compound crossing regulation table in; After if all imperfect regulations are all finished dealing with, Regs is still not empty in set, whether then need judge the number of paths of can passing through greater than 1, if the road reference table is then directly charged in only remaining unique path of can passing through; Handle otherwise get into optimal selection, optimal path deposits the road reference table in as this path of can passing through that gets into, withdraws from the Link combination in selecting to gather.As for the optimal route selection scheme, can select according to actual needs, generally consider factors such as path, flex point number.When all entering at this crossing, withdraw from the Link combination and all finish dealing with after, the regulation processing finishes.
Regulation is handled detailed process and please refer to Fig. 9 process flow diagram.
The above; Only be in order to practical implementation case of the present invention to be described; But be not in order to limit practical range of the present invention; Such as those skilled in the art must be covered by the scope of claim of the present invention not breaking away from all equivalence changes of being accomplished under indicated spirit of the present invention and the principle or modifying.