Hello, Nicolas,<br><br>Why do I need to change any edge's weight? <br><span id="result_box" class="short_text" lang="en"><span class="hps">My thought is about make no change </span></span>in the graph data, but parallel calculate my own weights and use that in algorithm-place, where gets original Graph's weights.<br>May be my things was incorrect, please explain me.<br><br><font color="#666">Пнд 06 Янв 2014 16:05:06 +0500, Nicolas Gillet <nicolas.gillet@market-ip.com> написал:</font><br><blockquote style="padding-left:10px; margin:10px 10px 10px 0px; border-left:#aaa 2px dotted">
<div xsscleaned="WordSection1">
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hello guys,<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">That implementation won’t be efficient I think.<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">First thing you must know about using real time weighting is that you won’t be able to use contractions hierarchies unless you re-contract the
whole graph any time you change any edge’s weight.<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">Without contraction you’ll have a serious downgrade of performances.<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">If you still want to perform real time weighting, the best option is to update the edge’s weight with your live traffic info, so updating the flags.<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><span lang="EN-US">> 1.) Which flags are included and which position they are set?<br>
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">This depends on the flag encoders you use, check the CarFlagEncoder class.<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><span lang="EN-US">> 2.) Is there a convinient way to get a single EdgeIteratorState Object directly by poviding its ID?</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US"><o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">If you know it’s GraphHopper’s ID, you can do graph.getEdgeProps(edgeId, Integer.MIN_VALUE) but you’ll have to maintain a way to link OSM ID’s
with GH’s ids.<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US">Regards,<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Nicolas GILLET<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></b></p>
<p xsscleaned="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Market-IP –</span></b><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
</span></i><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#404040">Creating Mobile Intelligence</span></i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Phone : +32 81 33 11 11
<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Fax : +32 81 33 11 10<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a target="_blank" href="http://www.market-ip.com/">www.market-ip.com</a> –
<a target="_blank" href="http://www.telefleet.com/">www.telefleet.com</a> – <a target="_blank" href="http://www.geoplanning.net/">
www.geoplanning.net</a> – <a target="_blank" href="http://www.drivexpert.net/">www.drivexpert.net</a>
<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><a target="_blank" href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;text-decoration:none"><img xsscleaned="Image_x0020_1" src="/mess/cid~34206;image001.png@01CF0AD5.FD12E720" alt="Description : cid:image003.png@01CD5521.849F3340" border="0" height="25" width="30"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p xsscleaned="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="FR">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="FR"> lanmaster@hotmail.ru [mailto:lanmaster@hotmail.ru]
<br>
<b>Envoyé :</b> lundi 6 janvier 2014 11:47<br>
<b>À :</b> Jrgen Zornig<br>
<b>Cc :</b> GraphHopper Java routing engine<br>
<b>Objet :</b> Re: [GraphHopper] How to consider traffic jam when route on road network?<o:p></o:p></span></p>
<p xsscleaned="MsoNormal"><o:p> </o:p></p>
<p xsscleaned="MsoNormal">Hello, Jrgen!<br>
<br>
I think about this implementation:<br>
1. We have in-memory arraylist, that contains infos about traffic jam<br>
2. We have function that can calculate weight of way by two coordinate pairs (from node / to node)<br>
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.<br>
<br>
Can that implementation be useful, how do you think?<br>
<br>
<br>
Пнд 06 Янв 2014 15:16:52 +0500, Jrgen Zornig <<a target="_blank" href="/compose/?adb_to=juergen.zornig@gmail.com">juergen.zornig@gmail.com</a>> написал:<o:p></o:p></p>
<div>
<p xsscleaned="MsoNormal">I am also trying to figure out how real time graph modifications and short and temporary events should be handled for the routing.<br>
<br>
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.<br>
<br>
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).<br>
<br>
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.<br>
<br>
So I want to add to this question: <br>
<br>
1.) Which flags are included and which position they are set?<br>
2.) Is there a convinient way to get a single EdgeIteratorState Object directly by poviding its ID?<br>
<br>
I am in need of these functions to handle real time traffic data on the graph. <br>
<br>
P.S. Perhaps we can figure it out by ourselves, so Peter doesn't have to answer every single question ;)
<br>
<br>
Regards,<br>
<br>
Juergen<br>
<br>
Am 06.01.2014 09:54, schrieb <a href="/compose/?adb_to=lanmaster@hotmail.ru" target="_blank">
lanmaster@hotmail.ru</a>:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p>Graphhopper is a project for finding routes over a road network. It also provides functionality for weighting this routing like
<code><span style="font-size:10.0pt">fastest</span></code> or <code><span style="font-size:10.0pt">shortest</span></code> path e.g. via the FastestWeighting class. Now, the question is: how can we extend
<code><span style="font-size:10.0pt">Graphhopper</span></code> to use the speed data we get from our traffic provider in realtime?<o:p></o:p></p>
<p>As I can see:<o:p></o:p></p>
<ol start="1" type="1">
<li xsscleaned="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
We must create a function that gets traffic jam data from our database.<o:p></o:p></li><li xsscleaned="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
We must force use that modified function (Encoder?) somewhere in Graphhopper <code>
<span style="font-size:10.0pt">route()</span></code> function. Do I think right?<o:p></o:p></li></ol>
<p>Please show me how we can do this by example.<o:p></o:p></p>
</div>
<p xsscleaned="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>GraphHopper mailing list<o:p></o:p></pre>
<pre><a href="mailto:GraphHopper@openstreetmap.org" target="_blank">GraphHopper@openstreetmap.org</a><o:p></o:p></pre>
<pre><a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a><o:p></o:p></pre>
</blockquote>
<p xsscleaned="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>