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
public abstract class AbstractLinearFreeControl extends AbstractActuatedControl
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-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Mar 14, 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterTypeDouble
KF
Desired speed error gain parameter.-
Fields inherited from class org.opentrafficsim.road.gtu.lane.control.AbstractActuatedControl
TDACC, TDCACC, X0
-
-
Constructor Summary
Constructors Constructor Description AbstractLinearFreeControl(DelayedActuation delayedActuation)
Constructor using default sensors with no delay.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Acceleration
getDesiredAcceleration(LaneBasedGTU gtu, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, Parameters settings)
Returns the desired acceleration from the longitudinal control.abstract Acceleration
getFollowingAcceleration(LaneBasedGTU gtu, PerceptionCollectable<HeadwayGTU,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 Detail
-
KF
public static final ParameterTypeDouble KF
Desired speed error gain parameter.
-
-
Constructor Detail
-
AbstractLinearFreeControl
public AbstractLinearFreeControl(DelayedActuation delayedActuation)
Constructor using default sensors with no delay.- Parameters:
delayedActuation
- DelayedActuation; delayed actuation
-
-
Method Detail
-
getDesiredAcceleration
public final Acceleration getDesiredAcceleration(LaneBasedGTU gtu, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, Parameters settings) throws ParameterException
Returns the desired acceleration from the longitudinal control.- Specified by:
getDesiredAcceleration
in classAbstractActuatedControl
- Parameters:
gtu
- LaneBasedGTU; gtuleaders
- PerceptionCollectable<HeadwayGTU, LaneBasedGTU>; leaderssettings
- Parameters; system settings- Returns:
- Acceleration; desired acceleration
- Throws:
ParameterException
- if parameter is not present
-
getFollowingAcceleration
public abstract Acceleration getFollowingAcceleration(LaneBasedGTU gtu, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> leaders, Parameters settings) throws ParameterException
Returns the following acceleration of the longitudinal control. This method is only invoked if there is at least 1 leader.- Parameters:
gtu
- LaneBasedGTU; gtuleaders
- PerceptionCollectable<HeadwayGTU, LaneBasedGTU>; leaderssettings
- Parameters; system settings- Returns:
- Acceleration; following acceleration of the longitudinal control
- Throws:
ParameterException
- if parameter is not present
-
-