[GraphHopper] GraphHopper Weighting

Moises Arcos moiarcsan at gmail.com
Wed Nov 5 15:18:30 UTC 2014


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>:

> 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>:
>
>>  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
>>
>>
>> _______________________________________________
>> GraphHopper mailing listGraphHopper at openstreetmap.orghttps://lists.openstreetmap.org/listinfo/graphhopper
>>
>>
>>
>> _______________________________________________
>> GraphHopper mailing list
>> GraphHopper at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/graphhopper
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20141105/aa3d2233/attachment.html>


More information about the GraphHopper mailing list