Interface HeadwayGTU
-
- All Superinterfaces:
Comparable<Headway>
,Headway
,Identifiable
,PerceivedObject
,Serializable
- All Known Implementing Classes:
AbstractHeadwayGTU
,HeadwayGTUPerceived
,HeadwayGTUReal
,HeadwayGTURealCopy
,HeadwayGTUSimple
,HeadwayGTUType
public interface HeadwayGTU extends Headway
Interface for perceived surrounding GTU's.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 24 mrt. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
Headway.ObjectType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CarFollowingModel
getCarFollowingModel()
Many models that observe a GTU need to predict the imminent behavior of that GTU.Speed
getDesiredSpeed()
Returns the perceived desired speed of the neighbor.GTUType
getGtuType()
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.Length
getWidth()
Returns the width of the GTU.boolean
isBrakingLightsOn()
boolean
isEmergencyLightsOn()
boolean
isFacingSameDirection()
boolean
isHonking()
boolean
isLeftTurnIndicatorOn()
boolean
isRightTurnIndicatorOn()
HeadwayGTU
moved(Length headway, Speed speed, Acceleration acceleration)
Creates a copy with different headway, speed and possibly acceleration.-
Methods inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
compareTo, getAcceleration, getDistance, getId, getLength, getObjectType, getOverlap, getOverlapFront, getOverlapRear, getSpeed, isAhead, isBehind, isParallel
-
-
-
-
Method Detail
-
getGtuType
GTUType getGtuType()
- Returns:
- gtuType
-
isFacingSameDirection
boolean isFacingSameDirection()
- Returns:
- facingSameDirection
-
isBrakingLightsOn
boolean isBrakingLightsOn()
- Returns:
- were the braking lights on?
-
isLeftTurnIndicatorOn
boolean isLeftTurnIndicatorOn()
- Returns:
- was the left turn indicator on?
-
isRightTurnIndicatorOn
boolean isRightTurnIndicatorOn()
- Returns:
- was the right turn indicator on?
-
isEmergencyLightsOn
boolean isEmergencyLightsOn()
- Returns:
- were the emergency lights on?
-
isHonking
boolean isHonking()
- Returns:
- was the vehicle honking or ringing its bell when being observed for the headway?
-
moved
HeadwayGTU moved(Length headway, Speed speed, Acceleration acceleration)
Creates a copy with different headway, speed and possibly acceleration. It may not be alongside. This method is used to anticipate movement of a neighboring GTU.- Parameters:
headway
- Length; headwayspeed
- Speed; speedacceleration
- Acceleration; acceleration- Returns:
- copy with different headway, speed and possibly acceleration
-
getCarFollowingModel
CarFollowingModel getCarFollowingModel()
Many models that observe a GTU need to predict the imminent behavior of that GTU. Having a car following model of the observed GTU can help with that. The car following model that is returned can be on a continuum between the actual car following model of the observed GTU and the own car following model of the observing GTU, not making any assumptions about the observed GTU. When successive observations of the GTU take place, parameters about its behavior can be estimated more accurately. Another interesting easy-to-implement solution is to return a car following model per GTU type, where the following model of a truck can differ from that of a car.- Returns:
- a car following model that represents the expected behavior of the observed GTU
-
getParameters
Parameters getParameters()
Many models that observe a GTU need to predict the imminent behavior of that GTU. Having an estimate of the behavioral characteristics of the observed GTU can help with that. The parameters that are returned can be on a continuum between the actual parameters of the observed GTU and the own parameters of the observing GTU, not making any assumptions about the observed GTU. When successive observations of the GTU take place, parameters about its behavior can be estimated more accurately. Another interesting easy-to-implement solution is to return a set of parameters per GTU type, where the parameters of a truck can differ from that of a car.- Returns:
- the parameters that represent the expected behavior of the observed GTU
-
getSpeedLimitInfo
SpeedLimitInfo getSpeedLimitInfo()
Many models that observe a GTU need to predict the imminent behavior of that GTU. Having a model of the speed info profile for the observed GTU can help with predicting its future behavior. The speed limit info that is returned can be on a continuum between the actual speed limit model of the observed GTU and the own speed limit model of the observing GTU, not making any assumptions about the observed GTU. When successive observations of the GTU take place, parameters about its behavior, such as the maximum speed it accepts, can be estimated more accurately. Another interesting easy-to-implement solution is to return a speed limit info object per GTU type, where the returned information of a truck -- with a maximum allowed speed on 80 km/h -- can differ from that of a car -- which can have a maximum allowed speed of 100 km/h on the same road.- Returns:
- a speed limit model that helps in determining the expected behavior of the observed GTU
-
getRoute
Route getRoute()
Models responding to other GTU may assume a route of the vehicle, for instance at intersections. The route may be short, i.e. only over the next intersection. Implementations may return anything from the actual route, a route based on indicators and other assumptions, ornull
if simply not known/estimated.- Returns:
- route of gtu
-
getDesiredSpeed
Speed getDesiredSpeed()
Returns the perceived desired speed of the neighbor.- Returns:
- Speed; perceived desired speed of the neighbor
-
getWidth
Length getWidth()
Returns the width of the GTU.- Returns:
- Length; width of the GTU
-
-