Decrease penalty for traffic signals
This commit is contained in:
parent
29d1fe315c
commit
367ca7f3ee
1 changed files with 6 additions and 0 deletions
|
@ -46,6 +46,12 @@ public class RouteResultPreparation {
|
|||
double speed = ctx.getRouter().defineSpeed(road);
|
||||
if (speed == 0) {
|
||||
speed = ctx.getRouter().getMinDefaultSpeed();
|
||||
} else {
|
||||
if(speed > 15) {
|
||||
// decrease speed proportionally from 15ms=50kmh -
|
||||
// reference speed 30ms=108kmh - 7kmh
|
||||
speed = speed - ((speed - 15f) / (30f - 15f) * 2f);
|
||||
}
|
||||
}
|
||||
boolean plus = rr.getStartPointIndex() < rr.getEndPointIndex();
|
||||
int next;
|
||||
|
|
Loading…
Reference in a new issue