public abstract class AbstractHeadway extends Object implements Headway
AbstractHeadwayCopy (and all it's sub classes), which contains such information
directly, and is a super class for delayed and/or erroneous perception.
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.
Headway.ObjectType| Modifier | Constructor and Description |
|---|---|
|
AbstractHeadway(org.djunits.value.vdouble.scalar.Length distance)
Construct a new Headway information object, for an object ahead of us or behind us.
|
|
AbstractHeadway(org.djunits.value.vdouble.scalar.Length overlapFront,
org.djunits.value.vdouble.scalar.Length overlap,
org.djunits.value.vdouble.scalar.Length overlapRear)
Construct a new Headway information object, for an object parallel with us.
|
protected |
AbstractHeadway(org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Length overlapFront,
org.djunits.value.vdouble.scalar.Length overlap,
org.djunits.value.vdouble.scalar.Length overlapRear)
Construct a new Headway information object, for an object in front, behind, or in parallel with us.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.djunits.value.vdouble.scalar.Length |
getDistance()
Retrieve the strongly typed distance to the other object.
|
org.djunits.value.vdouble.scalar.Length |
getOverlap()
Return the (perceived) overlap with the other object.
|
org.djunits.value.vdouble.scalar.Length |
getOverlapFront()
Return the (perceived) front overlap to the other object.
|
org.djunits.value.vdouble.scalar.Length |
getOverlapRear()
Return the (perceived) rear overlap to the other object.
|
int |
hashCode() |
boolean |
isAhead() |
boolean |
isBehind() |
boolean |
isParallel() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTo, getAcceleration, getId, getLength, getObjectType, getSpeedprotected AbstractHeadway(org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Length overlapFront,
org.djunits.value.vdouble.scalar.Length overlap,
org.djunits.value.vdouble.scalar.Length overlapRear)
throws org.opentrafficsim.core.gtu.GTUException
distance - the distance to the other objectoverlapFront - the front-front distance to the other objectoverlap - the 'center' overlap with the other objectoverlapRear - the rear-rear distance to the other objectorg.opentrafficsim.core.gtu.GTUException - when id is null, or parameters are inconsistentpublic AbstractHeadway(org.djunits.value.vdouble.scalar.Length distance)
throws org.opentrafficsim.core.gtu.GTUException
distance - the distance to the other object; if this constructor is used, distance cannot be null.org.opentrafficsim.core.gtu.GTUException - when id is null, or parameters are inconsistentpublic AbstractHeadway(org.djunits.value.vdouble.scalar.Length overlapFront,
org.djunits.value.vdouble.scalar.Length overlap,
org.djunits.value.vdouble.scalar.Length overlapRear)
throws org.opentrafficsim.core.gtu.GTUException
overlapFront - the front-front distance to the other object; if this constructor is used, this value cannot be null.overlap - the 'center' overlap with the other object; if this constructor is used, this value cannot be null.overlapRear - the rear-rear distance to the other object; if this constructor is used, this value cannot be null.org.opentrafficsim.core.gtu.GTUException - when id is null, or parameters are inconsistentpublic final org.djunits.value.vdouble.scalar.Length getDistance()
getDistance in interface Headwaypublic final org.djunits.value.vdouble.scalar.Length getOverlapFront()
----------
| GTU 1 | ----->
----------
---------------
| GTU 2 | ----->
---------------
| a | b | c |
getOverlapFront in interface Headwaypublic final org.djunits.value.vdouble.scalar.Length getOverlapRear()
----------
| GTU 1 | ----->
----------
---------------
| GTU 2 | ----->
---------------
| a | b | c |
getOverlapRear in interface Headwaypublic final org.djunits.value.vdouble.scalar.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–2017 Delft University of Technology. All rights reserved.