JP5213403B2 - Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network - Google Patents

Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network Download PDF

Info

Publication number
JP5213403B2
JP5213403B2 JP2007251266A JP2007251266A JP5213403B2 JP 5213403 B2 JP5213403 B2 JP 5213403B2 JP 2007251266 A JP2007251266 A JP 2007251266A JP 2007251266 A JP2007251266 A JP 2007251266A JP 5213403 B2 JP5213403 B2 JP 5213403B2
Authority
JP
Japan
Prior art keywords
data
network
fee
arc
calculation
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
Application number
JP2007251266A
Other languages
Japanese (ja)
Other versions
JP2009080763A (en
Inventor
拓真 山口
丞 菊地
隼史 森田
利宏 中山
敦子 池上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SCHOOL JURIDICAL PERSON SEIKEI GAKUEN
Nippon Signal Co Ltd
Original Assignee
SCHOOL JURIDICAL PERSON SEIKEI GAKUEN
Nippon Signal Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SCHOOL JURIDICAL PERSON SEIKEI GAKUEN, Nippon Signal Co Ltd filed Critical SCHOOL JURIDICAL PERSON SEIKEI GAKUEN
Priority to JP2007251266A priority Critical patent/JP5213403B2/en
Publication of JP2009080763A publication Critical patent/JP2009080763A/en
Application granted granted Critical
Publication of JP5213403B2 publication Critical patent/JP5213403B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、始点から終点までの最安料金を計算する料金計算ネットワークの生成装置及びこの料金計算ネットワークを用いた料金計算装置に関し、特に、料金体系の異なる複数の系に跨った2点間の最安料金計算に好適な料金計算ネットワークの生成装置及びこの料金計算ネットワークを用いた料金計算装置に関する。   The present invention relates to a fee calculation network generating device for calculating the lowest charge from the start point to the end point, and a fee calculation device using this fee calculation network, and in particular, between two points straddling a plurality of systems having different fee structures. The present invention relates to a charge calculation network generation apparatus suitable for the lowest charge calculation and a charge calculation apparatus using the charge calculation network.

始点から終点までの料金を計算する一例として、例えば、鉄道等の運賃計算がある。鉄道等の運賃計算は、出発駅と到着駅の情報が与えられた時に、駅間の接続関係を示す路線データと駅間距離データから出発駅と到着駅間の距離を算出した後、距離−運賃換算表データから、算出した距離を運賃に変換して出発駅と到着駅間の運賃を算出する(例えば、特許文献1及び特許文献2)。   As an example of calculating the charge from the start point to the end point, for example, there is a fare calculation for a railway or the like. The fare calculation for railways, etc. is calculated by calculating the distance between the departure station and the arrival station from the route data indicating the connection relationship between the stations and the inter-station distance data when the information of the departure station and the arrival station is given. From the fare conversion table data, the calculated distance is converted into a fare, and the fare between the departure station and the arrival station is calculated (for example, Patent Document 1 and Patent Document 2).

ところで、鉄道等の運賃計算の場合、与えられた2駅間の運賃計算は、その2駅間の利用可能経路の中で最安運賃の経路を利用するものと仮定して計算しなければならない。このような最安運賃計算方法として、従来、図29に示すような物理ネットワークを用いて最安運賃を計算する方法がある。図29の物理ネットワークは、駅をノード、線路をアークとし、ノードの接続のコストを距離としたネットワークで、この物理ネットワークにおいて、最短経路探索アルゴリズムを用いて最短距離経路を探索し、探索した経路の合計距離を距離−運賃換算表データを用いて運賃に換算して最安運賃を求める。
特開平5−258137号公報 特開2000−11211号公報
By the way, in the case of fare calculation for railways, etc., the fare calculation between two given stations must be calculated assuming that the route with the lowest fare is used among the available routes between the two stations. . As such a cheapest fare calculation method, there is conventionally a method of calculating the cheapest fare using a physical network as shown in FIG. 29 is a network in which a station is a node, a track is an arc, and a node connection cost is a distance. In this physical network, a shortest path search algorithm is used to search for a shortest path. Is converted into a fare using distance-fare conversion table data to obtain the lowest fare.
JP-A-5-258137 JP 2000-11211 A

しかしながら、例えば、出発駅と到着駅が、異なる料金体系(同一距離でも異なる料金が設定されている)の複数の会社を跨いでいるような場合、会社間の乗継に適用される割引制度等により、最短距離経路が最安運賃になる保証がない。このため、図29の物理ネットワークを用いて最安運賃を計算する場合は、2駅間の利用可能な経路を全て求め、全経路の距離を計算した後、計算した距離を運賃に換算し、その中から最安運賃を選択するような計算処理を行う。従って、首都圏のような大規模な鉄道ネットワークでは、探索経路数が膨大となり、しかも、全ての探索経路について、距離計算及び距離から運賃への換算を行う必要があるので、計算量が膨大で最安運賃計算処理に時間がかかるという問題がある。   However, for example, if the departure station and arrival station span multiple companies with different fee systems (different fees are set even for the same distance), a discount system applied to transfer between companies, etc. Therefore, there is no guarantee that the shortest distance route will be the cheapest fare. For this reason, when calculating the lowest fare using the physical network of FIG. 29, all the available routes between the two stations are obtained, the distances of all the routes are calculated, the calculated distances are converted into fare, A calculation process is performed to select the lowest fare from among them. Therefore, in a large-scale railway network such as the Tokyo metropolitan area, the number of search routes is enormous, and the calculation amount is enormous because it is necessary to perform distance calculation and distance-to-fare conversion for all search routes. There is a problem that it takes time to calculate the cheapest fare.

本発明は上記問題点に着目してなされたもので、最安料金計算処理における探索経路数を削減できると共に、計算処理量が少なく計算処理時間を短縮できる料金計算ネットワークを提供することを目的とする。また、この料金計算ネットワークを用いた料金計算装置を提供する。   The present invention has been made paying attention to the above problems, and aims to provide a fee calculation network that can reduce the number of search routes in the cheapest fee calculation processing and can reduce the calculation processing time and the calculation processing time. To do. In addition, a fee calculation apparatus using the fee calculation network is provided.

このため、請求項1に記載の本発明の料金計算ネットワーク生成装置は、異なる料金体系の複数の系の各系毎の料金を定めた料金データと各系間の接続関係を示す接続関係データとを格納するデータ格納部と、前記複数の系の各系内の各点をノードとし、各ノードを必要に応じてアークで直接接続し、前記アークで接続したノード間の接続のコストを前記料金データに基づいた料金としたネットワークデータを生成し、前記各系毎のネットワークデータをそれぞれサブネットワークデータとし、前記接続関係データに基づいて異なるサブネットワークデータのノード間を接続する接続アークデータを生成し、前記サブネットワークデータと接続アークデータを料金計算ネットワークデータとするネットワークデータ生成部とを備えて構成したことを特徴とする。 For this reason, the fee calculation network generation device according to the present invention described in claim 1 includes fee data defining a fee for each system of a plurality of systems having different fee systems, and connection relationship data indicating a connection relationship between the systems. The data storage unit for storing the data , and each point in each system of the plurality of systems as a node, each node is directly connected by an arc as necessary, and the cost of connection between the nodes connected by the arc is the fee Generate network data with charges based on data, use network data for each system as sub-network data, and generate connection arc data for connecting nodes of different sub-network data based on the connection relation data was constructed and a network data generator for the connection arc data and the sub-network data and billing network data And wherein the door.

請求項2のように、前記ネットワークデータ生成部は、前記複数の系の各系内の全てのノードをアークで互いに直接接続し、前記アークで接続したノード間の接続のコストを前記料金データに基づいた料金としたネットワークデータを、前記料金計算ネットワークデータとして生成する構成とした
かかる構成では、アークで接続されるノード間の接続のコストを料金としたので、最短経路探索アルゴリズムを適用して直接最安の料金を算出できるようになり、計算量を軽減できる。
According to a second aspect of the present invention, the network data generation unit directly connects all the nodes in each of the plurality of systems with arcs, and uses the connection cost between the nodes connected with the arcs as the fee data. the network data which was based fees, and configured to generate as the billing network data.
In such a configuration, since the cost of connection between nodes connected by arcs is used as a fee, the cheapest fee can be directly calculated by applying the shortest path search algorithm, and the amount of calculation can be reduced.

請求項3では、前記ネットワークデータ生成部は、前記アークで接続される前記ノード間の接続のコストを料金零とした前記料金計算ネットワークデータを生成する構成とした。 According to claim 3, the pre-kine Tsu network data generation unit, and configured to generate the billing network data costs of connection to the rates zero between the nodes before connection with Kia over click.

かかる構成では、料金体系の異なる系に跨る2点間の最安料金を、最短経路探索アルゴリズムを適用して算出することができるようになる。   In such a configuration, the cheapest price between two points across systems with different charge systems can be calculated by applying the shortest route search algorithm.

請求項4の発明では、前記ネットワークデータ生成部は、前記料金計算ネットワークデータにおける各サブネットワークをそれぞれ1つの上位のノードと見なし、前記接続関係データに基づいて前記上位ノード間を1つの上位のアークで接続し、この上位アークで接続される前記上位ノード間の接続のコストを1とした上位ネットワークデータを生成してネットワークデータの階層化を行い、異なる料金体系の複数の系に跨る始点と終点の情報が入力されたときに、予め定めた料金計算上の禁止条件に基づいて、前記上位ネットワークの始点を含む上位ノードから終点を含む上位ノードまでの上位アークのコスト値が所定コスト値以下で且つ始点から終点への経路において上位ノードが重複しないような接続関係を有する連絡パターンを前記上位ネットワークデータから選択し、前記選択された連絡パターンデータにおける各上位ノードに対応するそれぞれのサブネットワークとこれらサブネットワーク間を接続する接続アークの各データから前記禁止条件を満たす下位ネットワークデータを生成し、この下位ネットワークデータを料金計算ネットワークデータとするようにした。 In the invention of claim 4, the network data generation unit regards each sub-network in the fee calculation network data as one upper node, and sets one upper arc between the upper nodes based on the connection relation data. To create a higher level network data with a connection cost between the higher level nodes connected by this higher level arc as 1, and layer the network data to start and end points across multiple systems with different fee systems When the above information is input, the cost value of the upper arc from the upper node including the start point of the upper network to the upper node including the end point is less than or equal to the predetermined cost value based on a predetermined prohibition condition in charge calculation. In addition, the contact pattern having a connection relationship such that the upper nodes do not overlap in the route from the start point to the end point Subordinate network data is selected, and subnetwork corresponding to each upper node in the selected contact pattern data and subnetwork data connecting the subnetworks are generated from the subnetwork data connecting the subnetworks. The lower network data is used as fee calculation network data.

請求項5では、前記各サブネットワークデータを、前記接続アークで接続されるノードデータとこれらノード間を接続するアークデータのみで構成し、これらサブネットワークデータと前記接続アークデータからなる簡易ネットワークデータを生成し、異なる料金体系の複数の系を跨いだ始点と終点の情報が入力されたときに、前記簡易ネットワークデータに始点と終点の各ノードデータ及び始点と終点のそれぞれに接続する各アークデータを追加して、簡易料金計算ネットワークデータを生成する構成とした。 In Claim 5, each said subnetwork data is comprised only by the node data connected by the said connection arc, and the arc data which connect between these nodes, The simple network data which consists of these subnetwork data and the said connection arc data is comprised. When the information of the starting point and the ending point that are generated and straddles a plurality of systems of different fee systems is inputted, the node data of the starting point and the ending point and the arc data connected to each of the starting point and the ending point are added to the simple network data. In addition, a simple fee calculation network data is generated.

請求項6のように、前記各サブネットワークデータを、前記接続アークで接続されるノードデータとこれらノード間を接続するアークデータのみで構成し、これらサブネットワークデータと前記接続アークデータからなる簡易ネットワークデータを生成し、前記簡易ネットワークデータに異なる料金体系の複数の系を跨いだ始点と終点の各ノードデータ及び始点と終点のそれぞれに接続する各アークデータを追加した簡易料金計算ネットワークデータを、前記始点と終点の全ての組合せ分予め生成しておき、前記始点と終点の情報が入力されたときに、当該入力情報に対応した簡易料金計算ネットワークデータを選択する構成としてもよい。
かかる構成では、終点までたどり着けない分岐を削除するため、不要な分岐の探索をしなくなる。
The simple network comprising the sub-network data and the connection arc data, wherein each sub-network data includes only node data connected by the connection arc and arc data connecting the nodes. Generating simple data, and adding simple arc calculation network data in which each arc data connected to each of the start point and end point of each node data and start point and end point across a plurality of systems of different charge systems is added to the simple network data, A configuration may be adopted in which all combinations of the start point and the end point are generated in advance, and when the information on the start point and the end point is input, the simple fee calculation network data corresponding to the input information is selected.
In such a configuration, since a branch that cannot be reached to the end point is deleted, an unnecessary branch is not searched.

請求項7の発明では、前記料金計算ネットワークデータは、各サブネットワークの各ノード毎にダミーノードを追加したノードデータと、各サブネットワーク内のノード間を接続する前記アークの接続元又は接続先のどちらか一方端をダミーノードとしたアークデータとで構成したサブネットワークデータを有すると共に、前記アークの接続元をダミーノードとしたとき、異なるサブネットワークのノード間を接続する前記接続アークの接続先をダミーノードとする接続アークデータを有し、前記アークの接続先をダミーノードとしたとき、異なるサブネットワークのノード間を接続する前記接続アークの接続元をダミーノードとする接続アークデータを有する構成とした。
かかる構成では、接続関係のない系間を跨いだ2点間の料金計算の防止、途中下車経路の防止ができるようになる。
In the invention of claim 7, the charge calculation network data includes node data obtained by adding a dummy node for each node of each subnetwork, and a connection source or a connection destination of the arc connecting the nodes in each subnetwork. It has sub-network data composed of arc data with one end as a dummy node, and when the arc connection source is a dummy node, the connection destination of the connection arc that connects nodes in different sub-networks A connection arc data having a dummy node, and a connection arc data having a connection source of the connection arc connecting the nodes of different sub-networks as a dummy node when the connection destination of the arc is a dummy node; did.
With such a configuration, it is possible to prevent the calculation of a toll between two points straddling between unconnected systems, and to prevent a stopover route on the way.

請求項8の発明では、前記料金計算ネットワークデータは、異なる各サブネットワーク間の料金割引のある所定の2点間を直接接続する割引経路を示す割引アークデータを有し、予め定めた前記所定の2点間の料金割引データに基づいて、前記割引アークで接続されるノード間の接続のコストを割引後の料金とする構成とした。
かかる構成では、料金体系の異なる系間の料金割引のある2点間の料金計算を容易に行えるようになる。
In the invention of claim 8, the charge calculation network data includes discount arc data indicating a discount path that directly connects two predetermined points with charge discounts between different sub-networks, and the predetermined predetermined data Based on fee discount data between two points, the connection cost between nodes connected by the discount arc is set as a discounted fee.
With such a configuration, it becomes possible to easily calculate a charge between two points with a charge discount between systems having different charge systems.

請求項9に記載の本発明の料金計算装置は、始点と終点の情報を入力する入力部と、請求項1〜8のいずれか1つに記載の料金計算ネットワーク生成装置で生成した料金計算ネットワークデータを格納するネットワークデータ格納部と、始点と終点の情報が入力されたときに、前記ネットワークデータ格納部の料金計算ネットワークデータに基づいて料金計算ネットワークを構築し、前記料金計算ネットワークの前記始点から終点までの最安料金を算出する最安料金算出部と、算出した前記最安料金結果を出力する出力部とを備えて構成したことを特徴とする。 The fee calculation apparatus according to the present invention described in claim 9 is an input unit for inputting information of a start point and an end point, and a fee calculation network generated by the charge calculation network generation device according to any one of claims 1 to 8. a network data storage for storing data, when the information of the start point and the end point is inputted, to construct a billing network based on billing network data of the network data storage unit, from the start of the billing network It is characterized by comprising a cheapest price calculation unit for calculating the lowest price to the end point and an output unit for outputting the calculated lowest price result.

かかる構成では、入力部から始点と終点の情報が入力されると、最安料金算出部が、ネットワークデータ格納部に格納された料金計算ネットワークデータに基づいて料金計算ネットワークを構築し、料金計算ネットワークの始点から終点までの最安料金を算出し、出力部から算出した最安料金結果を出力するようにする。   In such a configuration, when the information of the start point and the end point is input from the input unit, the cheapest charge calculation unit constructs a charge calculation network based on the charge calculation network data stored in the network data storage unit, and the charge calculation network The lowest price from the start point to the end point is calculated, and the lowest price result calculated from the output unit is output.

請求項10のように、前記料金計算ネットワークデータが、請求項1〜7のいずれか1つに記載の料金計算ネットワーク生成装置で生成されたデータであるとき、前記最安料金算出部は、前記料金計算ネットワークにおける前記始点から終点までのアークのコストが最小となる経路を探索する最小コスト探索部と、料金割引を適用する経路とその割引額を示す料金割引データに基づいて、前記始点から終点までの経路に適用される割引額の最大値を算出する最大割引額算出部と、前記最小コスト探索部で探索された最小コストの料金に前記最大割引額算出部で算出した最大割引額を加算して探索閾値を設定する探索閾値設定部と、前記料金計算ネットワークに基づいて、アークのコストが前記探索閾値以下となる全ての経路を探索し、各経路の料金を算出する第1の料金算出部と、前記料金割引データに基づいて、探索された経路に割引が適用される経路があるときに、前記第1の料金算出部で算出したその経路の割引適用前料金からその経路に適用される割引額を減算して割引適用後の料金を算出する第2の料金算出部と、前記第1の料金算出部で算出した料金及び前記第2の料金算出部で算出した料金の中で最安の料金を選択する最安料金選択部と、を備える構成である。   As in claim 10, when the charge calculation network data is data generated by the charge calculation network generation device according to any one of claims 1 to 7, the cheapest charge calculation unit, Based on the minimum cost search unit that searches for a route that minimizes the cost of the arc from the start point to the end point in the fee calculation network, and the fee discount data that indicates the route to which the charge discount is applied and the discount amount, and the end point A maximum discount amount calculation unit that calculates the maximum value of the discount amount applied to the route up to and including the maximum discount amount calculated by the maximum discount amount calculation unit to the minimum cost fee searched by the minimum cost search unit Based on the search threshold setting unit for setting a search threshold and the fee calculation network, all routes where the cost of the arc is equal to or less than the search threshold are searched, and each route When there is a route to which a discount is applied to the searched route based on the fee discount data, a discount for the route calculated by the first fee calculation unit when a fee is calculated based on the fee discount data A second fee calculation unit that calculates a fee after applying the discount by subtracting the discount amount applied to the route from the pre-application fee, the fee calculated by the first fee calculation unit, and the second fee calculation And a cheapest charge selection unit that selects the lowest charge among the charges calculated by the department.

また、請求項11のように、前記料金計算ネットワークデータが、請求項8に記載の料金計算ネットワーク生成装置で生成されたデータであるとき、前記最安料金算出部は、前記料金計算ネットワークにおける前記始点から終点までのアークのコストが最小となる経路を探索する最小コスト探索部を備え、この最小コスト探索部で探索された経路のコストを最安料金とする構成である。   Further, as in claim 11, when the charge calculation network data is data generated by the charge calculation network generation device according to claim 8, the cheapest charge calculation unit includes the charge calculation network in the charge calculation network. A minimum cost search unit that searches for a route that minimizes the cost of the arc from the start point to the end point is provided, and the cost of the route searched by the minimum cost search unit is the lowest price.

請求項12のように、前記料金を、鉄道運賃とすれば、複雑な鉄道ネットワークの運賃を効率よく短時間で計算できるようになる。   If the charge is a railway fare as in claim 12, the fare of a complicated railway network can be calculated efficiently and in a short time.

本発明によれば、料金体系の異なる複数の系間を跨いだ2点間の料金計算を、最短経路探索アルゴリズムを適用して少ない計算処理量で効率良く短時間で算出することができる料金計算ネットワークを提供することが可能となり、この料金計算ネットワークを使用することにより、例えば、複雑な鉄道運賃等の料金を容易に短時間で計算することが可能になる。 According to the present invention, a fee calculation that can efficiently calculate a fee calculation between two points across a plurality of systems having different fee structures by applying a shortest route search algorithm efficiently and in a short time with a small amount of calculation processing. It becomes possible to provide a network. By using this fee calculation network, for example, it is possible to easily calculate a fee such as a complicated railway fare in a short time.

以下、本発明の実施形態を図面に基づいて説明する。尚、以下の各実施形態では、鉄道の運賃計算に適用した場合を例に説明する。
図1は、本発明に係る料金計算装置の第1実施形態の構成を示すブロック図である。
図1において、本実施形態の料金計算装置1は、一鉄道会社の料金体系の系に属する始点になる出発駅(以下、発駅とする)と終点になる到着駅(以下、着駅とする)間は勿論、料金体系の異なる複数の系に跨った発駅と着駅間の最安運賃を計算するものである。また、料金計算装置1は、後述するように料金計算用のネットワークデータ生成機能を備えており、料金計算ネットワーク生成装置を兼ねる。ここで、料金体系とは各鉄道会社毎に設定されている運賃計算の規則であり、各鉄道会社はそれぞれの料金体系を持っているものとする。尚、本発明では、仮に、各鉄道会社が同一の料金体系を持っていたとしても、会社が異なるためそれぞれ別の料金体系として扱うものであり、また、同一の鉄道会社が2以上の料金体系を持っている場合にもそれぞれ別の料金体系として扱うものである。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiments, a case where the present invention is applied to railway fare calculation will be described as an example.
FIG. 1 is a block diagram showing a configuration of a first embodiment of a fee calculation apparatus according to the present invention.
In FIG. 1, a fee calculation apparatus 1 according to the present embodiment includes a departure station (hereinafter referred to as a departure station) and an arrival station (hereinafter referred to as a destination station) belonging to a railway company's fee system. Of course, the lowest fare is calculated between the departure station and arrival station across multiple systems with different fee systems. Further, the fee calculation device 1 has a network data generation function for fee calculation as will be described later, and also serves as a fee calculation network generation device. Here, the fare system is a fare calculation rule set for each railway company, and each railway company has its own fare system. In the present invention, even if each railway company has the same charge system, it is handled as a different charge system because each company is different, and the same railway company has two or more charge systems. Even if you have a credit card, it is handled as a separate fee structure.

前記料金計算装置1は、入力部2と、データストレージ装置3と、ネットワークデータ生成部4と、最小コスト探索部5と、探索閾値設定部6と、最安運賃算出部7と、出力部8と、記憶装置とを備えて構成される。ここで、料金計算装置1は、例えばコンピュータで構成され、前記ネットワークデータ生成部4、最小コスト探索部5、探索閾値設定部6及び最安運賃算出部7の機能はソフトウエア的に備えられるものである。 The fee calculation device 1 includes an input unit 2, a data storage device 3, a network data generation unit 4, a minimum cost search unit 5, a search threshold setting unit 6, a cheapest fare calculation unit 7, and an output unit 8. And a storage device 9 . Here, the fee calculation device 1 is constituted by a computer, for example, and the functions of the network data generation unit 4, the minimum cost search unit 5, the search threshold setting unit 6 and the cheapest fare calculation unit 7 are provided as software. It is.

前記入力部2は、始点となる発駅と終点となる着駅の各データ等を入力するものである。
前記データストレージ装置3は、各社別運賃三角表データ、各社間の乗継関係データ及び乗継割引表データ等を予め格納しておくもので、データ格納部に相当する。前記運賃三角表データは、図2に示すように同一会社内の2駅間の運賃を定めたもので料金データに相当する。前記乗継関係データは、会社毎の別会社への乗継可能な駅データとその接続関係を定めたものである。前記乗継割引表データは、図3に示すような料金体系の異なる複数の会社間の乗継割引を適用する経路とその割引額を定めたデータであり、料金割引データに相当する。
The input unit 2 is for inputting data of a departure station as a starting point and a destination station as an end point.
The data storage device 3 stores in advance fare triangle table data for each company, transit relationship data between the companies, transit discount table data, and the like, and corresponds to a data storage unit. The fare triangular table data defines the fare between two stations in the same company as shown in FIG. 2, and corresponds to fare data. The connection relation data defines station data that can be transferred to another company for each company and its connection relation. The transit discount table data is data that defines a route for applying transit discount between a plurality of companies having different fee systems as shown in FIG. 3 and the discount amount, and corresponds to fee discount data.

前記ネットワークデータ生成部4は、データストレージ装置3内に格納されたデータに基づいて図5に示すような料金ネットワークを構築するネットワークデータを生成するもので、サブネットワークデータ生成部4Aと接続アークデータ生成部4Bを備える。前記サブネットワーク生成部4Aは、同一体系内の各駅をノードとし、全てのノードをアークで互いに直接接続し、アークで接続したノード間の接続の重み付けを図3の運賃三角表データに基づいた料金とする図5に示すサブネットワークN1〜N3構築用のサブネットワークデータを、料金体系毎に生成する。尚、ノードまたはアークのどちらかに重み付けされていれば、アークで接続したノード間の接続の重み付け(以下、コストとする)がなされているものとする。前記接続アークデータ生成部4Bは、前記乗継関係データに基づいて料金体系の異なる会社間の連絡駅に対応するノード間を接続する図5の点線で示す接続アークを生成し、接続アークで接続されるノード間の接続のコストを料金零に設定する。尚、同一料金体系内のノード間を接続するアークデータ及び異なる料金体系間を接続する接続アークデータは、一方のノードから他方のノードへ、他方のノードから一方のノードへ、それぞれ向かう2本のアークデータからなっているが、図5では図を簡略にするために1本線で示してある。   The network data generation unit 4 generates network data for constructing a fee network as shown in FIG. 5 based on the data stored in the data storage device 3, and is connected to the sub network data generation unit 4A and the connection arc data. A generation unit 4B is provided. The sub-network generation unit 4A uses each station in the same system as a node, connects all nodes directly to each other by arcs, and weights the connections between the nodes connected by arcs based on the fare triangle table data in FIG. Subnetwork data for constructing the subnetworks N1 to N3 shown in FIG. 5 is generated for each fee system. In addition, if weighting is given to either a node or an arc, it is assumed that the connection between nodes connected by the arc is weighted (hereinafter referred to as cost). The connection arc data generation unit 4B generates a connection arc indicated by a dotted line in FIG. 5 that connects between nodes corresponding to contact stations between companies with different charge systems based on the connection relation data, and connects with the connection arc. Set the cost of connection between the nodes to be zero to zero. Note that the arc data that connects nodes within the same fee structure and the connection arc data that connects between different fee structures are the two that go from one node to the other, and from the other node to one node. Although it consists of arc data, in FIG. 5 it is shown by a single line for the sake of simplicity.

前記最小コスト探索部5は、前記サブネットワークデータと接続アークデータから構築される料金ネットワークを用い、例えばダイクストラ法等の最短経路探索アルゴリズムによって、入力部2から入力された発駅と着駅間でコストが最小となる経路を探索する。この最小コスト探索部5で探索する経路の運賃は、後述する乗継割引を考慮したものでなく、乗継割引適用前の運賃である。   The minimum cost search unit 5 uses a toll network constructed from the sub-network data and connection arc data, for example, between a departure station and a destination station input from the input unit 2 by a shortest route search algorithm such as Dijkstra method. Search for the route with the lowest cost. The fare of the route searched by the minimum cost search unit 5 does not take into account the transfer discount described later, but is the fare before the connection discount is applied.

前記探索閾値設定部6は、入力された発駅と着駅間に乗継割引が適用される経路が存在する可能性がある場合に、図3の乗継割引表データに基づいて後述する図6のフローチャートで説明するように、発駅−着駅間の経路に適用される割引額の最大値を算出し、この最大割引額と最小コスト探索部5で探索した最小コストの経路の運賃を合算して、発駅と着駅間の最安運賃の算出に必要な探索閾値を設定する。ここで、探索閾値設定部6は、最大割引額算出部の機能を備えるものである。   The search threshold setting unit 6 is a diagram to be described later based on the connection discount table data in FIG. 3 when there is a possibility that a route to which the connection discount is applied exists between the input departure station and the arrival station. 6, the maximum discount amount applied to the route between the departure station and the arrival station is calculated, and the maximum discount amount and the fare of the route with the minimum cost searched by the minimum cost search unit 5 are calculated. In total, the search threshold necessary for calculating the lowest fare between the departure station and the arrival station is set. Here, the search threshold value setting unit 6 has a function of a maximum discount amount calculation unit.

前記最安運賃算出部7は、後述する図6のフローチャートで説明するように、料金ネットワークを利用して探索閾値設定部6で設定した探索閾値以下の運賃となる全ての経路を探索し、探索経路の中に乗継割引適用経路があればその経路の割引後の運賃を求めた後、全ての探索経路中の最も安い運賃を選択し、その運賃を最安運賃として算出するもので、最安料金算出部に相当する。ここで、最安運賃算出部7は、第1の料金算出部、第2の料金算出部及び最安料金選択部の機能を備えるものである。 As described in the flowchart of FIG. 6 to be described later, the cheapest fare calculation unit 7 searches for all routes that have a fare less than or equal to the search threshold set by the search threshold setting unit 6 using a fee network. after the fare after the discount of the route it was determined if there is a transfer discount route in the route, select the cheapest fare in all of the search path, and calculates the fare as the lowest fare, the most Corresponds to the low price calculation unit . Here, the cheapest fare calculator 7 has functions of a first charge calculator, a second charge calculator, and a cheapest charge selector.

前記出力部8は、最安運賃算出部7で算出された結果を最安運賃データとして出力する。
前記記憶装置は、ネットワークデータ生成部4で生成された料金ネットワークデータを料金計算ネットワークデータとして格納すると共に、最安運賃算出処理過程において必要とされる各種データを一時的に格納しておくもので、ネットワークデータ格納部に相当する
The output unit 8 outputs the result calculated by the lowest fare calculation unit 7 as the lowest fare data.
The storage device 9 stores the fee network data generated by the network data generating unit 4 as billing network data, which stores the various data required in the lowest fare calculation process temporarily This corresponds to a network data storage unit .

次に、料金計算装置1による料金ネットワークデータの生成及び最安運賃算出の各動作について説明する。
図4は、料金ネットワークデータの生成のフローチャートである。
ステップ1(図中S1で示し、以下同様とする)で、ネットワークデータ生成部4はデータストレージ装置3から各社別運賃三角表データ、乗継関係データを読込む。
ステップ2で、サブネットワークデータ生成部4Aにより、各社の運賃三角表データから異なる料金体系毎のサブネットワークデータを生成する。
ステップ3で、接続アークデータ生成部4Bにより、乗継関係データから異なる料金体系のサブネットワーク間を接続する接続アークデータを生成する。
ステップ4で、生成した異なる料金体系毎のサブネットワークデータ及び接続アークデータからなる料金ネットワークデータを、料金計算ネットワークデータとして記憶装置9に格納する。
Next, each operation | movement of the production | generation of fee network data by the fee calculation apparatus 1 and calculation of the cheapest fare is demonstrated.
FIG. 4 is a flowchart for generating fee network data.
In step 1 (indicated by S1 in the figure, the same shall apply hereinafter), the network data generation unit 4 reads the fare triangle table data for each company and the transit relation data from the data storage device 3.
In step 2, the sub-network data generation unit 4A generates sub-network data for each different fee structure from the fare triangle table data of each company.
In step 3, the connection arc data generation unit 4B generates connection arc data for connecting sub-networks of different charge systems from the connection relation data.
In step 4, the generated fee network data including the sub-network data and connection arc data for each different fee structure is stored in the storage device 9 as fee calculation network data.

かかる料金ネットワークデータを用いて、図5に示すような、同一体系内の各駅をノード(図中のa〜f、g〜l、m〜r)とし、全てのノードをアーク(図中の実線)で互いに直接接続しノード間の接続のコストを料金とした異なる料金体系1〜3毎のサブネットワークN1〜N3と、サブネットワークN1〜N3のノード間(図5では、dとg、dとm、kとo)を接続する接続アーク(図中の点線)からなる料金ネットワークを構築する。   Using such fee network data, each station in the same system as shown in FIG. 5 is set as a node (af, gl, mr in the figure), and all nodes are arcs (solid lines in the figure). ) Between the sub-networks N1 to N3 for each of the different fee systems 1 to 3 that are directly connected to each other and charge the connection cost between the nodes, and between the nodes of the sub-networks N1 to N3 (in FIG. 5, d, g, and d A fee network consisting of connection arcs (dotted lines in the figure) connecting m, k and o) is constructed.

