Class CarFollowingUtil.CarFollowingHeadway
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
-
- org.opentrafficsim.road.gtu.lane.tactical.util.CarFollowingUtil.CarFollowingHeadway
-
- All Implemented Interfaces:
Serializable
,Comparable<Headway>
,Identifiable
,PerceivedObject
,Headway
- Enclosing class:
- CarFollowingUtil
public static class CarFollowingUtil.CarFollowingHeadway extends AbstractHeadway
Simple headway implementation for minimum car-following information.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 26 feb. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
Headway.ObjectType
-
-
Constructor Summary
Constructors Constructor Description CarFollowingHeadway(Length headway, Speed speed)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acceleration
getAcceleration()
String
getId()
Length
getLength()
Headway.ObjectType
getObjectType()
Speed
getSpeed()
-
Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
equals, getDistance, getOverlap, getOverlapFront, getOverlapRear, hashCode, isAhead, isBehind, isParallel, toString
-
-
-
-
Constructor Detail
-
CarFollowingHeadway
public CarFollowingHeadway(Length headway, Speed speed) throws GTUException
Constructor.- Parameters:
headway
- Length; distance to the leaderspeed
- Speed; leader speed- Throws:
GTUException
- on exception
-
-
Method Detail
-
getId
public String getId()
- Returns:
- String; the id of the other object for comparison purposes, cannot be null.
-
getLength
public Length getLength()
- Returns:
- Length; the length of the other object; can be null if unknown.
-
getSpeed
public Speed getSpeed()
- Returns:
- Speed; the (perceived) speed of the other object; can be null if unknown.
-
getObjectType
public Headway.ObjectType getObjectType()
- Returns:
- Length; the (perceived) object Type, can be null if no object type unknown.
-
getAcceleration
public Acceleration getAcceleration()
- Returns:
- Acceleration; acceleration the (perceived) acceleration of the other object; can be null if unknown.
-
-