Class AbstractIdm.IdmDesiredSpeedModel
java.lang.Object
org.opentrafficsim.road.gtu.tactical.following.AbstractIdm.IdmDesiredSpeedModel
- All Implemented Interfaces:
Supplier<AbstractIdm.IdmDesiredSpeedModel>,Stateless<AbstractIdm.IdmDesiredSpeedModel>,DesiredSpeedModel
- Enclosing class:
- AbstractIdm
public static class AbstractIdm.IdmDesiredSpeedModel
extends Object
implements DesiredSpeedModel, Stateless<AbstractIdm.IdmDesiredSpeedModel>
IDM desired speed model. This model returns the minimum of fSpeed'*laneSpeedLimit and fSpeedGtu'*gtuTypeSpeedLimit if
both exist, or one of them if one exists. If both do not exist this model returns fSpeed*130km/h. For both fSpeed' and
fSpeedGtu', if the speed limit is enforced the value is the minimum of fSpeed/fSpeedGtu (respectively) and 1.0.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AbstractIdm.IdmDesiredSpeedModelSingleton instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.SpeeddesiredSpeed(Parameters parameters, SpeedLimits speedLimits, org.djunits.value.vdouble.scalar.Speed maxVehicleSpeed) Determines the desired speed.get()
-
Field Details
-
SINGLETON
Singleton instance.
-
-
Constructor Details
-
IdmDesiredSpeedModel
public IdmDesiredSpeedModel()Constructor.
-
-
Method Details
-
get
- Specified by:
getin interfaceStateless<AbstractIdm.IdmDesiredSpeedModel>- Specified by:
getin interfaceSupplier<AbstractIdm.IdmDesiredSpeedModel>
-
desiredSpeed
public org.djunits.value.vdouble.scalar.Speed desiredSpeed(Parameters parameters, SpeedLimits speedLimits, org.djunits.value.vdouble.scalar.Speed maxVehicleSpeed) throws ParameterException Description copied from interface:DesiredSpeedModelDetermines the desired speed.- Specified by:
desiredSpeedin interfaceDesiredSpeedModel- Parameters:
parameters- parametersspeedLimits- speed limitsmaxVehicleSpeed- maximum speed of the vehicle- Returns:
- desired speed
- Throws:
ParameterException- if parameter exception occurs
-