図6は、生成した料金ネットワークによる最安運賃算出を示すフローチャートである。ここでは、発駅と着駅が料金体系の異なる会社に跨る場合について説明する。この場合、入力された発駅と着駅間に乗継割引が適用される経路が存在すれば、最小コスト探索部5で探索される最安運賃が最安になるとは限らない。
ステップ11で、入力部2から発着駅データが入力されるまで待機し、入力されるとステップ12に進む。
ステップ12で、最小コスト探索部5が、記憶装置9から料金ネットワークデータを読込み、図5の料金ネットワークにおいて最短経路探索アルゴリズムを用いて発駅−着駅間の乗継割引適用前の最安運賃を求め、例えば記憶装置9に格納しておく。
ステップ13で、探索閾値設定部6が、データストレージ装置3から乗継割引表データを読込み、発駅−着駅間での最大割引額を求め、例えば記憶装置9に格納しておく。
FIG. 6 is a flowchart showing calculation of the lowest fare by the generated fee network. Here, a case will be described in which the departure station and the arrival station span different companies. In this case, if there is a route to which the transit discount is applied between the input departure station and the arrival station, the lowest fare searched by the minimum cost search unit 5 is not necessarily the lowest.
In step 11, the process waits until the arrival / departure station data is input from the input unit 2.
In step 12, the minimum cost search unit 5 reads the charge network data from the storage device 9, and uses the shortest route search algorithm in the charge network of FIG. And stored in the storage device 9, for example.
In step 13, the search threshold setting unit 6 reads the transfer discount table data from the data storage device 3, obtains the maximum discount amount between the departure station and the arrival station, and stores it in the storage device 9, for example.

