Interface LaneChangeModel
- All Known Implementing Classes:
AbstractLaneChangeModel
,Altruistic
,Egoistic
,FixedLaneChangeModel
public interface LaneChangeModel
All lane change models must implement this interface.
TODO: Lane change models should use the perceived nearby GTUs rather than a provided list of same lane traffic, etc.
TODO: Lane change models should use the perceived nearby GTUs rather than a provided list of same lane traffic, etc.
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
-
Method Summary
Modifier and TypeMethodDescriptioncomputeLaneChangeAndAcceleration
(LaneBasedGtu gtu, Collection<Headway> sameLaneTraffic, Collection<Headway> rightLaneTraffic, Collection<Headway> leftLaneTraffic, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Acceleration preferredLaneRouteIncentive, org.djunits.value.vdouble.scalar.Acceleration laneChangeThreshold, org.djunits.value.vdouble.scalar.Acceleration nonPreferredLaneRouteIncentive) Compute the acceleration and lane change.Return complete textual information about this instantiation of this GTU following model.getName()
Return the name of this GTU following model.
-
Method Details
-
computeLaneChangeAndAcceleration
LaneMovementStep computeLaneChangeAndAcceleration(LaneBasedGtu gtu, Collection<Headway> sameLaneTraffic, Collection<Headway> rightLaneTraffic, Collection<Headway> leftLaneTraffic, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Acceleration preferredLaneRouteIncentive, org.djunits.value.vdouble.scalar.Acceleration laneChangeThreshold, org.djunits.value.vdouble.scalar.Acceleration nonPreferredLaneRouteIncentive) throws GtuException, org.opentrafficsim.base.parameters.ParameterException, OperationalPlanException Compute the acceleration and lane change.- Parameters:
gtu
- LaneBasedGtu; the GTU for which the acceleration and lane change is computedsameLaneTraffic
- Collection<Headway>; the set of observable GTUs in the current lane (can not be null and may include thegtu
)rightLaneTraffic
- Collection<Headway>; the set of observable GTUs in the adjacent lane where GTUs should drive in the absence of other traffic (must be null if there is no such lane)leftLaneTraffic
- Collection<Headway>; the set of observable GTUs in the adjacent lane into which GTUs should merge to overtake other traffic (must be null if there is no such lane)speedLimit
- Speed; the local speed limitpreferredLaneRouteIncentive
- Acceleration; route incentive to merge to the adjacent lane where GTUs should drive in the absence of other trafficlaneChangeThreshold
- Acceleration; threshold that prevents lane changes that have very little benefitnonPreferredLaneRouteIncentive
- Acceleration; route incentive to merge to the adjacent lane into which GTUs should merge to overtake other traffic- Returns:
- LaneMovementStep; the result of the lane change and GTU following model
- Throws:
GtuException
- when the speed of the GTU can not be determinedorg.opentrafficsim.base.parameters.ParameterException
- in case of a parameter problem.OperationalPlanException
- if DefaultAlexander perception category is not present.
-
getName
String getName()Return the name of this GTU following model.- Returns:
- String; just the name of the GTU following model
-
getLongName
String getLongName()Return complete textual information about this instantiation of this GTU following model.- Returns:
- String; the name and parameter values of the GTU following model
-