public abstract class AbstractHeadwayGTU extends AbstractHeadway
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractHeadwayGTU.GTUStatus
Observable characteristics of a GTU.
|
Headway.ObjectType
Constructor and Description |
---|
AbstractHeadwayGTU(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Length distance,
boolean facingSameDirection,
org.djunits.value.vdouble.scalar.Length length)
Construct a new Headway information object, for a non-moving GTU ahead of us or behind us.
|
AbstractHeadwayGTU(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Length distance,
boolean facingSameDirection,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
AbstractHeadwayGTU.GTUStatus... gtuStatus)
Construct a new Headway information object, for a moving GTU ahead of us or behind us.
|
AbstractHeadwayGTU(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Length overlapFront,
org.djunits.value.vdouble.scalar.Length overlap,
org.djunits.value.vdouble.scalar.Length overlapRear,
boolean facingSameDirection,
org.djunits.value.vdouble.scalar.Length length)
Construct a new Headway information object, for a non-moving GTU parallel with us.
|
AbstractHeadwayGTU(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
org.djunits.value.vdouble.scalar.Length overlapFront,
org.djunits.value.vdouble.scalar.Length overlap,
org.djunits.value.vdouble.scalar.Length overlapRear,
boolean facingSameDirection,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration)
Construct a new Headway information object, for a moving GTU parallel with us.
|
Modifier and Type | Method and Description |
---|---|
abstract org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics |
getBehavioralCharacteristics()
Many models that observe a GTU need to predict the imminent behavior of that GTU.
|
abstract CarFollowingModel |
getCarFollowingModel()
Many models that observe a GTU need to predict the imminent behavior of that GTU.
|
org.opentrafficsim.core.gtu.GTUType |
getGtuType() |
abstract SpeedLimitInfo |
getSpeedLimitInfo()
Many models that observe a GTU need to predict the imminent behavior of that GTU.
|
boolean |
isBrakingLightsOn() |
boolean |
isEmergencyLightsOn() |
boolean |
isFacingSameDirection() |
boolean |
isHonking() |
boolean |
isLeftTurnIndicatorOn() |
boolean |
isRightTurnIndicatorOn() |
String |
toString() |
equals, getAcceleration, getDistance, getId, getLength, getObjectType, getOverlap, getOverlapFront, getOverlapRear, getSpeed, hashCode, isAhead, isBehind, isParallel
public AbstractHeadwayGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length distance, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration, AbstractHeadwayGTU.GTUStatus... gtuStatus) throws org.opentrafficsim.core.gtu.GTUException
id
- the id of the GTU for comparison purposes, can not be null.gtuType
- the perceived GTU Type, or null if unknown.distance
- the distance to the other object; if this constructor is used, distance cannot be null.facingSameDirection
- whether the GTU is facing the same direction.length
- the (perceived) length of the other object; can not be null.speed
- the (perceived) speed of the other object; can be null if unknown.acceleration
- the (perceived) acceleration of the other object; can be null if unknown.gtuStatus
- the observable characteristics of the GTU.org.opentrafficsim.core.gtu.GTUException
- when id is null, objectType is null, or parameters are inconsistentpublic AbstractHeadwayGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length distance, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length length) throws org.opentrafficsim.core.gtu.GTUException
id
- String; the id of the GTU for comparison purposes, can not be null.gtuType
- GTUType; the perceived GTU Type, or null if unknown.distance
- Length; the distance to the other GTU; if this constructor is used, distance cannot be null.facingSameDirection
- whether the GTU is facing the same direction.length
- the (perceived) length of the other object; can not be null.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadwayGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length overlapFront, org.djunits.value.vdouble.scalar.Length overlap, org.djunits.value.vdouble.scalar.Length overlapRear, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) throws org.opentrafficsim.core.gtu.GTUException
id
- the id of the GTU for comparison purposes, can not be null.gtuType
- the perceived GTU Type, or null if unknown.overlapFront
- the front-front distance to the other GTU; if this constructor is used, this value cannot be null.overlap
- the 'center' overlap with the other GTU; if this constructor is used, this value cannot be null.overlapRear
- the rear-rear distance to the other GTU; if this constructor is used, this value cannot be null.facingSameDirection
- whether the GTU is facing the same direction.length
- the (perceived) length of the other object; can not be null.speed
- the (perceived) speed of the other GTU; can be null if unknown.acceleration
- the (perceived) acceleration of the other GTU; can be null if unknown.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadwayGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length overlapFront, org.djunits.value.vdouble.scalar.Length overlap, org.djunits.value.vdouble.scalar.Length overlapRear, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length length) throws org.opentrafficsim.core.gtu.GTUException
id
- the id of the GTU for comparison purposes, can not be null.gtuType
- the perceived GTU Type, or null if unknown.overlapFront
- the front-front distance to the other GTU; if this constructor is used, this value cannot be null.overlap
- the 'center' overlap with the other GTU; if this constructor is used, this value cannot be null.overlapRear
- the rear-rear distance to the other GTU; if this constructor is used, this value cannot be null.facingSameDirection
- whether the GTU is facing the same direction.length
- the (perceived) length of the other object; can not be null.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic final org.opentrafficsim.core.gtu.GTUType getGtuType()
public final boolean isFacingSameDirection()
public final boolean isBrakingLightsOn()
public final boolean isLeftTurnIndicatorOn()
public final boolean isRightTurnIndicatorOn()
public final boolean isEmergencyLightsOn()
public final boolean isHonking()
public abstract CarFollowingModel getCarFollowingModel()
public abstract org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics getBehavioralCharacteristics()
public abstract SpeedLimitInfo getSpeedLimitInfo()
public final String toString()
toString
in class AbstractHeadway
Copyright © 2014–2016 Delft University of Technology. All rights reserved.