Package org.onebusaway.transit_data_federation.impl.otp

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


      if (arrival.getBlockSequence() != null)
        edit.appendTripSequence(arrival.getBlockSequence());
      else
        edit.appendTripSequence(arrival.getBlockTrip());

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

    return results;
  }
View Full Code Here


      if (departure.getBlockSequence() != null)
        edit.appendTripSequence(departure.getBlockSequence());
      else
        edit.appendTripSequence(departure.getBlockTrip());

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

    return results;
  }
View Full Code Here

      edit.incrementWeight(runningTime);

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

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

    return results;
  }
View Full Code Here

        edit.incrementInitialWaitTime(dwellTime * 1000);

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

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

    // In addition to all the departures, we can just remain waiting at the stop
    int dwellTime = (int) ((time - timeFrom) / 1000);
View Full Code Here

    edit.setTime(time);

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

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

    return results;
  }

View Full Code Here

    edit.incrementWeight(w);

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

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

    return results;
  }

View Full Code Here

      edit.incrementInitialWaitTime(dwellTime * 1000);

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

    return edit.makeState();
  }

  private State getNextScheduledBlockDepartureResults(State s0) {

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

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

    edit.appendTripSequence(instance.getStopTime().getTrip());

    return edit.makeState();
  }
}
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.