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 Identifiable
getId
in interface Headway
public final Length getLength()
public final Speed getSpeed()
public final Length getDistance()
getDistance
in interface Headway
public final Headway.ObjectType getObjectType()
getObjectType
in interface Headway
public final Acceleration getAcceleration()
getAcceleration
in interface Headway
public final Length getOverlapFront()
---------- | GTU 1 | -----> ---------- --------------- | GTU 2 | -----> --------------- | a | b | c |
getOverlapFront
in interface Headway
public final Length getOverlapRear()
---------- | GTU 1 | -----> ---------- --------------- | GTU 2 | -----> --------------- | a | b | c |
getOverlapRear
in interface Headway
public final Length getOverlap()
---------- | GTU 1 | -----> ---------- --------------- | GTU 2 | -----> --------------- | a | b | c |
getOverlap
in interface Headway
public final boolean isAhead()
public final boolean isBehind()
public final boolean isParallel()
isParallel
in interface Headway
Copyright © 2014–2019 Delft University of Technology. All rights reserved.