Class AbstractLinearFreeControl
java.lang.Object
org.opentrafficsim.road.gtu.lane.control.AbstractActuatedControl
org.opentrafficsim.road.gtu.lane.control.AbstractLinearFreeControl
- All Implemented Interfaces:
LongitudinalControl
- Direct Known Subclasses:
LinearAcc
Class that splits the desired acceleration of a controller in a fixed linear free term, and a term for following determined
by the sub-class.
Copyright (c) 2013-2024 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 ParameterTypeDoubleDesired speed error gain parameter.Fields inherited from class org.opentrafficsim.road.gtu.lane.control.AbstractActuatedControl
TDACC, TDCACC, X0 -
Constructor Summary
ConstructorsConstructorDescriptionAbstractLinearFreeControl(DelayedActuation delayedActuation) Constructor using default sensors with no delay. -
Method Summary
Modifier and TypeMethodDescriptionfinal AccelerationgetDesiredAcceleration(LaneBasedGtu gtu, PerceptionCollectable<PerceivedGtu, LaneBasedGtu> leaders, Parameters settings) Returns the desired acceleration from the longitudinal control.abstract AccelerationgetFollowingAcceleration(LaneBasedGtu gtu, PerceptionCollectable<PerceivedGtu, LaneBasedGtu> leaders, Parameters settings) Returns the following acceleration of the longitudinal control.Methods inherited from class org.opentrafficsim.road.gtu.lane.control.AbstractActuatedControl
delayActuation, getAcceleration
-
Field Details
-
KF
Desired speed error gain parameter.
-
-
Constructor Details
-
AbstractLinearFreeControl
Constructor using default sensors with no delay.- Parameters:
delayedActuation- delayed actuation
-
-
Method Details
-
getDesiredAcceleration
public final Acceleration getDesiredAcceleration(LaneBasedGtu gtu, PerceptionCollectable<PerceivedGtu, LaneBasedGtu> leaders, Parameters settings) throws ParameterExceptionDescription copied from class:AbstractActuatedControlReturns the desired acceleration from the longitudinal control.- Specified by:
getDesiredAccelerationin classAbstractActuatedControl- Parameters:
gtu- gtuleaders- leaderssettings- system settings- Returns:
- desired acceleration
- Throws:
ParameterException- if parameter is not present
-
getFollowingAcceleration
public abstract Acceleration getFollowingAcceleration(LaneBasedGtu gtu, PerceptionCollectable<PerceivedGtu, LaneBasedGtu> leaders, Parameters settings) throws ParameterExceptionReturns the following acceleration of the longitudinal control. This method is only invoked if there is at least 1 leader.- Parameters:
gtu- gtuleaders- leaderssettings- system settings- Returns:
- following acceleration of the longitudinal control
- Throws:
ParameterException- if parameter is not present
-