JP5036573B2 - Network generation device for total minimum cost route search, generation method, and route search device using this network - Google Patents
Network generation device for total minimum cost route search, generation method, and route search device using this network Download PDFInfo
- Publication number
- JP5036573B2 JP5036573B2 JP2008011831A JP2008011831A JP5036573B2 JP 5036573 B2 JP5036573 B2 JP 5036573B2 JP 2008011831 A JP2008011831 A JP 2008011831A JP 2008011831 A JP2008011831 A JP 2008011831A JP 5036573 B2 JP5036573 B2 JP 5036573B2
- Authority
- JP
- Japan
- Prior art keywords
- cost
- arc
- network
- route
- node
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 25
- 238000006243 chemical reaction Methods 0.000 claims description 40
- 238000013500 data storage Methods 0.000 claims description 27
- 238000004364 calculation method Methods 0.000 claims description 21
- 238000013139 quantization Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 4
- 238000012217 deletion Methods 0.000 claims description 3
- 230000037430 deletion Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 8
- 238000010845 search algorithm Methods 0.000 description 4
- 238000010276 construction Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
Images
Description
本発明は、2点間の最小コスト経路を全て探索するためのネットワークの生成装置と生成方法に関し、特に、最小コスト経路が複数存在する場合に好適な全最小コスト経路探索用ネットワークの生成装置及び生成方法に関する。また、このネットワークを用いた経路探索装置に関する。 The present invention relates to a network generation apparatus and a generation method for searching all minimum cost paths between two points, and more particularly to an apparatus for generating an entire minimum cost path search network suitable when there are a plurality of minimum cost paths, and It relates to a generation method. The present invention also relates to a route search apparatus using this network.
2点間の最小コスト経路探索の一例として、例えば、出発駅と到着駅間の鉄道運賃計算がある。鉄道運賃計算は、例えば、駅をノード、駅間を結ぶ線路をアーク、アークのコストを距離としたネットワークを用い、2駅間の利用可能経路の中で最短経路(最小コスト経路)を探索し、探索した経路の距離を運賃に換算することで運賃を算出する。また、鉄道運賃計算を行う際、発着駅間において最短経路が複数存在する場合、それらを全て求める必要がある。さらに、出発駅と到着駅間の最安運賃を求める必要もあるが、その際、発着駅間において最安運賃経路が複数存在する場合、それらを全て求めなければならない。 As an example of searching for a minimum cost route between two points, for example, there is a railway fare calculation between a departure station and an arrival station. Railway fare calculation uses, for example, a network in which stations are nodes, arcs are tracks connecting stations, and arc costs are distances, and the shortest route (minimum cost route) is searched for among the available routes between two stations. The fare is calculated by converting the distance of the searched route into the fare. Further, when calculating the railway fare, if there are a plurality of shortest routes between the departure and arrival stations, it is necessary to obtain all of them. Furthermore, there is a need to obtain the lowest fare between the departure station and the arrival station. At that time, if there are a plurality of the lowest fare routes between the departure and arrival stations, all of them must be obtained.
このような複数の最小コスト経路を探索する従来手法としては、ネットワーク上の2つのノード間に存在する全経路を求め、その中からコストが最小となる経路を選択する手法と、k−最短経路探索アルゴリズムを用いる手法がある。尚、k−最短経路探索アルゴリズムを利用した複数の最短経路探索方法に関して、特許文献1,2に記載されたものがある。
しかしながら、上述の全経路を探索する手法は、全経路を算出する必要があり計算量が非常に多いため、ネットワーク規模が大きい場合には実用的な処理時間での探索は困難であり、実用性に問題ある。また、k−最短経路探索アルゴリズムを利用する手法は、コストの小さい順に経路を求めるアルゴリズムであり、最小コスト経路よりもコストの大きい経路が求まるまで探索を行う仕組みである。従って、全経路探索手法よりは計算量は少ないが、やはり無駄な計算が多く、コスト最小の経路(最小コスト経路)の全てを探索するには時間がかかり効率的ではない。 However, the above-described method for searching all routes requires calculation of all routes, and the amount of calculation is very large. Therefore, when the network scale is large, it is difficult to search in a practical processing time. There is a problem. The method using the k-shortest route search algorithm is an algorithm for obtaining routes in ascending order of cost, and is a mechanism for performing a search until a route having a cost higher than the minimum cost route is obtained. Accordingly, although the calculation amount is smaller than that of the all-route search method, there is still a lot of useless calculation, and searching for all the routes with the lowest cost (minimum cost route) takes time and is not efficient.
本発明は上記問題点に着目してなされたもので、全ての最小コスト経路(例えば、最短経路や最安運賃経路等)を、効率的且つ高速で探索できるネットワークを生成する全最小コスト経路探索用ネットワーク生成装置と生成方法を提供することを目的とする。また、このネットワークを適用した経路探索装置を提供することを目的とする。 The present invention has been made paying attention to the above-mentioned problems, and is an all-minimum-cost route search that generates a network that can efficiently and quickly search all the minimum-cost routes (for example, the shortest route, the cheapest fare route, etc.). An object of the present invention is to provide a network generation device and a generation method for use. It is another object of the present invention to provide a route search apparatus to which this network is applied.
このため、請求項1に記載した本発明の全最小コスト経路探索用ネットワーク生成装置は、複数のノードを有し、隣合うノード間をアークで接続し、各アークにコストを設定した本来の経路探索ネットワークデータを格納するデータ格納部と、前記複数のノードのいずれか1つを終端ノードとし、当該終端ノードを含む全てのノードに関してそれぞれのノードから前記終端ノードまでの各経路の最小コストをそれぞれ算出し、算出した各最小コストと前記データ格納部の各アークのコストとに基づいて前記本来の経路探索ネットワークの各アークのコストを変換し、変換後のコストが零のアーク及び当該アークで接続されるノードのみで構成される最小コスト経路ネットワークデータを生成するネットワークデータ生成部と、を備えて構成したことを特徴とする。
Therefore, the network generation device for total minimum cost path search according to the present invention described in
かかる構成では、ネットワークデータ生成部は、データ格納部に格納された本来のネットワークデータに基づいて、終端ノードを含んで各ノードから終端ノードまでの最小コストを算出し、算出した各最小コストと本来のコストとから各アークのコストを変換し、変換後のコストが零のアーク及び当該アークで接続されるノードのみで構成される最小コスト経路ネットワークデータを生成する。最小コスト経路ネットワークデータで構築される最小コスト経路ネットワークは、各ノードから終端ノードまでの経路が全て最小コストの経路になっている。これにより、2つのノード間に存在する全ての最小コスト経路を、短時間で探索できるようになる。 In such a configuration, the network data generation unit calculates the minimum cost from each node to the terminal node including the terminal node based on the original network data stored in the data storage unit, The cost of each arc is converted from the cost of the arc, and the minimum cost path network data including only the arc having the converted cost of zero and the node connected by the arc is generated. In the minimum cost path network constructed with the minimum cost path network data, the paths from each node to the end node are all the minimum cost paths. As a result, all the minimum cost paths existing between the two nodes can be searched in a short time.
前記ネットワークデータ生成部は、具体的には、請求項2のように、前記最小コストを算出するコスト算出手段と、前記本来の経路探索ネットワークの各アークのコストを変換するアークコスト変換手段と、前記データ格納部に格納された前記ノード及び前記アークと前記アークコスト変換手段で得られた変換後のコストとで構成されるアークコスト変換ネットワークデータからコストが零でないアークデータを削除するアーク削除手段と、を備え、前記アークコスト変換ネットワークデータからコストが零でないアークデータを削除することにより前記最小コスト経路ネットワークデータを生成する構成とした。
Specifically, the network data generation unit, as in
前記アークコスト変換手段は、具体的には、請求項3のように、コスト変換対象のアークの始点となっているノードについて前記最小コスト算出手段で算出した終端ノードまでの最小コストをCtail、コスト変換対象のアークの終点となっているノードについて前記最小コスト算出手段で算出した終端ノードまでの最小コストをChead、前記始点ノードと前記終点ノード間を接続するコスト変換対象のアークの変換前のコストをCarcとして、前記データ格納部に格納された全てのアークについて、変換後のコストHCarcを、次の演算式、
HCarc=Chead+Carc−Ctail
を用いて算出する構成とした。
Specifically, as described in
HCarc = Chead + Carc-Ctail
It was set as the structure calculated using.
請求項4のように、前記ネットワークデータ生成部は、前記本来の経路探索ネットワークの各アークのコストを所定の規則に従ってそれぞれ量子化するコスト量子化手段を備え、該コスト量子化手段によるコスト量子化処理後に、前記最小コストの算出処理を行う構成とするとよい。
かかる構成では、コスト量子化手段によって本来の経路探索ネットワークの各アークのコストを量子化した後に、最小コストの算出処理、コスト変換処理を経て、最小コスト経路探索ネットワークデータを生成するようになる。これにより、本来の経路探索ネットワークにおける最小コストに近いコストの経路を複数探索可能な最小コスト経路探索ネットワークデータを生成できる。
5. The network data generation unit according to
In such a configuration, the cost of each arc in the original route search network is quantized by the cost quantization means, and then the minimum cost route search network data is generated through the minimum cost calculation process and the cost conversion process. Thereby, minimum cost route search network data capable of searching a plurality of routes having a cost close to the minimum cost in the original route search network can be generated.
請求項5のように、前記アークのコストの種類は、距離、時間及び金額のいずれかであることを特徴とする。
これにより、コストの種類を距離にすれば最短距離の経路が、コストの種類を時間にすれば最短時間の経路が、コストの種類を運賃等の料金にすれば最安の経路が、それぞれ短時間で探索できるようになる。
According to a fifth aspect of the present invention, the arc cost type is any one of distance, time, and amount.
As a result, if the cost type is distance, the shortest distance route is short, if the cost type is time, the shortest time route is short, and if the cost type is fares, the cheapest route is short. You can search in time.
また、請求項6に記載の本発明の全最小コスト経路探索用ネットワーク生成方法は、複数のノードを有し、隣合うノード間をアークで接続し、各アークにコストを設定して構成され、予め格納された本来の経路探索ネットワークデータの前記複数のノードのいずれか1つを終端ノードとして選択するステップと、該選択ステップで選択した終端ノードを含む全てのノードに関してそれぞれのノードから前記終端ノードまでの各経路の最小コストをそれぞれ算出する最小コスト算出ステップと、該最小コスト算出ステップで算出した各最小コストと前記データ格納部の各アークのコストとに基づいて前記本来の経路探索ネットワークの各アークのコストを変換するアークコスト変換ステップと、前記データ格納部のノード及びアークと前記アークコスト変換ステップで変換されたコストとで構成されるアークコスト変換ネットワークデータからコストが零でないアークデータを削除して、コストが零のアーク及び当該アークで接続されるノードのみで構成される最小コスト経路ネットワークデータを生成するネットワークデータ生成ステップと、を備えることを特徴とする。
Further, the network generation method for total minimum cost path search according to the present invention described in
また、請求項7に記載の本発明の経路探索装置は、経路探索対象の始端と終端の情報を入力する入力部と、前記請求項1〜5のいずれか1つに記載の全最小コスト経路探索用ネットワーク生成装置で生成した最小コスト経路ネットワークデータを格納したネットワークデータ格納部と、該ネットワークデータ格納部の最小コスト経路ネットワークデータで構築される最小コスト経路ネットワークを用いて、前記入力部で入力された始端と終端との間の少なくとも1以上の経路を探索する経路探索部と、該経路探索部で探索した経路情報と当該経路のコスト情報を出力する出力部と、を備える構成としたことを特徴とする。 A route search device according to a seventh aspect of the present invention includes an input unit that inputs information about a start end and a terminal end of a route search target, and an all minimum cost route according to any one of the first to fifth aspects. Using the network data storage unit storing the minimum cost route network data generated by the network generation device for search and the minimum cost route network constructed by the minimum cost route network data of the network data storage unit, input at the input unit A route search unit that searches for at least one or more routes between the start and end points, and an output unit that outputs route information searched by the route search unit and cost information of the route It is characterized by.
かかる構成では、入力部で始端と終端の情報を入力すると、経路探索部は、ネットワークデータ格納部に格納した最小コスト経路ネットワークデータに基づいて最小コスト経路ネットワークを構築し、入力された始端から終端までの少なくとも1以上(全て又は任意数)の経路を探索する。探索された経路は全て最小コストの経路である。出力部は、探索経路情報及びその経路のコスト情報を出力する。 In such a configuration, when the start and end information is input at the input unit, the route search unit constructs a minimum cost route network based on the minimum cost route network data stored in the network data storage unit, and ends from the input start point to the end point. Search for at least one route (all or any number) up to. All the searched routes are the least cost routes. The output unit outputs searched route information and cost information of the route.
請求項8のように、請求項4に記載のネットワーク生成装置で生成した最小コスト経路ネットワークデータを、前記ネットワークデータ格納部に格納し、前記経路探索部で、前記始端と前記終端との間で、前記本来の経路探索ネットワークにおける最小コストに近いコストの少なくとも1以上(全て又は任意数)の経路を探索可能とするとよい。
かかる構成では、例えば、アークのコストが距離である経路探索ネットワークを用いて、終端までの距離が短く、要する時間も短い経路を探索するような場合、最短経路に近い経路を全て探索し、探索した全ての経路に対して時間の重み付けを行うようにすれば、前記探索条件に最適な経路の探索が可能になる。
As in
In such a configuration, for example, when searching for a route with a short distance to the end and a short time required using a route search network in which the arc cost is a distance, all the routes that are closest to the shortest route are searched and searched. If time is weighted for all the routes, a route optimum for the search condition can be searched.
本発明によれば、最小コスト経路ネットワークデータで構築される最小コスト経路ネットワークは最小コストの経路だけで接続されたネットワークであるので、始端から終端までの全ての最小コスト経路を短時間で探索できるネットワークを提供できる。また、この最小コスト経路ネットワークを用いれば、例えば、鉄道運賃計算等のように、最安運賃の経路が複数存在すればその全てを探索する必要がある場合でも、短時間で全ての最安運賃経路を探索できるようになる。 According to the present invention, since the minimum cost path network constructed by the minimum cost path network data is a network connected by only the minimum cost path, all the minimum cost paths from the start end to the end can be searched in a short time. A network can be provided. In addition, if this minimum cost route network is used, if there are multiple routes with the cheapest fare, such as railway fare calculation, all the cheapest fare can be searched in a short time even if it is necessary to search all of them. The route can be searched.
以下、本発明の実施形態を図面に基づいて説明する。尚、以下の実施形態では、アークのコストを距離とし、最小コスト経路探索として最短経路探索に適用した場合を例に説明する。
図1は、本発明に係る経路探索装置の第1実施形態の構成を示すブロック図である。図2は、駅をノード、駅間を結ぶ線路をアーク、アークのコストを距離としたネットワークであり、これを本来の経路探索ネットワークと呼ぶこととする。
図1において、本実施形態の経路探索装置1は、後述するように最小コスト経路ネットワークデータとして最短経路ネットワークデータの生成機能を備えており、最小コスト経路探索用ネットワーク生成装置を兼ねる。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiment, an example will be described in which the arc cost is a distance and the minimum cost route search is applied to the shortest route search.
FIG. 1 is a block diagram showing a configuration of a first embodiment of a route search apparatus according to the present invention. FIG. 2 shows a network in which stations are nodes, lines connecting stations are arcs, and arc costs are distances. This is called an original route search network.
In FIG. 1, the
前記経路探索装置1は、入力部2と、データストレージ装置3と、最短経路ネットワークデータ生成部4と、記憶装置5と、経路探索部6と、出力部7と、を備えて構成される。ここで、経路探索装置1は、例えばコンピュータで構成され、前記最短経路ネットワークデータ生成部4及び経路探索部6の機能はソフトウエア的に備えられるものである。
The
前記入力部2は、始端となる出発点と終端となる到着点の各データ等を入力するものである。
前記データストレージ装置3は、複数のノードを有し、隣合うノード間をアークで接続し、各アークにコストとして例えば距離を設定した図2に示すような本来の経路探索ネットワーク構築用のネットワークデータを格納するもので、データ格納部に相当する。
The
The
前記最短経路ネットワークデータ生成部4は、データストレージ装置3内に格納された本来の経路探索ネットワークデータに基づいて、出発点と到着点のノード間に存在する全ての最短経路(最小コスト経路)を探索するために最短経路ネットワークを構築する必要があり、このための最短経路ネットワークデータを生成するもので、最短経路探索部4Aと、アークコスト変換部4Bと、アーク削除部4Cと、を備える。最短経路ネットワークデータ生成部4がネットワークデータ生成部に相当する。
The shortest path network
前記最短経路探索部4Aは、図2の本来の経路探索ネットワーク10において、複数のノードのいずれか1つを終端ノードとし、当該終端ノードを含む全てのノードに関してそれぞれのノードから終端ノードまでの各経路の最小コストをそれぞれ算出するもので、最小コスト算出手段に相当する。最小コストの算出方法は、本実施形態では例えばダイクストラ法等の最短経路探索アルゴリズムを用いることができる。
In the original
前記アークコスト変換部4Bは、最短経路探索部4Aの算出した各最小コストとデータストレージ装置3に格納された図2の本来の経路探索ネットワーク10を構築する各アークのコストデータとに基づいて、後述の演算式を用いて、図2の本来の経路探索ネットワーク10の各アークのコストを変換するもので、アークコスト変換手段に相当する。このアークコスト変換処理により、図3に示すような、本来の経路探索ネットワークのアークのコストを、変換後のコストに置き換えたアークコスト変換ネットワーク20を構築するネットワークデータを生成する。
The arc
前記アーク削除部4Cは、図3のアークコスト変換ネットワーク20の構築データから、コストが零でないアークデータを削除するもので、これにより、図4に示すような、最終的な最短経路ネットワーク30を構築するための最短経路ネットワークデータが生成される。
The
前記記憶装置5は、最短経路ネットワークデータ生成部4で生成された最短経路ネットワークデータを格納するもので、ネットワークデータ格納部に相当する。
前記経路探索部6は、記憶装置5に格納された最短経路ネットワークデータで構築される図4の最短経路ネットワーク30から全経路を探索するものである。
前記出力部7は、経路探索部6で探索された経路情報及びその経路のコスト情報(本実施形態では距離情報である)を出力するものである。
The
The
The
次に、本実施形態の経路探索装置1による最短経路ネットワークデータの生成及び最短経路ネットワークデータを用いた最短経路探索の各動作を、図5のフローチャートを参照して説明する。尚、以下では、図2の本来の経路探索ネットワーク10において、出発点をノードf、到着点をノードaとし、ノードfからノードaまでの全最短経路を探索するものとして説明する。
Next, each operation | movement of the production | generation of the shortest route network data by the
図5は、最短経路ネットワークデータの生成から最短経路探索までの動作を示すフローチャートである。
ステップS1で、入力部2において、出発点と到着点の各情報を入力する。
ステップS2では、最短経路ネットワークデータ生成部4の最短経路探索部4Aにより、図2の本来の経路探索ネットワーク10において、各ノードa〜fから到着ノードaまでの最短経路のコストをそれぞれ算出する。これらコストは、例えばダイクストラ法等の1点から全点への最短経路を算出する手法によって効率的に算出することが可能ある。図2において、各ノード近傍の四角形で囲まれた数字が、各ノードから到着ノードaまでの最小コストを表しており、その他の数字は、隣合うノード間を接続する各アークのコストを表している。ステップS2が、終端ノードの選択ステップ及び最小コスト算出ステップに相当する。
FIG. 5 is a flowchart showing the operation from the generation of the shortest path network data to the search for the shortest path.
In step S1, the
In step S2, the shortest
ステップS3では、最短経路ネットワークデータ生成部4のアークコスト変換部4Bにより、最短経路探索部4Aで算出した各最小コストと図2に示す各アークのコストとに基づいて、図2の本来の経路探索ネットワーク10の各アークのコストを変換し、図3のアークコスト変換ネットワーク20構築用のネットワークデータを生成する。ステップS3が、アークコスト変換ステップに相当する。
In step S3, the arc
ここで、前記アークコスト変換処理について詳述する。
アークコスト変換部4Bは、コスト変換対象のアークの始点となっているノードについて最短経路探索部4Aで算出した終端ノードまでの最小コストをCtail、コスト変換対象のアークの終点となっているノードについて算出した終端ノードまでの最小コストをChead、始点ノードと終点ノード間を接続するコスト変換対象のアークの変換前のコストをCarcとして、図2の本来の経路探索ネットワーク10の全てのアークについて、変換後のコストHCarcを、次の演算式(1)を用いて算出する。
HCarc=Chead+Carc−Ctail (1)
例えば、ノードdとノードeを接続するアークのコストを変換する場合は、ノードdを始点、ノードeを終点とするアークに関しては、Chead=4、Carc=3、Ctail=2となるので、HCarc=5となる。逆に、ノードdを終点、ノードeを始点とするアークに関しては、Chead=2、Carc=3、Ctail=4となるので、HCarc=1となる。また、ノードcとノードfを接続するアークのコストを変換する場合は、ノードcを始点、ノードfを終点とするアークに関しては、Chead=6、Carc=2、Ctail=4となるので、HCarc=4となる。ノードcを終点、ノードfを始点とするアークに関しては、Chead=4、Carc=2、Ctail=6となるので、HCarc=0となる。このようにして、図2の本来の経路探索ネットワーク10の全てのアークのコストを変換すると、図3のようなアークのコストが変換されたアークコスト変換ネットワーク20を構築するネットワークデータが生成される。
Here, the arc cost conversion process will be described in detail.
The arc
HCarc = Chead + Carc-Ctail (1)
For example, when the cost of the arc connecting node d and node e is converted, since Chead = 4, Carc = 3, and Ctail = 2 for the arc having node d as the start point and node e as the end point, HCarc = 5. On the other hand, with respect to the arc having node d as the end point and node e as the start point, Chead = 2, Carc = 3, and Ctail = 4, so HCarc = 1. When the cost of the arc connecting node c and node f is converted, since Chead = 6, Carc = 2, and Ctail = 4 for the arc starting at node c and ending at node f, HCarc = 4. With respect to the arc having node c as the end point and node f as the start point, Chead = 4, Carc = 2, and Ctail = 6, so HCarc = 0. When the costs of all arcs of the original
ステップS4では、最短経路ネットワークデータ生成部4のアーク削除部4Cにより、図3のアークコスト変換ネットワーク20を構築するネットワークデータから、コストが零以外のアークデータを削除する。これにより、コストが零のアークと当該アークで接続されたノードのみで構成した図4の最短経路ネットワーク30を構築するための最短経路ネットワークデータを生成する。生成した最短経路ネットワークデータを、記憶装置5に格納する。ステップS4が、ネットワークデータ生成ステップに相当する。上述のステップS1〜S4が、最短経路ネットワークデータの生成機能である。
In step S4, the
ステップS5では、経路探索部6により、記憶装置5に格納された最短経路ネットワークデータから構築される図4の最短経路ネットワーク30を用いて、入力部2で入力された出発点fから到着点aまでの全経路を探索する。図4の最短経路ネットワーク30において、出発点fから到着点aまでの全ての経路を列挙すると下記のようになる。
f→e→a
f→e→b→a
f→b→a
f→c→b→a
これらの経路は、全て図2の本来の経路探索ネットワーク10において、そのコストは「6」であり、最短経路である。
In step S5, the
f → e → a
f → e → b → a
f → b → a
f → c → b → a
All of these routes have the cost “6” in the original
ここで、図4の最短経路ネットワーク30の正当性について図6を参照して説明する。
図6のアークzが最短経路を構成するアークとなるための条件を求めることによって、図4の最短経路ネットワーク30の正当性を示すことができる。図6において、地点xからアークzを通って地点yを経由して目的地に到達する場合の最短距離は、Cyを地点yから目的地までの最短距離(最小コスト)、Carcをアークzのコストとすると、Cy+Carcで表される。この距離が地点xから目的地までの最短距離Cxと等しければ、アークzは最短経路を構成するアークとなる。このとき、以下の条件が満たされる。
Cy+Carc−Cx=0
この式は、前述した演算式(1)においてHCarc=0の場合である。従って、HCarc=0となるアークは、最短経路を構成するアークとなる。従って、図4の最短経路ネットワーク30が正当であると言える。
Here, the validity of the
The validity of the
Cy + Carc-Cx = 0
This equation is a case where HCarc = 0 in the above-described arithmetic expression (1). Therefore, the arc where HCarc = 0 is the arc that forms the shortest path. Therefore, it can be said that the
ステップS6では、ステップS5の探索結果に基づいて、探索経路情報とそのコスト情報を出力部7から出力する。
In step S6, search route information and its cost information are output from the
かかる本実施形態によれば、図4の最短経路ネットワーク30は、最短経路のみで構成されるネットワークであるので、この最短経路ネットワークで得られる経路は全て最短経路になる。従って、最短経路以外の無駄な経路が探索されないため、2地点間の最短経路を全て探索する必要がある場合でも、極めて効率よく高速にできる。
According to this embodiment, since the
尚、2つのノード間の全ての最短経路を探索するときは、図4の最短経路ネットワーク30上で全経路探索を行えばよい。また、全経路探索だけでなく任意数での経路探索の行うことができ、その際には、図4の最短経路ネットワーク30上で求めたい経路数だけ経路探索を行えばよい。この場合の経路探索手法は、深さ優先探索等の一般的な手法が利用可能である。
When searching for all the shortest paths between two nodes, the full path search may be performed on the
更に、図4の最短経路ネットワーク30は、ノードfからノードaへの最短経路を求めるために作成したネットワークであるが、到着ノードが同じであれば、図4の最短経路ネットワーク30を用いて、ノードf以外の別のノードb〜eから到着ノードaへの最短経路探索にも利用できる。
例えば、図4の最短経路ネットワーク30において、ノードeからノードaへの経路を挙げると、下記の2通りがある。
e→a
e→b→a
これらの経路も図2の本来の経路探索ネットワーク10において、コストが「4」で、最短経路となっている。
Further, the
For example, in the
e → a
e → b → a
These routes are also the shortest route with a cost of “4” in the original
このことから、経路探索ネットワーク上の全ての2ノード間の全最短経路を探索する場合、図2の本来の経路探索ネットワーク10から図4の最短経路ネットワーク30への変換回数は、図2の本来の経路探索ネットワーク10上のノードの数だけ行えばよく、この点でも効率よく最短経路探索が行える利点がある。
Therefore, when searching for the shortest route between all two nodes on the route search network, the number of conversions from the original
上記実施形態は、到着点のノード情報が入力される度に、そのノードを到着ノードとする最短経路ネットワークデータを生成する構成であるが、これに限らない。例えば、データストレージ装置3内の格納データで構築される本来の経路探索ネットワーク10における全てのノードについて、それぞれ到着点とした最短経路ネットワークデータを予め作成して記憶装置5に格納しておくようにしてもよい。また、本来の経路探索ネットワーク10における全てのノードについて、全ての出発点と到着点の組合せの最短経路ネットワークデータを予め作成して記憶装置5に格納しておくようにしてもよい。
In the above embodiment, every time node information of an arrival point is input, the shortest path network data having the node as an arrival node is generated. However, the present invention is not limited to this. For example, the shortest route network data, which is the arrival point, is created in advance and stored in the
前者の構成による最短経路探索動作は、図7のフローチャートのようになる。
ステップS11で、入力部2で求める出発点と到着点を入力する。
ステップS12で、経路探索部6により、予め作成して記憶装置3に格納した最短経路ネットワークデータの中から、入力された到着点を到着ノードとした最短経路ネットワークデータを選択して読出す。
ステップS13で、経路探索部6により、呼び出した最短経路ネットワークデータから構築される最短経路ネットワークを用いて、出発点からの全経路を算出する。
ステップS14で、探索経路情報とそのコスト情報を出力部7から出力する。
The shortest path search operation according to the former configuration is as shown in the flowchart of FIG.
In step S11, the starting point and the arrival point obtained by the
In step S12, the
In step S13, the
In step S14, the search route information and its cost information are output from the
後者の構成による最短経路探索動作は、図8のフローチャートのようになる。
ステップS21で、入力部2で求める出発点と到着点を入力する。
ステップS22で、経路探索部6により、予め作成して記憶装置3に格納した各最短経路ネットワークデータの中から、入力された出発点と到着点をそれぞれ出発ノードと到着ノードとした最短経路ネットワークデータを選択して読出す。
ステップS23で、経路探索部6により、読出した最短経路ネットワークデータから構築される最短経路ネットワークを用いて、全経路を算出する。
ステップS24で、探索経路情報とそのコスト情報を出力部7から出力する。
The shortest path search operation by the latter configuration is as shown in the flowchart of FIG.
In step S21, the starting point and the arrival point obtained by the
In step S22, the shortest route network data having the input departure point and arrival point as the departure node and arrival node, respectively, among the shortest route network data created in advance by the
In step S23, the
In step S24, the search route information and its cost information are output from the
本実施形態の経路探索装置を利用すれば、ノードを駅としアークのコストを距離としたネットワークデータに基づいて、図5のフローチャートのようにして図4のような最短経路ネットワークを構築するネットワークデータを作成し、作成した最短経路ネットワークデータで構築される図4のような最短経路ネットワークで、全経路探索を行えば、与えられた2駅間に存在する全ての最安運賃経路を効率よく短時間で探索することが可能となる。 If the route search device of this embodiment is used, network data for constructing the shortest route network as shown in FIG. 4 as shown in the flowchart of FIG. 5 based on network data with nodes as stations and arc costs as distances. If the entire route search is performed with the shortest route network as shown in FIG. 4 constructed with the created shortest route network data, all the cheapest fare routes existing between two given stations are efficiently shortened. It becomes possible to search in time.
また、各駅をノードとし、同一料金体系内の全てのノードをアークで互いに直接接続し、アークで接続したノード間の接続の重み付けを運賃三角表データに基づいた運賃とするネットワークを利用することにより、与えられた2駅間に存在する全ての最安運賃経路を求めることができる。即ち、前述の運賃ネットワークデータに基づいて、図5のフローチャートのようにして最小コスト経路ネットワークとして図4のような最安運賃経路ネットワークを構築するネットワークデータを作成し、作成した最安運賃経路ネットワークデータで構築される図4のような最安運賃経路ネットワークで、全経路探索を行えば、与えられた2駅間に存在する全ての最安運賃経路を効率よく短時間で探索することが可能となる By using a network where each station is a node, all nodes in the same fare system are directly connected to each other by arc, and the connection weight between nodes connected by arc is a fare based on the fare triangle table data All cheapest fare routes that exist between two given stations can be found. That is, based on the above-mentioned fare network data, network data for constructing the cheapest fare route network as shown in FIG. 4 is created as the minimum cost route network as shown in the flowchart of FIG. By searching for all routes in the lowest fare route network as shown in Fig. 4 constructed with data, it is possible to efficiently and quickly search for all the lowest fare routes that exist between two given stations. Become
次に、本発明の第2実施形態を説明する。
図9は、本発明に係る経路探索装置の第2実施形態の構成を示すブロック図である。尚、第1実施形態と同一要素には同一符号を付して説明を省略する。
図9において、本実施形態の経路探索装置1は、最短経路ネットワークデータ生成部4に、量子化手段としてアークコスト量子化部4Dを追加した以外は、第1実施形態と同じ構成である。
Next, a second embodiment of the present invention will be described.
FIG. 9 is a block diagram showing the configuration of the second embodiment of the route search apparatus according to the present invention. In addition, the same code | symbol is attached | subjected to the same element as 1st Embodiment, and description is abbreviate | omitted.
In FIG. 9, the
前記アークコスト量子化部4Dは、本来の経路探索ネットワークの各アークのコストを所定の規則に従ってそれぞれ量子化するものである。ここで量子化とは、実際の数値を所定の規則に従って近い代表値に置き換えることであり、所定の規則とは、例えば、四捨五入、切捨て、切上げ、代表値を含むある数値範囲を設定してその範囲内の数値を代表値に置き換える等の方法が考えられるが、これら方法に限らない。
The arc cost
次に、第2実施形態の経路探索装置1による最短経路ネットワークデータの生成及び最短経路ネットワークデータを用いた最短経路探索の各動作を、図10のフローチャートを参照して説明する。
ステップS31で、入力部2において、出発点と到着点の各情報を入力する。
ステップS32で、本来の経路探索ネットワークデータの各アークのコストを量子化する。例えば、データストレージ装置3に記憶されている本来の経路探索ネットワークデータが、図11のような経路探索ネットワーク40を構築するデータである場合、その各コストについて100未満を切り捨てて図12のような代表値に置き換える。
Next, each operation | movement of the production | generation of the shortest route network data by the
In step S31, the
In step S32, the cost of each arc in the original route search network data is quantized. For example, when the original route search network data stored in the
この量子化後は、図12の経路探索ネットワーク40′を本来の経路探索ネットワークデータと見なして、図5に示す第1実施形態のステップS2〜S6の動作と同じ動作を、ステップS33〜S37で順次実行する。これにより、コストが零のアークと当該アークで接続されたノードのみで構成される図13の最短経路ネットワーク50を構築するためのネットワークデータが生成される。図13の四角形で囲まれた数字は、各ノードから到着ノードaまでの最小コストを表している。
After this quantization, the
かかる第2実施形態によれば、アークコストの量子化を行うことで、複数の最短(最小コスト)経路を存在させることが可能になる。図11の本来の経路探索ネットワーク40では、ノードfからノードaに向かう最短経路は、f→c→b→aの一通りであるが、図12の量子化後の経路探索ネットワーク40′では、f→c→b→a、f→e→d→a、f→e→b→a、f→e→aの4通りであり、生成される図13の最短経路ネットワーク50はそれを表している。これらの経路は、最短に近い経路であり、量子化することで最短に近い経路を全て又は任意数だけ探索することが可能となる。
According to the second embodiment, it is possible to cause a plurality of shortest (minimum cost) paths to exist by quantizing the arc cost. In the original
コストを量子化した最短経路ネットワークを用いた経路探索装置では、例えば、カーナビゲーションで距離が短く且つ目的地までに要する時間も短い経路を探索する場合、最短に近い経路を全て探索しておき、探索されたそれぞれの経路に対して時間の重み付け(例えば渋滞情報、交通履歴、事故情報等に基づいた所要時間の度合い)を行って最適な経路を探索することが可能となる。 In the route search device using the shortest route network with the quantized cost, for example, when searching for a route with a short distance and a short time to the destination by car navigation, search for all the routes closest to the shortest, It is possible to search for an optimum route by weighting each searched route (for example, the degree of required time based on traffic jam information, traffic history, accident information, etc.).
尚、ネットワークにおけるアークに付加するコストの種類は、距離、金額、時間等どのようなものでもよい。 Note that the cost added to the arc in the network may be any distance, amount, time, or the like.
1 経路探索装置
2 入力部
3 データストレージ装置
4 最短経路ネットワークデータ生成部
5 記憶装置
6 経路探索部
7 出力部
10,40 経路探索ネットワーク
20 アークコスト変換ネットワーク
30、50 最短経路ネットワーク
40′ 経路探索ネットワーク(量子化後の)
DESCRIPTION OF
Claims (8)
前記複数のノードのいずれか1つを終端ノードとし、当該終端ノードを含む全てのノードに関してそれぞれのノードから前記終端ノードまでの各経路の最小コストをそれぞれ算出し、算出した各最小コストと前記データ格納部の各アークのコストとに基づいて前記本来の経路探索ネットワークの各アークのコストを変換し、変換後のコストが零のアーク及び当該アークで接続されるノードのみで構成される最小コスト経路ネットワークデータを生成するネットワークデータ生成部と、
を備えて構成したことを特徴とする全最小コスト経路探索用ネットワーク生成装置。 A data storage unit having a plurality of nodes, connecting adjacent nodes with arcs, and storing original route search network data in which a cost is set for each arc;
One of the plurality of nodes is set as a termination node, and the minimum cost of each path from each node to the termination node is calculated for all nodes including the termination node, and the calculated minimum cost and the data Based on the cost of each arc in the storage unit, the cost of each arc in the original route search network is converted, and the minimum cost path configured by only the arc whose converted cost is zero and the nodes connected by the arc. A network data generation unit for generating network data;
A network generation device for searching a total minimum cost route, comprising:
HCarc=Chead+Carc−Ctail
を用いて算出することを特徴とする請求項2に記載の全最小コスト経路探索用ネットワーク生成装置。 The arc cost conversion means includes Ctail as the minimum cost to the end node calculated by the minimum cost calculation means for the node that is the starting point of the arc that is the cost conversion target, and the node that is the end point of the arc that is the cost conversion target The minimum cost up to the end node calculated by the minimum cost calculation means is stored in the data storage unit as Chead, and the cost before conversion of the arc to be converted that connects the start node and the end node is Carc. For all arcs, the converted cost HCarc is calculated using the following formula:
HCarc = Chead + Carc-Ctail
The network generation device for searching for a total minimum cost route according to claim 2, wherein the network generation device calculates the minimum cost route according to claim 2.
該選択ステップで選択した終端ノードを含む全てのノードに関してそれぞれのノードから前記終端ノードまでの各経路の最小コストをそれぞれ算出する最小コスト算出ステップと、
該最小コスト算出ステップで算出した各最小コストと前記データ格納部の各アークのコストとに基づいて前記本来の経路探索ネットワークの各アークのコストを変換するアークコスト変換ステップと、
前記データ格納部のノード及びアークと前記アークコスト変換ステップで変換されたコストとで構成されるアークコスト変換ネットワークデータからコストが零でないアークデータを削除して、コストが零のアーク及び当該アークで接続されるノードのみで構成される最小コスト経路ネットワークデータを生成するネットワークデータ生成ステップと、
を備えることを特徴とする全最小コスト経路探索用ネットワーク生成方法。 It has a plurality of nodes, connects adjacent nodes with arcs, sets the cost for each arc, and terminates any one of the plurality of nodes of the original route search network data stored in advance Selecting as a node;
A minimum cost calculating step for calculating a minimum cost of each path from each node to the terminal node for all nodes including the terminal node selected in the selection step;
An arc cost conversion step of converting the cost of each arc of the original route search network based on each minimum cost calculated in the minimum cost calculation step and the cost of each arc in the data storage unit;
Arc data whose cost is not zero is deleted from arc cost conversion network data composed of nodes and arcs of the data storage unit and costs converted in the arc cost conversion step. A network data generation step for generating minimum cost path network data composed of only connected nodes;
A network generation method for searching a total minimum cost route, comprising:
前記請求項1〜5のいずれか1つに記載の全最小コスト経路探索用ネットワーク生成装置で生成した最小コスト経路ネットワークデータを格納したネットワークデータ格納部と、
該ネットワークデータ格納部の最小コスト経路探索ネットワークデータで構築される最小コスト経路ネットワークを用いて、前記入力部で入力された始端と終端との間の少なくとも1以上の経路を探索する経路探索部と、
該経路探索部で探索した経路情報と当該経路のコスト情報を出力する出力部と、
を備える構成としたことを特徴とする経路探索装置。 An input unit for inputting information on the start and end of the route search target;
A network data storage unit storing the minimum cost route network data generated by the network generation device for total minimum cost route search according to any one of claims 1 to 5;
A route search unit that searches for at least one or more routes between the start end and the end input by the input unit using a minimum cost route network constructed by the minimum cost route search network data of the network data storage unit; ,
An output unit that outputs route information searched by the route search unit and cost information of the route;
A route search device characterized by comprising the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008011831A JP5036573B2 (en) | 2008-01-22 | 2008-01-22 | Network generation device for total minimum cost route search, generation method, and route search device using this network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008011831A JP5036573B2 (en) | 2008-01-22 | 2008-01-22 | Network generation device for total minimum cost route search, generation method, and route search device using this network |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009175876A JP2009175876A (en) | 2009-08-06 |
JP5036573B2 true JP5036573B2 (en) | 2012-09-26 |
Family
ID=41030920
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008011831A Expired - Fee Related JP5036573B2 (en) | 2008-01-22 | 2008-01-22 | Network generation device for total minimum cost route search, generation method, and route search device using this network |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5036573B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111228804B (en) | 2020-02-04 | 2021-05-14 | 腾讯科技(深圳)有限公司 | Method, device, terminal and storage medium for driving vehicle in virtual environment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3289240B2 (en) * | 1991-07-30 | 2002-06-04 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Graph search method and apparatus |
JP3036473B2 (en) * | 1997-06-27 | 2000-04-24 | 日本電気株式会社 | Route search apparatus and method |
JP3811106B2 (en) * | 2002-07-29 | 2006-08-16 | 株式会社駅前探険倶楽部 | Route search method and route search program |
JP4463779B2 (en) * | 2006-03-07 | 2010-05-19 | 日本電信電話株式会社 | Pass accommodation calculation device, path accommodation calculation method, and program |
-
2008
- 2008-01-22 JP JP2008011831A patent/JP5036573B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009175876A (en) | 2009-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Fan et al. | A metaheuristic approach to the urban transit routing problem | |
JP5599830B2 (en) | Route guidance system, route guidance server device, and navigation terminal device | |
KR101640461B1 (en) | A method of resolving a location from encoded data representative thereof | |
US8682578B2 (en) | Road link string conversion method, road information providing device and road information providing system | |
US8229666B2 (en) | Generating and using pattern keys in navigation systems to predict user destinations | |
JP5605918B2 (en) | Traffic data prediction apparatus, traffic data prediction method, and computer program | |
US9175965B2 (en) | Apparatus and method for coordinate coding, and method and apparatus for distance calculation | |
WO2015129214A1 (en) | Route-finding device, route-finding method, and program | |
JP2020060563A (en) | Plural vehicle route planning method and plural vehicle route planning system | |
Azis et al. | Comparison of Floyd-Warshall algorithm and greedy algorithm in determining the shortest route | |
CN112001541A (en) | Improved genetic algorithm for path optimization | |
WO2010058785A1 (en) | Path calculation order deciding method, program and calculating apparatus | |
JP4529604B2 (en) | Route guidance device | |
JP2007083800A (en) | Passage searching method, passage searching program and passage searching system | |
JP5036573B2 (en) | Network generation device for total minimum cost route search, generation method, and route search device using this network | |
JP5294592B2 (en) | Route search server and route search program | |
JP6174502B2 (en) | Route search device, route search method, computer program, and data structure | |
JP2005259052A (en) | Program and vehicle operation program creation device | |
JP2004287484A (en) | Bus operating form evaluation method and program, and computer-readable recording medium to which relevant program is recorded | |
JP5271817B2 (en) | Route search method, apparatus and program | |
JP6553564B2 (en) | Route calculation apparatus, route calculation method, and program | |
JP5213403B2 (en) | Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network | |
JP5413894B2 (en) | Via minimum cost route searching apparatus and via minimum cost route searching method | |
JP5502802B2 (en) | Route determining apparatus and route determining method | |
WO2016075932A1 (en) | Model summarizing device, evacuation prediction system, summarized model generating device, summarizing method, and computer-readable recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101224 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120625 |
|
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: 20120703 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120703 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150713 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5036573 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |