Class AbstractActuatedControl
java.lang.Object
org.opentrafficsim.road.gtu.lane.control.AbstractActuatedControl
- All Implemented Interfaces:
LongitudinalControl
- Direct Known Subclasses:
AbstractLinearFreeControl
Simple linear CACC controller.
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
Modifier and TypeFieldDescriptionstatic final org.opentrafficsim.base.parameters.ParameterTypeDuration
Time headway setting for ACC mode.static final org.opentrafficsim.base.parameters.ParameterTypeDuration
Time headway setting for CACC mode.static final org.opentrafficsim.base.parameters.ParameterTypeLength
(C)ACC stopping distance. -
Constructor Summary
ConstructorDescriptionAbstractActuatedControl
(DelayedActuation delayedActuation) Constructor using default sensors with no delay. -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.Acceleration
delayActuation
(org.djunits.value.vdouble.scalar.Acceleration desiredAcceleration, LaneBasedGtu gtu) Delays the actuation of acceleration.org.djunits.value.vdouble.scalar.Acceleration
getAcceleration
(LaneBasedGtu gtu, org.opentrafficsim.base.parameters.Parameters settings) Calculate acceleration.abstract org.djunits.value.vdouble.scalar.Acceleration
getDesiredAcceleration
(LaneBasedGtu gtu, PerceptionCollectable<HeadwayGtu, LaneBasedGtu> leaders, org.opentrafficsim.base.parameters.Parameters settings) Returns the desired acceleration from the longitudinal control.
-
Field Details
-
TDACC
public static final org.opentrafficsim.base.parameters.ParameterTypeDuration TDACCTime headway setting for ACC mode. -
TDCACC
public static final org.opentrafficsim.base.parameters.ParameterTypeDuration TDCACCTime headway setting for CACC mode. -
X0
public static final org.opentrafficsim.base.parameters.ParameterTypeLength X0(C)ACC stopping distance.
-
-
Constructor Details
-
AbstractActuatedControl
Constructor using default sensors with no delay.- Parameters:
delayedActuation
- DelayedActuation; delayed actuation
-
-
Method Details
-
delayActuation
public org.djunits.value.vdouble.scalar.Acceleration delayActuation(org.djunits.value.vdouble.scalar.Acceleration desiredAcceleration, LaneBasedGtu gtu) Delays the actuation of acceleration.- Parameters:
desiredAcceleration
- Acceleration; desired accelerationgtu
- LaneBasedGtu; gtu- Returns:
- Acceleration; delayed acceleration
-
getAcceleration
public org.djunits.value.vdouble.scalar.Acceleration getAcceleration(LaneBasedGtu gtu, org.opentrafficsim.base.parameters.Parameters settings) Calculate acceleration.- Specified by:
getAcceleration
in interfaceLongitudinalControl
- Parameters:
gtu
- LaneBasedGtu; controlled GTUsettings
- Parameters; system settings- Returns:
- Acceleration; level of acceleration, may be
null
if the controller is unable to deal with a situation
-
getDesiredAcceleration
public abstract org.djunits.value.vdouble.scalar.Acceleration getDesiredAcceleration(LaneBasedGtu gtu, PerceptionCollectable<HeadwayGtu, LaneBasedGtu> leaders, org.opentrafficsim.base.parameters.Parameters settings) throws org.opentrafficsim.base.parameters.ParameterExceptionReturns the desired acceleration from the longitudinal control.- Parameters:
gtu
- LaneBasedGtu; gtuleaders
- PerceptionCollectable<HeadwayGtu, LaneBasedGtu>; leaderssettings
- Parameters; system settings- Returns:
- Acceleration; desired acceleration
- Throws:
org.opentrafficsim.base.parameters.ParameterException
- if parameter is not present
-