Make parameter 0-based maxnumber of changes

This commit is contained in:
Victor Shcherb 2019-03-17 17:06:30 +01:00
parent a301490d11
commit 0c8ce1270a
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ public class TransportRoutePlanner {
ctx.visitedRoutesCount++;
ctx.visitedSegments.put(segment.getId(), segment);
if (segment.getDepth() > ctx.cfg.maxNumberOfChanges) {
if (segment.getDepth() > ctx.cfg.maxNumberOfChanges + 1) {
continue;
}
if (segment.distFromStart > finishTime + ctx.cfg.finishTimeSeconds ||

View file

@ -18,7 +18,7 @@ public class TransportRoutingConfiguration {
public int walkChangeRadius = 300;
public int maxNumberOfChanges = 4;
public int maxNumberOfChanges = 3;
public int finishTimeSeconds = 1200;