Class CaccController
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.cacc.CaccController
-
- All Implemented Interfaces:
LongitudinalController
public class CaccController extends Object implements LongitudinalController
Copyright (c) 2013-2017 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 27 sep. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterTypeAccelerationA_MAXstatic ParameterTypeAccelerationA_MINstatic ParameterTypeDoubleKstatic ParameterTypeDoubleK_Astatic ParameterTypeDoubleK_Dstatic ParameterTypeDoubleK_Vstatic ParameterTypeDoubleR_MINstatic ParameterTypeLengthSTANDSTILLstatic ParameterTypeDurationT_SYSTEM_ACCstatic ParameterTypeDurationT_SYSTEM_CACCDeclare parameters.-
Fields inherited from interface org.opentrafficsim.road.gtu.lane.tactical.cacc.LongitudinalController
SENSOR_RANGE
-
-
Constructor Summary
Constructors Constructor Description CaccController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccelerationcalculateAcceleration(LaneBasedGTU gtu)Calculates the acceleration.voidsetCACCGTUType(GTUType gtuType)Set the GTU type that has CACC.voidsetPlatoon(Platoon platoon)Sets the platoon.
-
-
-
Field Detail
-
T_SYSTEM_CACC
public static final ParameterTypeDuration T_SYSTEM_CACC
Declare parameters.
-
T_SYSTEM_ACC
public static final ParameterTypeDuration T_SYSTEM_ACC
-
K
public static final ParameterTypeDouble K
-
K_A
public static final ParameterTypeDouble K_A
-
K_V
public static final ParameterTypeDouble K_V
-
K_D
public static final ParameterTypeDouble K_D
-
A_MIN
public static final ParameterTypeAcceleration A_MIN
-
A_MAX
public static final ParameterTypeAcceleration A_MAX
-
R_MIN
public static final ParameterTypeDouble R_MIN
-
STANDSTILL
public static final ParameterTypeLength STANDSTILL
-
-
Method Detail
-
setPlatoon
public void setPlatoon(Platoon platoon)
Sets the platoon.- Parameters:
platoon- Platoon; platoon
-
setCACCGTUType
public void setCACCGTUType(GTUType gtuType)
Set the GTU type that has CACC.- Parameters:
gtuType- GTUType; the GTU type that has CACC
-
calculateAcceleration
public Acceleration calculateAcceleration(LaneBasedGTU gtu) throws OperationalPlanException, ParameterException
Calculates the acceleration.- Specified by:
calculateAccelerationin interfaceLongitudinalController- Parameters:
gtu- LaneBasedGTU; the GTU- Returns:
- Acceleration from controller.
- Throws:
OperationalPlanExceptionParameterException
-
-