[GraphHopper] Fwd: Cannot change weighting mechanism

Peter graphhopper at gmx.de
Tue Dec 9 17:41:19 UTC 2014


If you enable contraction hierarchies you currently cannot do on-demand
weighting. So disable CH in config.properties (prepare.chShortcuts=no)
or via hopper.setCHEnable(false)

If that is too slow, I fear you have to wait until we build the more
flexible but still fast routing algorithm.

Regards,
Peter


On 09.12.2014 18:34, Александр Черепанов wrote:
>
> ---------- Forwarded message ----------
> From: *Александр Черепанов* <lanmaster at hotmail.ru
> <mailto:lanmaster at hotmail.ru>>
> Date: 2014-12-09 17:31 GMT+05:00
> Subject: Cannot change weighting mechanism
> To: graphhopper at openstreetmap.org <mailto:graphhopper at openstreetmap.org>
>
>
> Good day.
> We have modificate our project with this doc:
> https://github.com/graphhopper/graphhopper/blob/0.3/docs/core/weighting.md
>
> Parameters in config file:
> prepare.chShortcuts=fastest
>
>
> There is our method:
>
> @Override
> public double calcWeight( EdgeIteratorState edge, boolean reverse )
> {
> /*
>         if(forbiddenEdges.contains(edge.getEdge()))
>             return Double.POSITIVE_INFINITY;
> */
>
>     double speed = reverse ?
> encoder.getReverseSpeed(edge.getFlags()):encoder.getSpeed(edge.getFlags());
>         if (speed == 0)
>             return Double.POSITIVE_INFINITY;
>         double res = Math.random() * edge.getDistance() / speed;
>         return res;
>     }
>
> We want to simulate road jamm this way with Random weighting, but
> there is no changes in result track. What we are doing wrong?
>
>
>
> _______________________________________________
> 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/20141209/3568ff0f/attachment.html>


More information about the GraphHopper mailing list