long arrival = nextTransferStop.getBestArrivalTime();
int runningTime = (int) ((arrival - departure) / 1000);
Vertex fromVertex = new BlockDepartureVertex(_context, _from);
Vertex toVertex = new BlockArrivalVertex(_context, nextTransferStop);
EdgeNarrative narrative = narrative(s0, fromVertex, toVertex);
StateEditor edit = s0.edit(this, narrative);
edit.incrementTimeInSeconds(runningTime);
edit.incrementWeight(runningTime);
State result = edit.makeState();
results = result.addToExistingResultChain(results);
maxBlockSequence = nextTransferStop.getBlockStopTime().getBlockSequence();
} else {
maxBlockSequence = Integer.MAX_VALUE;
}
}
ArrivalAndDepartureInstance nextStop = service.getNextStopArrivalAndDeparture(_from);
if (nextStop != null
&& nextStop.getBlockStopTime().getBlockSequence() < maxBlockSequence) {
long departure = _from.getBestDepartureTime();
long arrival = nextStop.getBestArrivalTime();
int runningTime = (int) ((arrival - departure) / 1000);
Vertex fromVertex = new BlockDepartureVertex(_context, _from);
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);