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.
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
FieldsModifier and TypeFieldDescriptionstatic final org.djunits.value.vdouble.scalar.AccelerationField to return when there is no reason to accelerate/decelerate. -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.Accelerationaccelerate(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>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_REASONField 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 modellane- lane on which to consider the accelerationmergeDistance- distance over which a lane change is impossible- Returns:
- acceleration
- Throws:
ParameterException- on missing parameterGtuException- 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- iterablelane- lane of objectsmergeDistance- 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 isnull
-
onRoute
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- iterableroute- route, may benull- Returns:
- iterable with only those lane-based objects that are on the route
- Throws:
NullPointerException- when any input isnull
-