Hello, <font color="#666">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></font><br><font color="#666">Пнд 06 Янв 2014 15:16:52 +0500, Jrgen Zornig <juergen.zornig@gmail.com> написал:</font><br><blockquote style="padding-left:10px; margin:10px 10px 10px 0px; border-left:#aaa 2px dotted">
  
    
  
  
    <div xsscleaned="moz-cite-prefix">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 target="_blank" xsscleaned="moz-txt-link-abbreviated" href="/compose/?adb_to=lanmaster@hotmail.ru">lanmaster@hotmail.ru</a>:<br>
    </div>
    <blockquote cite="mid:006dc5b2fd1daea7109b607c2ff066ef4b71ea8f@mail.qip.ru" type="cite">
      <div xsscleaned="post-text" itemprop="description">
        <p>Graphhopper is a project for finding routes over a road
          network. It also provides functionality for weighting this
          routing like <code>fastest</code> or <code>shortest</code>
          path e.g. via the FastestWeighting class. Now, the question
          is: how can we extend <code>Graphhopper</code> to use the
          speed data we get from our traffic provider in realtime?</p>
        <p>As I can see:</p>
        <ol>
          <li>We must create a function that gets traffic jam data from
            our database.<br>
          </li>
          <li>We must force use that modified function (Encoder?)
            somewhere in Graphhopper <code>route()</code> function.
            Do I think right?</li>
        </ol>
        <p>Please show me how we can do this by example.</p>
      </div>
      <br>
      <fieldset xsscleaned="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
GraphHopper mailing list
<a target="_blank" xsscleaned="moz-txt-link-abbreviated" href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a>
<a target="_blank" xsscleaned="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre>
    </blockquote>
    <br>
  


</blockquote>