<div dir="ltr"><div><div><div>Hi Peter,<br><br></div>My bad. My validation logic was not correct. I literally compared updated speed value to expected speed value using equal comparator. They are always different as the way Graphhopper processes double value. <br><br></div>When I provided 1.0 variance in the comparison (i.e. Math.abs(current_speed - new_speed) > 1.0), I could confirm that the graph data actually flushed and persisted to disc.<br><br></div>By the way, is the speed used in Graphhopper km/hour or mile/hour?<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Kind Regards,<br>Tuan.</div></div></div>
<br><div class="gmail_quote">On 3 July 2015 at 01:28, Peter <span dir="ltr"><<a href="mailto:graphhopper@gmx.de" target="_blank">graphhopper@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi Tuan,<br>
      <br>
      hmmh, good question :)<br>
      <br>
      Did you try the RAMDataAccess with store to true and try if this
      works?<br>
      Maybe you can create a small and failing test?<br>
      <br>
      Regards,<br>
      Peter<div><div class="h5"><br>
      <br>
      On 02.07.2015 15:22, Tuan Nguyen wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi,<br>
                  <br>
                </div>
                In my project, I created a GraphHopper object with
                following initialization:<br>
                        hopper = new GraphHopper();<br>
                        hopper.setCHEnable(false);<br>
                        hopper.setMemoryMapped();<br>
                        hopper.setOSMFile(PBF_FILE);<br>
                        hopper.setGraphHopperLocation(GRAPH_FOLDER);<br>
                        encoder = new CarFlagEncoder();<br>
                        hopper.setEncodingManager( new EncodingManager(
                encoder ) );<br>
                        hopper.setPreciseIndexResolution(20);<br>
                        hopper.importOrLoad();<br>
                <br>
              </div>
              I then used Map Matching component to find and update
              speed of a number of edges. I could confirm that this
              update was successful as the routing results before &
              after updating speed were different.<br>
              <br>
            </div>
            However, when I tried to persist the updated edges by
            calling hopper.getGraph().flush(), the new speed was not
            stored to disc.<br>
            <br>
          </div>
          MMap was used as DataAccessType so I suppose flush is enabled.<br>
          <br>
        </div>
        Am I missing anything here?<br>
        <div>
          <div>
            <div><br clear="all">
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div dir="ltr">Kind Regards,<br>
                            Tuan.</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
GraphHopper mailing list
<a href="mailto:GraphHopper@openstreetmap.org" target="_blank">GraphHopper@openstreetmap.org</a>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
GraphHopper mailing list<br>
<a href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/graphhopper</a><br>
<br></blockquote></div><br></div>