Examples of FrequencyStopTripIndex


Examples of org.onebusaway.transit_data_federation.services.blocks.FrequencyStopTripIndex

    List<Pair<FrequencyStopTripIndex>> results = new ArrayList<Pair<FrequencyStopTripIndex>>();

    for (Map.Entry<FrequencyBlockTripIndex, FrequencyStopTripIndex> entry : fromIndicesBySequence.entrySet()) {
      FrequencyBlockTripIndex index = entry.getKey();
      FrequencyStopTripIndex fromStopIndex = entry.getValue();
      FrequencyStopTripIndex toStopIndex = toIndicesBySequence.get(index);

      /**
       * If the stops aren't in the requested order, then we don't include the
       * sequence indices in the results
       */
      if (fromStopIndex.getOffset() > toStopIndex.getOffset())
        continue;

      Pair<FrequencyStopTripIndex> pair = Tuples.pair(fromStopIndex,
          toStopIndex);
      results.add(pair);
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.FrequencyStopTripIndex

      for (BlockStopTimeEntry bst : trip.getStopTimes()) {

        StopTimeEntry stopTime = bst.getStopTime();
        StopEntryImpl stop = (StopEntryImpl) stopTime.getStop();

        FrequencyStopTripIndex stopTripIndex = new FrequencyStopTripIndex(
            index, offset);
        stop.addFrequencyStopTripIndex(stopTripIndex);
        offset++;
      }
    }
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.FrequencyStopTripIndex

    BlockConfigurationEntry bcFreq = linkBlockTrips(block("bFreq"),
        frequencies, tripF);

    FrequencyBlockTripIndex freqIndex = _factory.createFrequencyIndexForTrips(
        bcFreq.getTrips(), frequencies);
    FrequencyStopTripIndex freqFromIndex = new FrequencyStopTripIndex(
        freqIndex, 0);
    FrequencyStopTripIndex freqToIndex = new FrequencyStopTripIndex(freqIndex,
        1);
    Pair<FrequencyStopTripIndex> freqIndexPair = Tuples.pair(freqFromIndex,
        freqToIndex);

    List<Pair<FrequencyStopTripIndex>> frequencyIndices = new ArrayList<Pair<FrequencyStopTripIndex>>();
View Full Code Here

Examples of org.onebusaway.transit_data_federation.services.blocks.FrequencyStopTripIndex

    long slack = (runningLateSlack + runningEarlySlack) * 1000;

    for (Pair<FrequencyStopTripIndex> pair : indexPairs) {

      FrequencyStopTripIndex sourceStopIndex = findDepartures ? pair.getFirst()
          : pair.getSecond();
      FrequencyStopTripIndex destStopIndex = findDepartures ? pair.getSecond()
          : pair.getFirst();

      List<FrequencyBlockStopTimeEntry> sourceStopTimes = sourceStopIndex.getFrequencyStopTimes();
      List<FrequencyBlockStopTimeEntry> destStopTimes = destStopIndex.getFrequencyStopTimes();

      List<Date> serviceDates = _calendarService.getServiceDatesForInterval(
          sourceStopIndex.getServiceIds(),
          sourceStopIndex.getServiceInterval(), slackAdjustedTime,
          findDepartures);

      for (Date serviceDate : serviceDates) {

        ServiceInterval destServiceInterval = destStopIndex.getServiceInterval();

        if (serviceDateIsBeyondRangeOfQueue(nBestQueue, serviceDate,
            destServiceInterval, resultCount, findDepartures, slack)) {

          /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.