diff --git a/src/main/java/com/conveyal/r5/analyst/fare/ChicagoRTAInRoutingFareCalculator.java b/src/main/java/com/conveyal/r5/analyst/fare/ChicagoRTAInRoutingFareCalculator.java index 0590251dc..08b7ee66b 100644 --- a/src/main/java/com/conveyal/r5/analyst/fare/ChicagoRTAInRoutingFareCalculator.java +++ b/src/main/java/com/conveyal/r5/analyst/fare/ChicagoRTAInRoutingFareCalculator.java @@ -58,6 +58,12 @@ private CTAPaceTransferAllowance (int value, int number, int expirationTime) { this.unlimited = false; } + private CTAPaceTransferAllowance (int value, int number, int expirationTime, boolean unlimited) { + super(value, number, expirationTime); + this.unlimited = unlimited; + } + + private CTAPaceTransferAllowance (boolean unlimited) { this.unlimited = unlimited; } @@ -67,6 +73,15 @@ private CTAPaceTransferAllowance redeem (int fareToBoard) { return new CTAPaceTransferAllowance(Math.max(fareToBoard, this.value), this.number - 1, this.expirationTime); } + + @Override + public CTAPaceTransferAllowance tightenExpiration (int maxClockTime) { + // copied from TransferAllowance but need to override so that everything stays a BostonTransferAllowance + int expirationTime = Math.min(this.expirationTime, maxClockTime); + return new CTAPaceTransferAllowance(this.value, this.number, expirationTime, this.unlimited); + } + + } // For now, there are no transfer allowances to/from Metra