*
* @return acceleration considering traffic light
*/
protected double accelerationConsideringTrafficLight(double acc, RoadSegment roadSegment) {
double moderatedAcc = acc;
TrafficLightLocationWithDistance location = roadSegment.getNextDownstreamTrafficLight(
getFrontPosition(), lane(), TrafficLightApproaching.MAX_LOOK_AHEAD_DISTANCE);
if (location != null) {
LOG.debug("consider trafficlight={}", location.toString());
updateTrafficLightApproaching(location.trafficLightLocation, location.distance);
if (trafficLightApproaching.considerTrafficLight()) {
moderatedAcc = Math.min(acc, trafficLightApproaching.accApproaching());
}
}