Interface VehicleModel

All Known Implementing Classes:
VehicleModel.MassBased

public interface VehicleModel
Interface for vehicle models.

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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Defines (fixed) mass and moment of inertia about z-axis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final VehicleModel
    Acceleration bounded by GTU min and max acceleration.
    static final VehicleModel
    No bounds.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.djunits.value.vdouble.scalar.Acceleration
    boundAcceleration(org.djunits.value.vdouble.scalar.Acceleration acceleration, LaneBasedGtu gtu)
    Returns a bounded acceleration.
    default org.djunits.value.vdouble.scalar.Mass
    GTU mass.
    default double
    Moment of inertia about z-axis and center point of gravity.
    default boolean
    isBrakingLightsOn(org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration)
    Returns whether the braking lights are on.
  • Field Details

    • NONE

      static final VehicleModel NONE
      No bounds.
    • MINMAX

      static final VehicleModel MINMAX
      Acceleration bounded by GTU min and max acceleration.
  • Method Details

    • boundAcceleration

      org.djunits.value.vdouble.scalar.Acceleration boundAcceleration(org.djunits.value.vdouble.scalar.Acceleration acceleration, LaneBasedGtu gtu)
      Returns a bounded acceleration.
      Parameters:
      acceleration - intended acceleration
      gtu - gtu
      Returns:
      possible acceleration
    • getMass

      default org.djunits.value.vdouble.scalar.Mass getMass()
      GTU mass.
      Returns:
      GTU mass
    • getMomentOfInertiaAboutZ

      default double getMomentOfInertiaAboutZ()
      Moment of inertia about z-axis and center point of gravity.
      Returns:
      moment of inertia about z-axis
    • isBrakingLightsOn

      default boolean isBrakingLightsOn(org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration)
      Returns whether the braking lights are on. The default implementation returns true if the deceleration is larger than a speed-dependent threshold given by:

      c0 * g(v) + c1 + c3*v^2

      where c0 = 0.2, c1 = 0.15 and c3 = 0.00025 (with c2 = 0 implicit) are empirically derived averages, and g(v) is 0 below 25 km/h or 1 otherwise, representing that the engine is disengaged at low speeds.
      Parameters:
      speed - speed
      acceleration - acceleration
      Returns:
      whether the braking lights are on