Skip to content

Commit bb9af6e

Browse files
committed
Merge branch 'remove-via-slowdown' into v2
2 parents f0e7ce2 + 0d8a216 commit bb9af6e

20 files changed

Lines changed: 237 additions & 40 deletions

File tree

application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
<dependency>
382382
<groupId>com.azure</groupId>
383383
<artifactId>azure-messaging-servicebus</artifactId>
384-
<version>7.17.16</version>
384+
<version>7.17.17</version>
385385
</dependency>
386386
<dependency>
387387
<groupId>com.azure</groupId>

application/src/client/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<link rel="icon" type="image/svg+xml" href="/img/otp-logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>OTP Debug</title>
8-
<script type="module" crossorigin src="https://www.opentripplanner.org/debug-client-assets/2026/02/2026-02-02T16:55/assets/index-XJnYWmAF.js"></script>
9-
<link rel="stylesheet" crossorigin href="https://www.opentripplanner.org/debug-client-assets/2026/02/2026-02-02T16:55/assets/index-CME2K3XJ.css">
8+
<script type="module" crossorigin src="https://www.opentripplanner.org/debug-client-assets/2026/02/2026-02-12T14:52/assets/index-DuY9OjzB.js"></script>
9+
<link rel="stylesheet" crossorigin href="https://www.opentripplanner.org/debug-client-assets/2026/02/2026-02-12T14:52/assets/index-CME2K3XJ.css">
1010
</head>
1111
<body>
1212
<div id="root"></div>

application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ public static GraphQLObjectType create(
218218
.dataFetcher(env -> ((TripTimeOnDate) env.getSource()).isCanceledEffectively())
219219
.build()
220220
)
221+
.field(
222+
GraphQLFieldDefinition.newFieldDefinition()
223+
.name("extraCall")
224+
.type(new GraphQLNonNull(Scalars.GraphQLBoolean))
225+
.description("Whether this call is an extra call introduced by real-time data")
226+
.dataFetcher(env -> ((TripTimeOnDate) env.getSource()).isExtraCall())
227+
.build()
228+
)
221229
.field(
222230
GraphQLFieldDefinition.newFieldDefinition()
223231
.name("date")

application/src/main/java/org/opentripplanner/model/TripTimeOnDate.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ public boolean isCancelledStop() {
284284
);
285285
}
286286

287+
public boolean isExtraCall() {
288+
return tripTimes.isExtraCall(stopPosition);
289+
}
290+
287291
public boolean isPredictionInaccurate() {
288292
return tripTimes.isPredictionInaccurate(stopPosition);
289293
}

