---------- Forwarded message ---------- From: Александр Черепанов <[email protected]> Date: 2014-12-09 17:31 GMT+05:00 Subject: Cannot change weighting mechanism To: [email protected]
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 [email protected] https://lists.openstreetmap.org/listinfo/graphhopper
