// since the stopTimeService method will also return instances that depart
// in the target interval as well
if (arrivalTime < timeFrom || time <= arrivalTime)
continue;
Vertex fromVertex = new BlockArrivalVertex(_context, instance);
Vertex toVertex = new ArrivalVertex(_context, _stop, s0.getTime());
EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);
OBAStateEditor edit = (OBAStateEditor) s0.edit(this, narrative);
int dwellTime = (int) ((time - arrivalTime) / 1000);
edit.setTime(arrivalTime);
edit.incrementNumBoardings();
edit.setEverBoarded(true);
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);
}
// In addition to all the departures, we can just remain waiting at the stop
int dwellTime = (int) ((time - timeFrom) / 1000);
double w = ItineraryWeightingLibrary.computeWeightForWait(s0, dwellTime);
Vertex fromVertex = new ArrivalVertex(_context, _stop, timeFrom);
Vertex toVertex = new ArrivalVertex(_context, _stop, s0.getTime());
EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);
OBAStateEditor edit = (OBAStateEditor) s0.edit(this, narrative);
edit.incrementWeight(w);