pgRouting

Forum #15 - Topic #151 - Message List

Public Transport

Hi. just recently I have found out about pgRouting and have been looking at docs and demonstrations. A team of four is doing a project on journey planning using public transport. this requires us to implement an algorithm that accesses a database of public transport network - which has all routes + all stops in it. this is extended by a db of stop locations. I was wondering if pgRouting is a suitable tool to provide best connections between any selected two points ? Are there examples of pgRouting used for public transport trip planning? I assume its similar to driving instructions, only it passes through more intermediary points and must additionally use timetables.

Any tips very much appreciated. Qlex

  • Message #514

    Hi,

    Nobody used pgRouting for public transportation route planning yet. But I think it is possible. The only problem is timetables. You need to hack a cost function somehow if you have transfer pointss. It means that you need one more function which assigns additional costs to transfer points according to a timetable and current time and date.

    • Message #528

      Hi, thanx for that info Anton. What about a situation where cost of journey is directly related to time of travel ? That means, you pay a ticket which is valid on all modes of transport for a given time. What that require to add that function you mention ? We have a database of all stops and database which links the stops to routes and relevant timetables.

      • Message #529

        I think you need to use time as cost. And then the function should check the current time (or specified time of travel), compare it with a timetable for each transfer point (I think it is better to add fake edges for each possible transfer) and add a time until next bus/train (increase cost of that fake edge).