[GraphHopper] How to ­consider traffic jam when­ route on road network?

lanmaster at hotmail.ru lanmaster at hotmail.ru
Mon Jan 6 10:47:28 UTC 2014


Hello, Jrgen!

I think about this implementation:
1. We have in-memory arraylist, that contains infos about traffic jam
2. We have function that can calculate weight of way by two coordinate pairs (from node / to node)
3. We have modification on Graphhopper's route calculate algorithm, that can request weight from our weight function (2) and summarize it with original Graphhopper's weight.

Can that implementation be useful, how do you think?

Пнд 06 Янв 2014 15:16:52 +0500, Jrgen Zornig  написал:  
  
    I am also trying to figure out how real
      time graph modifications and short and temporary events should be
      handled for the routing.

      I assume you use to OSM graph? That makes things more complicated
      I think,because I have not found a function to retrieve a single
      Edge without iterating over and over the whole graph. Even when
      you know the Edge Id, you have to iterate over all Edges.

      In our scenario, we use a different (our own) graph, and while
      loading it, I build up a HashMap for all EdgeIteratorState Objects
      I have generated during loading. So I can easily find a
      corresponding Edge for a given TrafficJam, either by directly
      referencing it over our EdgeIds or by finding out the Id via the
      LocationIndex (NodeIds and the referenced EdgeIds).

      When having the corresponding EdgeIteratorState Object it should
      be simple to deactivate the Edge by calling setFlags(), but I also
      have no clue yet, how to set this bitmask because I couldn't find
      any documentation on to flags itself.

      So I want to add to this question:

      1.) Which flags are included and which position they are set?

      2.) Is there a convinient way to get a single EdgeIteratorState
      Object directly by poviding its ID?

      I am in need of these functions to handle real time traffic data
      on the graph.

      P.S. Perhaps we can figure it out by ourselves, so Peter doesn't
      have to answer every single question ;)

      Regards,

      Juergen

      Am 06.01.2014 09:54, schrieb lanmaster at hotmail.ru:        
        
Graphhopper is a project for finding routes over a road
          network. It also provides functionality for weighting this
          routing like fastest or shortest
          path e.g. via the FastestWeighting class. Now, the question
          is: how can we extend Graphhopper to use the
          speed data we get from our traffic provider in realtime?        
        
As I can see:        
        
          We must create a function that gets traffic jam data from
            our database.          
          
          We must force use that modified function (Encoder?)
            somewhere in Graphhopper route() function.
            Do I think right?        
        
Please show me how we can do this by example.      
      
_______________________________________________
GraphHopper mailing list
GraphHopper at openstreetmap.org
https://lists.openstreetmap.org/listinfo/graphhopper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140106/34c1f433/attachment.html>


More information about the GraphHopper mailing list