Skip to content

Commit

Permalink
FIX: NAV-95 - Get actual arrival time at stop to expand footpaths.
Browse files Browse the repository at this point in the history
  • Loading branch information
clukas1 committed Jun 11, 2024
1 parent dc71269 commit e2cde79
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/ch/naviqore/raptor/Raptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,14 @@ private void expandFootpathsFromStop(int stopIdx, int[] earliestArrivals, List<L
return;
}
Stop sourceStop = stops[stopIdx];
int arrivalTime = earliestArrivals[stopIdx];
Leg previousLeg = earliestArrivalsPerRound.get(round)[stopIdx];

// do not relax footpath from stop that was only reached by footpath in the same round
if (previousLeg == null || previousLeg.type == ArrivalType.TRANSFER) {
return;
}

int arrivalTime = previousLeg.arrivalTime();

for (int i = sourceStop.transferIdx(); i < sourceStop.transferIdx() + sourceStop.numberOfTransfers(); i++) {
Transfer transfer = transfers[i];
Expand Down

0 comments on commit e2cde79

Please sign in to comment.