Package org.opentripplanner.routing.core

Examples of org.opentripplanner.routing.core.EdgeNarrative


    TraverseOptions options = s0.getOptions();

    int transferTime = computeTransferTime(options);

    EdgeNarrative narrative = computeNarrative(s0);

    StateEditor edit = s0.edit(this, narrative);

    edit.incrementTimeInSeconds(transferTime + options.minTransferTime);
View Full Code Here


     * called in the GraphPath.optimize(), where the traverseBack() method has
     * previously been called.
     */
    TPDepartureVertex fromVertex = null;
    TPArrivalVertex toVertex = new TPArrivalVertex(_context, _pathState);
    EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);
    return s0.edit(this, narrative).makeState();
  }
View Full Code Here

        break;

      Vertex fromV = new TPBlockArrivalVertex(_context, _pathState,
          pair.getFirst(), pair.getSecond());

      EdgeNarrative narrative = narrative(s0, fromV, toV);

      OBAStateEditor edit = (OBAStateEditor) s0.edit(this, narrative);

      int dwellTime = computeWaitTime(s0, pair);
      edit.incrementTimeInSeconds(-dwellTime);
View Full Code Here

  @Override
  public State traverse(State s0) {

    int transitTime = computeTransitTime();

    EdgeNarrative narrative = createNarrative(s0);
    StateEditor edit = s0.edit(this, narrative);

    edit.incrementTimeInSeconds(transitTime);
    edit.incrementNumBoardings();
    edit.setEverBoarded(true);
View Full Code Here

      int dwellTime = computeWaitTime(s0, pair);

      double w = ItineraryWeightingLibrary.computeWeightForWait(s0, dwellTime);

      EdgeNarrative narrative = narrative(s0, fromV, toV);
      OBAStateEditor edit = (OBAStateEditor) s0.edit(this, narrative);
      edit.setTime(departure.getBestDepartureTime());
      edit.incrementWeight(w);

      /**
 
View Full Code Here

  private State traverseReverse(State s0) {

    TPDepartureVertex fromVertex = new TPDepartureVertex(_context, _pathState);
    Vertex toVertex = null;
    EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);

    return s0.edit(this, narrative).makeState();
  }
View Full Code Here

      if (options.isArriveBy())
        return null;

      Vertex toVertex = new TPOfflineBlockDepartureVertex(_context, _instance);
      EdgeNarrative narrative = narrative(s0, TPOfflineTransferVertex.this,
          toVertex);

      StateEditor edit = s0.edit(this, narrative);
      edit.setEverBoarded(true);
      edit.incrementNumBoardings();
View Full Code Here

    _instance = instance;
  }

  @Override
  public State traverse(State s0) {
    EdgeNarrative narrative = createNarrative(s0);
    return s0.edit(this, narrative).makeState();
  }
View Full Code Here

      TPOfflineOriginVertex originVertex = (TPOfflineOriginVertex) v;
      return Arrays.asList(originVertex.getStop());
    }

    Edge payload = state.getBackEdge();
    EdgeNarrative narrative = state.getBackEdgeNarrative();

    if (payload instanceof TPOfflineTransferEdge) {

      TPOfflineBlockArrivalVertex fromV = (TPOfflineBlockArrivalVertex) narrative.getFromVertex();
      TPOfflineTransferVertex toV = (TPOfflineTransferVertex) narrative.getToVertex();

      List<StopEntry> incomingPattern = computeParentsForState(
          state.getBackState(), parentsByState2);
      ArrayList<StopEntry> extendedPattern = new ArrayList<StopEntry>(
          incomingPattern);
View Full Code Here

    @Override
    public boolean shouldSkipTraversalResult(Vertex origin, Vertex target,
        State parent, State current, ShortestPathTree spt,
        TraverseOptions traverseOptions) {

      EdgeNarrative narrative = current.getBackEdgeNarrative();
      Vertex vertex = narrative.getToVertex();

      /**
       * We prune any arrivals that loop back to the origin stop
       */
      if (vertex instanceof TPOfflineBlockArrivalVertex) {
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.core.EdgeNarrative

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.