最大割引額の算出手法について図7を参照して説明する。尚、図7では、異なる料金体系の系が4つで、且つ、3料金体系間割引まで設定されている場合で説明する。
図7において、ノードcからノードuへ向かう経路を例として説明する。ここで求める最大割引額は料金体系間の最大割引額である。例えば、cからuへ向かう全ての経路で可能性のある料金体系間割引の組合せは以下の(a)〜(e)ようになる。
(a)2料金体系間割引1回(料金体系1,2間、料金体系2,3間、料金体系3,4間のいずれか1つ)
(b)2料金体系間割引2回(前記3つの料金体系間の中の2つを組合せ)
(c)2料金体系間割引3回(前記3つの料金体系間の全て)
(d)3料金体系間割引1回(料金体系1〜3間又は料金体系2〜4間のいずれか1つ)
(e)3料金体系間割引1回+2料金体系間割引1回(料金体系1〜3間と料金体系3,4間、又は、料金体系1,2間と料金体系2〜4間のいずれか1つ)
A method for calculating the maximum discount amount will be described with reference to FIG. In FIG. 7, a case where there are four systems with different fee systems and up to a discount between three fee systems will be described.
In FIG. 7, a route from the node c to the node u will be described as an example. The maximum discount amount obtained here is the maximum discount amount between fee systems. For example, possible combinations of discounts between fee systems on all routes from c to u are as follows (a) to (e).
(A) One discount between two fee structures (between fee structures 1, 2; one between fee structures 2, 3; one between fee structures 3, 4)
(B) Two discounts between two fee systems (combination of two of the above three fee systems)
(C) 3 discounts between 2 fee systems (all between the above 3 fee systems)
(D) One discount between three fee systems (one between fee systems 1 to 3 or between fee systems 2 to 4)
(E) One discount between three fee systems + one discount between two fee systems (between fee systems 1 to 3 and between fee systems 3 and 4, or between fee systems 1 and 2 and between fee systems 2 to 4 One)

各料金体系間の最大割引額は、データストレージ装置3に格納された乗継関係データの料金体系間の最大割引額から求めることができる。
例えば、2料金体系間最大割引額が20円、3料金体系間最大割引額が30円であれば、(a)は20円、(b)は40円、(c)は60円、(d)30円、(e)は50円となり、最大割引額は60円と定めることができる。図7の料金計算ネットワークにおいて、例えば実線で示すような経路(c→d→g→i→k→o→r→m→v→u)が考えられる。尚、この経路に限らない。
この最大割引額の算出は、下記の数1の(1)式から算出できる。
The maximum discount amount between the respective fee systems can be obtained from the maximum discount amount between the fee systems of the transit relation data stored in the data storage device 3.
For example, if the maximum discount between two fee systems is 20 yen, and the maximum discount between three fee systems is 30 yen, (a) is 20 yen, (b) is 40 yen, (c) is 60 yen, (d ) 30 yen, (e) will be 50 yen, and the maximum discount can be set at 60 yen. In the fee calculation network of FIG. 7, for example, a route (c → d → g → i → k → o → r → m → v → u) as shown by a solid line is conceivable. The route is not limited to this.
This maximum discount amount can be calculated from the following equation (1).

Figure 0005213403
Figure 0005213403

ここで、diはi料金体系間最大割引額、xiはi料金体系間割引回数、Nは利用する料金体系の最大数を表す。また、i料金体系間の割引適用回数の制約条件を数1の(2)式のように定める。
尚、料金ネットワークにおける最大割引額は、各料金体系間の最大割引額の変更や割引が適用される料金体系の最大数が変わらなければ変わらないので、予め求めてデータとして格納しておくとよい。
図7の説明では、料金体系の系が4つで、且つ、3料金体系間割引まで設定されている場合であったが、本発明ではこれに限らず系の数がいくつでもよく、また、料金体系間割引も2料金体系間割引、3料金体系間割引に限られることはない。
Here, d i represents the maximum discount amount between i fee systems, x i represents the number of discounts between i fee systems, and N represents the maximum number of fee systems to be used. Further, a constraint condition for the number of discounts applied between i fee systems is defined as shown in Equation (2).
The maximum discount amount in the fee network does not change unless the maximum discount amount changes between the fee systems or the maximum number of fee systems to which the discount is applied. .
In the description of FIG. 7, there is a case where there are four fee systems and up to a discount between three fee systems, but the present invention is not limited to this, and the number of systems may be any number. Discounts between fee systems are not limited to discounts between two fee systems and discounts between three fee systems.

ステップ14で、ステップ12,13でそれぞれ求めた最安運賃と最大割引額とから、探索閾値=適用前最安運賃+最大割引額として設定する。即ち、最大割引額を適用した場合に適用前最安運賃以下となる運賃の上限値として探索閾値を設定し、この探索閾値以下の乗継割引適用前の運賃経路だけを探索するようにしている。これにより、最安運賃を求める際に、探索閾値を超える運賃経路を探索する必要がなくなり、探索経路数を大幅に削減できる。この探索閾値を、例えば記憶装置9に格納しておく。
ステップ15で、料金ネットワークにより探索閾値以下となる割引適用前運賃の全ての経路及び探索された全ての経路で割引が適用される経路の探索を行う。
ステップ16で、乗継割引表データに基づいてステップ15で探索した各割引適用経路の乗継割引額を算出し、例えば記憶装置9に格納しておく。
ステップ17で、ステップ15で求めた各割引適用経路の乗継割引適用前運賃からステップ16で求めた乗継割引額を減算し、割引適用経路の乗継割引後の運賃を算出する。
ステップ18で、全ての乗継割引適用経路について割引後の運賃算出が終了したか否かを判定し、判定がYESであれば、ステップ19に進む。
ステップ19で、ステップ12で求めた最安運賃とステップ17で算出した全ての割引適用経路の各運賃の中で最も安いものを最安運賃として出力部8を介して出力する。
In step 14, the search threshold = the lowest fare before application + the maximum discount amount is set from the lowest fare and the maximum discount amount obtained in steps 12 and 13, respectively. That is, when a maximum discount amount is applied, a search threshold is set as an upper limit value of a fare that is less than or equal to the lowest fare before application, and only a fare route before applying a transit discount that is less than or equal to the search threshold is searched. . This eliminates the need to search for a fare route exceeding the search threshold when obtaining the lowest fare, and the number of searched routes can be greatly reduced. This search threshold value is stored in the storage device 9, for example.
In step 15, a search is performed for all routes of the pre-discount fare that are below the search threshold by the toll network and routes to which the discount is applied in all the searched routes.
In step 16, the connection discount amount of each discount application route searched in step 15 is calculated based on the connection discount table data, and stored in the storage device 9, for example.
In step 17, the fare before connection discount application for each discount application route obtained in step 15 is subtracted from the connection discount amount obtained in step 16 to calculate the fare after the connection discount on the discount application route.
In step 18, it is determined whether or not the discounted fare calculation has been completed for all connection discount application routes. If the determination is YES, the process proceeds to step 19.
In step 19, the cheapest one of the lowest fares calculated in step 12 and all fares of all discount application routes calculated in step 17 is output as the lowest fares via the output unit 8.

かかる第1実施形態の料金ネットワークを用いれば、ノード間を直接アークで接続し、ノード間の計算のコストを料金としたので、従来の物理的ネットワークを用いる場合に比べて、距離から運賃への変換処理を行わずに済む。また、異なる料金体系間を発駅と着駅が跨る場合でも、各料金体系で算出した運賃の足し算で運賃を求めることができ、最短経路探索問題としてダイクストラ法等の最短経路探索アルゴリズムを用いて計算できる。従って、特に発駅と着駅が異なる料金体系間を跨る場合に、探索経路数及び計算量を大幅に削減でき、最安運賃を極めて短時間で算出できるようになる。   By using the fee network of the first embodiment, the nodes are directly connected by arcs, and the calculation cost between the nodes is the fee. Therefore, compared to the case of using the conventional physical network, the distance to the fare is reduced. There is no need to perform conversion processing. In addition, even when the departure and arrival stations cross between different fee systems, the fare can be obtained by adding the fare calculated by each fee system, and using the shortest route search algorithm such as Dijkstra method as the shortest route search problem Can be calculated. Therefore, especially when the departure station and the arrival station cross between different fee systems, the number of search routes and the amount of calculation can be greatly reduced, and the lowest fare can be calculated in a very short time.