application/src/main/java/org/opentripplanner/transit/model/timetable/RealTimeTripTimes.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public final class RealTimeTripTimes implements TripTimes<RealTimeTripTimes> {
3030
private final int[] departureTimes;
3131
private final RealTimeState realTimeState;
3232
private final StopRealTimeState[] stopRealTimeStates;
33+
private final boolean[] extraCalls;
3334

3435
@Nullable
3536
private final I18NString tripHeadsign;
@@ -44,6 +45,7 @@ public final class RealTimeTripTimes implements TripTimes<RealTimeTripTimes> {
4445
departureTimes = builder.departureTimes();
4546
realTimeState = builder.realTimeState();
4647
stopRealTimeStates = builder.stopRealTimeStates();
48+
extraCalls = builder.extraCalls();
4749
tripHeadsign = builder.tripHeadsign();
4850
stopHeadsigns = builder.stopHeadsigns();
4951
occupancyStatus = builder.occupancyStatus();
@@ -60,6 +62,7 @@ private RealTimeTripTimes(RealTimeTripTimes original, ScheduledTripTimes schedul
6062
this.departureTimes = original.departureTimes;
6163
this.realTimeState = original.realTimeState;
6264
this.stopRealTimeStates = original.stopRealTimeStates;
65+
this.extraCalls = original.extraCalls;
6366
this.tripHeadsign = original.tripHeadsign;
6467
this.stopHeadsigns = original.stopHeadsigns;
6568
this.occupancyStatus = original.occupancyStatus;
@@ -78,6 +81,7 @@ private RealTimeTripTimes(RealTimeTripTimes original, int timeShift) {
7881
this.departureTimes = IntUtils.shiftArray(timeShift, original.departureTimes);
7982
this.realTimeState = original.realTimeState;
8083
this.stopRealTimeStates = original.stopRealTimeStates;
84+
this.extraCalls = original.extraCalls;
8185
this.tripHeadsign = original.tripHeadsign;
8286
this.stopHeadsigns = original.stopHeadsigns;
8387
this.occupancyStatus = original.occupancyStatus;
@@ -188,6 +192,10 @@ public boolean isPredictionInaccurate(int stopPos) {
188192
return isStopRealTimeStates(stopPos, StopRealTimeState.INACCURATE_PREDICTIONS);
189193
}
190194

195+
public boolean isExtraCall(int stopPos) {
196+
return extraCalls[stopPos];
197+
}
198+
191199
public boolean isRealTimeUpdated(int stopPos) {
192200
return (
193201
realTimeState != RealTimeState.SCHEDULED &&

application/src/main/java/org/opentripplanner/transit/model/timetable/RealTimeTripTimesBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public class RealTimeTripTimesBuilder {
2121

2222
private final StopRealTimeState[] stopRealTimeStates;
2323

24+
private final boolean[] extraCalls;
25+
2426
@Nullable
2527
private I18NString tripHeadsign;
2628

@@ -47,6 +49,7 @@ public class RealTimeTripTimesBuilder {
4749
departureTimes = new Integer[numStops];
4850
stopRealTimeStates = new StopRealTimeState[numStops];
4951
Arrays.fill(stopRealTimeStates, StopRealTimeState.DEFAULT);
52+
extraCalls = new boolean[numStops];
5053
stopHeadsigns = new I18NString[numStops];
5154
occupancyStatus = new OccupancyStatus[numStops];
5255
Arrays.fill(occupancyStatus, OccupancyStatus.NO_DATA_AVAILABLE);
@@ -199,6 +202,10 @@ public StopRealTimeState[] stopRealTimeStates() {
199202
return stopRealTimeStates.clone();
200203
}
201204

205+
public boolean[] extraCalls() {
206+
return extraCalls.clone();
207+
}
208+
202209
public RealTimeTripTimesBuilder withRecorded(int stop) {
203210
return withStopRealTimeState(stop, StopRealTimeState.RECORDED);
204211
}
@@ -220,6 +227,11 @@ public RealTimeTripTimesBuilder withStopRealTimeState(int stop, StopRealTimeStat
220227
return this;
221228
}
222229

230+
public RealTimeTripTimesBuilder withExtraCall(int stop, boolean extraCall) {
231+
this.extraCalls[stop] = extraCall;
232+
return this;
233+
}
234+
223235
@Nullable
224236
public I18NString tripHeadsign() {
225237
if (tripHeadsign == null) {

application/src/main/java/org/opentripplanner/transit/model/timetable/ScheduledTripTimes.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ public boolean isPredictionInaccurate(int stopPos) {
245245
return false;
246246
}
247247

248+
@Override
249+
public boolean isExtraCall(int stopPos) {
250+
return false;
251+
}
252+
248253
@Override
249254
public boolean isRealTimeUpdated(int stopPos) {
250255
return false;

application/src/main/java/org/opentripplanner/transit/model/timetable/TripTimes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ default int compareTo(TripTimes other) {
139139

140140
boolean isPredictionInaccurate(int stopPos);
141141

142+
boolean isExtraCall(int stopPos);
143+
142144
/**
143145
* Return if trip has been updated and stop position has not been given a NO_DATA update.
144146
*/

application/src/main/java/org/opentripplanner/transit/model/timetable/TripTimesStringBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public static String encodeTripTimes(TripTimes tripTimes, TripPattern pattern) {
4848
if (tripTimes.isNoDataStop(i)) {
4949
flags.add("ND");
5050
}
51+
if (tripTimes.isExtraCall(i)) {
52+
flags.add("EC");
53+
}
5154

5255
s.append(" | ").append(stops.get(i).getName());
5356
if (!flags.isEmpty()) {

application/src/main/java/org/opentripplanner/updater/trip/gtfs/GtfsRealTimeTripUpdateAdapter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ public class GtfsRealTimeTripUpdateAdapter {
6161
/**
6262
* A synchronized cache of trip patterns added to the timetable repository
6363
* due to GTFS-realtime messages.
64-
* <p>
65-
* This has "Siri" in the name because we are combining the two versions very carefully, step by
66-
* step. Once this process is complete, we will clean up the name and move it to an appropriate
67-
* package.
6864
**/
6965
private final TripPatternCache tripPatternCache;
7066

0 commit comments

Comments
 (0)