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

Jürgen Zornig juergen.zornig at gmail.com
Mon Jan 6 10:16:30 UTC 2014


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:
>
>  1. We must create a function that gets traffic jam data from our
>     database.
>  2. 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

-------------- n?chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140106/5bbee095/attachment.html>


More information about the GraphHopper mailing list