Pair<StopEntry> stopPair = _pathState.getStops();
TargetTime targetTime = new TargetTime(s0.getTime(), obaOpts.currentTime);
ArrivalAndDeparturePairQuery query = new ArrivalAndDeparturePairQuery();
query.setResultCount(obaOpts.numItineraries);
query.setApplyRealTime(obaOpts.useRealtime);
query.setIncludePrivateService(false);
if (s0.getNumBoardings() == 0)
query.setLookaheadTime(obaOpts.lookaheadTime);
List<Pair<ArrivalAndDepartureInstance>> instances = adService.getNextDeparturesForStopPair(
stopPair.getFirst(), stopPair.getSecond(), targetTime, query);
State results = null;
for (Pair<ArrivalAndDepartureInstance> pair : instances) {
ArrivalAndDepartureInstance departure = pair.getFirst();
if (departure.getBestDepartureTime() < s0.getTime()
- query.getLookaheadTime() * 1000)
continue;
Vertex toV = new TPBlockDepartureVertex(_context, _pathState, departure,
pair.getSecond());