route planning

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andre Meyer

    route planning

    Hi all

    Just a very simple question: where can I find a module for route planning?

    I have looked around and found some implementations of graph theory, e.g.
    http://sourceforge.net/projects/pynetwork/. But, what I need is not an
    abstract graph, but one where nodes/vertices have locations (2D), are
    connected (to follow a path, respecting distance among nodes) and where I
    can easily find the closest edge and vertex from any point in space.

    your links are much appreciated
    thanks
    André
  • Jon Clements

    #2
    Re: route planning

    It's not really what you're after, but I hope it might give some ideas
    (useful or not, I don't know).

    How about considering a vertex as a point in space (most libraries will
    allow you to decorate a vertex with additonal information), then
    creating an edge between vertices, which will be your 'path'. You can
    then decorate the edge with information such as distance/maximum speed
    etc...

    Then all you need to do is use an A* path algorithm or shortest path
    search to get the shortest / most efficient route.... You might need a
    custom visitor to suit the 'weight'/'score' of how efficient the path
    is.

    I know this probably isn't of much help, but I hope it comes in useful;
    I've only ever used Boost.Graph (which is C++, but I believe it has a
    Python binding) and that was for something else -- although I do recall
    it had examples involving Kevin Bacon and dependency tracking etc... so
    a good old Google might do you some good -- ie, it's not completely
    related, but it might give you a few extra things to search on...

    All the best with the search.

    Jon.

    PS. If you do find a library, can you let me know? I'd be interested in
    having a play with it...

    Comment

    Working...