Class SpeedLimitUtil
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.util.SpeedLimitUtil
Static methods regarding speed limits for composition in tactical planners.
Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opentrafficsim.base.parameters.ParameterTypeAccelerationMaximum comfortable acceleration in the lateral direction. -
Method Summary
Modifier and TypeMethodDescriptionstatic AccelerationconsiderSpeedLimitTransitions(org.opentrafficsim.base.parameters.Parameters parameters, Speed speed, SpeedLimitProspect speedLimitProspect, CarFollowingModel carFollowingModel) Acceleration for speed limit transitions.static SpeedgetLegalSpeedLimit(SpeedLimitInfo speedLimitInfo) Returns the minimum speed of the applicable speed limit types MAX_LEGAL_VEHICLE_SPEED, ROAD_CLASS, FIXED_SIGN and DYNAMIC_SIGN.static SpeedgetMaximumVehicleSpeed(SpeedLimitInfo speedLimitInfo) Returns the speed of speed limit type MAX_VEHICLE_SPEED.
-
Field Details
-
A_LAT
public static final org.opentrafficsim.base.parameters.ParameterTypeAcceleration A_LATMaximum comfortable acceleration in the lateral direction.
-
-
Method Details
-
getLegalSpeedLimit
Returns the minimum speed of the applicable speed limit types MAX_LEGAL_VEHICLE_SPEED, ROAD_CLASS, FIXED_SIGN and DYNAMIC_SIGN. ROAD_CLASS is only used if FIXED_SIGN and DYNAMIC_SIGN are not present. This method may be overridden by subclasses to implement additional behavior regarding legal speed limits.- Parameters:
speedLimitInfo- SpeedLimitInfo; speed limit info- Returns:
- minimum of speed of speed limit types
- Throws:
NullPointerException- if speed limit info is null
-
getMaximumVehicleSpeed
Returns the speed of speed limit type MAX_VEHICLE_SPEED. This method may be overridden by subclasses to implement additional behavior regarding maximum vehicle speed limits.- Parameters:
speedLimitInfo- SpeedLimitInfo; speed limit info- Returns:
- speed of speed limit type MAX_VEHICLE_SPEED
- Throws:
NullPointerException- if speed limit info is null
-
considerSpeedLimitTransitions
public static Acceleration considerSpeedLimitTransitions(org.opentrafficsim.base.parameters.Parameters parameters, Speed speed, SpeedLimitProspect speedLimitProspect, CarFollowingModel carFollowingModel) throws org.opentrafficsim.base.parameters.ParameterException Acceleration for speed limit transitions. This implementation decelerates before curves and speed bumps. For this it usesapproachTargetSpeed()of the abstract car-following model implementation. All remaining transitions happen in the default manner, i.e. deceleration and acceleration after the speed limit change and governed by the car-following model.- Parameters:
parameters- Parameters; parametersspeed- Speed; current speedspeedLimitProspect- SpeedLimitProspect; speed limit prospectcarFollowingModel- CarFollowingModel; car following model- Returns:
- acceleration for speed limit transitions
- Throws:
org.opentrafficsim.base.parameters.ParameterException- if a required parameter is not found
-