All Superinterfaces:
Comparable<Headway>, Headway, org.djutils.base.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-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • 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(org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.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; headway
      speed - Speed; speed
      acceleration - 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

      org.opentrafficsim.base.parameters.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, or null if simply not known/estimated.
      Returns:
      route of gtu
    • getDesiredSpeed

      org.djunits.value.vdouble.scalar.Speed getDesiredSpeed()
      Returns the perceived desired speed of the neighbor.
      Returns:
      Speed; perceived desired speed of the neighbor
    • getWidth

      org.djunits.value.vdouble.scalar.Length getWidth()
      Returns the width of the GTU.
      Returns:
      Length; width of the GTU