Interface AccelerationIncentive

All Known Implementing Classes:
AccelerationBusStop, AccelerationConflicts, AccelerationLaneChangers, AccelerationNoSlowLaneOvertake, AccelerationSpeedTransition, AccelerationTrafficLights
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AccelerationIncentive
Interface for acceleration incentives.

Copyright (c) 2013-2026 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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.djunits.value.vdouble.scalar.Acceleration
    Field to return when there is no reason to accelerate/decelerate.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.djunits.value.vdouble.scalar.Acceleration
    accelerate(TacticalContextEgo context, RelativeLane lane, org.djunits.value.vdouble.scalar.Length mergeDistance)
    Determine acceleration.
    static <T extends PerceivedLaneBasedObject>
    Iterable<T>
    onRoad(Iterable<T> iterable, RelativeLane lane, org.djunits.value.vdouble.scalar.Length mergeDistance)
    Returns an iterable with only those lane-based objects that are on the same road, i.e. only downstream of a possible merge.
    static <T extends PerceivedLaneBasedObject>
    Iterable<T>
    onRoute(Iterable<T> iterable, Route route)
    Returns an iterable with only those lane-based objects that are on the route, accounting for longitudinal direction of the GTU type.
  • Field Details

    • NO_REASON

      static final org.djunits.value.vdouble.scalar.Acceleration NO_REASON
      Field to return when there is no reason to accelerate/decelerate.
  • Method Details

    • accelerate

      org.djunits.value.vdouble.scalar.Acceleration accelerate(TacticalContextEgo context, RelativeLane lane, org.djunits.value.vdouble.scalar.Length mergeDistance) throws ParameterException, GtuException
      Determine acceleration.
      Parameters:
      context - tactical information such as parameters and car-following model
      lane - lane on which to consider the acceleration
      mergeDistance - distance over which a lane change is impossible
      Returns:
      acceleration
      Throws:
      ParameterException - on missing parameter
      GtuException - when there is a problem with the state of the GTU when planning a path
    • onRoad

      static <T extends PerceivedLaneBasedObject> Iterable<T> onRoad(Iterable<T> iterable, RelativeLane lane, org.djunits.value.vdouble.scalar.Length mergeDistance)
      Returns an iterable with only those lane-based objects that are on the same road, i.e. only downstream of a possible merge.
      Type Parameters:
      T - type of lane-based object
      Parameters:
      iterable - iterable
      lane - lane of objects
      mergeDistance - distance within which the lane and current lane merge
      Returns:
      iterable with only those lane-based objects that are on the route
      Throws:
      NullPointerException - when any input is null
    • onRoute

      static <T extends PerceivedLaneBasedObject> Iterable<T> onRoute(Iterable<T> iterable, Route route)
      Returns an iterable with only those lane-based objects that are on the route, accounting for longitudinal direction of the GTU type.
      Type Parameters:
      T - type of lane-based object
      Parameters:
      iterable - iterable
      route - route, may be null
      Returns:
      iterable with only those lane-based objects that are on the route
      Throws:
      NullPointerException - when any input is null