JP5871486B2 - Shortest route search program, computer-readable recording medium storing shortest route search program, shortest route search device, and shortest route search method - Google Patents
Shortest route search program, computer-readable recording medium storing shortest route search program, shortest route search device, and shortest route search method Download PDFInfo
- Publication number
- JP5871486B2 JP5871486B2 JP2011123626A JP2011123626A JP5871486B2 JP 5871486 B2 JP5871486 B2 JP 5871486B2 JP 2011123626 A JP2011123626 A JP 2011123626A JP 2011123626 A JP2011123626 A JP 2011123626A JP 5871486 B2 JP5871486 B2 JP 5871486B2
- Authority
- JP
- Japan
- Prior art keywords
- information
- course information
- course
- node
- registered
- 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
Links
Images
Description
最短経路探索プログラム、最短経路探索プログラムを記憶したコンピュータ読み取り可能な記録媒体、最短経路探索装置、最短経路探索方法に関する。 The present invention relates to a shortest route search program, a computer-readable recording medium storing the shortest route search program, a shortest route search device, and a shortest route search method.
いわゆる最短経路検索アルゴリズムとして、いわゆるA*アルゴリズムが知られている。A*アルゴリズムとは、複数のノードと、当該複数のノード間を接続するとともに、通過する際のコストが関連付けられた複数のエッジとで形成された経路において、スタートノードからゴールノードまでの最短経路を探索するためのアルゴリズムである。 A so-called A * algorithm is known as a so-called shortest path search algorithm. The A * algorithm is a shortest path from a start node to a goal node in a path formed by a plurality of nodes and a plurality of edges that connect the plurality of nodes and are associated with costs when passing through the nodes. Is an algorithm for searching for.
当該アルゴリズムの概要は、まず初期化処理で、スタートノードの値を0、他のノードの値を未定義または∞に設定する。その後、確定されていないノードのうち、最小の値を持つノードを見つけ確定ノードとし、当該確定ノードから延伸するエッジをそれぞれチェックし、確定ノードまでのコストと、エッジのコストの和を計算する。当該コストの和がそのノードの現在の値よりも小さければ更新する。上記のような初期化処理以降の処理を、確定ノードがピックアップされるまで繰り返すものである。 As an outline of the algorithm, first, in the initialization process, the value of the start node is set to 0, and the values of other nodes are set to undefined or ∞. Thereafter, a node having the minimum value among the nodes that have not been determined is found and set as a determined node, and edges extending from the determined node are checked, respectively, and the sum of the cost to the determined node and the cost of the edge is calculated. If the sum of the costs is smaller than the current value of the node, update. The processes after the initialization process as described above are repeated until a confirmed node is picked up.
しかしながら、上記のようなアルゴリズムにおいては、ノードの複数回の登録を認めると、同じ経路を無限に回り続けてしまう可能性があることから、一度確定されたノードを再度登録(確定)させることはできない。よって、あるノードに相当する場所において、対象物を転回(ターン)させる場合も含めて最短経路を求めることはできない。 However, in the algorithm as described above, if a node is registered more than once, there is a possibility that the same route will continue to travel indefinitely. Can not. Therefore, the shortest path cannot be obtained in a place corresponding to a certain node, including the case where the object is turned (turned).
また、仮想空間において、ある程度の長さを有する対象物、例えば、電車や胴体の長い動物など、を上記経路に沿って移動させる場合であって、あるノードで接続される一方のエッジと他方のエッジの角度が所定の角度以下である場合には、通常では当該対象物が曲がらないような不自然な角度で対象物が曲がりつつ、当該一方のエッジと他方のエッジを通過してしまう場合もある。 Further, in a virtual space, an object having a certain length, for example, a train or an animal with a long torso, is moved along the route, and one edge connected to a node and the other If the angle of the edge is less than or equal to a predetermined angle, the object may bend at an unnatural angle so that the object does not normally bend while passing through the one edge and the other edge. is there.
本発明は、上記に鑑みて、あるノードに相当する場所においては、対象物が転回可能とする場合も含めて、最短経路を検索することのできる最短経路探索装置、最短経路探索方法、最短経路探索プログラムを実現することを目的とする。 In view of the above, the present invention provides a shortest path search device, a shortest path search method, and a shortest path that can search for a shortest path in a place corresponding to a certain node, including a case where an object can turn. The purpose is to realize a search program.
また、本発明の他の目的は、所定のエッジのペアで構成される経路について通過可能か否かを設定し、当該設定に応じた最短経路を検索することのできる最短経路探索装置、最短経路探索方法、最短経路探索プログラムを実現することである。 Another object of the present invention is to set whether or not a route constituted by a pair of predetermined edges can be passed, and to search for the shortest route according to the setting, the shortest route search device, and the shortest route It is to realize a search method and a shortest path search program.
本発明の最短経路探索プログラムは、複数のノードと、該複数のノード間を接続するとともに、通過する際のコストが関連付けられた複数のエッジとで形成された経路において、該複数のノードに含まれるスタートノードからゴールノードまでの最短経路を探索する最短経路探索プログラムであって、前記各ノードに接続された1または複数のエッジ間の進行の可否を示す進行可否識別情報が、前記各ノードを識別するノード識別情報と、前記各エッジを識別するエッジ識別情報と、に関連付けて記憶された進行可否情報を取得する進行可否情報取得手段、及び、前記進行可否情報及び前記各エッジに関連付けられたコストに基づいて、前記スタートノードから前記ゴールノードまでの最短経路を取得する最短経路取得手段、としてコンピュータを機能させる。 The shortest path search program of the present invention includes a plurality of nodes and a path formed by a plurality of edges connecting the plurality of nodes and associated with a plurality of edges associated with costs when passing through the plurality of nodes. A shortest path search program for searching for a shortest path from a start node to a goal node, wherein progress determination information indicating whether or not progress is possible between one or more edges connected to each node Progression availability information acquisition means for acquiring progressability information stored in association with node identification information for identifying and edge identification information for identifying each of the edges, and the progressability information and associated with each edge Computation as shortest path acquisition means for acquiring the shortest path from the start node to the goal node based on the cost. The functioning of the data.
本発明の最短経路探索装置は、複数のノードと、該複数のノード間を接続するとともに、通過する際のコストが関連付けられた複数のエッジとで形成された経路において、該複数のノードに含まれるスタートノードからゴールノードまでの最短経路を探索する最短経路探索装置であって、前記各ノードに接続された1または複数のエッジ間の進行の可否を示す進行可否情報が、前記各ノードを識別するノード識別情報と、前記各エッジを識別するエッジ識別情報と、に関連付けて記憶された進行可否情報を取得する進行可否情報取得手段と、前記進行可否情報及び前記各エッジに関連付けられたコストに基づいて、前記スタートノードから前記ゴールノードまでの最短経路を取得する最短経路取得手段と、を有する。 The shortest path search device according to the present invention includes a plurality of nodes in a path formed by a plurality of nodes and a plurality of edges connected to the plurality of nodes and associated with costs when passing through the nodes. A shortest path search device for searching for a shortest path from a start node to a goal node, wherein progress information indicating whether or not progress is possible between one or a plurality of edges connected to each node identifies each node To the node identification information to be performed, to the edge identification information to identify each edge, to determine whether or not to proceed, to determine whether or not to proceed, to determine whether or not to proceed; And a shortest path acquisition means for acquiring the shortest path from the start node to the goal node.
本発明の最短経路探索方法は、複数のノードと、該複数のノード間を接続するとともに、通過する際のコストが関連付けられた複数のエッジとで形成された経路において、該複数のノードに含まれるスタートノードからゴールノードまでの最短経路を探索する最短経路探索方法であって、前記各ノードに接続された1または複数のエッジ間の進行の可否を示す進行可否情報が、前記各ノードを識別するノード識別情報と、前記各エッジを識別するエッジ識別情報と、に関連付けて記憶された進行可否情報を取得し、前記進行可否情報及び前記各エッジに関連付けられたコストに基づいて、前記スタートノードから前記ゴールノードまでの最短経路を取得する。 The shortest path search method of the present invention includes a plurality of nodes in a path formed by a plurality of nodes and a plurality of edges connected to the plurality of nodes and associated with costs when passing through the nodes. A shortest path search method for searching for a shortest path from a start node to a goal node, wherein progress information indicating whether or not progress is possible between one or more edges connected to each node identifies each node To obtain the advanceability information stored in association with the node identification information to identify each edge and the edge identification information to identify each edge, and based on the advanceability information and the cost associated with each edge, the start node To obtain the shortest path from the goal node to the goal node.
以下、本発明の実施形態について、図面を参照しつつ説明する。なお、図面については、同一又は同等の要素には同一の符号を付し、重複する説明は省略する。 Embodiments of the present invention will be described below with reference to the drawings. In addition, about drawing, the same code | symbol is attached | subjected to the same or equivalent element, and the overlapping description is abbreviate | omitted.
図1は、本発明の実施の形態における最短経路探索装置の構成の概要について説明するための図である。図1に示すように、最短経路探索装置100は、例えば、CPUやメモリ等で構成されるコンピュータで構成され、例えば、制御部101、記憶部102、通信部103、操作部104、表示部105を有する。なお、制御部101、記憶部102、通信部103、操作部104、表示部105は、内部バス106により互いに接続される。
FIG. 1 is a diagram for explaining an outline of a configuration of a shortest path search device according to an embodiment of the present invention. As illustrated in FIG. 1, the shortest
制御部101は、例えば、CPU、MPU等であって、記憶部102に格納されたプログラムに従って動作する。記憶部102は、例えば、ROMやRAM、ハードディスク等の情報記録媒体で構成され、制御部101によって実行されるプログラムを保持する情報記録媒体である。また、記憶部102は、制御部101のワークメモリとしても動作する。なお、当該プログラムは、例えば、ネットワーク(図示なし)を介して、ダウンロードされて提供されてもよいし、または、CD−ROMやDVD−ROM等のコンピュータで読み取り可能な各種の情報記録媒体によって提供されてもよい。
The
通信部103は、当該最短経路探索装置100を、ネットワークを介して、他の情報処理装置(図示なし)やデータベース(図示なし)等と接続する。操作部104は、例えば、キーボード、マウス、または、コントローラ等で構成され、ユーザーの指示操作に応じて、当該指示操作の内容を制御部101に出力する。表示部105は、例えば、液晶ディスプレイ、有機ELディスプレイ等であって、制御部101からの指示に従い、情報を表示する。なお、上記最短経路探索装置100の構成は、一例であってこれに限定されるものではない。
The
図2は、本実施の形態における最短経路探索装置の機能的な構成について説明するための図である。図2に示すように、最短経路探索装置100は、パス情報記憶部201、進行可否情報記憶部202、コスト情報記憶部203、初期コース情報設定部204、登録コース情報記憶部205、最小登録コース情報抽出部206、確定コース情報記憶部207、進行可能コース情報取得部208、登録コース情報設定部209を有する。
FIG. 2 is a diagram for describing a functional configuration of the shortest path search device according to the present embodiment. As shown in FIG. 2, the shortest
なお、下記においては、説明の簡略化のため、主に、図3に示した経路において、最短経路が探索される場合を例として説明する。また、図4A乃至図4Oは、図3に示したコースにおいて、最短経路が決定されるまでのコース情報が順次、登録コース情報記憶部205及び確定コース情報記憶部207に記憶されていく様子を図3に示した経路とともに示す。また、図4A乃至図4Oにおいては、登録コース情報記憶部205及び確定コース情報記憶部207をそれぞれ、登録リスト及び確定リストとして示した。なお、コース情報、登録コース情報記憶部205及び確定コース情報記憶部207の詳細については後述する。
In the following, for the sake of simplification of description, the case where the shortest route is searched for in the route shown in FIG. 3 will be mainly described as an example. 4A to 4O show how course information until the shortest route is determined is sequentially stored in the registered course
また、図3において、ノードBについては、エッジE1またはE2からノードBを介してエッジE2またはE1に進行することはできず、また、ノードDについては、エッジE3またはE4からノードBを介してエッジE4またはE2に進行することはできないものとして設定される場合を想定する。更に、図3において、ノードEは、転回可能、つまり、エッジE5からノードEを介してエッジE5に進行してもよいし、E6からノードEを介してE6に進行してもよいものとして設定される場合を想定する。図4においては、ノードから進行できる方向を矢印(斜線、ドットはなし)で示し、登録済みのコース(登録コース情報記憶部205に記憶されたコース)を矢印(ドットを付加した矢印)、確定済みのコース(確定コース情報記憶部207に記憶されたコース)を矢印(ドットを付加した矢印)で示した。 In FIG. 3, node B cannot proceed from edge E1 or E2 to node E2 or E1 via node B, and node D from edge E3 or E4 to node B. A case is assumed in which it is set that it cannot proceed to the edge E4 or E2. Further, in FIG. 3, the node E is set to be capable of turning, that is, the node E may proceed from the edge E5 to the edge E5 via the node E, or may proceed from the E6 to the node E via the node E. Assuming that In FIG. 4, the direction that can be advanced from the node is indicated by an arrow (slashed line, no dot), the registered course (the course stored in the registered course information storage unit 205) is indicated by an arrow (an arrow with a dot added), and confirmed. The course (the course stored in the confirmed course information storage unit 207) is indicated by an arrow (an arrow with a dot added).
パス情報記憶部201は、ノードを示すノード識別情報(ノードID)と、ノードとノードを接続するエッジを示すエッジ識別情報(エッジ識別情報)とを関連付けて記憶する。具体的には、例えば、図5に示すように、ノードID毎に、各ノードに接続されるエッジを示すエッジIDを表の形式で記憶する。これにより、図3に示すようなノードとエッジで形成される経路(パス)が表される。
The path
例えば、図5において、ノードID、Sのノード(スタートノードに相当する)は、エッジID、E0のエッジと関連付けられて記憶されているので、スタートノードはエッジE0と接続されることを示す。ノードID、Aのノード(ノードA)は、エッジID、E0(エッジE0)のエッジと関連付けられて記憶されているので、ノードAは、エッジE0と接続されていることを示す。つまり、エッジE0は、スタートノードとノードAを接続することを示す。以下同様にして、図5に示すような経路が表される。 For example, in FIG. 5, since the node with the node ID, S (corresponding to the start node) is stored in association with the edge with the edge ID, E0, the start node is connected to the edge E0. Since the node (node A) of the node ID, A is stored in association with the edge of the edge ID, E0 (edge E0), it indicates that the node A is connected to the edge E0. That is, the edge E0 indicates that the start node and the node A are connected. Similarly, a route as shown in FIG. 5 is represented.
進行可否情報記憶部202は、ノードID、エッジIDのペア、当該エッジのペアを当該ノードを介して移動可能か否かを示す移動可否識別情報(進行可否ID)を、関連付けて記憶する。具体的には、例えば、図6に示すように、ノードID毎に、エッジIDのペア、進行可否識別情報(進行可否ID)としての0または1の値を、表の形式で記憶する。なお、進行可否IDについては、例えば、0の値が移動不可を示し、1の値が進行可能を示す。
The progress / prohibition
また、例えば、図6においては、ノードID、BについてエッジID、E1とE1のペアが、進行可否ID、0(進行不可を示す)として記憶されているので、ノードBについて、E1から進入してE1に進出するような移動、つまり、転回ができないことを表す。また、ノードID、BについてエッジID、E1とE2のペアが、進行可否ID、0として記憶されているので、E1またはE2から進入して、ノードBを通過してE2またはE1に進出することはできないことを表す。一方、ノードID、BについてエッジID、E1とE3のペアが、進行可否ID、1(進行可能を示す)として記憶されているので、E1またはE3から進入して、ノードBを通過してE3またはE1に進出することはできないことを表す。
Further, for example, in FIG. 6, since the edge ID and the pair of E1 and E1 for the node ID and B are stored as the progress propriety ID and 0 (indicating that the progress is impossible), the node B enters from E1. This represents a movement that advances to E1, that is, a turn cannot be made. In addition, since the edge ID, the pair of E1 and E2 is stored as the progress ID ID, 0 for the node ID, B, enter from E1 or E2, pass through the node B, and advance to E2 or E1. Indicates that you cannot. On the other hand, since the pair of edge IDs E1 and E3 is stored as the
コスト情報記憶部203は、エッジIDに関連付けて、各エッジを通過する際に要するコストを示すコスト情報を記憶する。ここで、コストとは、例えば、距離や時間等に相当する数値である。具体的には、図7に示すように、エッジID毎に、コスト情報としての数値を記憶する。例えば、図7においては、エッジID、E0(エッジE0)についてコスト情報、1が関連付けて記憶されているので、エッジE0を通過するには、コスト1(例えば、エッジE0の距離が1を示す)を要することを表す。
The cost
初期コース情報設定部204は、スタート時におけるコース情報(初期コース情報)を設定し、後述する登録コース情報記憶部205に記憶する。ここで、コース情報とは、ノードを示すノードID、当該ノードからの進行方向のエッジを示すエッジID、当該ノードに到達するまでに要した累積コスト情報、進入元を示すエッジの進入元エッジIDを関連付けて構成される。
The initial course
具体的には、初期コース情報設定部204は、上記例の場合、パス情報記憶部201を参照し、ノードID、Sに関連付けて記憶されているエッジID、E0を取得する。なお、スタート時においては、累積コストは0であり、進入元のエッジは存在しないので、累積コスト情報として0、進入元エッジIDはなしとなる。よって、初期コース情報設定部204は、初期コース情報として、ノードID、S、エッジID、E0、累積コスト情報、0、進入元エッジID、なしとして、登録コース情報記憶部205に記憶する。この場合の様子を、図4Aに示した。
Specifically, in the case of the above example, the initial course
なお、ここで、説明の簡略化のため、各コース情報を、上記説明の順に、S−E0、コスト:0、IN:−のようにして示すものとして説明する。また、各コース情報に含まれるノードを示すノードIDと当該ノードからの進行方向のエッジを示すエッジIDを用いて、各コース情報をノードID−エッジIDで称する。つまり、例えば、ノードを示すノードIDがA、当該ノードからの進行方向のエッジを示すエッジIDがE4のコース情報を、A−E4のコース情報と称する。 Here, for simplification of description, each course information will be described in the order of the above description as S-E0, cost: 0, IN:-. Each course information is referred to as node ID-edge ID by using a node ID indicating a node included in each course information and an edge ID indicating an edge in the traveling direction from the node. That is, for example, the course information in which the node ID indicating the node is A and the edge ID indicating the edge in the traveling direction from the node is E4 is referred to as A-E4 course information.
最小登録コース情報抽出部206は、登録コース情報記憶部205に記憶されているコース情報のうち、最小のコスト情報を有するコース情報を取得する。また、取得した最小のコース情報を登録コース情報記憶部205から削除する。具体的には、例えば、図4Aに示した場合、登録コース情報記憶部205には、1のコース情報のみ記憶されているので、この場合は、当該1のコース情報を取得する。また、例えば、図4Cに示した場合、コスト情報が最小であるのは、A−E4のコース情報であることから、当該A−E4のコース情報を取得するとともに、当該A−E4のコース情報を登録コース情報記憶部205から削除する。なお、後述するように、当該A−E4のコース情報は、次に、図4Dに示すように、確定コース情報記憶部207に記憶される。
The minimum registered course
確定コース情報記憶部207は、最小登録コース情報抽出部206により抽出されたコース情報を、順次追加して記憶する。例えば、図4Bにおいては、上述のように図4Aにおいて、S−E0のコース情報が抽出されるので、当該S−E0のコース情報が、確定コース情報記憶部207に記憶される。
The confirmed course
進行可能コース情報取得部208は、確定コース情報記憶部207に新たに記憶されたコース情報(確定コース情報)に基づいて、当該確定コース情報で示されるコース(確定コース)の次に進行可能なコースを示す進行可能コース情報を取得する。以下、図8を用いて具体的に説明する。
The advanceable course
図8は、進行可能コース情報取得部の機能的な構成を説明するための図である。図8に示すように、進行可能コース情報取得部208は、接続先情報取得部301、エッジ情報取得部302、コスト算出部303、進入元エッジ情報取得部304、ゴール判定部305、進行可能コース情報判定部306を有する。
FIG. 8 is a diagram for explaining a functional configuration of the advancing course information acquisition unit. As shown in FIG. 8, the advancing course
接続先情報取得部301は、確定コース情報に基づき、当該確定コースの接続先のノードIDを取得する。例えば、確定コース情報が、S−E0、コスト:0、IN:−の場合、図5を参照すると、ノードSの他にノードE0に関連付けてノードAが記憶されていることがわかることから、接続先情報としてノードID、Aを取得する。
The connection destination
エッジ情報取得部302は、上記取得された接続先ノードのノードID、確定コース情報に含まれるエッジID、進行可否情報記憶部202に記憶された進行可否情報に基づいて、進行可能なエッジ情報(コース情報)を取得する。具体的には、例えば、上記例の場合、接続先ノードのノードIDとしてA、エッジIDとしてE0が取得される。そして、ノードID、A、エッジID、E0について、進行可否情報が1のエッジIDとして、E1及びE4が記憶されていることから、当該エッジID、E1及びE4を取得する。
The edge
コスト算出部303は、確定コース情報に含まれる累積コストを取得するとともに、確定コース情報に含まれるエッジIDを取得する。そして、当該エッジIDに基づいて、コスト情報記憶部203を参照し、当該エッジIDに関連して記憶されているコスト情報を取得し、当該コスト情報と確定コース情報に含まれる累積コストの和を算出する。例えば、上記例の場合、確定コース情報が、S−E0、コスト:0、IN:−であることから、確定コース情報に含まれる累積コスト0を取得するとともに、エッジID、E0を取得する。そして、コスト情報記憶部203にはエッジID、E0についてコスト1が関連付けて記憶されていることから、累積コスト0とコスト1の和である1を算出する。
The
進入元エッジ情報取得部304は、確定コース情報に含まれるエッジIDを進入元エッジ情報として取得する。上記例の場合、確定コース情報が、S−E0、コスト、0、IN:−であることから、エッジID、E0を進入元エッジIDとして取得する。
The approach source edge
ゴール判定部305は、接続先情報取得部301で取得される接続先のノードがゴールノードであるか否かを、パス情報記憶部201を参照して、判定する。ゴールノード(ノードID、G)であると判定した場合には、処理を終了する。一方、ゴールノードでないと判定した場合には、後述するように処理を継続する。
The
進行可能コース情報判定部306は、取得された進行可能コース情報と同一のノードID、及び、エッジIDを含む確定コース情報が既に確定コース情報記憶部207に記憶されているか否かを判定する。記憶されていると判定した場合には、当該進行可能コース情報は、登録コース情報設定部209に送信しない。一方、記憶されていないと判定した場合には、当該進行可能コース情報を登録コース情報設定部209に送信する。なお、当該登録コース情報設定部209の機能的な構成については後述する。例えば、図4Nに示した場合、確定コース情報C−E6、コスト:11、IN:E2の接続先ノードEとノードEからのエッジE5、E6で示されるコース情報コースE−E5及びE−E6が得られるが、当該コース情報は、既に確定コース情報記憶部207に記憶されている(確定済みである)ことから、登録コース情報記憶部205に記憶されることはない。
The advanceable course information determination unit 306 determines whether or not confirmed course information including the same node ID and edge ID as the acquired advanceable course information is already stored in the confirmed course
上記のようにして、進行可能コース情報取得部208は、接続先情報取得部301で取得されたノードID、エッジ情報取得部302で取得されたエッジID、コスト算出部303で算出された累積コスト、進入元エッジID、進入元エッジIDを、1または複数の進行可能コース情報として取得する。例えば、上記例の場合、進行可能コース情報として、A−E1、コスト、1、IN:E0、及び、A−E4、コスト、1、IN:E0を取得する。なお、当該進行可能コース情報の形式は、コース情報の形式と同様であるとはいうまでもない。
As described above, the advancing course
登録コース情報設定部209は、上記進行可能コース情報及び登録コース情報記憶部205に記憶されている登録コース情報に基づいて、進行可能コース情報を登録コース情報記憶部205に記憶させる。以下、図9を用いて、具体的に説明する。図9は、登録コース情報設定部209の機能的構成について説明するための図である。図9に示すように、登録コース情報設定部209は、同一コース判定部401、累積コスト判定部402を有する。
The registered course
同一コース判定部401は、進行可能コース情報に含まれるノードID及びエッジIDに基づき、登録コース情報記憶部205を参照して、当該ノードID及びエッジIDと同一のノードID及びエッジIDを有するコース情報が登録コース情報記憶部205に記憶されているか否かを判定する。そして、記憶されていないと判定した場合には、当該進行可能コース情報を登録コース情報記憶部205に新たに追加して記憶する。
The same
例えば、上記例の場合、進行可能コース情報A−E1、コスト、1、IN:E0、及び、A−E4、コスト、1、IN:E0と同一のノードID及びエッジIDは、登録コース情報記憶部205に記憶されていないため、当該2の進行可能コース情報が登録コース情報記憶部205に記憶される。この場合の様子を、図4Bに示した。
For example, in the case of the above example, the same course ID A-E1, cost 1, IN: E0, and A-E4, cost 1, 1, IN: E0 are stored in the registered course information. Since it is not stored in the
一方、記憶されていると判定した場合には、累積コスト判定部402は、当該進行可能コース情報に含まれる累積コスト情報が、同一のノードID及びエッジIDを有するコース情報の累積コスト情報より、小さいか否かを判定する。そして、小さいと判定した場合には、当該コース情報に代えて、当該進行可能コース情報を記憶する。なお、ここで、当該コース情報を当該進行可能コース情報に更新する構成としてもよいことはいうまでもない。
On the other hand, when it is determined that it is stored, the accumulated
一方、累積コスト判定部402は、当該進行可能コース情報に含まれる累積コスト情報が、同一のノードID及びエッジIDを有するコース情報の累積コスト情報以上であると判定した場合には、上記コース情報の更新等は行わない。つまり、登録コース情報記憶部205に記憶されている登録コース情報は、変更・更新されない。例えば、図4Eに示した場合、進行可能コース情報はD−E5、コスト:5、IN:E3が取得されるが、確定コース情報として、D−E5、コスト:5、IN:E4が記憶されていることから、当該確定コース情報の更新等は行われない。
On the other hand, when the accumulated
なお、上記で示した構成は一例であって、これに限定されるものではない。例えば、上記で示した構成と実質的に同一の構成、同一の作用効果を奏する構成又は同一の目的を達成することができる構成で置き換えることができる。 In addition, the structure shown above is an example, Comprising: It is not limited to this. For example, it can be replaced with a configuration that is substantially the same as the configuration described above, a configuration that exhibits the same operational effects, or a configuration that can achieve the same purpose.
次に、本実施の形態における最短経路探索装置100の処理のフローについて説明する。図10は、本実施の形態における最短経路探索装置の処理のフローについて説明するための図である。
Next, a processing flow of shortest
初期コース情報設定部204は、スタート時におけるコース情報(初期コース情報)を設定し(S101)、登録コース情報記憶部205に記憶する(S102)。
The initial course
登録コース情報記憶部205は、スタート時には、上記のように初期コース情報を登録コース情報として記憶する。また、後述するS106で進行可能コース情報と同一ノードID及びエッジIDを含む登録コース情報が登録コース情報記憶部205に含まれていないと判定された場合には、当該進行可能コース情報を記憶する。更に、後述するS107で進行可能コース情報に含まれる累積コストが、進行可能コース情報と同一のノードID及びエッジIDを含む登録コース情報の累積コストが小さいと判定された場合には、当該進行可能コース情報を当該進行可能コース情報に代えて記憶等する(S102)が、詳細には後述する。
The registered course
最小登録コース情報抽出部206は、登録コース情報記憶部205に含まれる1または複数のコース情報(登録コース情報)のうち、最小の累積コスト情報を含む登録コース情報を抽出する(S103)。なお、上述のように複数の登録コース情報に含まれている累積コスト情報が同一の場合には、当該複数の登録コース情報のうちいずれかの登録コース情報を任意に抽出する。また、抽出された登録コース情報が登録コース情報記憶部205から削除されることは前述のとおりである。
The minimum registered course
確定コース情報記憶部207は、S103で抽出された登録コース情報を確定コース情報記憶部207に記憶する(S104)。進行可能コース情報記憶部は、S104で記憶された確定コース情報に基づいて、1または複数の進行可能コース情報を取得する(S105)。
The confirmed course
同一コース判定部401は、進行可能コース情報と同一のノードID及びエッジIDを含む登録コース情報が、登録コース情報記憶部205に含まれているか否かを判定する。含まれていると判定した場合には、S107に進む。一方、含まれていないと判定した場合には、当該進行可能コース情報を登録コース情報記憶部205に記憶させる(S106)。
The same
累積コスト判定部402は、当該進行可能コース情報に含まれる累積コスト情報が、同一のノードID及びエッジIDを有するコース情報の累積コスト情報より、小さいか否かを判定する。小さいと判定した場合には、当該進行可能コース情報を、当該同一のノードID及びエッジIDを有するコース情報に代えて、登録コース情報記憶部205に記憶させる。一方、小さくないと判定した場合には、S103に戻る(S107)。
The accumulated
次に、上記S105について、図11を用いてより詳細に説明する。接続先情報取得部301は、確定コース情報に基づき、確定コースの接続先のノードIDを取得する(S201)。ゴール判定部が、S201で取得されたノードIDがゴールノードを示すID、Gである場合には、処理を終了する。一方、S201で取得されたノードIDがゴールノードを示すID、Gでない場合には、S203に進む(S202)。
Next, S105 will be described in more detail with reference to FIG. The connection destination
エッジ情報取得部302は、上記取得された接続先ノードのノードID、確定コース情報に含まれるエッジID、進行可否情報記憶部202に記憶された進行可否情報に基づいて、進行可能なエッジ情報を取得する(S203)。進行可能コース情報判定部306は、S201とS203で取得されたノードID及びエッジIDと、同一のノードID、及び、エッジIDを含む確定コース情報が既に確定コース情報記憶部207に記憶されているか否かを判定する(S204)。記憶されていると判定した場合には、S103に進む。一方、記憶されていないと判定した場合には、S205に進む。
The edge
コスト算出部303は、確定コース情報に含まれる累積コスト情報を取得するとともに、確定コース情報に含まれるエッジIDを取得する。そして、当該エッジIDに基づいて、コスト情報記憶部203を参照し、当該エッジIDに関連して記憶されているコスト情報を取得し、当該コスト情報と上記確定コース情報に含まれている累積コストの和を算出する(S205)。進入元エッジ情報取得部304は、確定コース情報に含まれるエッジIDを進入元エッジ情報として取得する(S206)。
The
上記のように、S105においては、進行可能コース情報取得部208は、S201で取得されたノードID、S203で取得されたエッジID、S204で算出された累積コスト、S205で取得された進入元エッジIDを、1または複数の進行可能コース情報として取得する。なお、上記図10及び図11に示したフローは、一例であって、上記フローと実質的に同一のフロー、同一の作用効果を奏するフロー又は同一の目的を達成することができるフローで置き換えることができる。
As described above, in S105, the advancing course
次に、本実施の形態における最短経路探索装置100の処理のフローの具体例として、図4A乃至図4Oを用いて説明する。なお、この場合における経路は、図3に示したものであることは前述のとおりである。
Next, a specific example of the processing flow of the shortest
まず、スタート時においては、図4Aに示すように、初期コース情報設定部204は、スタート時におけるコース情報、S−E0、コスト:0、IN:−を設定し、登録コース情報記憶部205に記憶させる。
First, at the start, as shown in FIG. 4A, the initial course
次に、図4Bに示すように、最小登録コース情報抽出部206は、登録コース情報記憶部205に記憶されたコース情報、S−E0、コスト:0、IN:−を抽出し、確定コース情報記憶部207に記憶するとともに、登録コース情報記憶部205から削除する。なお、この場合、登録コース情報記憶部205には、上記1のコース情報のみしか記憶されていないことから、上記コース情報を抽出することはいうまでもない。
Next, as shown in FIG. 4B, the minimum registered course
また、進行可能コース情報取得部208は、コース情報、S−E0、コスト:0、IN:−に基づいて、当該確定コース情報で示されるコース(確定コース)の次に進行可能なコースを示す進行可能コース情報A−E1、コスト:1、IN:E0及びA−E4、コスト:1、IN:E0を取得する。なお、この場合、登録コース情報記憶部205には、コース情報が記憶されていないことから、当該2の進行可能コース情報が、登録コース情報として、登録コース情報記憶部205に記憶される。
Further, the advancing course
次に、最小登録コース情報抽出部206は、最小の累積コスト情報を含む登録コース情報を抽出する。なお、ここでは、登録可能コース情報A−E1、コスト:1、IN:E0、及び、A−E4、コスト:1、IN:E0は、いずれの累積コスト情報が同じ1であることから、最小登録コース情報抽出部206は、いずれの登録コース情報を抽出してもよい。よって、ここでは、最小登録コース情報抽出部206が、登録コース情報A−E1、コスト:1、IN:E0が抽出したものとして説明する。
Next, the minimum registered course
次に、図4Cに示すように、上記抽出された登録コース情報A−E1、コスト:1、IN:E0が、確定コース情報記憶部207に、確定コース情報として、確定コース情報、S−E0、コスト:0、IN:0に追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、進行可能コース情報取得部208は、確定コース情報A−E1、コスト:1、IN:E0に基づいて、進行可能コース情報B−E3、コスト:4、IN:E1を取得する。
Next, as shown in FIG. 4C, the extracted registered course information A-E1, cost: 1, IN: E0 is stored in the confirmed course
具体的には、確定コース情報に含まれるA−E1の接続先はノードBであり、進行可否情報によりエッジE1及びE2はノードBを介して進行不可であることから、進行可能コース情報のノードIDはBとなり、エッジ情報はE3となる。また、進行可能コース情報の累積コスト情報は、確定コース情報A−E1、コスト:1、IN:E0に含まれる累積コスト情報1に、エッジID、E1のコスト3を加算して、4となる。また、進入元エッジIDは、確定コース情報に含まれるエッジID、E1より、E1となる。また、登録コース情報記憶部205には、ノードID、BかつエッジID、E3を有する登録コース情報は含まれていないことから、当該進行可能コース情報B−E3、コスト:4、IN:E1を登録コース情報として、登録コース情報記憶部205に追加して記憶する。次に、最小登録コース情報抽出部206は、登録コース情報記憶部205に記憶されている登録コース情報のうち最小のコスト情報を有する登録コース情報、つまり、A−E4、コスト:1、IN:E0を抽出する。
Specifically, since the connection destination of A-E1 included in the confirmed course information is the node B, and the edges E1 and E2 cannot progress through the node B due to the progress information, the node of the progressable course information The ID is B and the edge information is E3. Further, the accumulated cost information of the advanceable course information is 4 by adding the
次に、図4Dに示すように、上記抽出された登録コース情報A−E4、コスト:1、IN:E0が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、進行可能コース情報取得部208は、確定コース情報A−E4、コスト:1、IN:E0に基づいて、進行可能コース情報D−E5、コスト:5、IN:E4を取得する。
Next, as shown in FIG. 4D, the extracted registered course information A-E4, cost: 1, IN: E0 is additionally stored as confirmed course information in the confirmed course
具体的には、確定コース情報に含まれるA−E4の接続先はノードDであり、E3及びE4はノードDを介して進行不可であることから、進行可能コース情報のノードIDはDとなり、エッジ情報はE5となる。また、進行可能コース情報の累積コスト情報は、確定コース情報A−E4、コスト:1、IN:E0に含まれる累積コスト情報1に、エッジID、E4のコスト4を加算して、5となる。また、進入元エッジIDは、確定コース情報に含まれるエッジID、E4より、E4となる。また、登録コース情報記憶部205には、ノードID、DかつエッジID、E5を有する登録コース情報は含まれていないことから、当該進行可能コース情報D−E5、コスト:5、IN:E4を登録コース情報として、登録コース情報記憶部205に追加して記憶する。
Specifically, since the connection destination of A-E4 included in the confirmed course information is the node D, and E3 and E4 cannot proceed through the node D, the node ID of the proceeding course information is D. The edge information is E5. Further, the accumulated cost information of the advanceable course information is 5 by adding the
次に、最小登録コース情報抽出部206は、登録コース情報記憶部205に記憶されている登録コース情報のうち最小のコスト情報を有する登録コース情報、つまり、B−E3、コスト:4、IN:E1を抽出する。
Next, the minimum registered course
次に、図4Eに示すように、上記抽出された登録コース情報B−E3、コスト:4、IN:E1が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、進行可能コース情報取得部208は、同様にして、確定コース情報B−E3、コスト:4、IN:E1に基づいて、進行可能コース情報D−E5、コスト:6、IN:E4を取得する。
Next, as shown in FIG. 4E, the extracted registered course information B-E3, cost: 4, and IN: E1 are additionally stored as confirmed course information in the confirmed course
しかしながら、登録コース情報記憶部205には、ノードID、DかつエッジID、E5を有する登録コース情報D−E5、コスト:5、IN:E4(同一コース情報)が既に含まれている。したがって、上記進行可能コース情報の累積コスト情報が、当該同一コース情報の累積コスト情報より小さいか否かを判定する。この場合、進行可能コース情報の累積コスト情報が同一コース情報の累積コスト情報以上であるので、変更はされない。
However, the registered course
次に、最小登録コース情報抽出部206は、登録コース情報記憶部205に記憶されている登録コース情報のうち最小のコスト情報を有する登録コース情報、つまり、D−E5、コスト:5、IN:E4を抽出する。
Next, the minimum registered course
以下、同様に、図4Fに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報D−E5、コスト:5、IN:E4が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205には、進行可能コース情報E−E5、コスト:6、IN:E5、及び、進行可能コース情報E−E6、コスト:6、IN:E5が、登録コース情報として、登録コース情報記憶部205に追加して記憶される。
Similarly, as shown in FIG. 4F, the registered course information D-E5, cost: 5, and IN: E4 extracted by the minimum registered course
次に、図4Gに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報E−E5、コスト:6、IN:E5が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205には、進行可能コース情報D−E3、コスト:7、IN:E5、及び、進行可能コース情報D−E4、コスト:7、IN:E5が、登録コース情報として、登録コース情報記憶部205に追加して記憶される。
Next, as shown in FIG. 4G, the registered course information E-E5, cost: 6, and IN: E5 extracted by the minimum registered course
次に、図4Hに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報E−E6、コスト:6、IN:E5が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205には、進行可能コース情報C−E2、コスト:16、IN:E6、及び、進行可能コース情報C−E7、コスト:16、IN:E6が、登録コース情報として、登録コース情報記憶部205に追加して記憶される。
Next, as shown in FIG. 4H, the registered course information E-E6, the cost: 6, and the IN: E5 extracted by the minimum registered course
次に、図4Iに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報D−E3、コスト:7、IN:E5が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205には、進行可能コース情報B−E1、コスト:9、IN:E3、及び、進行可能コース情報B−E2、コスト:9、IN:E3が、登録コース情報として、登録コース情報記憶部205に追加して記憶される。
Next, as shown in FIG. 4I, the registered course information D-E3, cost: 7, and IN: E5 extracted by the minimum registered course
次に、図4Jに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報D−E4、コスト:7、IN:E5が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205には、進行可能コース情報A−E0、コスト:11、IN:E4が、登録コース情報として、登録コース情報記憶部205に追加して記憶される。
Next, as shown in FIG. 4J, the registered course information D-E4, cost: 7, and IN: E5 extracted by the minimum registered course
次に、図4Kに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報B−E1、コスト:9、IN:E3が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。なお、ここで、進行可能コース情報A−E0、コスト:12、IN:E1が取得されるが、登録コース情報A−E0、コスト:11、IN:E4が、登録コース情報記憶部205に記憶されていることから、当該登録コース情報は変更されない。
Next, as shown in FIG. 4K, the registered course information B-E1, the cost: 9, and the IN: E3 extracted by the minimum registered course
次に、図4Lに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報B−E2、コスト:9、IN:E3が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205には、進行可能コース情報C−E6、コスト:11、IN:E2が、登録コース情報として、登録コース情報記憶部205に追加して記憶されるとともに、登録コース情報C−E7、コスト:16、IN:E6が、取得された進行可能コース情報C−E7、コスト:11、IN:E2に変更される。
Next, as shown in FIG. 4L, the registered course information B-E2, the cost: 9, and the IN: E3 extracted by the minimum registered course
次に、図4Mに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報A−E0、コスト:11、IN:E4が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。また、登録コース情報記憶部205の内容に変更はない。進行可否情報より、スタートノードではターンできないからである。
Next, as shown in FIG. 4M, the registered course information A-E0, the cost: 11, and the IN: E4 extracted by the minimum registered course
次に、図4Nに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報C−E6、コスト:11、IN:E2が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。なお、このとき、確定コース情報C−E6、コスト:11、IN:E2の接続先ノードEとノードEからのエッジE5、E6で示されるコースE−E5及びE−E6は、既に確定コース情報記憶部207に記憶されていることから、E−E5やE−E6のコースについての進行可能コース情報が生成され、登録コース情報記憶部205に記憶されることはない。
Next, as shown in FIG. 4N, the registered course information C-E6, the cost: 11, and the IN: E2 extracted by the minimum registered course
次に、図4Oに示すように、最小登録コース情報抽出部206により、抽出された登録コース情報C−E7、コスト:11、IN:E2が、確定コース情報記憶部207に、確定コース情報として、追加して、記憶されるとともに、登録コース情報記憶部205から削除される。なお、このとき、登録コース情報C−E7、コスト:11、IN:E2の接続先のノードはゴールノードであることから、処理が終了する。
Next, as shown in FIG. 4O, the registered course information C-E7, cost: 11, and IN: E2 extracted by the minimum registered course
以上より、確定コース情報記憶部207に確定コース情報が記憶され、最短経路が求められる。具体的には、確定コース情報記憶部207に記憶された確定コース情報のエッジ情報と、進入元エッジ情報を新たに記憶された順(図4の下から上に向かう順序)に参照することにより、最短経路を求めることができる。例えば、図4Oの場合、最後に記憶された確定コース情報のエッジ情報E7で進入元エッジ情報はE2である。エッジ情報E2を有する確定コース情報はB−E2、コスト:9、IN:E3であり、進入元エッジ情報はE3である。したがって、ゴールノードかららE7、E2、E3の順に最短経路を決定することができる。以下同様にして、エッジID、G(ゴールノードに相当)から順に、E7、E2、E3、E5、E5、E4、E0、S(スタートノードに相当)の最短経路が求められる。なお、図12に、このようにして求められた最短経路を示す図である。
As described above, the confirmed course information is stored in the confirmed course
上記のように構成することで、CG(Computer Graphics)やゲームプログラム等で実現される仮想空間内における経路において、あるノードに相当する場所では、対象物を転回(ターン)可能とするとともに、当該経路の最短経路を求めることができる。 By configuring as described above, an object can be turned (turned) at a place corresponding to a certain node in a path in a virtual space realized by CG (Computer Graphics), a game program, and the like. The shortest route of the route can be obtained.
また、上記のような仮想空間において、ある程度の長さを有する対象物、例えば、電車や胴体の長い動物など、を上記経路に沿って移動させる場合であって、あるノードで接続される一方のエッジと他方のエッジの角度が所定の角度以下である場合には、通常では当該対象物が曲がらないような不自然な角度で対象物が曲がりつつ、当該一方のエッジと他方のエッジを通過してしまう場合もある。この場合、ノードに接続される一方のエッジと他方のエッジとの角度が所定の角度以下である場合には、当該ノードを当該一方のエッジと他方のエッジとの間を通過不可と設定することにより、最短経路を探索する際に当該ノードを当該一方のエッジと他方のエッジとの間の通過を避けた最短経路を求めることができる。これにより、上記のような対象物が、不自然な角度に折れ曲がりつつ進行するような経路の設定を避けることができ、結果として、上記のような対象物の不自然な移動の表示を避けることができる。また、当該経路に沿って、建物や壁が配置されること等により、当該一方のエッジと当該他方のエッジとの角度が所定の角度以下である場合には、狭い場所に配置された建物等にめり込んで進行するような経路の設定を避けることができる。 Further, in the virtual space as described above, an object having a certain length, such as a train or an animal with a long torso, is moved along the route, and one of the objects connected by a certain node is connected. When the angle between the edge and the other edge is equal to or smaller than a predetermined angle, the object is usually bent at an unnatural angle such that the object does not bend, and passes through the one edge and the other edge. There is also a case. In this case, when the angle between one edge connected to the node and the other edge is equal to or smaller than a predetermined angle, the node is set to be impassable between the one edge and the other edge. Thus, when searching for the shortest path, it is possible to obtain the shortest path that avoids passing the node between the one edge and the other edge. As a result, it is possible to avoid the setting of a route in which the object as described above advances while bending at an unnatural angle, and as a result, avoids the display of the unnatural movement of the object as described above. Can do. In addition, if the angle between the one edge and the other edge is less than or equal to a predetermined angle due to the placement of buildings or walls along the route, etc. It is possible to avoid setting up a route that is intrusive.
なお、本発明は、上記実施の形態に限定されるものではなく、種々の変形が可能である。例えば、上記実施の形態で示した構成と実質的に同一の構成、同一の作用効果を奏する構成又は同一の目的を達成することができる構成で置き換えることができる。具体的には、例えば、上記最短経路探索装置100は、更に、仮想空間内に配置された経路に沿って対象物を移動させる対象物移動制御部や、当該対象物を仮想空間内に表示させる画像を生成する画像生成部等と組み合わせて、仮想空間において当該対象物を上記最短経路探索装置100によって求められた経路に沿って移動させる動画像を生成する動画像生成装置や、仮想空間において、上記経路に沿って、キャラクタ(上記対象物に相当する)を移動させるゲーム装置として用いてもよい。更に、当該動画像生成装置またはゲーム装置と、表示部105とを組み合わせて、当該表示部105に表示される仮想空間において、上記経路に沿って、キャラクタ(上記対象物に相当する)を移動させる動画像を表示させるように構成してもよい。
In addition, this invention is not limited to the said embodiment, A various deformation | transformation is possible. For example, it can be replaced with a configuration that is substantially the same as the configuration described in the above embodiment, a configuration that exhibits the same operational effects, or a configuration that can achieve the same purpose. Specifically, for example, the shortest
100 最短経路探索装置、101 制御部、102 記憶部、103 通信部、104 操作部、105 表示部、106 内部バス、201 パス情報記憶部、202 進行可否情報記憶部、203 コスト情報記憶部、204 初期コース情報設定部、205 登録コース情報記憶部、206 最小登録コース情報抽出部、207 確定コース情報記憶部、208 進行可能コース情報取得部、209 登録コース情報設定部、301 接続先情報取得部、302 エッジ情報取得部、303 コスト算出部、304 進入元エッジ情報取得部、305 ゴール判定部、401 同一コース判定部、402 累積コスト判定部。
DESCRIPTION OF
Claims (9)
前記各ノードに接続された1または複数のエッジ間の進行の可否を示す進行可否識別情報が、前記各ノードを識別するノード識別情報と、前記各エッジを識別するエッジ識別情報と、に関連付けて記憶された進行可否情報を取得する進行可否情報取得手段、
前記進行可否情報及び前記各エッジに関連付けられたコストに基づいて、前記スタートノードから前記ゴールノードまでの最短経路を取得する最短経路取得手段、
仮想空間内に配置された前記最短経路に沿って対象物を移動させる対象物移動制御手段、及び、
前記進行可否情報に基づいて、進行可能なコースを示すコース情報である1または複数の進行可能コース情報を取得する進行可能コース情報取得手段、
としてコンピュータを機能させるための最短経路探索プログラムであって、
前記進行可否情報は前記対象物の長さと前記1または複数のエッジ間の角度に基づいて予め設定されている、
ことを特徴とする最短経路探索プログラム。 The shortest path from the start node to the goal node included in the plurality of nodes in a route formed by a plurality of nodes and a plurality of edges connected to the plurality of nodes and associated with the cost of passing A shortest route search program for searching a route,
The progress determination information indicating whether or not progress is possible between one or a plurality of edges connected to each node is associated with node identification information for identifying each node and edge identification information for identifying each edge. Progress information acquisition means for acquiring stored progress information;
A shortest path acquisition means for acquiring a shortest path from the start node to the goal node based on the progress propriety information and the cost associated with each edge;
An object movement control means for moving the object along the shortest path arranged in the virtual space; and
Advancing course information acquisition means for acquiring one or a plurality of advancing course information which is course information indicating a proceeding course based on the advancing propriety information;
As a shortest path search program for causing a computer to function as
The advanceability information is preset based on the length of the object and the angle between the one or more edges,
A shortest path search program characterized by that.
前記ノード識別情報、前記エッジ識別情報、該エッジ識別情報で識別されるエッジに到達するまでの累積コストを示す累積コスト情報、該エッジに進入してきた進入元のエッジを示す進入元エッジ情報を含む1または複数のコース情報を、登録コース情報として、記憶する登録コース情報記憶手段、
前記登録コース情報記憶手段に記憶された1または複数の登録コース情報のうち、最小の累積コスト情報を含む登録コース情報を抽出する最小登録コース情報抽出手段、
前記抽出された登録コース情報を、確定コース情報として、確定コース情報記憶手段に追加して記憶する確定コース情報記憶手段、
前記進行可否情報に基づいて、前記追加して記憶された確定コース情報により示されるコースの次に進行可能なコースを示すコース情報である1または複数の進行可能コース情報を取得する前記進行可能コース情報取得手段、及び、
前記登録コース情報記憶手段に記憶された登録コース情報及び前記取得された1または複数の進行可能コース情報に基づいて、前記進行可能コース情報を登録コース情報として、前記登録コース情報記憶手段に追加して記憶、または、前記登録コース情報を更新する登録コース情報設定手段、
としてコンピュータを機能させるための請求項1記載の最短経路探索プログラム。 In the shortest path acquisition means,
The node identification information, the edge identification information, the accumulated cost information indicating the accumulated cost until reaching the edge identified by the edge identification information, and the entry source edge information indicating the entry source edge that has entered the edge Registered course information storage means for storing one or more course information as registered course information;
Minimum registered course information extracting means for extracting registered course information including minimum accumulated cost information from one or a plurality of registered course information stored in the registered course information storage means;
Confirmed course information storage means for storing the extracted registered course information as confirmed course information in addition to the confirmed course information storage means;
Based on the traveling permission information, the traveling possible course of acquiring the additional to one or more of proceedable course information is course information indicating the possible traveling course to the next course indicated by the determined course information stored Information acquisition means, and
Based on the registered course information stored in the registered course information storage means and the acquired one or more advanceable course information, the advanceable course information is added to the registered course information storage means as registered course information. Or registered course information setting means for updating the registered course information,
The shortest path search program according to claim 1 for causing a computer to function as the computer program.
初期の前記コース情報を設定するとともに、該初期のコース情報を、登録コース情報として、前記登録コース情報記憶手段に記憶させる初期コース情報設定手段、としてコンピュータを機能させるための請求項2記載の最短経路探索プログラム。 The shortest path search program further includes:
3. The shortest set of claim 2, for setting the initial course information and causing the computer to function as initial course information setting means for storing the initial course information as registered course information in the registered course information storage means. Route search program.
前記各ノードに接続された1または複数のエッジ間の進行の可否を示す進行可否識別情報が、前記各ノードを識別するノード識別情報と、前記各エッジを識別するエッジ識別情報と、に関連付けて記憶された進行可否情報を取得する進行可否情報取得手段と、
前記進行可否情報及び前記各エッジに関連付けられたコストに基づいて、前記スタートノードから前記ゴールノードまでの最短経路を取得する最短経路取得手段と、
仮想空間内に配置された前記最短経路に沿って対象物を移動させる対象物移動制御手段と、
前記進行可否情報に基づいて、進行可能なコースを示すコース情報である1または複数の進行可能コース情報を取得する進行可能コース情報取得手段と、を有し、
前記進行可否情報は前記対象物の長さと前記1または複数のエッジ間の角度に基づいて予め設定されている、
ことを特徴とする最短経路探索装置。 The shortest path from the start node to the goal node included in the plurality of nodes in a route formed by a plurality of nodes and a plurality of edges connected to the plurality of nodes and associated with the cost of passing A shortest route search device for searching a route,
The progress determination information indicating whether or not progress is possible between one or a plurality of edges connected to each node is associated with node identification information for identifying each node and edge identification information for identifying each edge. Progress information acquisition means for acquiring stored progress information;
Shortest path acquisition means for acquiring the shortest path from the start node to the goal node based on the progress propriety information and the cost associated with each edge;
Object movement control means for moving the object along the shortest path arranged in the virtual space;
Advancing course information acquisition means for acquiring one or more advanceable course information that is course information indicating a course that can be advanced based on the advanceability information ;
The advanceability information is preset based on the length of the object and the angle between the one or more edges,
A shortest path search device characterized by that.
進行可否情報取得手段が、前記各ノードに接続された1または複数のエッジ間の進行の可否を示す進行可否識別情報が、前記各ノードを識別するノード識別情報と、前記各エッジを識別するエッジ識別情報と、に関連付けて記憶された進行可否情報を取得し、
最短経路取得手段が、前記進行可否情報及び前記各エッジに関連付けられたコストに基づいて、前記スタートノードから前記ゴールノードまでの最短経路を取得し、
進行可能コース情報取得手段が、前記進行可否情報に基づいて、進行可能なコースを示すコース情報である1または複数の進行可能コース情報を取得し、
対象物移動制御手段が、仮想空間内に配置された前記最短経路に沿って対象物を移動させ、
前記進行可否情報は前記対象物の長さと前記1または複数のエッジ間の角度に基づいて予め設定されている、
ことを特徴とする最短経路探索方法。
The shortest path from the start node to the goal node included in the plurality of nodes in a route formed by a plurality of nodes and a plurality of edges connected to the plurality of nodes and associated with the cost of passing A method of searching for a shortest route for searching a route,
The progress determination information indicating whether or not the progress determination information acquisition means indicates the progress of one or a plurality of edges connected to each of the nodes includes node identification information for identifying each of the nodes, and an edge for identifying each of the edges The identification information and the progress information stored in association with the identification information are acquired,
The shortest path acquisition means acquires the shortest path from the start node to the goal node based on the travel propriety information and the cost associated with each edge,
The advancing course information acquisition means acquires one or a plurality of advancing course information, which is course information indicating a course that can be progressed, based on the advancing propriety information;
The object movement control means moves the object along the shortest path arranged in the virtual space,
The advanceability information is preset based on the length of the object and the angle between the one or more edges,
The shortest path search method characterized by the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011123626A JP5871486B2 (en) | 2011-06-01 | 2011-06-01 | Shortest route search program, computer-readable recording medium storing shortest route search program, shortest route search device, and shortest route search method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011123626A JP5871486B2 (en) | 2011-06-01 | 2011-06-01 | Shortest route search program, computer-readable recording medium storing shortest route search program, shortest route search device, and shortest route search method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012251831A JP2012251831A (en) | 2012-12-20 |
JP5871486B2 true JP5871486B2 (en) | 2016-03-01 |
Family
ID=47524779
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011123626A Active JP5871486B2 (en) | 2011-06-01 | 2011-06-01 | Shortest route search program, computer-readable recording medium storing shortest route search program, shortest route search device, and shortest route search method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5871486B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101480670B1 (en) * | 2014-03-28 | 2015-01-15 | 경희대학교 산학협력단 | Method for searching shortest path in big graph database |
CN106382944B (en) * | 2016-10-08 | 2019-11-01 | 浙江国自机器人技术有限公司 | A kind of route planning method of mobile robot |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3381459B2 (en) * | 1995-05-30 | 2003-02-24 | 株式会社デンソー | Travel guide device for vehicles |
JP3517075B2 (en) * | 1997-02-18 | 2004-04-05 | アルパイン株式会社 | Navigation device |
JPH10300495A (en) * | 1997-04-25 | 1998-11-13 | Alpine Electron Inc | On-vehicle navigation device |
JP2002148066A (en) * | 2000-11-13 | 2002-05-22 | Toyota Motor Corp | Route searching device and medium thereof |
KR20070032948A (en) * | 2004-07-20 | 2007-03-23 | 가부시키가이샤 나비타이무쟈판 | Route navigation device, route navigation method and program |
JP2008304412A (en) * | 2007-06-11 | 2008-12-18 | Denso Corp | Navigation device, and program for navigation device |
JP4794601B2 (en) * | 2008-05-23 | 2011-10-19 | 株式会社ソニー・コンピュータエンタテインメント | Route search device, route search method and program |
JP5393195B2 (en) * | 2009-02-26 | 2014-01-22 | アルパイン株式会社 | Navigation device and route search method |
-
2011
- 2011-06-01 JP JP2011123626A patent/JP5871486B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012251831A (en) | 2012-12-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108362298B (en) | Navigation method and device in regional map | |
JP2006214965A (en) | Navigation device and program for enlarged display of intersection | |
JP5871486B2 (en) | Shortest route search program, computer-readable recording medium storing shortest route search program, shortest route search device, and shortest route search method | |
CN110755848A (en) | Path finding method in game, terminal and readable storage medium | |
CN111325849A (en) | Virtual content display method and device, terminal equipment and storage medium | |
US9689687B2 (en) | Generating navigation data | |
JP2008286732A (en) | Map display, and route display method | |
JP6572672B2 (en) | Route graph generation method, apparatus, and program | |
JP2006113457A (en) | Summary map creating device | |
JPWO2010013327A1 (en) | Route search device, route search method, route search program, and recording medium | |
JP6582437B2 (en) | Safety information registration system, safety information registration device, and program | |
JP2016080654A (en) | Movement route extraction device, movement route extraction method, and movement route extraction program | |
JP5706634B2 (en) | Route intersection extraction system and guide map generation system | |
JP4864149B2 (en) | Navigation server and navigation system | |
JP6572553B2 (en) | Security plan support method, security plan support device, and program | |
JP4902463B2 (en) | Navigation device | |
JP6898385B2 (en) | Terminal device, control method and control program | |
JP6545345B1 (en) | Terminal device, control method and control program | |
JP2007212836A (en) | Information acquisition device, information display device, information acquiring method, and the like | |
JP4794601B2 (en) | Route search device, route search method and program | |
JP5918836B2 (en) | Point setting device | |
JP5978041B2 (en) | Information processing system and information processing method | |
JP5056789B2 (en) | Navigation system, facility search method, and facility search program | |
JP6270751B2 (en) | Navigation device and navigation method | |
JP7177218B2 (en) | Terminal device, control method and control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140320 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20141224 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150106 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150224 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150811 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151002 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20151222 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160112 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5871486 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |