Package org.onebusaway.transit_data_federation.impl.otp

Examples of org.onebusaway.transit_data_federation.impl.otp.OBATraverseOptions


    return s0.edit(this, narrative).makeState();
  }

  private State traverseReverse(State s0) {

    OBATraverseOptions obaOpts = (OBATraverseOptions) s0.getOptions();

    ArrivalAndDepartureService adService = _context.getArrivalAndDepartureService();

    Vertex toV = new TPArrivalVertex(_context, _pathState);
View Full Code Here


      return traverseForward(s0);
  }

  private State traverseForward(State s0) {

    OBATraverseOptions obaOpts = (OBATraverseOptions) s0.getOptions();

    ArrivalAndDepartureService adService = _context.getArrivalAndDepartureService();

    Vertex fromV = new TPDepartureVertex(_context, _pathState);
View Full Code Here

        long tFrom = first.getDepartureTime();

        Map<StopEntry, List<StopTimeInstance>> nearbyStopTimeInstances = getNearbyStopTimeInstances(
            nearbyStopsAndWalkTimes.keySet(), serviceDate);

        OBATraverseOptions options = _otpConfigurationService.createTraverseOptions();

        options.maxComputationTime = -1;
        options.waitAtBeginningFactor = 1.0;
        options.extraSpecialMode = true;
        if (isHubStop)
View Full Code Here

    CoordinateBounds bounds = SphericalGeometryLibrary.bounds(
        stop.getStopLocation(), _nearbyStopsRadius);

    Map<StopEntry, Integer> nearbyStopsAndWalkTimes = new HashMap<StopEntry, Integer>();

    OBATraverseOptions opts = _otpConfigurationService.createTraverseOptions();
    Date now = new Date();

    List<StopEntry> stops = _transitGraphDao.getStopsByLocation(bounds);
    for (StopEntry nearbyStop : stops) {
View Full Code Here

      throws ServiceException {

    if (!_enabled)
      throw new ServiceException("service disabled");

    OBATraverseOptions options = createTraverseOptions();
    applyConstraintsToOptions(constraints, options);

    List<GraphPath> paths = _itinerariesService.getItinerariesBetween(from, to,
        targetTime, options);

    LocationBean fromBean = getPointAsLocation(from);
    LocationBean toBean = getPointAsLocation(to);

    ItinerariesBean itineraries = getPathsAsItineraries(paths, fromBean,
        toBean, options);

    ensureSelectedItineraryIsIncluded(from, to, targetTime, itineraries,
        constraints.getSelectedItinerary(), options);

    if (options.isArriveBy())
      Collections.sort(itineraries.getItineraries(), new SortByArrival());
    else
      Collections.sort(itineraries.getItineraries(), new SortByDeparture());

    return itineraries;
View Full Code Here

      TransitShedConstraintsBean constraints) {

    if (!_enabled)
      throw new ServiceException("service disabled");

    OBATraverseOptions options = createTraverseOptions();
    applyConstraintsToOptions(constraints.getConstraints(), options);

    Coordinate c = new Coordinate(location.getLon(), location.getLat());
    Vertex origin = _streetVertexIndexService.getClosestVertex(c, options);
View Full Code Here

  /****
   * Private Methods
   ****/

  private OBATraverseOptions createTraverseOptions() {
    OBATraverseOptions options = _otpConfigurationService.createTraverseOptions();
    return options;
  }
View Full Code Here

      return traverseForward(s0);
  }

  private State traverseForward(State s0) {

    OBATraverseOptions obaOpts = (OBATraverseOptions) s0.getOptions();
    if (obaOpts.extraSpecialMode)
      return extraSpecialMode(s0, obaOpts);

    ArrivalAndDepartureService service = _context.getArrivalAndDepartureService();
View Full Code Here

      return traverseForward(s0);
  }

  private State traverseForward(State s0) {

    OBATraverseOptions obaOpts = (OBATraverseOptions) s0.getOptions();
    if (obaOpts.extraSpecialMode)
      return null;

    EdgeNarrative narrative = createNarrative(s0);
    return s0.edit(this, narrative).makeState();
View Full Code Here

  private List<ArrivalAndDepartureInstance> getArrivalsInTimeRange(long time,
      long timeFrom, long timeTo, TraverseOptions options) {

    boolean useRealTime = false;
    OBATraverseOptions config = options.getExtension(OBATraverseOptions.class);
    if (config != null)
      useRealTime = config.useRealtime;

    ArrivalAndDepartureService service = _context.getArrivalAndDepartureService();
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.impl.otp.OBATraverseOptions

Copyright © 2018 www.massapicom. 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.