Skip to content

Commit

Permalink
Fix O'Hare boarding
Browse files Browse the repository at this point in the history
  • Loading branch information
ansoncfit committed Nov 16, 2023
1 parent 33b1481 commit bbdc271
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;

Expand Down Expand Up @@ -183,7 +182,9 @@ public FareBounds calculateFare(McRaptorSuboptimalPathProfileRouter.McRaptorStat
Fare fare = fares.getFareOrDefault(null, boardStopZoneId, alightStopZoneId);
cumulativeFarePaid += payFullFare(fare);
} else {
// We have a pass offering unlimited rides, so continue
if (transferAllowance.unlimited) continue;

int fareToPay = 0;
if (agency == Agency.PACE) {
String shortenedRouteId = route.route_id.split("-")[0];
Expand All @@ -196,6 +197,7 @@ public FareBounds calculateFare(McRaptorSuboptimalPathProfileRouter.McRaptorStat
if (boardStation.equals("40890")) { // Boarding at O'Hare; buy a day pass to cover the surcharge
cumulativeFarePaid += CTA_PACE_DAY_PASS - transferAllowance.value;
transferAllowance = new CTAPaceTransferAllowance(true);
break;
}

if (ride > 0) {
Expand Down

0 comments on commit bbdc271

Please sign in to comment.