次に、本発明の第2実施形態について説明する。
本実施形態は、異なる料金体系を跨いだ発駅−着駅間の最安運賃計算を第1実施形態よりも更に高速に行うことを可能としたネットワークである。
図8は、本発明に係る料金計算装置の第2実施形態の構成を示すブロック図である。尚、第1実施形態と同一要素には同一符号を付して説明を省略する。
図8において、本実施形態の料金計算装置10は、第1実施形態の料金計算装置1に、簡易ネットワークデータ生成部11を付加して構成される。
前記簡易ネットワークデータ生成部11は、ネットワークデータ生成部4で生成された料金ネットワークデータのサブネットワークデータから、前記接続アークで接続されるノード以外のノードを取除き、接続アークで接続されるノードデータとこれらノード間を接続するアークデータのみで構成されるサブネットワークデータと、これらサブネットワークデータと接続アークデータからなる簡易なネットワークデータ(簡易ネットワークデータ)を生成して記憶装置9に格納する。
尚、ネットワークデータ生成部4で生成された料金ネットワークデータのサブネットワークデータから、前記接続アークで接続されるノード以外のノードを取除く代わりに、前記簡易ネットワークデータ生成部11において、最初から図10に示すような接続アークで接続されるノードデータ及びノード間を接続するアークからなるサブネットワークデータと接続アークデータからなるネットワークデータ(簡易ネットワークデータ)を生成して記憶装置9に格納してもよい。
Next, a second embodiment of the present invention will be described.
The present embodiment is a network that enables the cheapest fare calculation between the departure station and the arrival station across different fee systems to be performed at a higher speed than in the first embodiment.
FIG. 8 is a block diagram showing the configuration of the second embodiment of the fee calculation 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. 8, the fee calculation apparatus 10 of the present embodiment is configured by adding a simple network data generation unit 11 to the fee calculation apparatus 1 of the first embodiment.
The simple network data generation unit 11 removes nodes other than the nodes connected by the connection arc from the subnetwork data of the fee network data generated by the network data generation unit 4, and node data connected by the connection arc And sub-network data composed only of arc data connecting these nodes, and simple network data (simple network data) composed of these sub-network data and connection arc data are generated and stored in the storage device 9.
Instead of removing nodes other than the nodes connected by the connection arc from the subnetwork data of the fee network data generated by the network data generation unit 4, the simple network data generation unit 11 starts from FIG. The network data (simple network data) consisting of the sub-network data consisting of the node data connected by the connection arc and the arc connecting the nodes and the connection arc data as shown in FIG. .

次に、料金計算装置10による簡易ネットワークデータの生成及び最安運賃算出の各動作について説明する。
図9は、簡易ネットワークデータの生成のフローチャートである。
ステップ21で、ネットワークデータ生成部4により第1実施例と同様のサブネットワークデータと接続アークデータからなる第1実施形態で説明した料金ネットワークデータを生成し、記憶装置9に格納する。この料金ネットワークデータの生成手順は、第1実施形態の図4のフローチャートのようにして生成する。
ステップ22で、簡易ネットワークデータ生成部11が記憶装置9から料金ネットワークデータを読込む。
ステップ23で、簡易ネットワークデータ生成部11は、読込んだデータに基づいて、接続アークで接続されるノード及びこれらノード間を接続するアークのみのサブネットワークデータと、サブネットワーク間のノードを接続する接続アークで構成される簡易ネットワークデータを生成する(第1の方法)。
ステップ24で、ステップ23で生成した簡易ネットワークデータを記憶装置9に格納する。
尚、ステップ23で生成した簡易ネットワークデータにおいて、料金体系の異なるサブネットワーク間を跨いだ発駅と着駅の全ての組合せに対応した各ネットワークデータを予め生成しておき、ステップ24で、実際に料金計算を行うための後述する実行簡易ネットワークデータとして各ネットワークデータを記憶装置9に格納しておいてもよい(第2の方法)。
Next, each operation | movement of the production | generation of the simple network data by the fee calculation apparatus 10 and calculation of the cheapest fare is demonstrated.
FIG. 9 is a flowchart of generation of simple network data.
In step 21, the network data generation unit 4 generates the fee network data described in the first embodiment, which includes the same subnetwork data and connection arc data as in the first embodiment, and stores them in the storage device 9. The fee network data generation procedure is generated as shown in the flowchart of FIG. 4 of the first embodiment.
In step 22, the simple network data generation unit 11 reads the fee network data from the storage device 9.
In step 23, the simple network data generation unit 11 connects the nodes connected by connection arcs and the arc-only subnetwork data connecting these nodes and the nodes between the subnetworks based on the read data. Simple network data composed of connection arcs is generated (first method).
In step 24, the simple network data generated in step 23 is stored in the storage device 9.
In addition, in the simple network data generated in step 23, each network data corresponding to all combinations of the departure station and the arrival station across the sub-networks having different charge systems is generated in advance. Each network data may be stored in the storage device 9 as the execution simple network data to be described later for performing the charge calculation (second method).

図10は、図5の料金ネットワークデータに基づいて生成した簡易ネットワークデータによる簡易ネットワークの例を示す。   FIG. 10 shows an example of a simple network using simple network data generated based on the fee network data of FIG.

図11は、簡易ネットワークを利用して最安運賃算出を示すフローチャートである。
ステップ31で、入力部2から発着駅データが入力されるまで待機し、入力されるとステップ32に進む。
ステップ32で、簡易ネットワークを用いて実際に運賃計算を行うための簡易料金計算ネットワークデータとして実行簡易ネットワークデータを生成する。具体的には、簡易ネットワークデータ生成部11において、接続アークで接続されるノードとこれらノード間を接続するアークのみで構成したサブネットワークデータと、サブネットワーク間のノードを接続する接続アークとで構成される簡易ネットワークデータが格納されている場合(前記第1の方法)、入力された発駅及び着駅データ(例えば後述する発駅のノードa、着駅のノードrのデータ)と前記発駅と着駅のそれぞれに接続する各アークデータである料金アークデータ(例えば後述するノードa−d間、ノードm−r間、ノードo−r間のデータ)を追加し、これを料金計算用の実行簡易ネットワークデータ(図9には図示せず)として生成して記憶装置9に一時格納する。
また、記憶装置9内に予め発駅と着駅の全ての組合せに対する実行簡易ネットワークデータが格納されている場合(第2の方法)、入力された発駅及び着駅データ(例えば後述する発駅のノードa、着駅のノードrのデータ)に対応する実行簡易ネットワークデータ(図9には図示せず)を選択して記憶装置9の別の場所に一時格納する。
FIG. 11 is a flowchart showing calculation of the lowest fare using a simple network.
In step 31, the system waits until the arrival / departure station data is input from the input unit 2.
In step 32, execution simple network data is generated as simple charge calculation network data for actually performing the fare calculation using the simple network. Specifically, in the simple network data generation unit 11, it is composed of subnetwork data composed only of nodes connected by connection arcs, arcs connecting these nodes, and connection arcs connecting nodes between subnetworks. When the simplified network data to be stored is stored (the first method), the input departure station and arrival station data (for example, data of the node a of the departure station and the node r of the arrival station described later) and the departure station Charge arc data (for example, data between nodes a and d, between nodes m and r, and between nodes or), which will be described later, is added for each of the arc data connected to each of the destination stations. It is generated as execution simple network data (not shown in FIG. 9) and temporarily stored in the storage device 9.
Further, when the execution simple network data for all combinations of the departure station and the arrival station is stored in the storage device 9 in advance (second method), the input departure station and arrival station data (for example, a departure station described later) The execution simple network data (not shown in FIG. 9) corresponding to the node a and the node r of the arrival station are selected and temporarily stored in another location of the storage device 9.

その後、ステップ33〜40で、ステップ32で生成した実行簡易ネットワークデータにより構築した図12に示すような実行簡易ネットワークを用いて、第1実施形態と同様にして最安運賃を算出し出力する。図12の実行簡易ネットワークは、図10の簡易ネットワークに、発駅のノードa、着駅のノードr、ノードa−d間、ノードm−r間、ノードo−r間をそれぞれ接続する各料金アークを追加したものである。尚、ステップ33〜40の動作は、第1実施形態の図6のフローチャートのステップ12〜19と同様であるので説明を省略する。   Thereafter, in steps 33 to 40, the lowest fare is calculated and output in the same manner as in the first embodiment using the execution simple network as shown in FIG. 12 constructed by the execution simple network data generated in step 32. The execution simple network shown in FIG. 12 is connected to the simple network shown in FIG. 10 for each charge for connecting the node a at the departure station, the node r at the arrival station, the nodes ad, the nodes mr, and the nodes o-r. An arc is added. Note that the operations of Steps 33 to 40 are the same as Steps 12 to 19 of the flowchart of FIG.

かかる簡易ネットワークを利用した実行簡易ネットワークを用いれば、運賃計算過程において経路を求めるときの(探索の)分岐数を大幅に削減できるので、異なる料金体系間に跨った発駅−着駅間の運賃計算をより一層高速に行うことが可能となり、運賃計算処理時間を短縮できる。   By using an execution simple network that uses such a simple network, the number of branches (search) when finding a route in the fare calculation process can be greatly reduced, so the fare between the departure station and the arrival station across different fare systems Calculations can be performed even faster, and the fare calculation processing time can be shortened.

次に、本発明の第3実施形態を説明する。
図5に示す第1実施形態の料金ネットワークでは、異なる料金体系に属する発駅と着駅の間の最安運賃を計算しようとした場合、運賃計算に関して定義されているルールと矛盾する経路が求まる可能性を含んでいる。
Next, a third embodiment of the present invention will be described.
In the fee network of the first embodiment shown in FIG. 5, when trying to calculate the cheapest fare between the departure station and the arrival station belonging to different fee systems, a route inconsistent with the rules defined for the fare calculation is obtained. Includes possibilities.

ここで、ルールと矛盾する経路とは、以下の2つである。
1つは、連絡不可能な経路である。これについて、図13の料金ネットワークで説明する。図13は、料金体系AとCはノードdとfで連絡可能であり、料金体系BとCはノードeとfで連絡可能であるが、料金体系AとCは連絡不可能と定義されている料金ネットワークの場合である。ここで、連絡可能とは、改札を通らずに乗継ができる、言い換えれば、1つの経路として一括計算してもよいことを意味し、連絡不可能とは、一度改札を通らないと乗継ができない、言い換えれば、1つの経路として一括計算できないことを意味する。従って、例えば、料金体系Aの地点aから料金体系Bの地点bまでの運賃計算は、運賃計算で定義されているルールでは、本来は経路なしとして計算してはいけない経路であるが、図13の料金ネットワークでは、a→d→f→e→bの経路のd→f→eの経路部分の接続のコストが零であるために、恰もd−e間が連絡されているものとして、a→d→e→bの経路を地点aから地点bまでの経路として運賃計算してしまう可能性がある。
Here, the following two routes conflict with the rule.
One is an inaccessible route. This will be described with reference to the fee network in FIG. FIG. 13 shows that fee systems A and C can be communicated by nodes d and f, and fee systems B and C can be communicated by nodes e and f, but fee systems A and C are defined as incapable of communication. This is the case for a fee network. Here, “contactable” means that connections can be made without going through the ticket gates, in other words, it may be calculated as a single route, and “not connectable” means that connections cannot be made without going through the ticket gates once. In other words, it means that it cannot be calculated as a single route. Therefore, for example, the fare calculation from the point a of the fee system A to the point b of the fee system B is a route that should not be calculated as a route originally according to the rules defined in the fare calculation. In the toll network, since the cost of connection of the route part d → f → e of the route a → d → f → e → b is zero, There is a possibility that the fare is calculated as a route from point a to point b from the route d → e → b.

もう1つは途中下車経路である。これについて、図13の料金ネットワークで説明する。例えば、同一料金体系A内で地点aから地点dまでの運賃は、乗車形態として、地点aからdまで途中下車することなく乗車することを想定して定めたもので、地点mで一旦下車(改札を通過する)することは想定していない。従って、運賃計算のルールとして、a−d間の運賃計算は、地点mで一旦下車するa−m−dの経路で運賃計算してはならないことになっている。しかし、図13の料金ネットワークにおいて、例えば、a−d間の接続コストと、a−m間の接続コストとm−d間の接続コストとを加算したコストとが等しい場合、地点aから地点dまでの運賃計算を行う際に、a−m−dの経路を求めてしまう可能性がある。   The other is a stopover route. This will be described with reference to the fee network in FIG. For example, in the same fare system A, the fare from point a to point d is determined on the assumption that the user gets on the way from point a to d without getting off halfway. It is not supposed to pass through the ticket gate. Therefore, as a rule for calculating the fare, the fare calculation between a and d should not be calculated on the a-m-d route to get off at the point m. However, in the toll network of FIG. 13, for example, when the connection cost between a and d is equal to the cost of adding the connection cost between a and m and the connection cost between m and d, the point a to the point d When the fare calculation up to is performed, there is a possibility of obtaining the amd route.

第3実施形態は、上述のような運賃計算に関して定義されているルールと矛盾する乗継経路を求めてしまうことを回避できるようにしたネットワークを生成するものである。以下、前記ネットワークをダイレクトネットワークとする。
図14は、本発明に係る料金計算装置の第3実施形態の構成を示すブロック図である。尚、第1実施形態と同一要素には同一符号を付して説明を省略する。
図14において、本実施形態の料金計算装置20は、第1実施形態の料金計算装置1に、ダイレクトネットワークデータ生成部21を付加して構成される。
The third embodiment generates a network that can avoid finding a transit route that contradicts the rules defined for fare calculation as described above. Hereinafter, the network is a direct network.
FIG. 14 is a block diagram showing the configuration of the third embodiment of the fee calculation 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. 14, the charge calculation device 20 of the present embodiment is configured by adding a direct network data generation unit 21 to the charge calculation device 1 of the first embodiment.

