<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Sprechblasentext Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;}
span.E-MailFormatvorlage21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.SprechblasentextZchn
{mso-style-name:"Sprechblasentext Zchn";
mso-style-priority:99;
mso-style-link:Sprechblasentext;
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1387602827;
mso-list-template-ids:-2048653684;}
@list l0:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US> > @Override<br> > public double getMinWeight(double distance) {<br> > return distance;<br> > }</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><br>this will probably cause big troubles using astar or astarbi algorithm, as it is used by the heuristic (which must overestimate the real cost).<br>so it should be distance/maxspeed for all fastest weightings.<br><br></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>regards,<br>philipp<br><br><br><br><o:p></o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Alexander Cherepanov [mailto:lanmaster@hotmail.ru] <br><b>Gesendet:</b> Freitag, 10. Januar 2014 07:38<br><b>An:</b> Peter K<br><b>Cc:</b> GraphHopper Ja</span><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>va routing engine<br><b>Betreff:</b> Re: [GraphHopper] How to consider traffic jam when route on road net<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div id=mailContent><p class=MsoNormal><span lang=EN-US>Hello, Peter!<br>Than</span>k you very much!<br>I was try and it is ok.<br><span lang=EN-US>Let me show for others people some code for example:<br><br>// somewhere in main() method (for example)<br> CmdArgs args1 = CmdArgs.readFromConfig("Cfg/Graphhopper.cfg", "graphhopper.config");<br> GraphHopper gh = new GraphHopperJam().forServer().init(args1);<br> gh.setEncodingManager(new EncodingManager("CAR"));<br> gh.importOrLoad();<br> GHRequest request = new GHRequest(56.833703,60.687447,56.777473,60.623331);<br> // there is our own weighting method selection<br> request.setWeighting("fastestjam"); // look here<br> GHResponse response = gh.route(request);<br> double res = response.getDistance();<br><br>// GraphHopperJam.java<br>public class GraphHopperJam extends GraphHopper {<br> protected Weighting createWeighting( String weighting, FlagEncoder encoder )<br> {<br> // ignore case<br> weighting = weighting.toLowerCase();<br> if ("shortest".equals(weighting))<br> return new ShortestWeighting();<br> if ("fastestjam".equals(weighting)) // look here, it is added for selectable our weighting class<br> return new FastestJamWeighting(); // our weighting class<br> return new FastestWeighting(encoder);<br> }<br><br>}<br><br>// FastestJamWeighting.java<br>public class FastestJamWeighting implements Weighting {<br><br> @Override<br> public double getMinWeight(double distance) {<br> return distance;<br> }<br><br> @Override<br> public double calcWeight(EdgeIteratorState edgeIter) {<br> return edgeIter.getDistance(); // It will be changed for our weight algorithm<br> }<br><br> @Override<br> public double revertWeight(EdgeIteratorState iter, double weight) {<br> return weight;<br> }<br><br> @Override<br> public String toString() {<br> return "FASTESTJAM|";<br> }<br>}<br><br><br></span>Чтв<span lang=EN-US> 09 </span>Янв<span lang=EN-US> 2014 16:23:52 +0600, Peter K <</span><a href="mailto:peathal@yahoo.de"><span lang=EN-US>peathal@yahoo.de</span></a><span lang=EN-US>> </span>написал<span lang=EN-US>:<o:p></o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>Hey,<br><br>if you don't use maven you'll have to add the dependencies explicitely. If you use maven it will download the dependencies you need and include it automatically into your project. IntelliJ and NetBeans are good in handling maven projects.<br><br>> but it would be very nice if we can use Graphhopper as library and extends<br>> or implements some classes/methods for our purposes (instead overwrite the Weighting)<br><br>with 'overwrite' I meant extending and 'overloading' the method. No need to change the sources for this.<br><br>Regards,<br>Peter.<br><br><o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hello again!<br>Also it is hard to reuse source code...<br>I get 0.2 version, unpack folder "\graphhopper-0.2\core\src\main\java\com\graphhopper\" to my IntelliJ IDEA's project folder \project\src\com\graphhopper\<br>and I get import error in "InstructionList.java":<br>import gnu.trove.list.TDoubleList;<br>Where to get that code?<br>Why don't you include that sources to your project?<br><br><br><br><br>Пнд 06 Янв 2014 18:22:46 +0600, Peter K <a href="http://mail.qip.ru/compose/?adb_to=peathal@yahoo.de" target="_blank"><peathal@yahoo.de></a> написал:<o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>Hi,<br><br>indeed: if you are updating the edges in real time you won't be able to use CH or you will have to prepare the graph again which is not real-time but okayish for country-sized data like Germany (<10min) and good for even big cities (<2min). Updating the already contracted graph is possible but complex and tedious.<br><br>If you maintain some mapping between OSM IDs (or GPS data) and the GraphHopper edge IDs this "update" process is easily implemented (and should be very fast) if you overwrite the Weighting (no changes necessary to the FlagEncoder I think) and return your own:<br><br>@Override<br>public double calcWeight( EdgeIteratorState edge ) {<br> return getWeightForID(edge.getEdge());<br>}<br><br><br>> Even when you know the Edge Id, you have to iterate over all Edges.<br><br>As Nicolas pointed out there is the getEdgeProps method, but I think extending "Weighting" should be sufficient.<br><br><br>> how to set this bitmask because I couldn't find any documentation on to flags itself.<br><br>Yes, again as Nicolas said (thanks btw :) !) there is no documentation but you can see the CarFlagEncoder class and its unit tests. Mainly the first two bits specifies the access (forward?, backward?) and then the speed as integer (but with low resolution - only 5km/h). You should increase the resolution if you have very precise real time data.<br><br>Regards,<br>Peter.<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hello,</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It could work but I think that this will get the routing algorithm even slower.</span><o:p></o:p></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Add this to the drop of contraction your performances would get really poor I’m afraid.</span><o:p></o:p></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Nicolas GILLET</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></b><o:p></o:p></p><p><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:#404040'>Creating Mobile Intelligence</span></i><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Phone : +32 81 33 11 11 </span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Fax : +32 81 33 11 10</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.market-ip.com/" target="_blank">www.market-ip.com</a> – <a href="http://www.telefleet.com/" target="_blank">www.telefleet.com</a> – <a href="http://www.geoplanning.net/" target="_blank">www.geoplanning.net</a> – <a href="http://www.drivexpert.net/" target="_blank">www.drivexpert.net</a> </span><o:p></o:p></p><p><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><b><span lang=FR style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'>De :</span><span style='color:windowtext;font-weight:normal;text-decoration:none'> <u><span style='color:blue'>lanmaster@hotmail.ru</span></u> [<u><span style='color:blue'>mailto:lanmaster@hotmail.ru</span></u>] <br></span><span style='color:windowtext;text-decoration:none'>Envoyé :</span><span style='color:windowtext;font-weight:normal;text-decoration:none'> lundi 6 janvier 2014 12:17<br></span><span style='color:windowtext;text-decoration:none'>À :</span><span style='color:windowtext;font-weight:normal;text-decoration:none'> Nicolas Gillet<br></span><span style='color:windowtext;text-decoration:none'>Cc :</span><span style='color:windowtext;font-weight:normal;text-decoration:none'> GraphHopper Java routing engine; Jrgen Zornig<br></span><span style='color:windowtext;text-decoration:none'>Objet :</span><span style='color:windowtext;font-weight:normal;text-decoration:none'> Re: Re: [GraphHopper] How to consider traffic jam when route on road network</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;font-weight:normal;text-decoration:none'><o:p></o:p></span></a></span></b></p><p><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></a></p><p><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'>Hello, Nicolas,<br><br>Why do I need to change any edge's weight? <br></span><span lang=EN style='color:windowtext;text-decoration:none'>My thought is about make no change </span><span style='color:windowtext;text-decoration:none'>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>Пнд 06 Янв 2014 16:05:06 +0500, Nicolas Gillet <<u><span style='color:blue'>nicolas.gillet@market-ip.com</span></u>> написал:<o:p></o:p></span></a></p><div><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Hello guys,</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>That implementation won’t be efficient I think.</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>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.</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Without contraction you’ll have a serious downgrade of performances.</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>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.</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'>> 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;text-decoration:none'>This depends on the flag encoders you use, check the CarFlagEncoder class.</span><span lang=DE style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'>> 2.) Is there a convinient way to get a single EdgeIteratorState Object directly by poviding its ID?</span><span lang=DE style='color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>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.</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Regards,</span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span lang=DE style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Nicolas GILLET</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;font-weight:normal;text-decoration:none'><o:p></o:p></span></a></span></b></p><p><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Market-IP –</span><i><span style='color:#404040;font-weight:normal;text-decoration:none'>Creating Mobile Intelligence</span></i><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;font-weight:normal;text-decoration:none'><o:p></o:p></span></a></span></b></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Phone : +32 81 33 11 11 </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'>Fax : +32 81 33 11 10</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:#1F497D;text-decoration:none'><u><span style='color:blue'>www.market-ip.com</span></u> – <u><span style='color:blue'>www.telefleet.com</span></u> – <u><span style='color:blue'>www.geoplanning.net</span></u> – <u><span style='color:blue'>www.drivexpert.net</span></u> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:windowtext;text-decoration:none'><o:p></o:p></span></a></span></p><p><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p></o:p></span><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;text-decoration:none'> </span><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></p><p><b><span lang=FR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;text-decoration:none'>De :</span></b><span lang=FR style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;text-decoration:none'> <u><span style='color:blue'>lanmaster@hotmail.ru</span></u> [<u><span style='color:blue'>mailto:lanmaster@hotmail.ru</span></u>] <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?</span><span style='color:windowtext;text-decoration:none'><o:p></o:p></span></p><p><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></p><p><span style='color:windowtext;text-decoration:none'>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 <<u><span style='color:blue'>juergen.zornig@gmail.com</span></u>> написал:<o:p></o:p></span></p><div><p><span style='color:windowtext;text-decoration:none'>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 <u><span style='color:blue'>lanmaster@hotmail.ru</span></u>:<o:p></o:p></span></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p><span style='color:windowtext;text-decoration:none'>Graphhopper is a project for finding routes over a road network. It also provides functionality for weighting this routing like </span><code><span style='font-size:10.0pt;color:windowtext;text-decoration:none'>fastest</span></code><span style='color:windowtext;text-decoration:none'> or </span><code><span style='font-size:10.0pt;color:windowtext;text-decoration:none'>shortest</span></code><span style='color:windowtext;text-decoration:none'> path e.g. via the FastestWeighting class. Now, the question is: how can we extend </span><code><span style='font-size:10.0pt;color:windowtext;text-decoration:none'>Graphhopper</span></code><span style='color:windowtext;text-decoration:none'> to use the speed data we get from our traffic provider in realtime?<o:p></o:p></span></p><p><span style='color:windowtext;text-decoration:none'>As I can see:<o:p></o:p></span></p><ol start=1 type=1><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'><span style='color:windowtext;text-decoration:none'>We must create a function that gets traffic jam data from our database.<o:p></o:p></span></li><li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1'><span style='color:windowtext;text-decoration:none'>We must force use that modified function (Encoder?) somewhere in Graphhopper </span><code><span style='font-size:10.0pt;color:windowtext;text-decoration:none'>route()</span></code><span style='color:windowtext;text-decoration:none'> function. Do I think right?<o:p></o:p></span></li></ol><p><span style='color:windowtext;text-decoration:none'>Please show me how we can do this by example.<o:p></o:p></span></p></div><p style='margin-bottom:12.0pt'><span style='color:windowtext;text-decoration:none'><o:p> </o:p></span></p><pre><span style='color:windowtext;text-decoration:none'>_______________________________________________<o:p></o:p></span></pre><pre><span style='color:windowtext;text-decoration:none'>GraphHopper mailing list<o:p></o:p></span></pre><pre><span style='color:windowtext;text-decoration:none'><u><span style='color:blue'>GraphHopper@openstreetmap.org</span></u><o:p></o:p></span></pre><pre><span style='color:windowtext;text-decoration:none'><u><span style='color:blue'>https://lists.openstreetmap.org/listinfo/graphhopper</span></u><o:p></o:p></span></pre></blockquote><p><span style='color:windowtext;text-decoration:none'> <o:p></o:p></span></p></a></p></div><p class=MsoNormal><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><br><br><br><o:p></o:p></span></a></p><pre><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'>_______________________________________________<o:p></o:p></span></a></pre><pre><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'>GraphHopper mailing list<o:p></o:p></span></a></pre><pre><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><u><span style='color:blue'>GraphHopper@openstreetmap.org</span></u><o:p></o:p></span></a></pre><pre><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><u><span style='color:blue'>https://lists.openstreetmap.org/listinfo/graphhopper</span></u><o:p></o:p></span></a></pre></div><p class=MsoNormal><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p> </o:p></span></a></p><p class=MsoNormal style='margin-bottom:12.0pt'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><br><br>--<o:p></o:p></span></a></p></blockquote><p class=MsoNormal><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><o:p> </o:p></span></a></p><p class=MsoNormal style='margin-bottom:12.0pt'><a href="http://www.linkedin.com/groups/MarketIP-4289716?gid=4289716&trk=hb_side_g" target="_blank"><span style='color:windowtext;text-decoration:none'><br><br>--<o:p></o:p></span></a></p></blockquote></div></div></body></html>