pgRouting

Forum #13 - Topic #31 - Message List

Bus routes

Hi,

I would like to know if someone has already used pgrouting for finding the shortest path for bus routes/lines. For example: I am at location X and I want to go to location Y. Which busses should I take and at which respective busstops?

I asume converting the layers of busstops and busroutes into a topology and then using either dijkstra or shooting* should do the trick, but simply I'm curious if someone has already used pgrouting for this.

  • Message #113

    We didn't hear about any bus routing project so far :(

    It sounds very interesting. May I ask you to keep us updated with your project progress?

  • Message #114

    As bus routes usually only cover a part of a complete road network, route calculation time should be fast with any of the algorithms. The convenient thing on bus routing is, that you might have detailed information about travel time, so you can exactly calculate the fastest route.

    Tricky might be the implementation of bus schedules. What happens if someone has to change the line, but just missed the previous bus. If you can integrate the bus timetables, only your bus stops should represent the nodes. For changing bus lines you might have to add some extra costs. I worked with a traffic simulation software in the past, which handled it that way.

    Hope you keep us up-to-date!

    • Message #174

      The convenient thing on bus routing is, that you might have detailed information about travel time, so you can exactly calculate the fastest route.

      Normaly, he, who want to find a route bus,will find a path as fewest bus station as possible. If database havn't full detailed infomation, are there a algorithm for that?

      • Message #175

        Well, If the bus network data has length information, you can calculate fastest path (knowing the avarage bus speed). If the data doesn't have it (which means that all edges have same length value) - you will get a path with fewest number of edges (and if in the dataset edges exist only between stops, it also means with fewest number of stops).

        • Message #184

          Unfortunately it is not as simple as it seems. A bus does not necessarily stop at every bus stop that it passes or you might have to walk a bit from one busstop to the other.

    • Message #115

      There is also the tricky part that you might have to get of one bus, walk to another bus stop and then take another bus. Our idea is to merge the street base and bus lines (which are neatly designed on top of the roads) and put a high cost on arcs that do no have a bus line associated with it.

      There is also the issue of some bus lines not being available and/or having different routes on certain times of the day. We'll be addressing that later though, lets get the basics up and running first :)

      Right now I'm not able to get mapserver up and running, but I hope a reinstall will fix that. I'll let you guys know if we are getting anywhere using pgrouting!