前記ダイレクトネットワークデータ生成部21は、ネットワークデータ生成部4で生成された各サブネットワーク内の全てのノード(以下、元ノードとする)にダミーノードを追加する。更に、各サブネットワーク内のノード(以下、元ノードとする)間を接続するアークについては、その接続元であるアーク元の元ノードを当該元ノードに対応するダミーノードに変更し接続先であるアーク先を元ノードする。また、料金体系の異なるサブネットワーク間を接続する接続アークについては、接続元であるアーク元を元ノードとしその接続先であるアーク先の元ノードを当該元ノードに対応するダミーノードに変更してアークデータを生成する。そして、このようにアークデータ(接続アークデータも含む)の変更された料金ネットワークデータと追加したダミーノードデータからなるダイレクトネットワークデータを料金計算ネットワークデータとして記憶装置9に格納する。   The direct network data generation unit 21 adds dummy nodes to all nodes (hereinafter referred to as original nodes) in each sub-network generated by the network data generation unit 4. Furthermore, for arcs connecting between nodes in each sub-network (hereinafter referred to as original nodes), the original node of the arc source that is the connection source is changed to a dummy node corresponding to the original node, and is the connection destination. The original node is the arc destination. For connection arcs connecting sub-networks with different charge systems, change the arc source that is the connection source to the original node, and change the source node of the arc destination that is the connection destination to a dummy node corresponding to the source node. Generate arc data. Then, the direct network data including the fee network data in which the arc data (including the connection arc data is changed) and the added dummy node data is stored in the storage device 9 as the fee calculation network data.

次に、料金計算装置20によるダイレクトネットワークデータの生成及び最安運賃算出の各動作について説明する。
図15は、ダイレクトネットワークデータの生成のフローチャートである。
ステップ51で、ネットワークデータ生成部4により第1実施例の料金ネットワークデータを生成し、記憶装置9に格納する。この料金ネットワークデータの生成手順は、第1実施形態の図4のフローチャートに示す。
ステップ52で、ダイレクトネットワークデータ生成部21が記憶装置9から料金ネットワークデータを読込む。
ステップ53で、読込んだ料金ネットワークデータの全てのノードにダミーノードを追加する。
ステップ54で、料金ネットワークデータのアークデータの1つを取出す。
ステップ55で、取出したアークデータが接続アークか否かを判定し、接続アークでなければ、サブネットワーク内のノード同士を接続するアークデータと判断し、ステップ56に進み、そのアーク元の元ノードをダミーノードに変更する。一方、接続アークであれば、ステップ57で、そのアーク先の元ノードをダミーノードに変更する。
ステップ58で、料金ネットワークデータの全てのアークデータを取出したか否かを判定し、判定がYESであれば、ステップ59に進み、ダミーノードを追加したサブネットワークデータと変更したアークデータとをダイレクトネットワークデータとし、このダイレクトネットワークデータを記憶装置9に料金計算ネットワークデータとして格納する。
Next, each operation | movement of the production | generation of the direct network data by the charge calculation apparatus 20 and calculation of the cheapest fare is demonstrated.
FIG. 15 is a flowchart of generation of direct network data.
In step 51, the network data generator 4 generates the fee network data of the first embodiment and stores it in the storage device 9. The fee network data generation procedure is shown in the flowchart of FIG. 4 of the first embodiment.
In step 52, the direct network data generation unit 21 reads fee network data from the storage device 9.
In step 53, dummy nodes are added to all nodes of the read fee network data.
In step 54, one of the arc data of the fee network data is retrieved.
In step 55, it is determined whether or not the extracted arc data is a connection arc. If it is not a connection arc, it is determined as arc data for connecting nodes in the sub-network. Is changed to a dummy node. On the other hand, if it is a connection arc, in step 57, the original node of the arc destination is changed to a dummy node.
In step 58, it is determined whether or not all arc data of the fee network data has been taken out. If the determination is YES, the process proceeds to step 59, where the sub-network data with the dummy node added and the changed arc data are directly specified. As network data, this direct network data is stored in the storage device 9 as fee calculation network data.

図16は、図13の料金ネットワークデータに基づいて生成したダイレクトネットワークデータを用いて構築されるダイレクトネットワークの例を示す。図中、a′〜f′、m′〜o′がダミーノードを示す。そして、運賃計算する場合には、各ダミーノードを発駅ノードとし、元ノードを着駅ノードとして扱う。   FIG. 16 shows an example of a direct network constructed using direct network data generated based on the fee network data of FIG. In the figure, a 'to f' and m 'to o' indicate dummy nodes. When calculating the fare, each dummy node is treated as a departure station node, and the original node is treated as a destination station node.

かかるダイレクトネットワークを用いて、例えば、料金体系Aの地点aから料金体系Bの地点bまでの運賃計算を行う場合、ダミーノードa′が発駅ノードとなり、a′→d→f′の経路で料金体系A−C間は接続しているが、ダミーノードf′の接続先は同一料金体系C内の元ノードだけであり、料金体系Bのノードは接続先になっていないので、料金体系Aから料金体系Cを経由して料金体系Bへ行く経路は構成されない。料金体系Aから料金体系Bに行くには、一度改札を通らないと行くことはできないネットワークになっている。従って、上述したルール上の矛盾の1つである連絡不可能経路の問題を回避できる。   For example, when the fare calculation from the point a of the fee system A to the point b of the fee system B is performed using such a direct network, the dummy node a ′ becomes the departure station node, and the route a ′ → d → f ′. Although the fee systems A and C are connected, the connection destination of the dummy node f ′ is only the original node in the same fee system C, and the node of the fee system B is not the connection destination. A route from fare system C to fare system B is not configured. In order to go from the fee system A to the fee system B, it is a network that can only be reached through a ticket gate. Therefore, it is possible to avoid the problem of an inaccessible route that is one of the contradictions in the rules described above.

また、例えば、同一料金体系A内で地点aから地点dまでの運賃計算を行う場合、ダミーノードa′が発駅ノードとなり、このダミーノードa′の接続先は元ノードm,dであるが、元ノードmは着駅ノードとして扱うので接続先はない。従って、ダミーノードa′を発駅として元ノードdを着駅とする経路のみとなり、上述した2つ目のルール上の矛盾である途中下車経路の問題も回避できる。
尚、アークの接続元・接続先についてであるが、各元ノードを発駅ノードとし、各ダミーノードを着駅ノードとした場合、上記実施形態の接続元・接続先を逆にして、各サブネットワーク内の元ノード間を接続するアークについて、その接続元を元ノードにし、接続先であるアーク先をダミーノードに変更し、また、料金体系の異なるサブネットワーク間を接続する接続アークについては、接続元であるアーク元をダミーノードに変更し、その接続先であるアーク先を元ノードにしてもよい。
For example, when the fare calculation from the point a to the point d is performed in the same fee system A, the dummy node a ′ becomes the departure node, and the connection destination of the dummy node a ′ is the original nodes m and d. Since the original node m is treated as a destination station node, there is no connection destination. Therefore, only the route having the dummy node a ′ as the departure station and the former node d as the arrival station is provided, and the problem of a stopover route that is a contradiction in the second rule described above can be avoided.
As for the connection source / connection destination of the arc, when each source node is a source station node and each dummy node is a destination station node, the connection source / connection destination of the above embodiment is reversed and each sub node For arcs that connect between original nodes in the network, the connection source is the original node, the arc destination that is the connection destination is changed to a dummy node, and for connection arcs that connect between sub-networks with different pricing systems, The arc source that is the connection source may be changed to a dummy node, and the arc destination that is the connection destination may be the original node.

このダイレクトネットワークによる最安運賃算出過程は、第1実施形態の料金ネットワークを用いた図6のフローチャートと同様である。ただし、探索閾値設定部6による最大割引額の算出手法が異なる。
以下に、ダイレクトネットワークにおける最大割引額の算出方法について、図7を参照して説明する。
The cheapest fare calculation process by this direct network is the same as the flowchart of FIG. 6 using the charge network of the first embodiment. However, the calculation method of the maximum discount amount by the search threshold setting unit 6 is different.
Hereinafter, a method for calculating the maximum discount amount in the direct network will be described with reference to FIG.

図7において、料金ネットワークの場合と同じノードcからノードuへ向かう経路を例として説明する。第1実施形態の料金ネットワークは同一料金体系内で複数のアークを使用する経路が選択可能であるが、ダイレクトネットワークは同一料金体系内では1つのアークしか使用できない。このため、ダイレクトネットワークにおいて最大割引額が適用される可能性のある経路は、図中の点線で示す経路(c→d→g→k→o→m→v→u)である。この経路に適用される可能性のある料金体系間の割引の組合せは以下の(a)〜(c)である。
(a)2料金体系間割引1回(料金体系1,2間、料金体系2,3間、料金体系3,4間のいずれか1つ)
(b)2料金体系間割引2回(前記3つの料金体系間の中の2つを組合せ)
(c)3料金体系間割引1回(料金体系1〜3間又は料金体系2〜4間のいずれか1つ)
In FIG. 7, the same route from the node c to the node u as in the charge network will be described as an example. The charge network of the first embodiment can select a route using a plurality of arcs in the same charge system, but the direct network can use only one arc in the same charge system. For this reason, a route to which the maximum discount amount may be applied in the direct network is a route (c → d → g → k → o → m → v → u) indicated by a dotted line in the figure. Combinations of discounts between fee systems that may be applied to this route are the following (a) to (c).
(A) One discount between two fee structures (between fee structures 1, 2; one between fee structures 2, 3; one between fee structures 3, 4)
(B) Two discounts between two fee systems (combination of two of the above three fee systems)
(C) One discount between three fee systems (one between fee systems 1 to 3 or between fee systems 2 to 4)

各料金体系間の最大割引額は、データストレージ装置3に格納された乗継関係データの料金体系間の最大割引額から求めることができ、前述した料金ネットワークの場合と同じで、2料金体系間最大割引額が20円、3料金体系間最大割引額が30円とすれば、(a)は20円、(b)は40円、(c)30円となり、最大割引額は40円となる。
この最大割引額の算出は、料金ネットワークの場合と同様に数1の(1)式から算出できる。i料金体系間の割引適用回数の制約条件を数2の(3)式のようになる。
The maximum discount amount between each fee structure can be obtained from the maximum discount amount between the charge structures of the transit relation data stored in the data storage device 3, and is the same as in the case of the charge network described above. If the maximum discount amount is 20 yen, and the maximum discount amount between three fee systems is 30 yen, (a) will be 20 yen, (b) will be 40 yen, (c) 30 yen, and the maximum discount will be 40 yen. .
This maximum discount amount can be calculated from Equation (1) of Equation 1 as in the case of the charge network. The constraint condition of the number of discounts applied between i fee systems is as shown in Equation (3) of Equation 2.

Figure 0005213403
Figure 0005213403

尚、料金ネットワークでの最大割引額は、ダイレクトネットワークにおける最大割引額より大きくなることは明らかであるので、ダイレクトネットワークにおける上限値算出のための最大割引額として用いてもよい。
また、図7の説明では、料金体系の系が4つで、且つ、3料金体系間割引まで設定されている場合であったが、本発明ではこれに限らず系の数がいくつでもよく、また、料金体系間割引も2料金体系間割引、3料金体系間割引に限られることはない。
Since it is clear that the maximum discount amount in the fee network is larger than the maximum discount amount in the direct network, it may be used as the maximum discount amount for calculating the upper limit value in the direct network.
Further, in the description of FIG. 7, there is a case where there are four fee systems and up to a discount between three fee systems, but the present invention is not limited to this, and the number of systems may be any number, Further, the discount between the fee systems is not limited to the discount between the two fee systems and the discount between the three fee systems.

次に、本発明の第4実施形態について説明する。
第4実施形態は、異なる料金体系間において乗継割引制度が存在する場合でも、最短経路探索問題として最安運賃を求めることができるネットワークを生成する。このネットワークを以下では、ディスカウントネットワークとする。
図17は、本発明に係る料金計算装置の第4実施形態の構成を示すブロック図である。尚、第1実施形態と同一要素には同一符号を付して説明を省略する。
図17において、本実施形態の料金計算装置30は、第1実施形態の料金計算装置1から探索閾値設定部6及び最安運賃算出部7を取除き、乗継割引適用アークデータ生成部31を付加して構成される。
Next, a fourth embodiment of the present invention will be described.
The fourth embodiment generates a network that can obtain the lowest fare as a shortest route search problem even when a transit discount system exists between different fee systems. Hereinafter, this network is referred to as a discount network.
FIG. 17 is a block diagram showing a configuration of the fourth embodiment of the fee calculation 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. 17, the charge calculation device 30 of the present embodiment removes the search threshold setting unit 6 and the cheapest fare calculation unit 7 from the charge calculation device 1 of the first embodiment, and changes the connection discount applied arc data generation unit 31. It is configured by adding.

前記乗継割引適用アークデータ生成部31は、データストレージ装置3に格納された図2のような各社別運賃三角表データ及び図3のような乗継割引表データに基づいて、乗継割引適用アークデータを生成する。乗継割引適用アークは、乗継割引が適用される経路の発駅と着駅にそれぞれ相当するノード間を接続するもので、乗継割引適用アークで接続されるノード間の接続のコストを、その経路の割引前の運賃から割引額を減算した割引適用後の運賃とする。乗継割引が適用される経路及びその発着駅データは、乗継割引表データの発着範囲データと連絡駅データから設定でき、前記コストは確定した経路と各社別運賃三角表データの運賃データに基づいて設定できる。   The connection discount application arc data generation unit 31 applies the connection discount application based on the fare triangle table data of each company as shown in FIG. 2 and the connection discount table data as shown in FIG. Generate arc data. The connection discount application arc connects the nodes corresponding to the departure station and the arrival station of the route to which the connection discount is applied, and the connection cost between the nodes connected by the connection discount application arc is The fare after discount is applied by subtracting the discount amount from the fare before discount for that route. The route to which the transfer discount is applied and its departure / arrival station data can be set from the departure / arrival data and connection station data of the transfer discount table data. Can be set.

次に、料金計算装置30によるディスカウントネットワークデータの生成及び最安運賃算出の各動作について説明する。
図18は、ディスカウントネットワークデータの生成のフローチャートである。
ステップ61で、ネットワークデータ生成部4により料金ネットワークデータを生成し、記憶装置9に格納する。この料金ネットワークデータの生成手順は、第1実施形態の図4のフローチャートに示す。
ステップ62で、乗継割引適用アークデータ生成部31で、各社別運賃三角表データと乗継割引表データに基づいて乗継割引適用アークデータを生成する。
ステップ63で、料金ネットワークデータとステップ62で生成した乗継割引適用アークデータとを結合して、ディスカウントネットワークデータを生成する。
ステップ64で、ステップ63で生成したディスカウントネットワークデータを、記憶装置9に料金計算ネットワークデータとして格納する。
Next, operations of generating discount network data and calculating the lowest fare by the fee calculation device 30 will be described.
FIG. 18 is a flowchart of generating discount network data.
In step 61, fee network data is generated by the network data generating unit 4 and stored in the storage device 9. The fee network data generation procedure is shown in the flowchart of FIG. 4 of the first embodiment.
In step 62, the connection discount application arc data generation unit 31 generates connection discount application arc data based on the fare triangle table data of each company and the connection discount table data.
In step 63, discount network data is generated by combining the charge network data and the transfer discount application arc data generated in step 62.
In step 64, the discount network data generated in step 63 is stored in the storage device 9 as fee calculation network data.

