Interface GtuFollowingModelOld

All Superinterfaces:
CarFollowingModel, DesiredHeadwayModel, DesiredSpeedModel, Initialisable
All Known Implementing Classes:
AbstractGtuFollowingModelMobil, FixedAccelerationModel, IdmOld, IdmPlusOld, SequentialFixedAccelerationModel

public interface GtuFollowingModelOld extends CarFollowingModel
GTU following model interface.
GTU following models following this interface compute an acceleration.

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
  • Field Summary

    Fields inherited from interface org.opentrafficsim.road.gtu.lane.tactical.following.CarFollowingModel

    CAR_FOLLOWING_MODEL
  • Method Summary

    Modifier and Type
    Method
    Description
    org.djunits.value.vdouble.scalar.Acceleration
    computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit)
    Compute the acceleration that would be used to follow a leader.
    org.djunits.value.vdouble.scalar.Acceleration
    computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize)
    Compute the acceleration that would be used to follow a leader.
    computeAccelerationStep(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Time currentTime)
    Compute the acceleration that would be used to follow a leader.
    computeAccelerationStep(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Time currentTime, org.djunits.value.vdouble.scalar.Duration stepSize)
    Compute the acceleration that would be used to follow a leader.
    computeAccelerationStep(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit)
    Compute the acceleration that would be used to follow a leader.
    computeAccelerationStep(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize)
    Compute the acceleration that would be used to follow a leader.
    computeAccelerationStepWithNoLeader(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit)
    Compute the acceleration that would be used if the is not leader in sight.
    computeAccelerationStepWithNoLeader(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize)
    Compute the acceleration that would be used if the is not leader in sight.
    computeDualAccelerationStep(LaneBasedGtu gtu, Collection<Headway> otherHeadways, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit)
    Compute the lowest accelerations (or most severe decelerations) that would be used if a referenceGTU is present (inserted, or not removed) in a set of other GTUs.
    If any GTU in the set of otherGTUs has a null headway (indicating that the other GTU is in fact parallel to the referenceGTU), prohibitive decelerations shall be returned.
    Two AccelerationStep values are returned in a DualAccelerationStep.
    or should slow down for a crossing from accelerating to unsafe speeds.
    computeDualAccelerationStep(LaneBasedGtu gtu, Collection<Headway> otherHeadways, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize)
    Compute the lowest accelerations (or most severe decelerations) that would be used if a referenceGTU is present (inserted, or not removed) in a set of other GTUs.
    If any GTU in the set of otherGTUs has a null headway (indicating that the other GTU is in fact parallel to the referenceGTU), prohibitive decelerations shall be returned.
    Two AccelerationStep values are returned in a DualAccelerationStep.
    or should slow down for a crossing from accelerating to unsafe speeds.
    org.djunits.value.vdouble.scalar.Acceleration
    Return the maximum safe deceleration for use in gap acceptance models.
    org.djunits.value.vdouble.scalar.Duration
    Return the standard step size of this GTU following model.
    org.djunits.value.vdouble.scalar.Length
    minimumHeadway(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length precision, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed)
    Compute the minimum net headway given the speed of the follower and the leader.
    At the returned headway, the follower would decelerate with it's maximum comfortable deceleration.
    void
    setA(org.djunits.value.vdouble.scalar.Acceleration a)
    Set value of acceleration parameter.
    void
    setFspeed(double fSpeed)
    Set value of desired speed factor.
    void
    setT(org.djunits.value.vdouble.scalar.Duration t)
    Set value of desired headway.

    Methods inherited from interface org.opentrafficsim.road.gtu.lane.tactical.following.CarFollowingModel

    followingAcceleration, getLongName, getName, init

    Methods inherited from interface org.opentrafficsim.road.gtu.lane.tactical.following.DesiredHeadwayModel

    desiredHeadway

    Methods inherited from interface org.opentrafficsim.road.gtu.lane.tactical.following.DesiredSpeedModel

    desiredSpeed
  • Method Details

    • computeAccelerationStep

      AccelerationStep computeAccelerationStep(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit) throws GtuException
      Compute the acceleration that would be used to follow a leader.
      Parameters:
      gtu - LaneBasedGtu; the GTU for which acceleration is computed
      leaderSpeed - Speed; the speed of the leader
      headway - Length; the headway of the leader
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      Returns:
      AccelerationStep; the result of application of the GTU following model
      Throws:
      GtuException - when the speed of the gtu cannot be determined
    • computeAccelerationStep

      AccelerationStep computeAccelerationStep(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize) throws GtuException
      Compute the acceleration that would be used to follow a leader.
      Parameters:
      gtu - LaneBasedGtu; the GTU for which acceleration is computed
      leaderSpeed - Speed; the speed of the leader
      headway - Length; the headway of the leader
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      stepSize - Duration; given step size, which can be longer or shorter than the provided step size in the algorithms.
      Returns:
      AccelerationStep; the result of application of the GTU following model
      Throws:
      GtuException - when the speed of the gtu cannot be determined
    • computeAcceleration

      org.djunits.value.vdouble.scalar.Acceleration computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit)
      Compute the acceleration that would be used to follow a leader.
      Parameters:
      followerSpeed - Speed; the speed of the follower at the current time
      followerMaximumSpeed - Speed; the maximum speed that the follower is capable of driving at
      leaderSpeed - Speed; the speed of the follower at the current time
      headway - Length; the net headway (distance between the front of the follower to the rear of the leader) at the current time, or the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      Returns:
      Acceleration; the acceleration (or, if negative, deceleration) resulting from application of the GTU following model
    • computeAcceleration

      org.djunits.value.vdouble.scalar.Acceleration computeAcceleration(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize)
      Compute the acceleration that would be used to follow a leader.
      Parameters:
      followerSpeed - Speed; the speed of the follower at the current time
      followerMaximumSpeed - Speed; the maximum speed that the follower is capable of driving at
      leaderSpeed - Speed; the speed of the follower at the current time
      headway - Length; the net headway (distance between the front of the follower to the rear of the leader) at the current time, or the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      stepSize - Duration; given step size, which can be longer or shorter than the provided step size in the algorithms.
      Returns:
      Acceleration; the acceleration (or, if negative, deceleration) resulting from application of the GTU following model
    • computeAccelerationStep

      AccelerationStep computeAccelerationStep(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Time currentTime)
      Compute the acceleration that would be used to follow a leader.
      Parameters:
      followerSpeed - Speed; the speed of the follower at the current time
      leaderSpeed - Speed; the speed of the follower at the current time
      headway - Length; the net headway (distance between the front of the follower to the rear of the leader) at the current time, or the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      currentTime - Time; to be used to determine the validity of the AccelerationStep
      Returns:
      Acceleration; the acceleration (or, if negative, deceleration) resulting from application of the GTU following model
    • computeAccelerationStep

      AccelerationStep computeAccelerationStep(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length headway, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Time currentTime, org.djunits.value.vdouble.scalar.Duration stepSize)
      Compute the acceleration that would be used to follow a leader.
      Parameters:
      followerSpeed - Speed; the speed of the follower at the current time
      leaderSpeed - Speed; the speed of the follower at the current time
      headway - Length; the net headway (distance between the front of the follower to the rear of the leader) at the current time, or the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      currentTime - Time; to be used to determine the validity of the AccelerationStep
      stepSize - Duration; given step size, which can be longer or shorter than the provided step size in the algorithms.
      Returns:
      Acceleration; the acceleration (or, if negative, deceleration) resulting from application of the GTU following model
    • computeDualAccelerationStep

      DualAccelerationStep computeDualAccelerationStep(LaneBasedGtu gtu, Collection<Headway> otherHeadways, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit) throws GtuException
      Compute the lowest accelerations (or most severe decelerations) that would be used if a referenceGTU is present (inserted, or not removed) in a set of other GTUs.
      If any GTU in the set of otherGTUs has a null headway (indicating that the other GTU is in fact parallel to the referenceGTU), prohibitive decelerations shall be returned.
      Two AccelerationStep values are returned in a DualAccelerationStep.
      or should slow down for a crossing from accelerating to unsafe speeds.
      Parameters:
      gtu - LaneBasedGtu; the GTU for which the accelerations are computed
      otherHeadways - Collection<Headway>; the other GTUs. A negative headway value indicates that the other GTU is a follower. NB. If the referenceGTU is contained in this Collection, it is ignored.
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      Returns:
      DualAccelerationStep; the result with the lowest accelerations (or most severe decelerations) of application of the GTU following model of the referenceGTU for each leader and follower
      Throws:
      GtuException - when the speed of the gtu cannot be determined
    • computeDualAccelerationStep

      DualAccelerationStep computeDualAccelerationStep(LaneBasedGtu gtu, Collection<Headway> otherHeadways, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize) throws GtuException
      Compute the lowest accelerations (or most severe decelerations) that would be used if a referenceGTU is present (inserted, or not removed) in a set of other GTUs.
      If any GTU in the set of otherGTUs has a null headway (indicating that the other GTU is in fact parallel to the referenceGTU), prohibitive decelerations shall be returned.
      Two AccelerationStep values are returned in a DualAccelerationStep.
      or should slow down for a crossing from accelerating to unsafe speeds.
      Parameters:
      gtu - LaneBasedGtu; the GTU for which the accelerations are computed
      otherHeadways - Collection<Headway>; the other GTUs. A negative headway value indicates that the other GTU is a follower. NB. If the referenceGTU is contained in this Collection, it is ignored.
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      stepSize - Duration; given step size, which can be longer or shorter than the provided step size in the algorithms.
      Returns:
      DualAccelerationStep; the result with the lowest accelerations (or most severe decelerations) of application of the GTU following model of the referenceGTU for each leader and follower
      Throws:
      GtuException - when the speed of the gtu cannot be determined
    • computeAccelerationStepWithNoLeader

      AccelerationStep computeAccelerationStepWithNoLeader(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit) throws GtuException
      Compute the acceleration that would be used if the is not leader in sight.
      Parameters:
      gtu - LaneBasedGtu; the GTU for which acceleration is computed
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      Returns:
      AccelerationStep; the result of application of the GTU following model
      Throws:
      GtuException - when the speed of the gtu cannot be determined
    • computeAccelerationStepWithNoLeader

      AccelerationStep computeAccelerationStepWithNoLeader(LaneBasedGtu gtu, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Duration stepSize) throws GtuException
      Compute the acceleration that would be used if the is not leader in sight.
      Parameters:
      gtu - LaneBasedGtu; the GTU for which acceleration is computed
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      stepSize - Duration; given step size, which can be longer or shorter than the provided step size in the algorithms.
      Returns:
      AccelerationStep; the result of application of the GTU following model
      Throws:
      GtuException - when the speed of the gtu cannot be determined
    • minimumHeadway

      org.djunits.value.vdouble.scalar.Length minimumHeadway(org.djunits.value.vdouble.scalar.Speed followerSpeed, org.djunits.value.vdouble.scalar.Speed leaderSpeed, org.djunits.value.vdouble.scalar.Length precision, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Speed followerMaximumSpeed)
      Compute the minimum net headway given the speed of the follower and the leader.
      At the returned headway, the follower would decelerate with it's maximum comfortable deceleration.
      Parameters:
      followerSpeed - Speed; speed of the follower
      leaderSpeed - Speed; speed of the leader
      precision - Length; the required precision of the result (must be > 0)
      maxDistance - Length; the maximum distance we can cover at the current time, e.g. as the result of a lane drop
      speedLimit - Speed; the local speed limit
      followerMaximumSpeed - Speed; the maximum speed that the follower can drive at
      Returns:
      Length
    • getMaximumSafeDeceleration

      org.djunits.value.vdouble.scalar.Acceleration getMaximumSafeDeceleration()
      Return the maximum safe deceleration for use in gap acceptance models. This is the deceleration that may be enforced upon a new follower due to entering a road or changing into an adjacent lane. The result shall be a positive value. In most car following models this value is named b.
      Returns:
      Acceleration; must be a positive value!
    • getStepSize

      org.djunits.value.vdouble.scalar.Duration getStepSize()
      Return the standard step size of this GTU following model.
      Returns:
      Duration; the standard step size of the GTU following model
    • setA

      void setA(org.djunits.value.vdouble.scalar.Acceleration a)
      Set value of acceleration parameter.
      Parameters:
      a - Acceleration; value to set
    • setT

      void setT(org.djunits.value.vdouble.scalar.Duration t)
      Set value of desired headway.
      Parameters:
      t - Duration; desired headway
    • setFspeed

      void setFspeed(double fSpeed)
      Set value of desired speed factor.
      Parameters:
      fSpeed - double; desired speed factor