for (Vehicle vehicle : laneSegment) {
evaluateVehicle(vehicle, laneSegment, testVehicle, gapCandidates);
}
// check also rear vehicles of next downstream segment
Vehicle rearVehicleNextLaneSegment = laneSegment.sinkLaneSegment().rearVehicle();
if (rearVehicleNextLaneSegment != null) {
evaluateVehicle(rearVehicleNextLaneSegment, laneSegment, testVehicle, gapCandidates);
}
if (rearVehicleNextLaneSegment == null && laneSegment.vehicleCountWithoutObstacles() == 0) {
gapCandidates.add(new GapCandidate(MovsimConstants.GAP_INFINITY, laneSegment.lane(), 0.5