図19に、ディスカウントネットワークデータを用いたディスカウントネットワークの一例を示す。図19において、料金体系1のノードbと料金体系3のノードnの間や、料金体系2のノードiと料金体系3のノードpの間を、それぞれ接続している図中の太線が乗継割引適用アークである。   FIG. 19 shows an example of a discount network using discount network data. In FIG. 19, the thick lines in the diagram connecting between node b of fee structure 1 and node n of fee structure 3 and between node i of fee structure 2 and node p of fee structure 3 are connected. It is a discount application arc.

図20は、ディスカウントネットワークを用いた最安運賃算出のフローチャートである。
ステップ71で、入力部2から発着駅データが入力されるまで待機し、入力されるとステップ72に進む。
ステップ72で、最小コスト探索部5は記憶装置9からディスカウントネットワークデータを読込み、ディスカウントネットワークにおいて最短経路探索アルゴリズムを用いて入力された発駅−着駅間の最安運賃経路を探索する。
ステップ73で、ステップ72で探索された経路運賃を最安運賃結果として出力部8を介して出力する。
かかるディスカウントネットワークを用いれば、最小コスト探索部5の探索結果がそのまま最安運賃となるので、計算量を大幅に削減できる利点がある。
FIG. 20 is a flowchart of calculating the lowest fare using a discount network.
In step 71, the process waits until the arrival / departure station data is input from the input unit 2. When the input / output station data is input, the process proceeds to step 72.
In step 72, the minimum cost search unit 5 reads the discount network data from the storage device 9, and searches the discount network for the cheapest fare route between the departure station and the arrival station input using the shortest route search algorithm.
In step 73, the route fare searched in step 72 is output through the output unit 8 as the lowest fare result.
If such a discount network is used, the search result of the minimum cost search unit 5 becomes the lowest fare as it is, and there is an advantage that the calculation amount can be greatly reduced.

次に、本発明の第5実施形態について説明する。
本発明のネットワークを鉄道運賃計算に適用した場合、(イ)同一料金体系の複数回通過、(ロ)5料金体系以上を連絡する経路(現状の鉄道運賃計算規則では4社線以内で運賃計算をする必要がある)、(ハ)同一地点の複数通過等の、禁止されている経路を計算対象に含めてしまう可能性があるという問題が起こる。ただし、(ハ)に関しては、ダイレクトネットワークの場合のみ生じる問題である。
Next, a fifth embodiment of the present invention will be described.
When the network of the present invention is applied to railway fare calculation, (b) a route that passes multiple times of the same fare system, and (b) a route that connects five or more fare systems (the current railway fare calculation rule is fare calculation within 4 company lines) (C) There is a possibility that prohibited routes such as multiple passes at the same point may be included in the calculation target. However, (c) is a problem that occurs only in the case of a direct network.

例えば、図21のネットワーク構成において、地点p−f間の運賃計算を行った場合を考える。この場合、p→n→q→r→u→v→l→i→k→h→fの経路は5料金体系に跨った経路であり、p→n→q→t→w→u→r→q→g→fの経路は同一地点(地点q)及び同一料金体系を複数回通過する経路であり、p→n→q→t→w→u→r→h→fの経路は同一料金体系を複数回通過する経路である。
このような問題を解決するためには、禁止されていない経路が探索されるまで繰返し、k−最短経路探索アルゴリズムにより経路を探索する必要がある。しかし、ノード数が多い場合、計算負荷が大きいことや、ネットワークの形状によってはkが大きくなる可能性があり、効率が悪い。
For example, consider the case where the fare calculation between points pf is performed in the network configuration of FIG. In this case, the route of p → n → q → r → u → v → l → i → k → h → f is a route spanning the 5 fee system, and p → n → q → t → w → u → r The route q → g → f is a route that passes through the same point (point q) and the same fee system multiple times, and the route p → n → q → t → w → u → r → h → f has the same charge. A route that passes through the system multiple times.
In order to solve such a problem, it is necessary to search for a route by the k-shortest route search algorithm repeatedly until an uninhibited route is searched. However, when the number of nodes is large, the calculation load is large, and k may become large depending on the shape of the network, which is inefficient.

本実施形態は、ネットワークを簡略化した上位ネットワークと詳細な下位ネットワークとに階層化したネットワーク形態とすることによって、上述の問題点を解決し、効率良く最安運賃を算出するようにしたものである。   In the present embodiment, the above-mentioned problems are solved and the lowest fare is efficiently calculated by adopting a network form in which the network is simplified into a higher level network and a detailed lower level network. is there.

図22は、本発明に係る料金計算装置の第5実施形態の構成を示すブロック図である。尚、第1実施形態と同一要素には同一符号を付して説明を省略する。
図22において、本実施形態の料金計算装置40は、第1実施形態の料金計算装置1の構成に、上位ネットワークデータ生成部41と、連絡パターンデータ生成部42と、下位ネットワークデータ生成部43とを追加して構成されている。また、データストレージ装置3には、前述した(イ)〜(ハ)の禁止条件データが予め格納される。
FIG. 22 is a block diagram showing a configuration of the fifth embodiment of the fee calculation 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. 22, the fee calculation device 40 of the present embodiment has a configuration of the fee calculation device 1 of the first embodiment, the upper network data generation unit 41, the contact pattern data generation unit 42, and the lower network data generation unit 43. It is configured by adding. The data storage device 3 stores in advance the prohibition condition data (A) to (C) described above.

前記上位ネットワークデータ生成部41は、料金ネットワークにおける料金体系の異なる各サブネットワーク(各料金体系)を1つのノード(上位ノードとする)と見なし、乗継関係データに基づいて、図23に示すような上位ノード(サブネットワーク)間を1つのアーク(上位アークとする)で互いに直接接続する簡略化した上位ネットワークデータを生成する。ここで、上位ネットワークの上位アークで接続される上位ノード間の接続のコストを1に設定する。これにより、コストが3までの経路を最短経路探索アルゴリズムによって算出することで、探索経路を4料金体系内に制限でき、5料金体系に跨る経路の探索を防止できる。   As shown in FIG. 23, the upper network data generation unit 41 regards each sub-network (each fee structure) having a different charge system in the charge network as one node (assumed to be an upper node), and based on the transfer relation data. Simplified higher-level network data is generated in which the higher-level nodes (sub-networks) are directly connected to each other by one arc (referred to as higher-level arc). Here, the cost of connection between the upper nodes connected by the upper arc of the upper network is set to 1. Thus, by calculating the route up to cost 3 by the shortest route search algorithm, the searched route can be limited within the four fee system, and the search for the route across the five fee system can be prevented.

前記連絡パターンデータ生成部42は、上位ネットワークデータと禁止条件データに基づいて、異なる料金体系に跨る発駅と着駅のノードの組合せ数に対応する数の各料金体系のペア毎の図24に示すような連絡パターンデータを予め生成する。料金体系間を接続する上位アークは、図中の矢印で示すように方向性を持っている。図24は、図21のネットワークにおいて初駅を地点p、着駅を地点fとした場合の連絡パターン例を示しており、この場合、(A)、(B)の2通りの連絡パターンとなる。これら連絡パターンデータは、上位ネットワークの始点を含む上位ノードから終点を含む上位ノードまでの上位アークのコスト値が所定コスト値(例えば前述のコスト3)以下で且つ始点から終点への経路において上位ノードが重複しないような接続関係を有した、前記禁止条件を満した連絡パターンデータとなっている。   The contact pattern data generation unit 42 is based on the upper network data and the prohibition condition data in FIG. 24 for each pair of charge systems corresponding to the number of combinations of the departure station and arrival station nodes across different charge systems. The contact pattern data as shown is generated in advance. The upper arcs that connect the fee systems have direction as shown by the arrows in the figure. FIG. 24 shows an example of a contact pattern when the first station is a point p and the destination station is a point f in the network of FIG. 21. In this case, there are two contact patterns (A) and (B). . These contact pattern data are such that the cost value of the high-order arc from the high-order node including the start point of the high-order network to the high-order node including the end point is not more than a predetermined cost value (for example, the above-mentioned cost 3) and the high-order node in the route from the start point to the end point The connection pattern data satisfying the prohibition condition has a connection relationship that does not overlap.

前記下位ネットワークデータ生成部43は、連絡パターンの各上位ノードを料金ネットワークのサブネットワークデータに置換え、これらサブネットワーク間を接続アークで接続した図25のような前記禁止条件を満たす詳細な下位ネットワークデータを生成する。図25の(A)は、図24の(A)の連絡パターンに対応するものであり、(B)は、図24の(B)の連絡パターンに対応するものである。   The lower network data generation unit 43 replaces each upper node of the contact pattern with the subnetwork data of the charge network, and the detailed lower network data satisfying the prohibition condition as shown in FIG. 25 in which these subnetworks are connected by a connection arc. Is generated. 25A corresponds to the contact pattern of FIG. 24A, and FIG. 25B corresponds to the contact pattern of FIG.

尚、下位ネットワーク形態としては、図25に示す第1実施形態の料金ネットワーク形態の他、第2〜第4実施形態の簡易料金計算ネットワーク形態、ダイレクトネットワーク形態、或いはディスカウントネットワーク形態でもよい。また、これら簡易料金計算ネットワーク、ダイレクトネットワーク及びディスカウントネットワークの少なくとも2つのネットワーク形態を組み合わせるようにしてもよい。   The lower network form may be the charge network form of the first embodiment shown in FIG. 25, the simple charge calculation network form, the direct network form, or the discount network form of the second to fourth embodiments. Moreover, you may make it combine at least 2 network form of these simple charge calculation networks, a direct network, and a discount network.

図26は、第5実施形態の階層化構造のネットワークデータの生成のフローチャートである。
ステップ81で、ネットワークデータ生成部4により料金ネットワークデータを生成し、記憶装置9に格納する。この料金ネットワークデータの生成手順は、第1実施形態の図4のフローチャートに示す。
ステップ82で、上位ネットワークデータ生成部41により図23に示すような上位ネットワークデータを生成する。
ステップ83で、連絡パターンデータ生成部42で、上位ネットワークデータと禁止条件データに基づいて、発駅と着駅のノードの組合せ数に対応する数の各料金体系のペア毎の連絡パターンデータを生成する。
ステップ84で、下位ネットワークデータ生成部43で、入力された発駅と着駅の情報に基づいて、選択された連絡パターンデータと料金ネットワークのサブネットワークデータから詳細な下位ネットワークデータを生成する。
ステップ85で、生成した上位ネットワーク、連絡パターン及び下位ネットワークの各データを記憶装置9に格納する。
FIG. 26 is a flowchart of generation of network data having a hierarchical structure according to the fifth embodiment.
In step 81, fee network data is generated by the network data generating unit 4 and stored in the storage device 9. The fee network data generation procedure is shown in the flowchart of FIG. 4 of the first embodiment.
In step 82, the upper network data generator 41 generates upper network data as shown in FIG.
In step 83, the contact pattern data generation unit 42 generates contact pattern data for each pair of fee systems corresponding to the number of combinations of the departure station and arrival station nodes, based on the upper network data and the prohibition condition data. To do.
In step 84, the lower-layer network data generation unit 43 generates detailed lower-layer network data from the selected contact pattern data and toll network sub-network data based on the input information on the departure station and destination station.
In step 85, the generated data of the upper network, the contact pattern, and the lower network are stored in the storage device 9.

図27は、階層化したネットワークを用いた最安運賃算出のフローチャートであり、図21のネットワークにおいて、発駅として地点p、着駅として地点fが入力された場合を例に説明する。
ステップ91で、入力部2から発着駅データが入力されるまで待機し、入力されるとステップ92に進む。
ステップ92で、入力された発着駅情報に対応する連絡パターンを選択する。ここで、発駅が地点p、着駅が地点fとすると、禁止条件から連絡パターンは、図24の(A)に示す料金体系4→料金体系1→料金体系2の連絡パターンと、(B)に示す料金体系4→料金体系5→料金体系2の連絡パターンの2通りが選択される。
ステップ93で、選択された連絡パターンから下位ネットワークを生成する。この場合、図25の(A)、(B)に示す下位ネットワークが生成される。
FIG. 27 is a flowchart of calculating the lowest fare using a hierarchical network, and an example will be described in which the point p is input as the departure station and the point f is input as the arrival station in the network of FIG.
In step 91, the process waits until the arrival / departure station data is input from the input unit 2.
In step 92, a contact pattern corresponding to the inputted station information is selected. Here, if the departure station is a point p and the arrival station is a point f, the communication pattern from the prohibition condition is a charge system 4 → charge system 1 → charge system 2 communication pattern shown in FIG. 2) of the charge system 4 → charge system 5 → charge system 2 shown in FIG.
In step 93, a subordinate network is generated from the selected contact pattern. In this case, the lower networks shown in FIGS. 25A and 25B are generated.

ステップ94で、最小コスト探索部5により、ステップ93で生成された各下位ネットワークにおける最安運賃を、最短経路探索アルゴリズムを用いてそれぞれ算出する。ここで、乗継割引が適用される可能性がなければ、最小コスト探索部5で求めた運賃を最安運賃とすればよい。乗継割引が適用される可能性が存在する場合は、第1実施形態と同様にして探索閾値を設定し、それ以下の運賃の最も安い運賃を最安運賃とする。また、下位ネットワークとして、乗継割引適用アークを設定したディスカウントネットワークを適用すれば、最小コスト探索部5の算出した運賃を最安とすることができる。
ステップ95で、ステップ94で算出された各下位ネットワークの最安運賃を比較し、安い方を最安運賃として出力部8を介して出力する。
In step 94, the lowest cost fare in each lower network generated in step 93 is calculated by the minimum cost search unit 5 using the shortest route search algorithm. Here, if there is no possibility that the connection discount is applied, the fare obtained by the minimum cost search unit 5 may be set as the lowest fare. When there is a possibility that a transfer discount is applied, the search threshold is set in the same manner as in the first embodiment, and the cheapest fare below that is set as the cheapest fare. Further, if a discount network in which a transit discount application arc is set as a lower network, the fare calculated by the minimum cost search unit 5 can be made the cheapest.
In step 95, the lowest fare of each lower network calculated in step 94 is compared, and the cheaper fare is output as the lowest fare via the output unit 8.

