Package org.onebusaway.transit_data_federation.impl.otp

Examples of org.onebusaway.transit_data_federation.impl.otp.OBAStateEditor.incrementWeight()


      int dwellTime = computeWaitTime(s0, pair);
      edit.incrementTimeInSeconds(-dwellTime);

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

      if (arrival.getBlockSequence() != null)
        edit.appendTripSequence(arrival.getBlockSequence());
      else
        edit.appendTripSequence(arrival.getBlockTrip());
View Full Code Here


      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);

      /**
       * If the departure time is less than the starting state time, it must
       * mean the departure was included as determined by the lookahead
       * parameter. Thus, we indicate that we have a lookahead itinerary.
View Full Code Here

      Vertex toVertex = new BlockArrivalVertex(_context, nextStop);
      EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);

      OBAStateEditor edit = (OBAStateEditor) s0.edit(this, narrative);
      edit.incrementTimeInSeconds(runningTime);
      edit.incrementWeight(runningTime);

      if (state.getMaxBlockSequence() < 0)
        edit.setMaxBlockSequence(maxBlockSequence);

      State tr = edit.makeState();
View Full Code Here

      if (s0.getNumBoardings() == 0)
        edit.incrementInitialWaitTime(dwellTime * 1000);

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

      State r = edit.makeState();
      results = r.addToExistingResultChain(results);
    }

View Full Code Here

    Vertex toVertex = new ArrivalVertex(_context, _stop, s0.getTime());
    EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);

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

    edit.incrementWeight(w);
    edit.setTime(time);

    if (s0.getNumBoardings() == 0)
      edit.incrementInitialWaitTime(dwellTime * 1000);

 
View Full Code Here

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

    int dwellTime = (int) ((toTime - time) / 1000);
    double w = ItineraryWeightingLibrary.computeWeightForWait(s0, dwellTime);
    edit.incrementWeight(w);

    if (s0.getNumBoardings() == 0)
      edit.incrementInitialWaitTime(dwellTime * 1000);

    State r = edit.makeState();
View Full Code Here

    if (s0.getNumBoardings() == 0)
      edit.incrementInitialWaitTime(dwellTime * 1000);

    edit.appendTripSequence(instance.getBlockTrip());
    edit.incrementWeight(w);

    return edit.makeState();
  }

  private State getNextScheduledBlockDepartureResults(State s0) {
View Full Code Here

    edit.setTime(departureTime);

    int dwellTime = (int) ((departureTime - time) / 1000);
    double w = transferWeight
        + ItineraryWeightingLibrary.computeWeightForWait(s0, dwellTime);
    edit.incrementWeight(w);

    if (s0.getNumBoardings() == 0)
      edit.incrementInitialWaitTime(dwellTime * 1000);

    edit.appendTripSequence(instance.getStopTime().getTrip());
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.