[GraphHopper] GraphHopper Weighting

Peter graphhopper at gmx.de
Wed Nov 12 23:46:23 UTC 2014


Hi,

maybe because of the 4 virtual edges which are created per query point?
E.g. if there is an edge with ID=X then when you use a start or end
point directly on this edge there will be new virtual edges which are not X

Depending on the usecase you'll have to tweak the QueryGraph or the
Weighting or something else.

Regards,
Peter

On 12.11.2014 16:35, Moises Arcos wrote:
> Hi all,
>
> I've been trying to get an edge id using the findClosest method, but I
> don't know what edge id returns.
> I need to avoid an edge list, but when I try to calculate the weigth
> of an edge, never is equals than the EdgeIteratorState.
>
> Anybody knows why?
>
> Regards!!!
>
> 2014-11-05 16:18 GMT+01:00 Moises Arcos <moiarcsan at gmail.com
> <mailto:moiarcsan at gmail.com>>:
>
>     Thank you for your answer.
>
>     I followed your instructions and I used the initCHPrepare method
>     to update the edges list.
>
>     But I have another trouble: When the list is updated, there isn't
>     any edge that is inside my list.
>     I mean that in the method calcWeight [1] not found any edge that
>     is the same than another. This condition is always false.
>
>     ¿How do I know if I'm selecting the right edge? I used the
>     location index [2]
>
>     Regards!!!
>
>     [1] https://github.com/moiarcsan/smartcity-traffic-jam/blob/master/smc-tj-engine/src/main/java/com/graphhopper/BlockingWeighting.java#L35
>     [2] https://github.com/graphhopper/graphhopper/blob/master/docs/core/location-index.md
>
>
>
>     2014-11-05 13:52 GMT+01:00 Moises Arcos <moiarcsan at gmail.com
>     <mailto:moiarcsan at gmail.com>>:
>
>         Hi, 
>
>         I'm trying to do that you told me, but I don't know how I have
>         to call the preparation method.
>
>         Where could I find it?
>
>         Thanks
>
>
>
>         2014-11-05 13:04 GMT+01:00 Peter <graphhopper at gmx.de
>         <mailto:graphhopper at gmx.de>>:
>
>             Hi,
>
>             as you have CH enabled you will need to call the
>             preparation everytime the road issues change.
>
>             Or just disable CH before the import to make traffic jam
>             integration easy and possible 'on-the-fly'.
>             (graphHopper.setCHEnable(false) or graphHopper.disableCH
>             in previous versions)
>
>             Regards,
>             Peter.
>
>
>             On 05.11.2014 12:43, Moises Arcos wrote:
>>             Hi all,
>>
>>             I'm trying investigate if it's possible implement a
>>             routing method that it's able to recalculate the route
>>             when there is an issue in a street near to fastest route.
>>
>>             For example I want to go from an A point to B point but
>>             one of the street that I get with graphhopper routing
>>             engine has a traffic jam, so I would like to calculate
>>             with graphhopper an alternative route, but I don't know
>>             how I can do it.
>>
>>             I've been trying to do the next thing:
>>
>>             I've implemented a Weighting class with a callWeigth
>>             method [1], and a class that extends GraphHopper [2] and
>>             when I'm going to use it [3] it's not working correctly.
>>
>>             I don't know what Im doing wrong because I followed the
>>             weighting guidelines. I have only a reason that explains
>>             this problem.
>>
>>             Could the graph's edges updated when the graph has been
>>             already made?
>>
>>             I need some help.
>>
>>             Thanks
>>
>>             Regards!!!
>>
>>             [1] https://github.com/moiarcsan/smartcity-traffic-jam/blob/master/smc-tj-engine/src/main/java/com/graphhopper/BlockingWeighting.java
>>             [2] https://github.com/moiarcsan/smartcity-traffic-jam/blob/master/smc-tj-engine/src/main/java/com/graphhopper/TrafficJamGraph.java
>>             [3] https://github.com/moiarcsan/smartcity-traffic-jam/blob/master/smc-tj-engine/src/main/java/com/emergya/smc/tj/TrafficJamHandler.java
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20141113/3451f809/attachment.html>


More information about the GraphHopper mailing list