尚、上述の例では階層化したネットワークの下位ネットワークとして、料金ネットワークのサブネットワークを用いた例を示したが、下位ネットワーク形態としては、第2実施形態の簡略料金計算ネットワーク、第3実施形態のダイレクトネットワーク及び第4実施形態のディスカウントネットワークをそれぞれ適用してもよく、また、これらの中の2つを組み合わせてもよく、3つ全てを組み合わせたものでもよい。乗継割引経路が存在する場合、下位ネットワークがディスカウントネットワーク形態である場合を除いて、ステップ94の運賃算出後、第1実施形態と同様に、図6のステップ13以降の処理を行って最安運賃を算出することになる。
また、連絡パターンデータ生成部42は、発駅及び着駅情報が入力されたときに、その発駅及び着駅情報に応じて、予め定めた料金計算上の禁止条件を満足させる接続関係にある系のみを上位ネットワークデータから選択して連絡パターンを生成するようにしてもよい。この場合、多数の連絡パターンデータを格納する必要がなくなる。
In the above example, the subnetwork of the fee network is used as the lower network of the hierarchical network. However, as the lower network form, the simplified fee calculation network of the second embodiment, the third embodiment Each of the direct network and the discount network of the fourth embodiment may be applied, or two of these may be combined, or all three may be combined. When there is a transit discount route, except for the case where the lower network is a discount network, after the fare calculation in step 94, the processing after step 13 in FIG. The fare will be calculated.
In addition, when the departure station and arrival station information is input, the contact pattern data generation unit 42 has a connection relation that satisfies a predetermined prohibition condition in charge calculation according to the departure station and arrival station information. Only the system may be selected from the upper network data to generate the contact pattern. In this case, it is not necessary to store a large number of contact pattern data.

このようにネットワーク構成を、簡略化した上位ネットワークと、禁止条件に基づいて経路を制限した詳細な下位ネットワークとに階層化し、下位ネットワークによって最安運賃を算出するようにすれば、禁止されている経路は算出されなくなると共に、求める経路数は大幅に削減される。よって、前述の問題点を回避でき、効率良く短時間で最安運賃を算出することが可能となる。   In this way, it is prohibited if the network configuration is hierarchized into a simplified upper network and a detailed lower network whose route is restricted based on prohibition conditions, and the lowest fare is calculated by the lower network. Routes are no longer calculated and the number of routes sought is greatly reduced. Therefore, the above-mentioned problems can be avoided and the lowest fare can be calculated efficiently in a short time.

上述の各実施形態では、簡易料金計算ネットワーク、ダイレクトネットワーク、ディスカウントネットワークについてそれぞれ個別に説明したが、簡易料金計算ネットワークにダミーノード及び乗継割引適用アークを追加して、簡易料金計算ネットワークとダイレクトネットワークとディスカウントネットワークを組み合わせてもよい。また、簡易料金計算ネットワークとダイレクトネットワークの組合せ、簡易料金計算ネットワークとディスカウントネットワークの組合せ、ダイレクトネットワークとディスカウントネットワークの組合せも考えられる。   In each of the above-described embodiments, the simple charge calculation network, the direct network, and the discount network are individually described. However, a simple charge calculation network and a direct network are added by adding a dummy node and a transit discount application arc to the simple charge calculation network. And a discount network may be combined. Further, a combination of a simple fee calculation network and a direct network, a combination of a simple fee calculation network and a discount network, and a combination of a direct network and a discount network are also conceivable.

本発明の料金計算ネットワークは、鉄道の運賃計算への適用に限るものではない。例えば、以下のような適用が可能である。
(1)時間帯によって単位時間当たりの料金設定が異なる駐車場等の駐車料金や電力料金等の計算への適用。
(2)重さや距離等によって料金設定が異なる陸運、海運や空輸等の運送/配送料金等の計算への適用。この場合、陸運、海運や空輸は異なる系として相互に跨ってもよい。
(3)有料道路の料金計算への適用。
(4)保険料の計算への適用。保険の内容毎に保険会社を選択する等が考えられる。
(5)税金等の計算への適用。
(6)生活保護を受ける人の手取りを減らさず、生活保護支給額を最小にする生活保護の支給金額の計算への適用。例えば、仕事についた(生活保護が無くなった)ときの手取りが生活保護を受けているときの手取りにならないように、生活保護の支給額を決定するための計算に用いることができる。
(7)SaaS(software as a service)によるアプリ利用の課金計算への適用。例えば、長時間使うと割引率を高くしたり、特定の機能の組合せなら割引する等の料金計算をすることが考えられる。
The fare calculation network of the present invention is not limited to application to railway fare calculation. For example, the following application is possible.
(1) Application to calculation of parking charges and power charges for parking lots, etc., where the charge setting per unit time varies depending on the time of day.
(2) Application to calculation of transportation / delivery charges such as land transportation, maritime transportation, air transportation, etc. with different fee settings depending on weight and distance. In this case, land transportation, sea transportation, and air transportation may straddle each other as different systems.
(3) Application to toll road toll calculation.
(4) Application to insurance premium calculation. For example, an insurance company may be selected for each insurance content.
(5) Application to calculation of taxes.
(6) Application to calculation of the amount of welfare payment that minimizes the amount of welfare payment without reducing the number of people who receive welfare protection. For example, it can be used for calculation for determining the amount of payment for welfare so that the take-up at the time of work (the loss of welfare) does not become the take-up when receiving welfare.
(7) Application to billing calculation of application usage by SaaS (software as a service). For example, it may be possible to calculate a fee such as increasing the discount rate when used for a long time, or discounting a combination of specific functions.

上述の実施形態におけるサブネットワークは、系内の全てのノードをアークで互いに直接接続する構成であるが、料金計算ネットワークの適用対象によっては全てのノードを直接接続する構成としなくともよく、各ノードを必要に応じてアークで直接接続し、アークで接続したノード間の接続のコストを料金とする構成のものであればよい。このような例として、例えば上述の駐車料金計算に適用する場合が考えられる。
例えば、入庫から3時間までは300円、それ以後30分毎に100円が加算されるような料金体系の駐車場の駐車料金計算に用いる料金計算ネットワーク構成としては、図28に示すような料金計算ネットワーク構成とすればよい。
図28の料金計算ネットワークは、駐車時間0分のノードを中心とし、当該ノードを接続元としてアークを放射状に配置し、各アークの接続先を入庫からの駐車時間を示すノードとし、アークで接続したノード間のコストを、アーク先のノードの駐車時間に応じた駐車料金とする構成である。ここで、駐車時間の設定間隔は、分単位、秒単位等、自由であり、その料金体系等に合わせて適切に設定すればよい。
そして、駐車時間0分のノードを他のサブネットワーク(例えば、ある駐車場の位置する駅の鉄道運賃)と接続アークで接続することで、複数のサブネットワークに跨る料金計算ネットワークを構成することが可能となる。
The sub-network in the above-described embodiment has a configuration in which all nodes in the system are directly connected to each other by arc. However, depending on the application target of the fee calculation network, it is not necessary to directly connect all the nodes. As long as it is necessary to connect directly with an arc as necessary, the cost of connection between nodes connected by the arc is charged. As such an example, the case where it applies to the above-mentioned parking charge calculation can be considered, for example.
For example, as shown in FIG. 28, the charge calculation network configuration used for the calculation of the parking charge for a parking lot with a charge structure in which 300 yen is added for 3 hours after warehousing and 100 yen is added every 30 minutes thereafter. A calculation network configuration may be used.
The fee calculation network in FIG. 28 is centered on a node with a parking time of 0 minutes, arcs are arranged radially from the node as a connection source, and the connection destination of each arc is a node indicating the parking time from warehousing and connected by an arc. In this configuration, the cost between the nodes is set as a parking fee according to the parking time of the arc destination node. Here, the setting interval of the parking time is arbitrary, such as a minute unit or a second unit, and may be set appropriately according to the charge system.
And, by connecting nodes with a parking time of 0 minutes to other sub-networks (for example, railway fare at a station where a certain parking lot is located) with a connection arc, a charge calculation network that spans multiple sub-networks can be configured. It becomes possible.

尚、本発明では、各会社が全く同一の料金体系を持っていたとしても、会社が異なるためそれぞれ別の料金体系として扱うことができ、また、同一の会社が2以上の料金体系を持っている場合にもそれぞれ別の料金体系として扱うことができるため、料金体系の変更等にも柔軟に対応でき、多様な料金ネットワークの設定を行うことができる。   In the present invention, even if each company has the same fee system, it can be handled as different fee systems because each company is different, and the same company has two or more fee systems. Can be handled as different fee systems, so that it is possible to flexibly respond to changes in the fee structure and to set various fee networks.

本発明に係る料金計算装置の第1実施形態の構成を示すブロック図The block diagram which shows the structure of 1st Embodiment of the fee calculation apparatus which concerns on this invention. 運賃三角表データの例を示す図Figure showing an example of fare triangle table data 乗継割引表データの例を示す図Figure showing an example of transit discount table data 第1実施形態の料金ネットワークデータの生成フローチャートCharge network data generation flowchart of the first embodiment 料金ネットワークの例を示す図Diagram showing an example of a fee network 料金ネットワークを用いた最安運賃算出フローチャートThe lowest fare calculation flowchart using the charge network 最大割引額の算出手法の説明図Illustration of the maximum discount calculation method 本発明に係る料金計算装置の第2実施形態の構成を示すブロック図The block diagram which shows the structure of 2nd Embodiment of the fee calculation apparatus which concerns on this invention. 第2実施形態の簡易ネットワークデータの生成フローチャートSimple network data generation flowchart of the second embodiment 簡易ネットワークの例を示す図Diagram showing an example of a simple network 簡易ネットワークを用いた最安運賃算出フローチャートThe lowest fare calculation flowchart using a simple network 実行簡易ネットワークの例を示す図Figure showing an example of a simple execution network 料金ネットワークで最安運賃を算出する場合の問題点の説明図Explanatory diagram of problems when calculating the lowest fare on the fee network 本発明に係る料金計算装置の第3実施形態の構成を示すブロック図The block diagram which shows the structure of 3rd Embodiment of the fee calculation apparatus which concerns on this invention. ダイレクトネットワークデータの生成フローチャートDirect network data generation flowchart ダイレクトネットワークの例を示す図Diagram showing an example of a direct network 本発明に係る料金計算装置の第4実施形態の構成を示すブロック図The block diagram which shows the structure of 4th Embodiment of the fee calculation apparatus which concerns on this invention. ディスカウントネットワークデータの生成フローチャートDiscount network data generation flowchart ディスカウントネットワークの例を示す図Diagram showing an example of a discount network ディスカウントネットワークを用いた最安運賃算出フローチャートThe lowest fare calculation flowchart using a discount network 料金ネットワークを鉄道運賃計算に適用する場合の問題点の説明図Explanatory diagram of problems when applying the toll network to railway fare calculation 本発明に係る料金計算装置の第5実施形態の構成を示すブロック図The block diagram which shows the structure of 5th Embodiment of the fee calculation apparatus which concerns on this invention. 上位ネットワークの例を示す図Diagram showing an example of the upper network 連絡パターン例を示す図Figure showing contact pattern example 下位ネットワークの例を示す図A diagram showing an example of a subordinate network 階層化したネットワークデータの生成フローチャートHierarchical network data generation flowchart 階層化したネットワークを用いた最安運賃算出フローチャートThe lowest fare calculation flowchart using a hierarchical network 駐車場の駐車料金計算に適用する料金計算ネットワークの一例を示す図The figure which shows an example of the charge calculation network applied to the parking charge calculation of the parking lot 物理ネットワークの例を示す図Diagram showing an example of a physical network

符号の説明Explanation of symbols

1,10,20,30,40 料金計算装置
2 入力部
3 データストレージ装置
4 ネットワークデータ生成部
5 最小コスト探索部
6 探索閾値設定部
7 最安運賃算出部
8 出力部
9 記憶装置
11 簡易ネットワークデータ生成部
21 ダイレクトネットワークデータ生成部
31 乗継割引適用アークデータ生成部
41 上位ネットワークデータ生成部
42 連絡パターン生成部
43 下位ネットワークデータ生成部
1, 10, 20, 30, 40 Charge calculation device 2 Input unit 3 Data storage device 4 Network data generation unit 5 Minimum cost search unit 6 Search threshold setting unit 7 Lowest fare calculation unit 8 Output unit 9 Storage device 11 Simple network data Generation unit 21 Direct network data generation unit 31 Transfer discount application arc data generation unit 41 Upper network data generation unit 42 Contact pattern generation unit 43 Lower network data generation unit

Claims (12)

