Interface AccelerationIncentive
- All Known Implementing Classes:
AccelerationBusStop,AccelerationConflicts,AccelerationNoRightOvertake,AccelerationSpeedLimitTransition,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-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 Summary
Modifier and TypeMethodDescriptionvoidaccelerate(SimpleOperationalPlan simplePlan, RelativeLane lane, Length mergeDistance, LaneBasedGtu gtu, LanePerception perception, CarFollowingModel carFollowingModel, Speed speed, Parameters params, SpeedLimitInfo speedLimitInfo) Determine acceleration.default <T extends PerceivedLaneBasedObject>
Iterable<T>onRoute(Iterable<T> iterable, LaneBasedGtu gtu) Returns an iterable with only those lane-based objects that are on the route, accounting for longitudinal direction of the GTU type.
-
Method Details
-
accelerate
void accelerate(SimpleOperationalPlan simplePlan, RelativeLane lane, Length mergeDistance, LaneBasedGtu gtu, LanePerception perception, CarFollowingModel carFollowingModel, Speed speed, Parameters params, SpeedLimitInfo speedLimitInfo) throws ParameterException, GtuException Determine acceleration.- Parameters:
simplePlan- simple plan to set the accelerationlane- lane on which to consider the accelerationmergeDistance- distance over which a lane change is impossiblegtu- gtuperception- perceptioncarFollowingModel- car-following modelspeed- current speedparams- parametersspeedLimitInfo- speed limit info- Throws:
ParameterException- on missing parameterGtuException- when there is a problem with the state of the GTU when planning a path
-
onRoute
default <T extends PerceivedLaneBasedObject> Iterable<T> onRoute(Iterable<T> iterable, LaneBasedGtu gtu) 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- iterablegtu- gtu- Returns:
- iterable with only those lane-based objects that are on the route
-