public final class TrafficLightUtil extends Object
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Field and Description |
---|---|
static ParameterTypeAcceleration |
B_YELLOW
Maximum deceleration for stopping for yellow traffic light.
|
Modifier and Type | Method and Description |
---|---|
static Acceleration |
respondToTrafficLight(Parameters parameters,
HeadwayTrafficLight headwayTrafficLight,
CarFollowingModel carFollowingModel,
Speed speed,
SpeedLimitInfo speedLimitInfo)
Returns an acceleration as response to a traffic light, being positive infinity if ignored.
|
static Acceleration |
respondToTrafficLights(Parameters parameters,
Iterable<HeadwayTrafficLight> headwayTrafficLights,
CarFollowingModel carFollowingModel,
Speed speed,
SpeedLimitInfo speedLimitInfo)
Returns an acceleration as response to a set of traffic lights, being positive infinity if ignored.
|
public static final ParameterTypeAcceleration B_YELLOW
public static Acceleration respondToTrafficLights(Parameters parameters, Iterable<HeadwayTrafficLight> headwayTrafficLights, CarFollowingModel carFollowingModel, Speed speed, SpeedLimitInfo speedLimitInfo) throws ParameterException
parameters
- parametersheadwayTrafficLights
- set of headway traffic lightscarFollowingModel
- car following modelspeed
- speedspeedLimitInfo
- speed limit infoParameterException
- if a parameter is not definedNullPointerException
- if any input is nullIllegalArgumentException
- if the traffic light is not downstreampublic static Acceleration respondToTrafficLight(Parameters parameters, HeadwayTrafficLight headwayTrafficLight, CarFollowingModel carFollowingModel, Speed speed, SpeedLimitInfo speedLimitInfo) throws ParameterException
parameters
- parametersheadwayTrafficLight
- headway traffic lightcarFollowingModel
- car following modelspeed
- speedspeedLimitInfo
- speed limit infoParameterException
- if a parameter is not definedNullPointerException
- if any input is nullIllegalArgumentException
- if the traffic light is not downstreamCopyright © 2014–2018 Delft University of Technology. All rights reserved.