異なる料金体系の複数の系の各系毎の料金を定めた料金データと各系間の接続関係を示す接続関係データとを格納するデータ格納部と、
前記複数の系の各系内の各点をノードとし、各ノードを必要に応じてアークで直接接続し、前記アークで接続したノード間の接続のコストを前記料金データに基づいた料金としたネットワークデータを生成し、前記各系毎のネットワークデータをそれぞれサブネットワークデータとし、前記接続関係データに基づいて異なるサブネットワークデータのノード間を接続する接続アークデータを生成し、前記サブネットワークデータと接続アークデータを料金計算ネットワークデータとするネットワークデータ生成部と、
を備えて構成したことを特徴とする料金計算ネットワーク生成装置。
A data storage unit for storing charge data defining charges for each system of a plurality of systems of different charge systems and connection relation data indicating a connection relation between each system ;
A network in which each point in each system of the plurality of systems is a node, each node is directly connected by an arc as necessary, and the connection cost between the nodes connected by the arc is a fee based on the fee data Data is generated, network data for each system is set as subnetwork data, connection arc data for connecting nodes of different subnetwork data based on the connection relation data is generated, and the subnetwork data and the connection arc are generated. A network data generator that uses the data as charge calculation network data;
A charge calculation network generating device characterized by comprising:
前記ネットワークデータ生成部は、前記複数の系の各系内の全てのノードをアークで互いに直接接続し、前記アークで接続したノード間の接続のコストを前記料金データに基づいた料金としたネットワークデータを、前記料金計算ネットワークデータとして生成する構成とした請求項1に記載の料金計算ネットワーク生成装置。 The network data generation unit is configured to connect all nodes in each of the plurality of systems directly to each other by an arc, and network data in which the cost of connection between the nodes connected by the arc is a fee based on the fee data The charge calculation network generation device according to claim 1, wherein the charge calculation network data is generated as the charge calculation network data. 記ネットワークデータ生成部は、前記アークで接続される前記ノード間の接続のコストを料金零とした前記料金計算ネットワークデータを生成する構成とした請求項1又は2に記載の料金計算ネットワーク生成装置。 Before kine Tsu network data generation unit, according to the cost of the connections between the nodes are pre-connected with Kia over click to claim 1 or 2 and configured to generate the billing network data and Rates zero Charge calculation network generator. 前記ネットワークデータ生成部は、前記料金計算ネットワークデータにおける各サブネットワークをそれぞれ1つの上位のノードと見なし、前記接続関係データに基づいて前記上位ノード間を1つの上位のアークで接続し、この上位アークで接続される前記上位ノード間の接続のコストを1とした上位ネットワークデータを生成してネットワークデータの階層化を行い、
異なる料金体系の複数の系に跨る始点と終点の情報が入力されたときに、予め定めた料金計算上の禁止条件に基づいて、前記上位ネットワークの始点を含む上位ノードから終点を含む上位ノードまでの上位アークのコスト値が所定コスト値以下で且つ始点から終点への経路において上位ノードが重複しないような接続関係を有する連絡パターンを前記上位ネットワークデータから選択し、
前記選択された連絡パターンデータにおける各上位ノードに対応するそれぞれのサブネットワークとこれらサブネットワーク間を接続する接続アークの各データから前記禁止条件を満たす下位ネットワークデータを生成し、この下位ネットワークデータを料金計算ネットワークデータとする請求項1〜3のいずれか1つに記載の料金計算ネットワーク生成装置。
The network data generation unit regards each sub-network in the fee calculation network data as one upper node, and connects the upper nodes with one upper arc based on the connection relation data. The network data is hierarchized by generating upper network data with a connection cost between the upper nodes connected by 1 as 1,
From the upper node including the start point of the upper network to the upper node including the end point based on a predetermined prohibition condition in charge calculation when information on the start point and the end point across multiple systems of different charge systems is input A contact pattern having a connection relationship such that the cost value of the upper arc is equal to or less than a predetermined cost value and the upper node does not overlap in the route from the start point to the end point is selected from the upper network data,
Lower network data satisfying the prohibition condition is generated from each subnetwork corresponding to each upper node in the selected contact pattern data and each connection arc data connecting between the subnetworks, and the lower network data is charged The fee calculation network generation device according to claim 1, wherein the fee calculation network generation device is calculation network data.
前記各サブネットワークデータを、前記接続アークで接続されるノードデータとこれらノード間を接続するアークデータのみで構成し、これらサブネットワークデータと前記接続アークデータからなる簡易ネットワークデータを生成し、
異なる料金体系の複数の系を跨いだ始点と終点の情報が入力されたときに、前記簡易ネットワークデータに始点と終点の各ノードデータ及び始点と終点のそれぞれに接続する各アークデータを追加して、簡易料金計算ネットワークデータを生成する構成とした請求項1〜4のいずれか1つに記載の料金計算ネットワーク生成装置。
Each subnetwork data is composed of only node data connected by the connection arc and arc data connecting these nodes, and generates simple network data composed of the subnetwork data and the connection arc data,
When starting point and ending point information across multiple systems with different fee systems is input, node data of starting point and ending point and arc data connected to each of starting point and ending point are added to the simple network data. The fee calculation network generation device according to claim 1, wherein the fee calculation network generation device is configured to generate simple fee calculation network data.
前記各サブネットワークデータを、前記接続アークで接続されるノードデータとこれらノード間を接続するアークデータのみで構成し、これらサブネットワークデータと前記接続アークデータからなる簡易ネットワークデータを生成し、
前記簡易ネットワークデータに異なる料金体系の複数の系を跨いだ始点と終点の各ノードデータ及び始点と終点のそれぞれに接続する各アークデータを追加した簡易料金計算ネットワークデータを、前記始点と終点の全ての組合せ分予め生成しておき、前記始点と終点の情報が入力されたときに、当該入力情報に対応した簡易料金計算ネットワークデータを選択する構成とした請求項1〜4のいずれか1つに記載の料金計算ネットワーク生成装置。
Each subnetwork data is composed of only node data connected by the connection arc and arc data connecting these nodes, and generates simple network data composed of the subnetwork data and the connection arc data,
Simple fee calculation network data in which each arc data connected to each of the start and end points and each node data of start and end points across a plurality of systems of different charge systems is added to the simple network data, all of the start and end points In any one of claims 1 to 4, a simple charge calculation network data corresponding to the input information is selected when the start point and end point information is input. The fee calculation network generation device described.
前記料金計算ネットワークデータは、各サブネットワークの各ノード毎にダミーノードを追加したノードデータと、各サブネットワーク内のノード間を接続する前記アークの接続元又は接続先のどちらか一方端をダミーノードとしたアークデータとで構成したサブネットワークデータを有すると共に、
前記アークの接続元をダミーノードとしたとき、異なるサブネットワークのノード間を接続する前記接続アークの接続先をダミーノードとする接続アークデータを有し、
前記アークの接続先をダミーノードとしたとき、異なるサブネットワークのノード間を接続する前記接続アークの接続元をダミーノードとする接続アークデータを有する構成とした請求項〜6のいずれか1つに記載の料金計算ネットワーク生成装置。
The fee calculation network data includes node data obtained by adding a dummy node for each node of each subnetwork, and a connection node or a connection destination of the arc connecting the nodes in each subnetwork. With sub-network data composed of arc data and
When the connection source of the arc is a dummy node, connection arc data having a connection destination of the connection arc connecting between nodes of different sub-networks as a dummy node,
The connection arc data according to any one of claims 1 to 6, wherein when the connection destination of the arc is a dummy node, the connection arc data includes a connection source of the connection arc that connects nodes of different sub-networks as a dummy node. Charge calculation network generation device described in 1.
前記料金計算ネットワークデータは、異なる各サブネットワーク間の料金割引のある所定の2点間を直接接続する割引経路を示す割引アークデータを有し、予め定めた前記所定の2点間の料金割引データに基づいて、前記割引アークで接続されるノード間の接続のコストを割引後の料金とする構成である請求項〜7のいずれか1つに記載の料金計算ネットワーク生成装置。 The fee calculation network data includes discount arc data indicating a discount path that directly connects two predetermined points with fee discounts between different sub-networks, and the predetermined fee discount data between the two predetermined points based on, billing network generating device according to any one of claims 1 to 7 which is configured to fee discounted cost of connections between nodes connected by the discount arc. 始点と終点の情報を入力する入力部と、
請求項1〜8のいずれか1つに記載の料金計算ネットワーク生成装置で生成した料金計算ネットワークデータを格納するネットワークデータ格納部と、
始点と終点の情報が入力されたときに、前記ネットワークデータ格納部の料金計算ネットワークデータに基づいて料金計算ネットワークを構築し、前記料金計算ネットワークの前記始点から終点までの最安料金を算出する最安料金算出部と、
算出した前記最安料金結果を出力する出力部と、
を備えて構成したことを特徴とする料金計算装置。
An input unit for inputting information of the start point and the end point;
A network data storage unit for storing fee calculation network data generated by the fee calculation network generation device according to any one of claims 1 to 8;
When the start point and end point information is input, a charge calculation network is constructed based on the charge calculation network data in the network data storage unit, and the lowest charge from the start point to the end point of the charge calculation network is calculated. A low price calculator,
An output unit for outputting the calculated lowest price result;
A charge calculation device comprising:
前記料金計算ネットワークデータが、請求項1〜7のいずれか1つに記載の料金計算ネットワーク生成装置で生成されたデータであるとき、
前記最安料金算出部は、
前記料金計算ネットワークにおける前記始点から終点までのアークのコストが最小となる経路を探索する最小コスト探索部と、
料金割引を適用する経路とその割引額を示す料金割引データに基づいて、前記始点から終点までの経路に適用される割引額の最大値を算出する最大割引額算出部と、
前記最小コスト探索部で探索された最小コストの料金に前記最大割引額算出部で算出した最大割引額を加算して探索閾値を設定する探索閾値設定部と、
前記料金計算ネットワークに基づいて、アークのコストが前記探索閾値以下となる全ての経路を探索し、各経路の料金を算出する第1の料金算出部と、
前記料金割引データに基づいて、探索された経路に割引が適用される経路があるときに、前記第1の料金算出部で算出したその経路の割引適用前料金からその経路に適用される割引額を減算して割引適用後の料金を算出する第2の料金算出部と、
前記第1の料金算出部で算出した料金及び前記第2の料金算出部で算出した料金の中で最安の料金を選択する最安料金選択部と、
を備える構成である請求項9に記載の料金計算装置。
When the fee calculation network data is data generated by the fee calculation network generation device according to any one of claims 1 to 7,
The cheapest price calculation unit
A minimum cost search unit that searches for a route that minimizes the cost of the arc from the start point to the end point in the fee calculation network;
A maximum discount amount calculation unit for calculating a maximum value of the discount amount applied to the route from the start point to the end point based on a route to which the charge discount is applied and fee discount data indicating the discount amount;
A search threshold setting unit that sets a search threshold by adding the maximum discount amount calculated by the maximum discount amount calculation unit to the minimum cost fee searched by the minimum cost search unit;
Based on the fee calculation network, a first fee calculation unit that searches all routes for which the arc cost is equal to or less than the search threshold and calculates a fee for each route;
When there is a route to which a discount is applied to the searched route based on the fee discount data, the discount amount applied to the route from the pre-discount fee for the route calculated by the first fee calculation unit A second charge calculation unit that calculates a charge after applying the discount by subtracting
A cheapest charge selection unit for selecting the lowest charge among the charge calculated by the first charge calculation unit and the charge calculated by the second charge calculation unit;
The charge calculation device according to claim 9, wherein
前記料金計算ネットワークデータが、請求項8に記載の料金計算ネットワーク生成装置で生成されたデータであるとき、
前記最安料金算出部は、前記料金計算ネットワークにおける前記始点から終点までのアークのコストが最小となる経路を探索する最小コスト探索部を備え、この最小コスト探索部で探索された経路のコストを最安料金とする構成である請求項に記載の料金計算装置。
When the fee calculation network data is data generated by the fee calculation network generation device according to claim 8,
The cheapest charge calculation unit includes a minimum cost search unit that searches for a route that minimizes the cost of the arc from the start point to the end point in the charge calculation network, and calculates the cost of the route searched by the minimum cost search unit. The charge calculation apparatus according to claim 9 , wherein the charge calculation apparatus is configured to be the lowest charge.
前記料金が、鉄道運賃である請求項9〜11のいずれか1つに記載の料金計算装置。   The fee calculation device according to any one of claims 9 to 11, wherein the fee is a railway fare.
JP2007251266A 2007-09-27 2007-09-27 Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network Active JP5213403B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007251266A JP5213403B2 (en) 2007-09-27 2007-09-27 Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007251266A JP5213403B2 (en) 2007-09-27 2007-09-27 Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network

Publications (2)

Publication Number Publication Date
JP2009080763A JP2009080763A (en) 2009-04-16
JP5213403B2 true JP5213403B2 (en) 2013-06-19

Family

ID=40655447

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007251266A Active JP5213403B2 (en) 2007-09-27 2007-09-27 Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network

Country Status (1)

Country Link
JP (1) JP5213403B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5772113B2 (en) * 2011-03-18 2015-09-02 富士通株式会社 ROUTE INFORMATION GENERATION DEVICE AND ROUTE INFORMATION GENERATION PROGRAM

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002260018A (en) * 2001-02-26 2002-09-13 Casio Comput Co Ltd Ticket issuing system and ticket issuing processing program
JP3811106B2 (en) * 2002-07-29 2006-08-16 株式会社駅前探険倶楽部 Route search method and route search program

Also Published As

Publication number Publication date
JP2009080763A (en) 2009-04-16

Similar Documents

Publication Publication Date Title
Santos et al. Taxi and ride sharing: A dynamic dial-a-ride problem with money as an incentive
Shrivastava et al. A model for development of optimized feeder routes and coordinated schedules—A genetic algorithms approach
Leurent et al. A user equilibrium, traffic assignment model of network route and parking lot choice, with search circuits and cruising flows
Lu et al. Flexible feeder transit route design to enhance service accessibility in urban area
CN106969777A (en) Path prediction meanss and path Forecasting Methodology
CN103471603B (en) The matching process of a kind of public bus network and road network and device
Schmid Hybrid large neighborhood search for the bus rapid transit route design problem
JP2013190218A (en) Route search method, route search device, and program
Li et al. Multi-modal combined route choice modeling in the MaaS age considering generalized path overlapping problem
Böhmová et al. Computing and listing st-paths in public transportation networks
JP2001165681A (en) Traffic network route searing method
US10928211B2 (en) Method and apparatus for selectively qualifying trajectories in regards to a determination of travel time for a maneuver
Ben Ticha et al. The time-dependent vehicle routing problem with time windows and road-network information
Aslaksen et al. A combined dial-a-ride and fixed schedule ferry service for coastal cities
Yu et al. Optimal routing of multimodal mobility systems with ride‐sharing
Urrutia‐Zambrana et al. Variable neighborhood search to solve the generalized orienteering problem
JP5213403B2 (en) Charge calculation network generation apparatus and charge calculation apparatus using the charge calculation network
Piątkowski et al. Comparison of traffic assignment in VISUM and transport simulation in MATSim
Monroy‐Licht et al. The rural postman problem with time windows
JP2010026777A (en) Device and method for charging at toll gate in toll road
Chou et al. Models for effective deployment and redistribution of shared bicycles with location choices
Ayala et al. A delay-robust touristic plan recommendation using real-world public transportation information
CN102419910B (en) Information provider unit and information providing method
KR20160115838A (en) Apparatus, method and computer program for producing a timing sequence of activities of the user
Ştefănescu et al. Trip planners used in public transportation. Case Study on the city of Timişoara

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100616

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120814

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120815

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121011

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: 20130226

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130226

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5213403

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160308

Year of fee payment: 3

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250