public class HeadwayGTUSimple extends AbstractHeadwayGTU
Copyright (c) 2013-2018 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 |
---|
HeadwayGTUSimple(String id,
GTUType gtuType,
Length overlapFront,
Length overlap,
Length overlapRear,
Length length,
Length width,
Speed speed,
Acceleration acceleration,
Speed desiredSpeed,
GTUStatus... gtuStatus)
Construct a new Headway information object, for a moving GTU parallel with us.
|
HeadwayGTUSimple(String id,
GTUType gtuType,
Length overlapFront,
Length overlap,
Length overlapRear,
Length length,
Length width,
Speed desiredSpeed,
GTUStatus... gtuStatus)
Construct a new Headway information object, for a non-moving GTU parallel with us.
|
HeadwayGTUSimple(String id,
GTUType gtuType,
Length distance,
Length length,
Length width,
Speed speed,
Acceleration acceleration,
Speed desiredSpeed,
GTUStatus... gtuStatus)
Construct a new Headway information object, for a moving GTU ahead of us or behind us.
|
HeadwayGTUSimple(String id,
GTUType gtuType,
Length distance,
Length length,
Length width,
Speed desiredSpeed,
GTUStatus... gtuStatus)
Construct a new Headway information object, for a non-moving GTU ahead of us or behind us.
|
Modifier and Type | Method and Description |
---|---|
CarFollowingModel |
getCarFollowingModel()
Many models that observe a GTU need to predict the imminent behavior of that GTU.
|
Parameters |
getParameters()
Many models that observe a GTU need to predict the imminent behavior of that GTU.
|
Route |
getRoute()
Models responding to other GTU may assume a route of the vehicle, for instance at intersections.
|
SpeedLimitInfo |
getSpeedLimitInfo()
Many models that observe a GTU need to predict the imminent behavior of that GTU.
|
AbstractHeadwayGTU |
moved(Length headway,
Speed speed,
Acceleration acceleration)
Creates a copy with different headway, speed and possibly acceleration.
|
String |
toString() |
getDesiredSpeed, getGtuStatus, getGTUStatuses, getGtuType, getSpeedLimitInfo, getWidth, isBrakingLightsOn, isEmergencyLightsOn, isFacingSameDirection, isHonking, isLeftTurnIndicatorOn, isRightTurnIndicatorOn
equals, getAcceleration, getId, getLength, getObjectType, getSpeed, hashCode
getDistance, getOverlap, getOverlapFront, getOverlapRear, isAhead, isBehind, isParallel
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getAcceleration, getDistance, getId, getLength, getObjectType, getOverlap, getOverlapFront, getOverlapRear, getSpeed, isAhead, isBehind, isParallel
public HeadwayGTUSimple(String id, GTUType gtuType, Length distance, Length length, Length width, Speed speed, Acceleration acceleration, Speed desiredSpeed, GTUStatus... gtuStatus) throws 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.length
- the length of the other object; if this constructor is used, length cannot be null.width
- the (perceived) width 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.desiredSpeed
- desired speedgtuStatus
- the observable characteristics of the GTU.GTUException
- when id is null, objectType is null, or parameters are inconsistentpublic HeadwayGTUSimple(String id, GTUType gtuType, Length distance, Length length, Length width, Speed desiredSpeed, GTUStatus... gtuStatus) throws GTUException
id
- the id of the GTU for comparison purposes, can not be null.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.length
- the length of the other object; if this constructor is used, length cannot be null.width
- the (perceived) width of the other object; can not be null.desiredSpeed
- desired speedgtuStatus
- the observable characteristics of the GTU.GTUException
- when id is null, or parameters are inconsistentpublic HeadwayGTUSimple(String id, GTUType gtuType, Length overlapFront, Length overlap, Length overlapRear, Length length, Length width, Speed speed, Acceleration acceleration, Speed desiredSpeed, GTUStatus... gtuStatus) throws 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.length
- the length of the other object; if this constructor is used, length cannot be null.width
- the (perceived) width 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.desiredSpeed
- desired speedgtuStatus
- the observable characteristics of the GTU.GTUException
- when id is null, or parameters are inconsistentpublic HeadwayGTUSimple(String id, GTUType gtuType, Length overlapFront, Length overlap, Length overlapRear, Length length, Length width, Speed desiredSpeed, GTUStatus... gtuStatus) throws 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.length
- the length of the other object; if this constructor is used, length cannot be null.width
- the (perceived) width of the other object; can not be null.desiredSpeed
- desired speedgtuStatus
- the observable characteristics of the GTU.GTUException
- when id is null, or parameters are inconsistentpublic final CarFollowingModel getCarFollowingModel()
public final Parameters getParameters()
public final SpeedLimitInfo getSpeedLimitInfo()
public final Route getRoute()
null
if simply not known/estimated.public final AbstractHeadwayGTU moved(Length headway, Speed speed, Acceleration acceleration)
headway
- headwayspeed
- speedacceleration
- accelerationpublic final String toString()
toString
in class AbstractHeadwayGTU
Copyright © 2014–2018 Delft University of Technology. All rights reserved.