public class HeadwayDistance extends Object implements Headway
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Headway.ObjectType| Constructor and Description |
|---|
HeadwayDistance(double distance)
Construct a new Headway information object with just a distance, without any further information about the object; it
assumes a speed of 0 at the headway, so it also good to store information about a lane drop.
|
HeadwayDistance(Length distance)
Construct a new Headway information object with just a distance, without any further information about the object; it
assumes a speed of 0 at the headway, so it also good to store information about a lane drop.
|
| Modifier and Type | Method and Description |
|---|---|
Acceleration |
getAcceleration() |
Length |
getDistance()
Retrieve the strongly typed distance to the other object.
|
String |
getId() |
Length |
getLength() |
Headway.ObjectType |
getObjectType() |
Length |
getOverlap()
Return the (perceived) overlap with the other object.
|
Length |
getOverlapFront()
Return the (perceived) front overlap to the other object.
|
Length |
getOverlapRear()
Return the (perceived) rear overlap to the other object.
|
Speed |
getSpeed() |
boolean |
isAhead() |
boolean |
isBehind() |
boolean |
isParallel() |
String |
toString() |
public HeadwayDistance(double distance)
distance - double; the distance that needs to be stored.public HeadwayDistance(Length distance)
distance - Length; the distance that needs to be stored.public final String getId()
getId in interface IdentifiablegetId in interface Headwaypublic final Length getLength()
public final Speed getSpeed()
public final Length getDistance()
getDistance in interface Headwaypublic final Headway.ObjectType getObjectType()
getObjectType in interface Headwaypublic final Acceleration getAcceleration()
getAcceleration in interface Headwaypublic final Length getOverlapFront()
----------
| GTU 1 | ----->
----------
---------------
| GTU 2 | ----->
---------------
| a | b | c |
getOverlapFront in interface Headwaypublic final Length getOverlapRear()
----------
| GTU 1 | ----->
----------
---------------
| GTU 2 | ----->
---------------
| a | b | c |
getOverlapRear in interface Headwaypublic final Length getOverlap()
----------
| GTU 1 | ----->
----------
---------------
| GTU 2 | ----->
---------------
| a | b | c |
getOverlap in interface Headwaypublic final boolean isAhead()
public final boolean isBehind()
public final boolean isParallel()
isParallel in interface HeadwayCopyright © 2014–2019 Delft University of Technology. All rights reserved.